@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@500;600;700&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
    --bg: #edf3f7;
    --bg-deep: #dfeaf2;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-2: rgba(241, 246, 252, 0.9);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --panel-soft: rgba(240, 246, 252, 0.8);
    --card: rgba(255, 255, 255, 0.9);
    --border: rgba(17, 32, 52, 0.12);
    --border-strong: rgba(17, 32, 52, 0.18);

    --text: #111827;
    --text-soft: #374151;
    --text-muted: #667085;

    --hyundai-blue-1: #eaf3ff;
    --hyundai-blue-2: #cfe2ff;
    --hyundai-blue-3: #5aa9ff;
    --hyundai-blue-4: #1f5ec7;
    --hyundai-blue-5: #0f2d5c;
    --hyundai-silver-1: #f3f4f6;
    --hyundai-silver-2: #dfe4ea;
    --hyundai-silver-3: #a3b0bc;
    --hyundai-black: #101820;

    --primary: #123d87;
    --primary-strong: #0b2d63;
    --primary-soft: rgba(31, 94, 199, 0.12);
    --primary-50: rgba(31, 94, 199, 0.06);
    --accent: #5aa9ff;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 18px 36px rgba(17, 24, 39, 0.12);
    --shadow-lg: 0 32px 80px rgba(15, 45, 92, 0.18);

    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 12px;
    --radius: 16px;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(90, 169, 255, 0.24), transparent 28%),
        radial-gradient(circle at bottom right, rgba(16, 24, 32, 0.08), transparent 28%),
        linear-gradient(135deg, var(--bg) 0%, var(--bg-deep) 100%);
    font-size: 14.5px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#layout-mount {
    display: contents;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    gap: 0;
}

.sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 14px 16px;
    background:
        linear-gradient(180deg, rgba(13, 31, 61, 0.98), rgba(16, 43, 90, 0.96)),
        radial-gradient(circle at top right, rgba(74, 144, 255, 0.28), transparent 32%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.94);
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 12px 20px rgba(90, 169, 255, 0.15);
}

.brand-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e6f3ff;
}

.brand-sub {
    margin-top: 2px;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.sidebar-section {
    margin: 18px 8px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(190, 218, 255, 0.78);
}

.sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 2px;
    padding: 0 6px;
    align-content: start;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(233, 242, 255, 0.84);
    font-weight: 600;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    border: 1px solid transparent;
}

.sidebar nav a i {
    width: 18px;
    text-align: center;
    opacity: 0.94;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(153, 198, 255, 0.18);
    transform: translateX(2px);
}

.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(90, 169, 255, 0.26), rgba(31, 94, 199, 0.14));
    border-color: rgba(140, 198, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(164, 205, 255, 0.2);
    color: #ffffff;
}

.sidebar-foot {
    margin-top: auto;
    padding: 14px 6px 2px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 8px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ebf4ff;
    background: linear-gradient(135deg, rgba(94, 158, 255, 0.4), rgba(27, 71, 152, 0.6));
    border: 1px solid rgba(168, 212, 255, 0.28);
}

.user-chip .name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #f3faff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip .role {
    margin-top: 2px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(214, 232, 255, 0.7);
}

.user-chip-btn {
    flex: 1;
    min-width: 0;
}

.user-chip > .btn,
.user-chip > .btn.btn-sm {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    flex: 0 0 36px;
    border-radius: 10px;
}

.main-content {
    padding: 28px clamp(18px, 2.6vw, 32px) 42px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 10px 0 6px;
}

.page-title {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2.2rem);
    line-height: 1.12;
    letter-spacing: -0.06em;
    font-weight: 800;
    color: var(--text);
}

.page-subtitle {
    margin-top: 4px;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Page context is already visible in the navigation and content headers. */
.topbar .page-title,
.topbar .page-subtitle { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 7px;
    background: rgba(90, 169, 255, 0.08);
    border: 1px solid rgba(31, 94, 199, 0.14);
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.dashboard-hero {
    position: relative;
    padding: 28px 24px 20px;
    margin-bottom: 22px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(23, 44, 80, 0.02), rgba(90, 169, 255, 0.06));
    border: 1px solid rgba(17, 32, 52, 0.08);
    box-shadow: 0 16px 28px rgba(15, 45, 92, 0.05);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(90,169,255,0.06), transparent 40%);
    pointer-events: none;
}

.dashboard-hero h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.06em;
    margin: 0;
    background: linear-gradient(90deg, #0d1b2a 0%, #123d87 40%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dashboard-hero p {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    margin: 10px 0 0;
    font-size: 14px;
}

.stat-card,
.search-panel,
.card {
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(17, 32, 52, 0.1);
    box-shadow: 0 12px 28px rgba(13, 30, 56, 0.04);
}

.card {
    border-radius: var(--radius);
}

.search-panel {
    border-radius: var(--radius);
}

.stat-card {
    box-shadow: 0 14px 24px rgba(15, 45, 92, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, #0f2d5c 0%, #1f5ec7 52%, #5aa9ff 100%);
    box-shadow: 0 14px 22px rgba(31, 94, 199, 0.22);
}

.btn-secondary {
    background: rgba(241, 246, 252, 0.9);
    border: 1px solid rgba(17, 32, 52, 0.08);
    color: var(--text);
}

.refurb-action-footer {
    width: auto;
    min-width: 104px;
    min-height: 42px;
    height: 42px;
    padding: 10px 16px;
    border-radius: 11px;
    flex: 0 0 auto;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    position: relative;
    isolation: isolate;
}

.login-hero {
    position: relative;
    padding: 52px 54px 40px;
    background:
        linear-gradient(135deg, rgba(8, 18, 34, 0.98), rgba(18, 61, 135, 0.96)),
        radial-gradient(circle at 80% 12%, rgba(90, 169, 255, 0.22), transparent 22%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

.login-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(32px);
    opacity: 0.8;
    pointer-events: none;
}
.login-hero-glow-one {
    width: 260px;
    height: 260px;
    right: 10%;
    top: -14%;
    background: rgba(90, 169, 255, 0.26);
}
.login-hero-glow-two {
    width: 300px;
    height: 300px;
    left: -8%;
    bottom: -10%;
    background: rgba(148, 163, 184, 0.18);
}

.login-brand,
.hero-copy,
.login-hero-foot {
    position: relative;
    z-index: 1;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(220, 233, 255, 1), rgba(90, 169, 255, 0.85));
    box-shadow: 0 16px 28px rgba(90, 169, 255, 0.25);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,0.16);
    padding: 4px;
}

.brand-copy {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.92);
}
.brand-kicker {
    display: block;
    margin-bottom: 4px;
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    opacity: 0.72;
}

.hero-copy {
    margin-top: 42px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: #dfeeff;
    background: rgba(90, 169, 255, 0.12);
    border: 1px solid rgba(159, 202, 255, 0.22);
}

.login-hero-title {
    margin-top: 18px;
    max-width: 560px;
    font-size: clamp(2.6rem, 3.1vw, 4.2rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
    font-weight: 800;
    color: #fffaf6;
    font-family: var(--font-sans);
}

.login-hero-title span {
    color: var(--hyundai-blue-2);
}

.login-hero-sub {
    margin-top: 18px;
    max-width: 480px;
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.76);
}

.login-hero-foot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.09);
}

.login-hero-foot div {
    display: grid;
    gap: 4px;
    min-height: 54px;
}
.login-hero-foot b {
    color: #f5e7d2;
    font-size: 0.9rem;
    font-weight: 700;
}
.login-hero-foot span {
    color: rgba(255,255,255,0.62);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 44px 26px;
    background: rgba(253, 249, 245, 0.42);
}

.login-card {
    position: relative;
    width: min(430px, 100%);
    padding: 36px 30px 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: cardIn 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(90, 169, 255, 0.06), transparent 40%);
    pointer-events: none;
}

.card-topline {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.mini-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--primary-strong);
    background: rgba(90, 169, 255, 0.12);
    border: 1px solid rgba(31, 94, 199, 0.18);
}

.login-card h1 {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 2.7rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
    font-weight: 800;
    color: var(--text);
}

.login-card .muted {
    margin-top: 12px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.7;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 14px 0 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    transition:
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.input-wrap i {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1.5px solid rgba(17, 32, 52, 0.24);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.input-wrap .form-input {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.form-input:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
textarea:hover {
    border-color: rgba(31, 94, 199, 0.5);
    background: #fff;
}

.form-input:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 94, 199, 0.14);
    background: #fff;
}

.input-wrap .form-input:hover,
.input-wrap .form-input:focus {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.form-input::placeholder {
    color: rgba(88, 76, 69, 0.52);
}

select,
.form-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 42px 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: rgba(255,255,255,0.78);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.4;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

select:hover,
.form-select:hover {
    border-color: rgba(31, 94, 199, 0.35);
    background-color: rgba(255,255,255,0.94);
}

select:focus,
.form-select:focus {
    border-color: rgba(31, 94, 199, 0.8);
    box-shadow: 0 0 0 4px rgba(90, 169, 255, 0.12);
}

select:disabled,
.form-select:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    background-color: var(--surface-2);
}

select option,
.form-select option {
    color: var(--text);
    background: #ffffff;
}

.input-wrap:focus-within {
    border-color: rgba(31, 94, 199, 0.8);
    box-shadow: 0 0 0 5px rgba(90, 169, 255, 0.12), 0 12px 30px rgba(15, 45, 92, 0.08);
    transform: translateY(-1px);
}

.input-wrap-password {
    padding-right: 10px;
}

.password-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
    flex-shrink: 0;
}

.password-toggle:hover {
    background: rgba(90, 169, 255, 0.1);
    color: var(--primary-strong);
}

.password-toggle:active {
    transform: scale(0.96);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    border: 0;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    transition:
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-shell .btn,
.modal .btn {
    width: auto;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 11px;
    font-size: 0.86rem;
}

.app-shell .btn.btn-sm,
.modal .btn.btn-sm {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 0.78rem;
    gap: 7px;
}

.app-shell .btn.btn-block,
.modal .btn.btn-block {
    width: 100%;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.18), transparent 42%);
    transform: translateX(-110%);
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:hover {
    transform: translateY(-2px) scale(1.01);
}

.btn:active {
    transform: translateY(0) scale(0.985);
}

.btn-primary {
    color: #f8fbff;
    background: linear-gradient(135deg, #0f2d5c 0%, #1f5ec7 52%, #5aa9ff 100%);
    box-shadow: 0 18px 28px rgba(31, 94, 199, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 20px 34px rgba(31, 94, 199, 0.32);
}

.default-creds {
    display: grid;
    gap: 6px;
    margin-top: 20px;
    padding: 16px 18px;
    background: rgba(90, 169, 255, 0.06);
    border: 1px solid rgba(31, 94, 199, 0.12);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.default-creds b {
    color: var(--primary-strong);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@keyframes cardIn {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        min-height: 300px;
        padding-bottom: 28px;
    }

    .login-hero-foot {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 24px 16px 28px;
    }

    .login-card {
        padding: 26px 18px 20px;
    }

    .login-hero {
        padding: 30px 20px 22px;
    }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 7px;
    background: rgba(90, 169, 255, 0.12);
    color: var(--primary-strong);
    border: 1px solid rgba(31, 94, 199, 0.18);
    font-size: 12px;
    font-weight: 600;
}
.chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success, #16a34a);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }

.dashboard-hero {
    text-align: center;
    padding: 22px 0 8px;
    margin-bottom: 20px;
}
.dashboard-hero h1 {
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 800;
    letter-spacing: -.5px;
    margin: 0 0 8px;
    background: linear-gradient(90deg, #0f172a, #1e40af 65%, #0ea5e9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dashboard-hero p { color: var(--text-muted); margin: 0; font-size: 14px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    transition: transform .18s, box-shadow .18s, border-color .18s;
    position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.stat-label { color: var(--text-muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 26px; font-weight: 800; margin-top: 2px; font-family: var(--font-mono); }

.stat-card.blue    .stat-icon { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.stat-card.green   .stat-icon { background: linear-gradient(135deg, #059669, #34d399); }
.stat-card.amber   .stat-icon { background: linear-gradient(135deg, #d97706, #fbbf24); }
.stat-card.purple  .stat-icon { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.stat-card.pink    .stat-icon { background: linear-gradient(135deg, #db2777, #f472b6); }
.stat-card.teal    .stat-icon { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.stat-card.slate   .stat-icon { background: linear-gradient(135deg, #475569, #94a3b8); }
.stat-card.indigo  .stat-icon { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.stat-card.red     .stat-icon { background: linear-gradient(135deg, #dc2626, #f87171); }
.stat-card.cyan    .stat-icon { background: linear-gradient(135deg, #0284c7, #38bdf8); }

.stat-card.highlight { border: 1.5px solid #dbeafe; background: linear-gradient(180deg, #eff6ff 0%, #ffffff 60%); }

.search-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
}
.search-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.search-row {
    display: grid; grid-template-columns: 1fr auto;
    gap: 12px;
}
.search-input-wrap { position: relative; }
.search-input-wrap i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-soft);
}
.search-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.search-input-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px #1e40af1a; }

.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.data-table th, .data-table td {
    padding: 12px 16px; text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table th {
    background: var(--surface-2);
    font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; font-size: 11.5px; letter-spacing: .5px;
    position: sticky; top: 0;
}
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table td.mono { font-family: var(--font-mono); font-weight: 600; }
.data-table .col-no { width: 42px !important; min-width: 42px !important; max-width: 42px; padding-inline: 6px; text-align: center; box-sizing: border-box; }
.data-table .col-plat { width: 132px; min-width: 132px; }
.data-table .col-date { width: 128px; min-width: 128px; }
.data-table .col-action { width: 112px; min-width: 112px; text-align: center; }
.data-table td.col-plat { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }

.badge {
    display: inline-block; padding: 3px 8px; border-radius: 6px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0;
    border: 1px solid transparent;
}
.badge-ITC       { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.badge-VENDOR    { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-RENTAL    { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.badge-EMPLOYEE  { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.badge-COURTESY  { background: #ccfbf1; color: #115e59; border-color: #99f6e4; }
.badge-PIO       { background: #fef3c7; color: #a16207; border-color: #fde68a; }
.badge-MARKETING { background: #fde68a; color: #713f12; border-color: #fbbf24; }
.badge-SCBD      { background: #ddd6fe; color: #5b21b6; border-color: #c4b5fd; }
.badge-SOLD      { background: #f1f5f9; color: #334155; border-color: #cbd5e1; text-decoration: line-through; }
.badge-YARD      { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.badge-WISMUL    { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.badge-TestDrive { background: #cffafe; color: #155e75; border-color: #a5f3fc; }

.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-backdrop.show { display: flex; animation: fadeIn .18s ease; }
/* Modal detail/nested (Detail Pergerakan Unit, Remark, Chart) HARUS selalu di atas modal kategori/daftar,
   walau file JS ter-cache. search-modal berada sebelum list-modal di DOM sehingga tanpa aturan ini
   ia bisa tertutup di belakang. */
#search-modal,
#refurb-remark-modal,
#chart-detail-modal { z-index: 1200; }
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 680px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0,0,0,.24);
    animation: pop .22s ease;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
    background: none; border: 0; cursor: pointer;
    font-size: 20px; color: var(--text-muted);
    width: 34px; height: 34px; border-radius: 8px;
    display: grid; place-items: center;
    transition: background .15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 22px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 22px; border-top: 1px solid var(--border);
    background: var(--surface-2);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop    { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 22px;
}
.detail-item .k { font-size: 11.5px; text-transform: uppercase; color: var(--text-muted); letter-spacing: .5px; font-weight: 600; }
.detail-item .v { font-size: 14.5px; font-weight: 600; margin-top: 2px; color: var(--text); word-break: break-word; }
.detail-item .v.mono { font-family: var(--font-mono); }

.section-divider {
    margin: 22px 0 14px; padding-top: 14px;
    border-top: 1px dashed var(--border);
    font-size: 12.5px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .8px;
}

.toast-stack {
    position: fixed; top: 20px; right: 20px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 2000;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 280px;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
    animation: slideIn .22s ease;
    font-size: 13.5px;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger);  }
.toast.warning { border-left-color: var(--warning); }
.toast .t { font-weight: 700; margin-bottom: 2px; }
.toast .m { color: var(--text-muted); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0 } to { transform: none; opacity: 1 } }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 20px;
}
.form-grid .col-2 { grid-column: span 2; }

.operator-form-card {
    border: 2px solid rgba(31, 94, 199, 0.28);
    box-shadow: 0 12px 30px rgba(31, 94, 199, 0.12);
}
.operator-form-card .card-header {
    background: linear-gradient(100deg, rgba(234, 243, 255, 0.95), rgba(255, 255, 255, 0.9));
    border-bottom-color: rgba(31, 94, 199, 0.2);
}
.operator-form-card .card-header h3 { color: var(--primary-strong); }
.operator-form-card .form-group { padding: 12px; border: 1px solid rgba(31, 94, 199, 0.14); border-radius: 10px; background: rgba(255,255,255,.55); }
.operator-form-card .form-input,
.operator-form-card .form-select { border-color: rgba(31, 94, 199, 0.3); background: #fff; }
.operator-form-card .form-input:focus,
.operator-form-card .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 94, 199, 0.14); }

.confirm-list {
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 8px;
}
.confirm-list .row {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 4px 0; font-size: 13.5px;
    border-bottom: 1px dotted var(--border);
}
.confirm-list .row:last-child { border: 0; }
.confirm-list .row .k { color: var(--text-muted); font-weight: 500; }
.confirm-list .row .v { font-weight: 600; text-align: right; }

.empty-state {
    padding: 40px 20px; text-align: center; color: var(--text-muted);
}
.empty-state i { font-size: 34px; margin-bottom: 12px; opacity: .5; }
.empty-state h4 { margin: 0 0 4px; color: var(--text); }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-hero { padding: 32px; min-height: 240px; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; z-index: 200; left: -86vw; width: min(84vw, 320px);
        min-height: 100vh; min-height: 100dvh;
        padding: 14px 12px 16px;
        border-radius: 0 18px 18px 0;
        border-right: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 10px 30px rgba(15, 45, 92, 0.18);
        transition: left .18s ease, transform .18s ease;
    }
    .sidebar.open {
        left: 0;
        transform: translateX(0);
        box-shadow: 0 14px 36px rgba(15, 45, 92, 0.22);
    }
    .sidebar .brand {
        padding: 10px 8px 16px;
        border-bottom-color: rgba(255,255,255,0.12);
    }
    .sidebar .brand-title {
        font-size: 0.74rem;
        letter-spacing: 0.12em;
    }
    .sidebar nav {
        gap: 8px;
        padding: 0 4px;
    }
    .sidebar nav a {
        padding: 12px 12px;
        border-radius: 12px;
        min-height: 46px;
        font-size: 0.96rem;
        background: rgba(255,255,255,0.02);
    }
    .sidebar nav a.active {
        background: rgba(90, 169, 255, 0.16);
    }
    .sidebar-foot {
        padding: 12px 4px 2px;
    }
    .user-chip {
        padding: 10px 10px 10px 8px;
        border-radius: 12px;
        background: rgba(255,255,255,0.05);
    }
    .main-content { padding: 18px; }
    .mobile-toggle {
        display: inline-flex !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: rgba(15,45,92,0.96) !important;
        box-shadow: 0 8px 20px rgba(15,45,92,0.18) !important;
    }
}
@media (max-width: 720px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .form-grid .col-2 { grid-column: span 1; }
    .search-row { grid-template-columns: 1fr; }
    .login-hero { display: none; }
}
.mobile-toggle {
    display: none;
    position: relative;
    background: linear-gradient(135deg, rgba(15, 45, 92, 0.95), rgba(31, 94, 199, 0.95));
    border: 1px solid rgba(255,255,255,0.18);
    width: 46px; height: 46px; border-radius: 14px;
    align-items: center; justify-content: center; cursor: pointer;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 45, 92, 0.28), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    z-index: 10;
}
.mobile-toggle:hover,
.mobile-toggle:focus-visible {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 16px 28px rgba(15, 45, 92, 0.32), inset 0 1px 0 rgba(255,255,255,0.2);
}
.mobile-toggle:active {
    transform: translateY(0) scale(0.98);
}
.mobile-toggle i {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 180ms ease;
}
body.sidebar-open .mobile-toggle i {
    transform: rotate(90deg);
}

.notif-center-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    overflow: visible;
    z-index: 30;
}

.notif-center-btn {
    position: relative;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: visible !important;
    flex-shrink: 0;
}

.notif-center-btn i {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.notif-center-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 20;
    pointer-events: none;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger, #dc2626);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--surface, #fff);
    box-sizing: border-box;
    display: none;
}

.notif-center-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 24px));
    max-height: 70vh;
    overflow: auto;
    background: var(--surface, #fff);
    color: var(--text, #111);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    z-index: 950;
}

@media (max-width: 900px) {
    .notif-center-wrap {
        margin-left: 0;
    }
    .notif-center-btn {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        border-radius: 12px;
    }
    .notif-center-panel {
        right: 0;
        left: auto;
        width: min(320px, calc(100vw - 18px));
    }
}

.notif-bell { position:relative; }
.notif-badge { position:absolute; top:-6px; right:-6px; background:var(--danger,#dc2626); color:#fff; font-size:10px; font-weight:700; min-width:16px; height:16px; line-height:16px; text-align:center; border-radius:8px; padding:0 4px; }
.notif-panel { position:absolute; bottom:64px; left:12px; right:12px; max-height:60vh; overflow:auto; background:var(--card,#fff); border:1px solid var(--border,#e2e8f0); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.12); z-index:60; }
.notif-panel-head { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-bottom:1px solid var(--border,#e2e8f0); position:sticky; top:0; background:inherit; }
.notif-panel-body { padding:6px; }
.notif-item { padding:8px 10px; border-bottom:1px solid var(--border,#f1f5f9); display:flex; flex-direction:column; gap:4px; }
.ni-plat { font-weight:700; }
.ni-meta { font-size:11.5px; color:var(--text-muted,#64748b); }
.plat-lock-status { min-height:16px; }

h1, h2, h3, h4,
.page-title,
.dashboard-hero h1,
.card-header h3,
.modal-header h3 {
    font-family: var(--font-sans);
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

.page-title {
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.2;
    font-weight: 800;
}

.page-subtitle {
    font-family: var(--font-sans);
    letter-spacing: 0.08em;
}

.card-header h3,
.modal-header h3 {
    font-weight: 750;
}

@media (min-width:900px){ .notif-panel { left:200px; right:auto; width:340px; } }

/* ============ UI RULES: Waiting QC (kuning) & Refurbishment (merah) ============ */
.stat-card.lime    .stat-icon { background: linear-gradient(135deg, #ca8a04, #facc15); }
.stat-card.orange  .stat-icon { background: linear-gradient(135deg, #ea580c, #fb923c); }
.stat-card.sky     .stat-icon { background: linear-gradient(135deg, #0369a1, #7dd3fc); }
.stat-card.emerald .stat-icon { background: linear-gradient(135deg, #047857, #6ee7b7); }
.stat-card.rose    .stat-icon { background: linear-gradient(135deg, #be123c, #fb7185); }
.stat-card.violet  .stat-icon { background: linear-gradient(135deg, #6d28d9, #c4b5fd); }

/* Baris / item berstatus Waiting QC */
.is-wqc, tr.is-wqc, .area-row.is-wqc, .ab-slot.is-wqc {
    background: #fef9c3 !important;
    color: #854d0e;
    box-shadow: inset 3px 0 0 #eab308;
}
.is-wqc .s-ws, .is-wqc .plat, .is-wqc .s-plat { color: #854d0e !important; font-weight: 800; }
.txt-wqc { color: #a16207 !important; font-weight: 800; }

/* Baris / item berstatus Refurbishment */
.is-refurb, tr.is-refurb, .area-row.is-refurb, .ab-slot.is-refurb {
    background: #fee2e2 !important;
    color: #991b1b;
    box-shadow: inset 3px 0 0 #dc2626;
}
.is-refurb .s-ws, .is-refurb .plat, .is-refurb .s-plat { color: #b91c1c !important; font-weight: 800; }
.txt-refurb { color: #dc2626 !important; font-weight: 800; }

/* Badge status pada popup Unit Operational */
.op-status { font-weight: 800; }
.op-status.wqc     { color: #a16207; }
.op-status.refurb  { color: #dc2626; }

/* Used Car — daftar pinjam kunci ringkas (ramah HP) */
.key-list { display: flex; flex-direction: column; gap: 10px; }
.key-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface);
}
.key-row .key-info { min-width: 0; }
.key-row .key-plat { font-family: var(--font-mono); font-weight: 700; font-size: 14.5px; letter-spacing: 0.5px; }
.key-row .key-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-row .key-act { flex-shrink: 0; }
@media (max-width: 560px) {
    .key-row { flex-direction: column; align-items: stretch; }
    .key-row .key-act .btn { width: 100%; }
}

/* ===== Collapsible nav groups ===== */
.nav-group { margin-top: 10px; }
.nav-group-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    margin: 0; padding: 7px 10px;
    background: none; border: none; border-radius: 8px; cursor: pointer;
    font-family: inherit; text-align: left;
    transition: background 0.15s ease;
}
.nav-group-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.nav-group-label {
    flex: 1; min-width: 0;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
    color: rgba(190, 218, 255, 0.78);
}
.nav-group-count {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: rgba(255, 255, 255, 0.10); color: rgba(190, 218, 255, 0.85);
    font-size: 0.62rem; font-weight: 800; line-height: 18px; text-align: center;
}
.nav-group-chevron {
    font-size: 0.62rem; color: rgba(190, 218, 255, 0.6);
    transition: transform 0.2s ease;
}
.nav-group.open .nav-group-chevron { transform: rotate(180deg); }
.nav-group-items.hidden { display: none; }
.nav-group-items { display: grid; gap: 6px; margin-top: 4px; padding: 0 6px; }
