:root {
    --bg: #e8edf3;
    --bg-soft: #f4f7fb;
    --surface: #ffffff;
    --ink: #122033;
    --ink-soft: #5b6b7f;
    --line: #d8e0ea;
    --brand: #0b6e6a;
    --brand-dark: #085753;
    --brand-soft: #d9efed;
    --accent: #d97706;
    --accent-soft: #fff3df;
    --danger: #c2410c;
    --danger-soft: #ffedd5;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #b45309;
    --sidebar: #10233a;
    --sidebar-2: #16304d;
    --sidebar-text: #c7d4e5;
    --shadow: 0 10px 30px rgba(16, 35, 58, 0.08);
    --radius: 18px;
    --radius-sm: 12px;
    --font: "Manrope", system-ui, sans-serif;
    --display: "Sora", system-ui, sans-serif;
    --table-head: "Plus Jakarta Sans", var(--display), system-ui, sans-serif;
    --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(11, 110, 106, 0.12), transparent 60%),
        radial-gradient(900px 400px at 100% 0%, rgba(217, 119, 6, 0.08), transparent 55%),
        linear-gradient(180deg, #eef3f8 0%, var(--bg) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

.auth-html,
.auth-body {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.auth-body {
    margin: 0;
    min-height: 0;
    font-family: Inter, system-ui, sans-serif;
    color: #0f172a;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.auth-page {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.auth-visual {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    padding: 40px 40px;
    color: #fff;
    background-color: #0b1f1c;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
}

@media (min-width: 1024px) {
    .auth-visual {
        display: flex;
        padding: 40px 64px;
    }
}

.auth-visual-top {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.auth-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #0d9488;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.35);
}

.auth-brand-mark--sm {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
}

.auth-brand-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-brand-name--dark {
    color: #1e293b;
}

.auth-brand-logo {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.auth-visual-main {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    padding: 48px 0;
}

.auth-visual h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-visual-main > p {
    margin: 20px 0 0;
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    line-height: 1.65;
}

.auth-feature-list {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.auth-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-check {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 999px;
    background: #14b8a6;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
}

.auth-copy {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100dvh;
    padding: 40px 24px;
    background: #fafafa;
    overflow: auto;
}

@media (min-width: 640px) {
    .auth-panel {
        padding: 40px 40px;
    }
}

.auth-panel-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    color: inherit;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .auth-mobile-brand {
        display: none;
    }
}

.auth-mobile-brand img {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.auth-form,
.auth-card {
    width: 100%;
}

.auth-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.auth-card--register {
    width: 100%;
}

.auth-form-head {
    margin-bottom: 32px;
}

.auth-form-head h2,
.auth-card h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-form-head p,
.auth-card .subtitle {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-card .subtitle {
    margin-bottom: 24px;
}

.auth-card form .form-group {
    margin-bottom: 16px;
}

.auth-card .auth-form-grid {
    margin-bottom: 8px;
}

.auth-card .btn-block {
    margin-top: 4px;
}

.auth-fields {
    display: grid;
    gap: 20px;
}

.auth-alert,
.auth-flash {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-alert--success,
.flash-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.auth-alert--warning,
.flash-warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.auth-alert--error,
.flash-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.auth-label-row,
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-label-row {
    margin-bottom: 6px;
}

.auth-label-row label {
    margin-bottom: 0;
}

.auth-inline-link {
    color: #0d9488;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.auth-inline-link:hover {
    color: #0f766e;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .form-control {
    padding-right: 44px;
}

.auth-password-toggle {
    position: absolute;
    inset: 0 0 0 auto;
    width: 44px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: #475569;
}

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

.auth-password-toggle .is-hidden {
    display: none;
}

.auth-footer {
    margin: 14px 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.4;
}

.auth-footer a {
    color: #0d9488;
    font-weight: 700;
}

.auth-footer a:hover {
    color: #0f766e;
}

.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.84rem;
    color: #64748b;
}

.auth-meta-row a {
    color: #0d9488;
    font-weight: 700;
    text-decoration: none;
}

.auth-meta-row a:hover {
    color: #0f766e;
}

.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.auth-actions form {
    margin: 0;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b !important;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.auth-back-link svg {
    width: 14px;
    height: 14px;
}

.auth-back-link:hover {
    color: #0f172a !important;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
}

.auth-form-grid .span-2 {
    grid-column: 1 / -1;
}

.auth-body .form-group {
    margin-bottom: 0;
}

.auth-body .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.auth-body .form-control {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #0f172a;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-body .form-control::placeholder {
    color: #94a3b8;
}

.auth-body .form-control:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.auth-body .checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 0.875rem;
    user-select: none;
}

.auth-body .checkbox-row input {
    width: 16px;
    height: 16px;
    accent-color: #0d9488;
}

.auth-body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-body .btn-primary,
.auth-body .auth-submit {
    background: #0d9488;
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.auth-body .btn-primary:hover,
.auth-body .auth-submit:hover {
    background: #0f766e;
}

.auth-body .btn-ghost {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.auth-body .btn-ghost:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.auth-body .btn-block { width: 100%; }

.auth-body .error-text {
    color: #b91c1c;
    font-size: 0.78rem;
    margin: 4px 0 0;
    line-height: 1.35;
}

.form-hint {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.35;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #0d9488;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
}

.brand-mark span {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.brand-mark-sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

@media (max-height: 760px) {
    .auth-visual-main {
        padding: 24px 0;
    }
    .auth-feature-list {
        margin-top: 24px;
        gap: 12px;
    }
    .auth-form-head {
        margin-bottom: 20px;
    }
    .auth-fields {
        gap: 14px;
    }
    .auth-meta-row {
        margin-top: 18px;
        padding-top: 14px;
    }
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.form-control {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(11, 110, 106, 0.12);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 20px;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    box-shadow: 0 10px 20px rgba(11, 110, 106, 0.25);
}

.btn-primary:hover { background: linear-gradient(135deg, #0d7f7a, #074844); }

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 0.86rem; border-radius: 10px; }

.error-text {
    color: var(--danger);
    font-size: 0.86rem;
    margin-top: 6px;
}

.demo-hint {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px dashed var(--line);
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.5;
}

.app-shell {
    display: block;
    min-height: 100vh;
}

.layout-topnav {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    box-shadow: 0 12px 40px rgba(8, 12, 20, 0.28);
}

.header-utility {
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
}

.header-utility-inner,
.header-main-inner {
    width: 100%;
    max-width: none;
    padding: 0 28px;
    display: flex;
    align-items: center;
}

.header-utility-inner {
    min-height: 42px;
    justify-content: space-between;
    gap: 16px;
}

.utility-left,
.utility-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.utility-left a {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 160ms ease;
}

.utility-left a:hover,
.utility-left a.is-active {
    color: #0f172a;
}

.utility-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(11,110,106,0.12), rgba(242,122,26,0.12));
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.pending-bell-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    flex-shrink: 0;
}
.pending-bell-toggle svg {
    width: 16px;
    height: 16px;
}
.pending-bell-toggle.is-on {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.pending-bell-toggle.is-off {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.pending-bell-toggle:hover {
    transform: translateY(-1px);
}
.pending-bell-toggle:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.utility-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.utility-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0b6e6a, #1aa39c);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.utility-user strong {
    display: block;
    color: #0f172a;
    font-size: 0.8rem;
    line-height: 1.1;
}

.utility-user small {
    display: block;
    color: #94a3b8;
    font-size: 0.68rem;
}

.utility-logout {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    padding: 6px 12px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 160ms ease;
}

.utility-logout:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
}

.header-main {
    width: 100%;
    background:
        radial-gradient(900px 120px at 10% 0%, rgba(11, 110, 106, 0.28), transparent 55%),
        radial-gradient(700px 120px at 90% 100%, rgba(242, 122, 26, 0.18), transparent 50%),
        linear-gradient(180deg, #14181f 0%, #0f1319 100%);
}

.header-main-inner {
    min-height: 64px;
    gap: 8px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    flex-shrink: 0;
    min-width: 210px;
    margin-right: 18px;
    padding: 6px 0;
}

.header-logo {
    height: 36px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

.header-brand-text strong {
    display: block;
    font-family: var(--display);
    font-size: 1.12rem;
    letter-spacing: -0.03em;
    text-transform: lowercase;
    line-height: 1.1;
}

.header-brand-text small {
    display: block;
    color: rgba(255,255,255,0.55);
    font-size: 0.7rem;
    margin-top: 2px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1aa39c, #0b6e6a);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(11, 110, 106, 0.35);
}

.brand-mark span {
    font-family: var(--display);
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.brand-mark-lg {
    width: 64px;
    height: 64px;
    border-radius: 18px;
}

.brand-mark-lg span {
    font-size: 1.2rem;
}

.header-nav {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
    height: 64px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
    height: 64px;
    padding-left: 8px;
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    font: inherit;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.header-actions .pending-bell-toggle {
    width: 36px;
    height: 36px;
}

.header-logout-form {
    margin: 0;
}

.header-logout-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-logout-btn .header-link-icon {
    width: 16px;
    height: 16px;
    opacity: 0.92;
}

.header-logout-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: translateY(-1px);
}

.header-logout-btn:focus-visible,
.header-actions .pending-bell-toggle:focus-visible {
    outline: 2px solid #f27a1a;
    outline-offset: 2px;
}

.header-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 18px;
    color: rgba(255,255,255,0.78);
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.header-link-text {
    display: inline-block;
}

.header-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
}

.header-link.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
    border-bottom-color: #f27a1a;
    text-shadow: 0 0 18px rgba(242, 122, 26, 0.35);
}

.header-link .nav-badge {
    position: absolute;
    top: 10px;
    right: 4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff !important;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
    z-index: 2;
}

.header-link .nav-badge[hidden] {
    display: none !important;
}

.nav-badge-soft,
.nav-badge-danger {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
}

.page-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 28px 28px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 22px 0 8px;
}

.page-heading h1 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.page-heading-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: #fff;
    cursor: pointer;
    margin-left: auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 16px;
}

.settings-preview-card .brand-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background:
        radial-gradient(500px 120px at 0% 0%, rgba(11,110,106,0.16), transparent 60%),
        linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

.brand-preview-logo {
    height: 52px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.settings-preview-card .brand-preview strong {
    display: block;
    font-family: var(--display);
    font-size: 1.15rem;
}

.settings-preview-card .brand-preview p {
    margin: 4px 0 0;
    color: rgba(255,255,255,0.65);
    font-size: 0.86rem;
}

.content {
    padding: 8px 0 24px;
    animation: fadeUp 0.45s var(--transition) both;
}

.flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #bbf7d0;
    font-weight: 600;
}

.flash-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: #bbf7d0;
}

.flash-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: #fed7aa;
}

.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-grid-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stats-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card.is-link {
    display: block;
    color: inherit;
    cursor: pointer;
}

.stat-card.is-link.is-active,
.stat-card.is-link:hover {
    border-color: #9fd4d0;
    box-shadow: 0 0 0 2px rgba(11, 110, 106, 0.14), var(--shadow);
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeUp 0.5s var(--transition) both;
}

.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(16, 35, 58, 0.12);
}

.stat-label {
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-value {
    font-family: var(--display);
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    margin: 0;
}

.stat-meta {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--brand);
    font-weight: 700;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.panel-header h3 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.panel-body { padding: 16px 18px; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.toolbar .search {
    flex: 1 1 240px;
    min-width: 180px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all var(--transition);
}

.chip:hover, .chip.active {
    background: var(--brand-soft);
    border-color: #9fd4d0;
    color: var(--brand-dark);
}

.table-wrap { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
}

table.data th,
table.data td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
    white-space: nowrap;
}

table.data th {
    font-family: var(--table-head);
    font-weight: 800;
    font-size: 0.78rem;
    line-height: 1.25;
    color: #1e2d3d;
    text-transform: none;
    letter-spacing: -0.01em;
    background: var(--bg-soft);
}

table.data tr {
    transition: background var(--transition);
}

table.data tbody tr:hover {
    background: #f7fafc;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(16, 35, 58, 0.12);
}

.product-thumb {
    height: 140px;
    background:
        linear-gradient(135deg, rgba(11,110,106,0.12), rgba(217,119,6,0.1)),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.35) 10px, rgba(255,255,255,0.35) 20px);
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.4rem;
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-body h3 {
    margin: 0;
    font-size: 1rem;
    font-family: var(--display);
    letter-spacing: -0.01em;
}

.product-meta {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.product-price {
    font-weight: 800;
    font-size: 1.1rem;
    margin-top: auto;
}

.price-old {
    color: var(--ink-soft);
    text-decoration: line-through;
    font-size: 0.86rem;
    font-weight: 600;
    margin-left: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge-soft { background: var(--bg-soft); color: var(--ink-soft); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--accent-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: #e0f2fe; color: #0369a1; }

.mp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 4px;
}

.mp-trendyol { background: #fff1e6; color: #c2410c; }
.mp-n11 { background: #f3e8ff; color: #6b21a8; }
.mp-hepsiburada { background: #ffedd5; color: #c2410c; }
.mp-edm { background: #dbeafe; color: #1d4ed8; }

/* Standart mağaza logosu (sipariş tabloları) */
.mp-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 32px;
    padding: 4px 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line, #d8e0ea);
    box-sizing: border-box;
    vertical-align: middle;
}

.mp-logo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 84px;
    max-height: 22px;
    object-fit: contain;
    object-position: center;
}

.mp-logo--sm {
    width: 80px;
    height: 28px;
}

.mp-logo--sm img {
    max-width: 68px;
    max-height: 18px;
}

.mp-logo--lg {
    width: 112px;
    height: 36px;
}

.mp-logo--lg img {
    max-width: 96px;
    max-height: 26px;
}

.mp-logo--xl {
    width: 128px;
    height: 40px;
}

.mp-logo--xl img {
    max-width: 112px;
    max-height: 30px;
}

.mp-logo-fallback {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-soft, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mp-logo--plain {
    width: 88px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}

.mp-logo--plain img {
    max-width: none;
    max-height: none;
}

/* Sipariş listeleri — sütun ayırıcı çizgiler */
.order-list-table {
    border-collapse: collapse;
}

.order-list-table thead th {
    overflow: visible;
    text-overflow: clip;
    font-family: var(--table-head);
    font-weight: 800;
    font-size: 0.78rem;
    line-height: 1.25;
    color: #1e2d3d;
    text-transform: none;
    letter-spacing: -0.01em;
    border-bottom: 1px solid #e2e8f0;
}

.order-list-table tbody td {
    overflow: hidden;
}

.order-list-table th:not(:first-child),
.order-list-table td:not(:first-child) {
    border-left: 1px solid #e2e8f0;
}

.order-list-table .col-store {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    text-align: center;
    padding: 6px 4px;
    overflow: visible;
}

.order-list-table .col-store .mp-logo {
    margin: 0 auto;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.store-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border-top: 3px solid var(--line);
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(16, 35, 58, 0.1);
}

.store-card.is-active {
    border-color: #9fd4d0;
    box-shadow: 0 0 0 2px rgba(11, 110, 106, 0.18), var(--shadow);
}

.mp-border-trendyol { border-top-color: #f27a1a; }
.mp-border-n11 { border-top-color: #7b2d8e; }
.mp-border-hepsiburada { border-top-color: #ff6000; }

.store-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.store-card-top h3 {
    margin: 8px 0 0;
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.store-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.store-metrics div {
    background: var(--bg-soft);
    border-radius: 10px;
    padding: 8px;
}

.store-metrics span {
    display: block;
    font-size: 0.72rem;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.store-metrics strong {
    font-size: 0.92rem;
}

.order-toolbar {
    margin-bottom: 14px;
}

.order-link {
    font-weight: 700;
    color: var(--brand-dark);
}

.muted-line {
    color: var(--ink-soft);
    font-size: 0.78rem;
    margin-top: 2px;
}

.cell-strong {
    font-weight: 700;
}

.order-table tr.row-urgent {
    background: linear-gradient(90deg, rgba(224, 242, 254, 0.65), transparent 55%);
}

.order-table tr.is-clickable {
    cursor: pointer;
}

.order-table tr.is-clickable:hover {
    background: #f3f8fc;
}

.pending-toolbar {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.pending-live {
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    margin-top: 5px;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
}

.live-dot.is-pulse {
    animation: livePulse 0.8s ease;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    100% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}

.order-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.order-hero-amount {
    text-align: right;
}

.order-hero-amount span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.84rem;
    margin-bottom: 4px;
}

.order-hero-amount strong {
    font-family: var(--display);
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.status-form .integration-fields {
    margin-top: 0;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.integration-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.integration-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(16, 35, 58, 0.12);
}

.integration-head {
    padding: 20px 22px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-height: 108px;
}

.integration-head h3 {
    margin: 0 0 8px;
    font-family: var(--display);
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.integration-head p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 36ch;
}

.integration-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.integration-body form.integration-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.integration-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
}

.integration-fields .form-group {
    margin-bottom: 0;
}

.integration-fields .form-group.full {
    grid-column: 1 / -1;
}

.secret-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.secret-row .form-control { flex: 1; }

.field-help {
    margin-top: 6px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--ink-soft);
}

.field-hint-box {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 0.82rem;
    line-height: 1.45;
}

.req {
    color: var(--danger);
    font-weight: 800;
}

.integration-switches {
    margin-top: 16px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-soft);
}

.integration-actions {
    margin-top: auto;
    padding-top: 18px;
    display: grid;
    gap: 8px;
}

.integration-meta {
    color: var(--ink-soft);
    font-size: 0.82rem;
    min-height: 1.2em;
}

.integration-actions-bar {
    margin-top: auto;
    padding-top: 16px;
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 1fr;
    gap: 8px;
    align-items: stretch;
}

.integration-actions-bar .btn {
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
    font-size: 0.88rem;
    white-space: nowrap;
}

.integration-secondary-actions {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.btn-test {
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.btn-test:hover {
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

.btn-test:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.test-result {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
}

.test-result p {
    margin: 6px 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--ink-soft);
}

.test-result-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
}

.test-result-top span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    white-space: nowrap;
}

.test-result.is-success {
    background: var(--success-soft);
    border-color: #bbf7d0;
}

.test-result.is-success .test-result-top strong,
.test-result.is-success p {
    color: var(--success);
}

.test-result.is-failed {
    background: var(--danger-soft);
    border-color: #fed7aa;
}

.test-result.is-failed .test-result-top strong,
.test-result.is-failed p {
    color: var(--danger);
}

.test-result.is-idle .test-result-top strong {
    color: var(--ink-soft);
}

.integration-card.is-tested {
    box-shadow: 0 0 0 2px rgba(11, 110, 106, 0.28), var(--shadow);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

.switch-row:last-of-type { border-bottom: none; }

.toggle {
    position: relative;
    width: 44px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle span {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle span::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
}

.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(18px); }

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
}

.kv {
    display: grid;
    gap: 10px;
}

.kv-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}

.kv-row span { color: var(--ink-soft); }
.kv-row strong { text-align: right; }

.empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--ink-soft);
}

.pagination-wrap {
    width: 100%;
    padding: 14px 18px;
    border-top: 1px solid var(--line, #d8e0ea);
    flex-shrink: 0;
    box-sizing: border-box;
}

.pagination-wrap > nav[role="navigation"] {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pagination-wrap nav > div[class*="sm:flex-1"] {
    display: flex;
    width: 100%;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pagination-wrap nav > div[class*="sm:flex-1"] > div:first-child {
    flex: 0 1 auto;
    min-width: 0;
}

.pagination-wrap nav > div[class*="sm:flex-1"] > div:last-child {
    flex: 0 0 auto;
    margin-left: auto;
}

.pagination-wrap nav p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

.pagination nav[role="navigation"] {
    width: 100%;
}

.pagination nav > div { gap: 6px !important; }

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 35, 58, 0.45);
    z-index: 35;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1200px) {
    .stats-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .store-grid { grid-template-columns: 1fr; }
    .pending-toolbar { flex-direction: column; }
}

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2, .detail-grid { grid-template-columns: 1fr; }
    .store-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .header-utility-inner,
    .header-main-inner,
    .page-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .header-link {
        padding: 0 14px;
        font-size: 0.86rem;
    }

    .utility-user small { display: none; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
        height: 100dvh;
    }
    .auth-panel {
        padding: 28px 20px;
        padding-top: max(28px, env(safe-area-inset-top));
    }
    .auth-form-grid {
        grid-template-columns: 1fr;
    }
    .auth-form-grid .span-2 {
        grid-column: auto;
    }
    .auth-meta-row {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .utility-left { display: none; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .header-nav {
        position: fixed;
        top: 76px;
        left: 12px;
        right: 12px;
        height: auto;
        background: #14181f;
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 14px;
        padding: 8px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        z-index: 60;
        max-height: calc(100vh - 120px);
        overflow: auto;
    }
    .header-nav.open { display: flex; }
    .header-link {
        justify-content: flex-start;
        height: 46px;
        border-bottom: none;
        border-radius: 10px;
        padding: 0 14px;
    }
    .header-link .nav-badge {
        position: static;
        margin-left: auto;
    }
    .header-link.active {
        background: rgba(255,255,255,0.08);
        border-bottom: none;
    }
    .header-actions {
        margin-left: auto;
        padding-left: 4px;
    }
    .header-logout-btn .header-link-text {
        display: none;
    }
    .header-logout-btn {
        width: 36px;
        padding: 0;
    }
    .overlay.show { display: block; }
    .page-heading { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .content { padding: 12px 0 24px; }
    .page-shell { padding: 0 14px 24px; }
    .header-utility-inner,
    .header-main-inner { padding-left: 14px; padding-right: 14px; }
    .stats-grid, .stats-grid-6, .stats-grid-5, .stats-grid-4, .product-grid, .integration-grid, .store-grid { grid-template-columns: 1fr; }
    .integration-fields { grid-template-columns: 1fr; }
    .integration-actions-bar { grid-template-columns: 1fr; }
    .order-hero { flex-direction: column; align-items: flex-start; }
    .order-hero-amount { text-align: left; }
}

/* Products ? quick edit table + form tabs */
.chip-meta {
    margin-left: auto;
    align-self: center;
    font-size: 0.8rem;
    color: var(--ink-soft);
    font-weight: 600;
}

table.data .text-right { text-align: right; }
table.data .text-center { text-align: center; }

.product-list-table td,
.product-list-table th {
    vertical-align: middle;
}

.product-list-table tbody tr.product-row--out { background: #fef2f2; }
.product-list-table tbody tr.product-row--out:hover { background: #fee2e2; }
.product-list-table tbody tr.product-row--low { background: #fffbeb; }
.product-list-table tbody tr.product-row--low:hover { background: #fef3c7; }
.product-list-table tbody tr.product-row--ok { background: #f0fdf9; }
.product-list-table tbody tr.product-row--ok:hover { background: #dcfaf2; }

.product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    max-width: 260px;
}

.product-cell-thumb {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    overflow: hidden;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.product-cell-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-cell-name {
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-cell-name:hover { color: var(--brand); }

.product-quick-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: 7.5rem;
    margin-left: auto;
}

.product-quick-field--stock { width: 4.5rem; }

.product-quick-input {
    width: 100%;
    min-width: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -moz-appearance: textfield;
}

.product-quick-input::-webkit-outer-spin-button,
.product-quick-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-quick-input:hover {
    border-color: #9fd4d0;
    background: #fff;
}

.product-quick-input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(11, 110, 106, 0.15);
}

.product-quick-input:disabled {
    opacity: 0.7;
    cursor: wait;
}

.product-quick-input.is-saving {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.product-quick-input.is-saved {
    border-color: #6ee7b7;
    background: #ecfdf5;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.product-quick-input.is-error {
    border-color: #fca5a5;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.product-quick-suffix {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-soft);
    flex-shrink: 0;
}

.product-quick-input--stock {
    text-align: center;
    font-weight: 800;
    border-radius: 999px;
}

.product-quick-input--tone-out {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.product-quick-input--tone-low {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.product-quick-input--tone-ok {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.product-quick-input--stock:focus { background: #fff; }

.mp-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sku-code {
    font-size: 0.78rem;
    color: var(--ink-soft);
    background: transparent;
}

.muted { color: var(--ink-soft); }

.product-form-panel { padding: 0; overflow: hidden; }

.product-form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 16px 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.product-form-tab {
    appearance: none;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    margin-bottom: -1px;
}

.product-form-tab.is-active {
    background: #fff;
    color: var(--brand-dark);
    border-color: var(--line);
}

.product-tab-panel { padding-top: 4px; }

.mp-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.mp-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mp-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mp-subtab {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 7px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.mp-subtab.is-active {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.mp-panel { margin-top: 4px; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .stats-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* --- Admin V2 bridge for existing Tailwind page content --- */
body.admin-theme-v2 .page-shell,
body.admin-theme-v2 .admin-content {
    width: 100%;
    max-width: none;
    margin: 0;
}

body.admin-theme-v2 .admin-content {
    padding-left: 0;
    padding-right: 0;
}

body.admin-theme-v2 .admin-content > .bg-white,
body.admin-theme-v2 .admin-content > form > .bg-white,
body.admin-theme-v2 .admin-content .rounded-2xl.bg-white,
body.admin-theme-v2 .admin-content .rounded-xl.bg-white {
    box-shadow: var(--shadow);
    border-color: var(--line);
}

body.admin-theme-v2 .page-heading h1 {
    font-family: var(--display);
    letter-spacing: -0.03em;
}

body.admin-theme-v2 .header-brand {
    min-width: 0;
    margin-right: 12px;
    padding: 6px 12px;
    border-radius: 12px;
    background: #fff;
    align-self: center;
}

body.admin-theme-v2 .header-logo {
    height: 40px;
    max-width: 180px;
    filter: none;
}

body.admin-theme-v2 .header-brand .brand-mark {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

body.admin-theme-v2 .header-nav {
    flex-wrap: nowrap;
    max-height: none;
    gap: 0;
}

body.admin-theme-v2 .header-link {
    white-space: nowrap;
    gap: 8px;
    padding: 0 14px;
}

body.admin-theme-v2 .header-link-icon,
body.admin-theme-v2 .header-caret {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.9;
}

body.admin-theme-v2 .header-caret {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: transform 160ms ease;
}

body.admin-theme-v2 .header-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 100%;
}

body.admin-theme-v2 .header-dropdown-toggle {
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font: inherit;
}

body.admin-theme-v2 .header-dropdown-toggle.active {
    border-bottom-color: #f27a1a;
}

body.admin-theme-v2 .header-dropdown.is-open > .header-dropdown-toggle .header-caret,
body.admin-theme-v2 .header-dropdown:hover > .header-dropdown-toggle .header-caret {
    transform: rotate(180deg);
}

body.admin-theme-v2 .header-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(16, 35, 58, 0.16);
    z-index: 80;
}

body.admin-theme-v2 .header-dropdown-menu--wide {
    min-width: 260px;
}

body.admin-theme-v2 .header-dropdown.is-open > .header-dropdown-menu,
body.admin-theme-v2 .header-dropdown:hover > .header-dropdown-menu {
    display: block;
}

body.admin-theme-v2 .header-dropdown-section {
    padding: 10px 12px 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

body.admin-theme-v2 .header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
}

body.admin-theme-v2 .header-dropdown-item .header-link-icon {
    color: var(--brand);
    opacity: 1;
}

body.admin-theme-v2 .header-dropdown-item:hover,
body.admin-theme-v2 .header-dropdown-item.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

@media (max-width: 1100px) {
    body.admin-theme-v2 .header-nav:not(.open) {
        display: none;
    }
    body.admin-theme-v2 .header-nav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        inset: 0 0 0 auto;
        width: min(320px, 88vw);
        height: 100%;
        background: var(--sidebar);
        padding: 72px 16px 24px;
        z-index: 60;
        overflow-y: auto;
        box-shadow: -12px 0 40px rgba(16, 35, 58, 0.25);
    }
    body.admin-theme-v2 .header-dropdown {
        flex-direction: column;
        height: auto;
    }
    body.admin-theme-v2 .header-dropdown-toggle,
    body.admin-theme-v2 .header-link {
        justify-content: flex-start;
        width: 100%;
        height: 44px;
    }
    body.admin-theme-v2 .header-dropdown-menu {
        position: static;
        display: none;
        min-width: 0;
        width: 100%;
        margin: 4px 0 8px;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: none;
    }
    body.admin-theme-v2 .header-dropdown.is-open > .header-dropdown-menu {
        display: block;
    }
    body.admin-theme-v2 .header-dropdown:hover > .header-dropdown-menu {
        display: none;
    }
    body.admin-theme-v2 .header-dropdown.is-open:hover > .header-dropdown-menu {
        display: block;
    }
    body.admin-theme-v2 .header-dropdown-section {
        color: rgba(255,255,255,0.45);
    }
    body.admin-theme-v2 .header-dropdown-item {
        color: rgba(255,255,255,0.88);
    }
    body.admin-theme-v2 .header-dropdown-item:hover,
    body.admin-theme-v2 .header-dropdown-item.active {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
    body.admin-theme-v2 .header-dropdown-item .header-link-icon {
        color: #7dd3c7;
    }
}

