/* ==========================================================================
   Packtisch v2 — Theme
   ========================================================================== */

:root {
    --bg-page:       #f5f7fb;
    --bg-card:       #ffffff;
    --bg-sidebar:    #0f172a;
    --bg-sidebar-2:  #1e293b;

    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #64748b;
    --text-on-dark:   #cbd5e1;
    --text-on-dark-2: #94a3b8;

    --border:    #e2e8f0;
    --border-2:  #f1f5f9;

    --accent:      #4f46e5;
    --accent-hov:  #4338ca;
    --accent-soft: #eef2ff;

    --success:      #10b981;
    --success-soft: #d1fae5;
    --warning:      #f59e0b;
    --warning-soft: #fef3c7;
    --danger:       #ef4444;
    --danger-soft:  #fee2e2;
    --info:         #06b6d4;
    --info-soft:    #cffafe;

    --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
    --shadow:    0 4px 6px -1px rgba(15,23,42,.06), 0 2px 4px -2px rgba(15,23,42,.04);
    --shadow-lg: 0 10px 25px -5px rgba(15,23,42,.08), 0 8px 10px -6px rgba(15,23,42,.04);

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 16px;

    --sidebar-w:  248px;
    --topbar-h:   64px;

    --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Reset / Base ---------- */
html, body { height: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hov); }

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- App Shell ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    margin: 0;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    color: var(--text-on-dark);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    padding: 24px 28px 48px;
    max-width: 1600px;
    width: 100%;
}

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .app-content { padding: 16px; }
    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(15,23,42,.5);
        z-index: 1030; opacity: 0; pointer-events: none;
        transition: opacity .2s;
    }
    .sidebar-overlay.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Sidebar ---------- */
.sidebar-brand {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-link { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-link:hover { color: #fff; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: grid; place-items: center; color: #fff; font-size: 18px;
    box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 16px; color: #fff; letter-spacing: -0.01em; }
.brand-version { font-size: 11px; color: var(--text-on-dark-2); font-weight: 500; }

.btn-sidebar-close {
    background: transparent; border: 0; color: var(--text-on-dark);
    width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
}
.btn-sidebar-close:hover { background: rgba(255,255,255,.06); color: #fff; }

.sidebar-nav {
    flex: 1; overflow-y: auto; padding: 8px 8px 16px;
    display: flex; flex-direction: column; gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.08) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }

/* ----- Accordion-Gruppen ----- */
.nav-group { display: flex; flex-direction: column; }

.nav-group-toggle {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 9px 12px;
    background: transparent; border: 0; cursor: pointer;
    color: var(--text-on-dark-2);
    font-family: inherit; font-size: 12.5px; font-weight: 600;
    text-align: left; letter-spacing: .01em;
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.nav-group-toggle:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav-group-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.nav-group-icon { font-size: 15px; width: 20px; text-align: center; opacity: .85; }
.nav-group-label { flex: 1; }
.nav-group-chevron {
    font-size: 11px; opacity: .55;
    transition: transform .2s ease, opacity .15s;
}
.nav-group-toggle:hover .nav-group-chevron { opacity: .9; }
.nav-group-toggle[aria-expanded="true"] .nav-group-chevron { transform: rotate(180deg); }

/* Aktive Gruppe (mit aktiver Seite) bekommt subtilen Highlight am Header */
.nav-group.has-active > .nav-group-toggle {
    color: #fff;
}
.nav-group.has-active > .nav-group-toggle .nav-group-icon { opacity: 1; color: var(--accent); }

/* Body mit smooth Open/Close (grid-template-rows-Trick für 0fr → 1fr Animation) */
.nav-group-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .25s ease;
}
.nav-group-body > .nav-list { overflow: hidden; min-height: 0; }
.nav-group.is-open > .nav-group-body { grid-template-rows: 1fr; }

.nav-list {
    list-style: none; padding: 4px 0 6px 6px; margin: 0;
    display: flex; flex-direction: column; gap: 1px;
}

.nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 7px 10px 7px 26px;
    border-radius: 7px;
    color: var(--text-on-dark);
    font-size: 13px; font-weight: 500;
    position: relative;
    transition: background .12s, color .12s;
}
.nav-link::before {
    content: '';
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 4px; border-radius: 50%;
    background: rgba(255,255,255,.18);
    transition: background .15s, transform .15s;
}
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link:hover::before { background: rgba(255,255,255,.45); }
.nav-link.is-active {
    background: linear-gradient(90deg, rgba(99,102,241,.22) 0%, rgba(99,102,241,.10) 100%);
    color: #fff;
}
.nav-link.is-active::before {
    background: var(--accent);
    transform: translateY(-50%) scale(1.6);
    box-shadow: 0 0 8px rgba(99,102,241,.6);
}
.nav-link i {
    font-size: 14px; width: 18px; text-align: center;
    opacity: .75;
}
.nav-link.is-active i { opacity: 1; }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
    background: var(--accent); color: #fff;
    font-size: 10.5px; font-weight: 600;
    padding: 1px 7px; border-radius: 999px;
    line-height: 1.4;
}
.nav-badge.stub {
    background: rgba(255,255,255,.06);
    color: var(--text-on-dark-2);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 9.5px;
}
.nav-link.is-stub { opacity: .55; }
.nav-link.is-stub:hover { opacity: .9; }

/* Marketplace-dots (jetzt nicht mehr in Sidebar genutzt, aber für Dashboard-Legende behalten) */
.mp-dot {
    width: 10px; height: 10px; border-radius: 50%; margin-left: 4px; margin-right: 6px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.06);
}
.mp-kaufland { background: #e5101a; }
.mp-ebay     { background: linear-gradient(90deg,#e53238 0 25%,#0064d2 25% 50%,#f5af02 50% 75%,#86b817 75% 100%); }
.mp-amazon   { background: #ff9900; }

.sidebar-footer { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.06); }
.user-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    background: rgba(255,255,255,.03);
}
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg,#a78bfa,#6366f1);
    color: #fff; font-weight: 600; font-size: 13px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.user-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.user-meta { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-login { font-size: 11px; color: var(--text-on-dark-2); }

/* ---------- Topbar ---------- */
.app-topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    padding: 0 28px;
    position: sticky; top: 0; z-index: 100;
}
@media (max-width: 991.98px) { .app-topbar { padding: 0 16px; } }

.btn-sidebar-toggle {
    background: transparent; border: 0; padding: 0;
    width: 40px; height: 40px; border-radius: 8px;
    color: var(--text-secondary); font-size: 20px; cursor: pointer;
}
.btn-sidebar-toggle:hover { background: var(--bg-page); color: var(--text-primary); }

.topbar-title { flex: 0 1 auto; min-width: 0; }
.page-title {
    font-size: 18px; font-weight: 600; margin: 0;
    color: var(--text-primary); letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.topbar-search {
    position: relative; min-width: 320px;
}
.topbar-search i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none;
}
.topbar-search input {
    width: 100%; height: 38px; padding: 0 14px 0 40px;
    background: var(--bg-page); border: 1px solid transparent;
    border-radius: 10px; font-size: 13.5px; color: var(--text-primary);
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.topbar-search input:focus {
    outline: 0; background: #fff;
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.topbar-search input::placeholder { color: var(--text-muted); }

.user-pill {
    display: inline-flex; align-items: center;
    background: transparent; border: 0;
    padding: 4px 10px 4px 4px; border-radius: 999px;
    font-weight: 500; font-size: 13.5px; color: var(--text-primary);
    cursor: pointer;
}
.user-pill:hover { background: var(--bg-page); }
.user-pill::after { margin-left: 8px; }

/* ---------- Cards & Page Header ---------- */
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 20px;
}
.page-header h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.page-header .page-subtitle { color: var(--text-muted); font-size: 13.5px; margin: 0; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-body { padding: 20px; }
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 16px; }
.card-header-flex { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* ---------- Stat Cards ---------- */
.stat-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 20px;
    flex-shrink: 0;
}
.stat-icon.bg-indigo  { background: var(--accent-soft);  color: var(--accent); }
.stat-icon.bg-green   { background: var(--success-soft); color: var(--success); }
.stat-icon.bg-amber   { background: var(--warning-soft); color: var(--warning); }
.stat-icon.bg-cyan    { background: var(--info-soft);    color: var(--info); }
.stat-icon.bg-rose    { background: var(--danger-soft);  color: var(--danger); }

.stat-meta { min-width: 0; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.1; letter-spacing: -0.02em; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Badges ---------- */
.pkt-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}
.pkt-badge .dot { width: 6px; height: 6px; border-radius: 50%; }

.pkt-badge.success { background: var(--success-soft); color: #047857; }
.pkt-badge.success .dot { background: #047857; }

.pkt-badge.warning { background: var(--warning-soft); color: #92400e; }
.pkt-badge.warning .dot { background: #b45309; }

.pkt-badge.danger { background: var(--danger-soft); color: #b91c1c; }
.pkt-badge.danger .dot { background: #b91c1c; }

.pkt-badge.info { background: var(--info-soft); color: #155e75; }
.pkt-badge.info .dot { background: #155e75; }

.pkt-badge.neutral { background: #f1f5f9; color: #475569; }
.pkt-badge.neutral .dot { background: #64748b; }

.pkt-badge.indigo { background: var(--accent-soft); color: var(--accent-hov); }
.pkt-badge.indigo .dot { background: var(--accent); }

/* Marketplace badges */
.mp-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; padding: 3px 8px;
    border-radius: 6px; line-height: 1.5;
}
.mp-badge.kaufland { background: #fee2e2; color: #b91c1c; }
.mp-badge.ebay     { background: #fef3c7; color: #92400e; }
.mp-badge.amazon   { background: #ffedd5; color: #c2410c; }

/* ---------- Tables (DataTables override) ---------- */
.dt-card { padding: 0; overflow: hidden; }
.dt-card .dataTables_wrapper { padding: 0; }
.dt-card .dataTables_wrapper .row { margin: 0; }
.dt-card .dataTables_length,
.dt-card .dataTables_filter {
    padding: 14px 20px; border-bottom: 1px solid var(--border-2);
}
.dt-card .dataTables_info {
    padding: 12px 20px; color: var(--text-muted); font-size: 12.5px;
}
.dt-card .dataTables_paginate {
    padding: 12px 20px; display: flex; justify-content: flex-end;
}
.dt-card table.dataTable {
    margin: 0 !important; border: 0;
}
.dt-card table.dataTable thead th {
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary); font-weight: 600;
    font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
    padding: 12px 16px;
}
.dt-card table.dataTable tbody td {
    padding: 14px 16px; border-bottom: 1px solid var(--border-2);
    vertical-align: middle; font-size: 13.5px; color: var(--text-primary);
}
.dt-card table.dataTable tbody tr:hover {
    background: var(--bg-page);
    cursor: pointer;
}
.dt-card table.dataTable tbody tr:last-child td { border-bottom: 0; }

.bestellnr { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text-primary); }
.kunde-line1 { font-weight: 500; }
.kunde-line2 { font-size: 12px; color: var(--text-muted); }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-mute { color: var(--text-muted); font-weight: 500; }

/* ---------- Filter bar ---------- */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-row .form-select,
.filter-row .form-control {
    height: 38px; font-size: 13.5px;
    border: 1px solid var(--border); border-radius: 8px;
}
.filter-row .form-select:focus,
.filter-row .form-control:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.filter-search { flex: 1; min-width: 240px; position: relative; }
.filter-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.filter-search input { padding-left: 36px; }

.btn-reset {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0 14px; height: 38px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-reset:hover { background: var(--bg-page); color: var(--text-primary); }

/* ---------- Order detail ---------- */
.order-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
    box-shadow: var(--shadow-sm);
}
.order-hero-main { flex: 1; min-width: 280px; }
.order-hero-back {
    color: var(--text-muted); font-size: 12.5px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px;
}
.order-hero-back:hover { color: var(--accent); }
.order-hero-title {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.01em;
}
.order-hero-title .order-id { color: var(--text-muted); font-weight: 500; font-family: var(--font-mono); font-size: 14px; }
.order-hero-meta {
    display: flex; gap: 18px; flex-wrap: wrap;
    color: var(--text-muted); font-size: 13px; margin-top: 6px;
}
.order-hero-meta strong { color: var(--text-primary); font-weight: 500; }
.order-hero-amount {
    text-align: right;
    font-size: 28px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.order-hero-amount small {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--text-muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}
@media (max-width: 1100px) {
    .detail-grid { grid-template-columns: 1fr; }
}

.section-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted); margin: 0 0 12px;
}

/* Items list */
.items-list { display: flex; flex-direction: column; gap: 12px; }
.item-row {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 14px; border: 1px solid var(--border-2); border-radius: 10px;
    background: #fdfdfe;
}
.item-thumb {
    width: 56px; height: 56px; border-radius: 8px;
    background: var(--bg-page); flex-shrink: 0;
    display: grid; place-items: center; color: var(--text-muted);
    overflow: hidden;
}
.item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.item-meta { flex: 1; min-width: 0; }
.item-title { font-weight: 500; color: var(--text-primary); margin: 0 0 4px; line-height: 1.4; }
.item-attrs { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 12px; }
.item-attrs span { white-space: nowrap; }
.item-amount { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.item-qty { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.item-price { font-weight: 600; font-size: 14px; }

/* Address card */
.addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .addr-grid { grid-template-columns: 1fr; } }
.addr-card {
    background: #fdfdfe; border: 1px solid var(--border-2); border-radius: 10px;
    padding: 14px;
}
.addr-card-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted); margin: 0 0 8px;
    display: flex; align-items: center; gap: 6px;
}
.addr-block { font-size: 13.5px; line-height: 1.55; color: var(--text-primary); }
.addr-block .name { font-weight: 600; }
.addr-block .secondary { color: var(--text-muted); font-size: 12.5px; }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 22px;
}
.timeline::before {
    content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px;
    width: 1px; background: var(--border);
}
.timeline-item {
    position: relative; padding-bottom: 18px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -19px; top: 4px;
    width: 11px; height: 11px; border-radius: 50%;
    background: #fff; border: 2px solid var(--accent);
}
.timeline-item.system .timeline-dot { border-color: var(--text-muted); }
.timeline-content {
    background: var(--bg-card); border: 1px solid var(--border-2);
    border-radius: 10px; padding: 10px 14px;
}
.timeline-meta {
    font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px;
    display: flex; gap: 8px; align-items: center;
}
.timeline-meta strong { color: var(--text-secondary); font-weight: 600; }
.timeline-text { font-size: 13.5px; color: var(--text-primary); margin: 0; }

.timeline-empty {
    background: var(--bg-page); border-radius: 10px;
    padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* Sidebar action panel */
.action-panel {
    display: flex; flex-direction: column; gap: 16px;
}
.action-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
    box-shadow: var(--shadow-sm);
}
.action-card .form-label {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em;
}
.action-card .form-select,
.action-card .form-control,
.action-card textarea {
    border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px;
}
.action-card .form-select:focus,
.action-card .form-control:focus,
.action-card textarea:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.btn-primary, .btn-pkt {
    background: var(--accent); border-color: var(--accent);
    color: #fff; font-weight: 500; border-radius: 8px;
    padding: 8px 16px; font-size: 13.5px;
}
.btn-primary:hover, .btn-pkt:hover {
    background: var(--accent-hov); border-color: var(--accent-hov); color: #fff;
}

/* ---------- Login ---------- */
.login-shell {
    min-height: 100vh; display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-page);
}
@media (max-width: 991.98px) { .login-shell { grid-template-columns: 1fr; } }

.login-side {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 48px;
    display: flex; flex-direction: column; justify-content: space-between;
    color: #fff;
    position: relative; overflow: hidden;
}
.login-side::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.12) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(255,255,255,.08) 0%, transparent 40%);
}
.login-side-inner { position: relative; z-index: 1; }
.login-side .brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; }
.login-side .brand .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.login-tagline { margin-top: 80px; max-width: 420px; }
.login-tagline h2 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 12px; }
.login-tagline p { font-size: 14.5px; color: rgba(255,255,255,.85); line-height: 1.6; }
.login-foot { font-size: 12px; color: rgba(255,255,255,.7); position: relative; z-index: 1; }
@media (max-width: 991.98px) { .login-side { display: none; } }

.login-form-wrap {
    display: flex; align-items: center; justify-content: center; padding: 40px;
}
.login-form { width: 100%; max-width: 380px; }
.login-form h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.login-form .lead { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; }
.login-form .form-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.login-form .form-control {
    height: 44px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px;
}
.login-form .form-control:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.login-form .btn-submit {
    width: 100%; height: 44px;
    background: var(--accent); color: #fff; border: 0;
    border-radius: 10px; font-weight: 600; font-size: 14px;
    transition: background .15s, transform .05s;
}
.login-form .btn-submit:hover { background: var(--accent-hov); }
.login-form .btn-submit:active { transform: translateY(1px); }
.login-error {
    background: var(--danger-soft); color: #991b1b;
    border-radius: 8px; padding: 10px 14px; font-size: 13px;
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* ---------- Worklist table on dashboard ---------- */
.worklist-table { width: 100%; }
.worklist-table th {
    text-align: left; padding: 10px 16px;
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); font-weight: 600;
    border-bottom: 1px solid var(--border-2);
}
.worklist-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-2);
    font-size: 13.5px; vertical-align: middle;
}
.worklist-table tr:last-child td { border-bottom: 0; }
.worklist-table tr:hover { background: var(--bg-page); cursor: pointer; }

.empty-state {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 32px; margin-bottom: 8px; display: block; }
.empty-state p { margin: 0; font-size: 13.5px; }

/* ---------- Misc ---------- */
.flash-stack { margin-bottom: 20px; }
.flash-stack .alert { border: 0; border-radius: var(--radius); font-size: 13.5px; }
.alert-success { background: var(--success-soft); color: #065f46; }
.alert-danger  { background: var(--danger-soft);  color: #991b1b; }
.alert-warning { background: var(--warning-soft); color: #92400e; }
.alert-info    { background: var(--info-soft);    color: #155e75; }

.dropdown-menu { border-radius: 10px; padding: 6px; font-size: 13.5px; }
.dropdown-item { border-radius: 6px; padding: 8px 12px; }
.dropdown-item:hover { background: var(--bg-page); }

.toast-container .toast {
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-lg); font-size: 13.5px;
}

/* DataTables pagination */
.page-link { color: var(--text-secondary); border-radius: 6px !important; margin: 0 2px; border: 0; padding: 6px 12px; }
.page-link:hover { background: var(--bg-page); color: var(--accent); }
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-item.disabled .page-link { color: var(--text-muted); }
