/*
 * Full Path: /home/u339835642/domains/carpravas.co.in/public_html/assets/common/css/premium.css
 * Purpose: Global premium CarPravas Blue-Green brand system, app shell, topbar, role pill and polished common UI.
 */

:root {
    --premium-bg: #06111f;
    --premium-bg-soft: #091a2d;
    --premium-bg-glow-blue: rgba(16, 157, 245, .18);
    --premium-bg-glow-green: rgba(105, 239, 98, .12);

    --premium-surface: rgba(13, 30, 51, .88);
    --premium-surface-strong: #0f2035;
    --premium-surface-soft: rgba(255, 255, 255, .065);
    --premium-surface-hover: rgba(16, 157, 245, .105);

    --premium-text: #f7fbff;
    --premium-muted: #91a8c1;

    --premium-border: rgba(111, 177, 226, .18);
    --premium-border-strong: rgba(57, 187, 255, .42);

    --premium-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    --premium-shadow-soft: 0 13px 34px rgba(0, 0, 0, .20);
    --premium-glow: 0 0 0 1px rgba(39, 190, 255, .10), 0 18px 46px rgba(16, 157, 245, .14);

    --premium-radius-xl: 30px;
    --premium-radius-lg: 22px;
    --premium-radius-md: 16px;

    --premium-accent: linear-gradient(135deg, var(--brand-blue) 0%, #24c2ff 42%, var(--brand-green) 100%);
    --premium-accent-soft: linear-gradient(135deg, rgba(16, 157, 245, .18), rgba(105, 239, 98, .13));
}

html[data-theme="light"] {
    --premium-bg: #edf7ff;
    --premium-bg-soft: #e6f3fd;
    --premium-bg-glow-blue: rgba(16, 157, 245, .16);
    --premium-bg-glow-green: rgba(105, 239, 98, .16);

    --premium-surface: rgba(255, 255, 255, .93);
    --premium-surface-strong: #ffffff;
    --premium-surface-soft: rgba(12, 119, 200, .075);
    --premium-surface-hover: rgba(16, 157, 245, .115);

    --premium-text: #0d2139;
    --premium-muted: #607891;

    --premium-border: rgba(18, 104, 174, .17);
    --premium-border-strong: rgba(16, 157, 245, .36);

    --premium-shadow: 0 24px 66px rgba(13, 96, 161, .15);
    --premium-shadow-soft: 0 14px 32px rgba(13, 96, 161, .11);
    --premium-glow: 0 0 0 1px rgba(16, 157, 245, .10), 0 18px 48px rgba(16, 157, 245, .13);
}

html {
    min-height: 100%;
    background: var(--premium-bg);
}

body {
    background:
        radial-gradient(circle at 8% -8%, var(--premium-bg-glow-blue), transparent 34%),
        radial-gradient(circle at 92% 0%, var(--premium-bg-glow-green), transparent 32%),
        linear-gradient(135deg, var(--premium-bg) 0%, var(--premium-bg-soft) 56%, var(--premium-bg) 100%);
    color: var(--premium-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body,
input,
button,
select,
textarea {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.premium-topbar {
    display: grid;
    grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
    align-items: center;
    min-height: 76px;
    gap: 16px;
    padding: 11px clamp(18px, 3.5vw, 46px);
    border-color: var(--premium-border);
    background: color-mix(in srgb, var(--premium-bg) 76%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(22px) saturate(155%);
}

html[data-theme="light"] .premium-topbar {
    background: color-mix(in srgb, #f1f9ff 82%, transparent);
}

.premium-brand {
    display: flex;
    grid-column: 1;
    align-items: center;
    min-width: 0;
    color: var(--premium-text);
    text-decoration: none;
}

.premium-brand:hover {
    color: var(--premium-text);
}

.premium-brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 26px rgba(16, 157, 245, .22), 0 0 0 1px rgba(105, 239, 98, .10);
}

.premium-brand-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.premium-brand-copy strong {
    color: var(--premium-text);
    font-size: 1.02rem;
    font-weight: 850;
    letter-spacing: -.025em;
    line-height: 1.12;
}

.premium-brand-copy small {
    color: color-mix(in srgb, var(--premium-muted) 92%, var(--brand-blue));
    font-size: .77rem;
    font-weight: 720;
    line-height: 1.18;
}

.premium-role-pill,
.cp-nav-role-pill {
    display: inline-flex !important;
    grid-column: 2;
    align-items: center !important;
    justify-content: center !important;
    justify-self: start;
    gap: 8px !important;
    max-width: 170px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border: 1px solid rgba(16, 157, 245, .38) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(16, 157, 245, .17), rgba(105, 239, 98, .15)) !important;
    color: color-mix(in srgb, var(--brand-blue) 74%, var(--premium-text)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .20), 0 10px 24px rgba(16, 157, 245, .12) !important;
    font-size: .80rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

html[data-theme="dark"] .premium-role-pill,
html[data-theme="dark"] .cp-nav-role-pill {
    color: #eaf8ff !important;
}

.premium-role-pill > span:last-child,
.cp-nav-role-pill > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.premium-role-dot,
.cp-nav-role-dot {
    display: inline-block !important;
    width: 7px !important;
    height: 7px !important;
    flex: 0 0 auto !important;
    border-radius: 50% !important;
    background: var(--brand-blue) !important;
    box-shadow: 0 0 0 4px rgba(16, 157, 245, .14), 0 0 16px rgba(105, 239, 98, .24) !important;
}

.premium-topbar-actions {
    display: flex;
    grid-column: 3;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    gap: 9px;
}

.premium-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--premium-border);
    border-radius: 999px;
    background: var(--premium-surface-soft);
    color: var(--premium-muted);
    font-size: .84rem;
    font-weight: 780;
    overflow: hidden;
}

.premium-user-chip > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.premium-user-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--brand-green);
    box-shadow: 0 0 0 4px rgba(105, 239, 98, .13);
}

.premium-icon-button,
.premium-logout-button {
    min-height: 42px;
    border: 1px solid var(--premium-border);
    background: var(--premium-surface-soft);
    color: var(--premium-text);
    box-shadow: none;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.premium-icon-button:hover,
.premium-logout-button:hover {
    border-color: var(--premium-border-strong);
    background: var(--premium-surface-hover);
    box-shadow: var(--premium-glow);
    transform: translateY(-1px);
}

.premium-icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    padding: 0;
    border-radius: 15px;
}

.premium-theme-emoji {
    font-size: 1.18rem;
    line-height: 1;
}

.premium-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border-radius: 15px;
    font: inherit;
    font-size: .86rem;
    font-weight: 850;
}

.premium-logout-symbol {
    font-size: 1.05rem;
    transform: rotate(45deg);
}

.premium-page-shell {
    width: min(1240px, calc(100% - 34px));
    padding: 32px 0 40px;
}

.premium-footer {
    width: min(1240px, calc(100% - 34px));
    margin-top: 8px;
    color: var(--premium-muted);
    border-color: var(--premium-border);
    font-size: .82rem;
}

.flash-stack {
    position: fixed;
    top: 88px;
    right: 18px;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 36px));
    pointer-events: none;
}

.flash {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid var(--premium-border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--premium-surface-strong) 94%, transparent);
    color: var(--premium-text);
    box-shadow: var(--premium-shadow-soft);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.flash-success {
    border-color: rgba(105, 239, 98, .38);
}

.flash-error {
    border-color: rgba(255, 111, 122, .45);
}

.premium-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: color-mix(in srgb, var(--brand-blue) 82%, var(--premium-text));
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.premium-kicker::before {
    content: "";
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--premium-accent);
}

.premium-panel {
    border: 1px solid var(--premium-border);
    border-radius: var(--premium-radius-xl);
    background: var(--premium-surface);
    box-shadow: var(--premium-shadow);
    backdrop-filter: blur(18px);
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #109df5 0%, #1789ee 55%, #28c985 145%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(16, 126, 224, .25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #22b8ff 0%, #1592f4 55%, #45e695 145%);
    color: #ffffff;
}

.btn-secondary {
    border-color: var(--premium-border);
    background: var(--premium-surface-soft);
    color: var(--premium-text);
}

.btn-secondary:hover {
    border-color: var(--premium-border-strong);
    background: var(--premium-surface-hover);
}

.form-field {
    gap: 8px;
}

.form-label {
    color: var(--premium-text);
    font-size: .84rem;
    font-weight: 850;
}

input,
select,
textarea {
    min-height: 52px;
    border-color: var(--premium-border);
    border-radius: 15px;
    background: color-mix(in srgb, var(--premium-surface-strong) 90%, transparent);
    color: var(--premium-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .028);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: #ffffff;
    border-color: rgba(21, 108, 178, .18);
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--premium-muted) 80%, transparent);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(16, 157, 245, .72);
    box-shadow: 0 0 0 4px rgba(16, 157, 245, .11), 0 10px 24px rgba(16, 157, 245, .08);
}

.field-error {
    color: #ff6f7a;
}

.form-message {
    border-color: var(--premium-border);
    border-radius: 16px;
    background: var(--premium-surface-soft);
}

.form-message-error {
    border-color: rgba(255, 111, 122, .40);
    color: #ff6f7a;
}

.form-message-success {
    border-color: rgba(105, 239, 98, .38);
    color: var(--brand-green-2);
}

.status-pill {
    border-color: var(--premium-border);
    background: var(--premium-surface-soft);
}

/* Desktop / Laptop: 1024px and above */
@media (min-width: 1024px) {
    .premium-page-shell {
        min-height: calc(100vh - 154px);
    }
}

/* Tablet: 600px to 1023px */
@media (min-width: 600px) and (max-width: 1023px) {
    .premium-topbar {
        min-height: 70px;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, auto);
        gap: 12px;
        padding: 10px 20px;
    }

    .premium-page-shell {
        width: min(100% - 30px, 1240px);
        padding-top: 27px;
    }

    .premium-user-chip {
        max-width: 160px;
    }
}

/* Mobile: up to 599px */
@media (max-width: 599px) {
    .premium-topbar {
        min-height: 62px;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
        padding: 8px 12px;
    }

    .premium-brand {
        gap: 9px;
    }

    .premium-brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .premium-brand-copy strong {
        font-size: .90rem;
    }

    .premium-brand-copy small {
        font-size: .68rem;
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .premium-role-pill,
    .cp-nav-role-pill {
        max-width: 112px !important;
        min-height: 34px !important;
        padding: 0 10px !important;
        gap: 6px !important;
        font-size: .70rem !important;
    }

    .premium-topbar-actions {
        gap: 7px;
    }

    .premium-user-chip {
        display: none;
    }

    .premium-icon-button,
    .premium-logout-button {
        min-height: 40px;
    }

    .premium-icon-button {
        width: 40px;
        border-radius: 13px;
    }

    .premium-logout-button {
        width: 40px;
        padding: 0;
        border-radius: 13px;
    }

    .premium-logout-text {
        display: none;
    }

    .premium-page-shell {
        width: 100%;
        padding: 14px 12px 24px;
    }

    .premium-footer {
        width: calc(100% - 24px);
        margin-top: 0;
        padding: 16px 0 22px;
        font-size: .74rem;
    }

    .flash-stack {
        top: 70px;
        right: 8px;
        width: calc(100vw - 16px);
    }
}
