/* ==========================================================================
   AYBAKLAR PORTAL · Brand & UI System
   Marka renkleri logodan: Yeşil #1F8B3D / Sarı #FFE600
   ========================================================================== */

:root {
    /* Brand */
    --ayb-green-900: #0d5023;
    --ayb-green-800: #126a30;
    --ayb-green-700: #1a7e36;
    --ayb-green-600: #1F8B3D;
    --ayb-green-500: #2aa14b;
    --ayb-green-400: #4ec46b;
    --ayb-green-100: #d8f1de;
    --ayb-green-50:  #ecfaf0;

    --ayb-yellow-600: #d6c200;
    --ayb-yellow-500: #FFE600;
    --ayb-yellow-400: #ffec33;
    --ayb-yellow-100: #fffbcc;

    /* Neutrals (pro dark sidebar) */
    --ink-950: #0b1220;
    --ink-900: #0f172a;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-600: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-300: #cbd5e1;
    --ink-200: #e2e8f0;
    --ink-100: #f1f5f9;
    --ink-50:  #f8fafc;

    /* Status */
    --ok:    #16a34a;
    --warn:  #f59e0b;
    --err:   #dc2626;
    --info:  #0ea5e9;
    --purple:#a855f7;

    /* Layout */
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.05);
    --shadow:    0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.05);
    --shadow-lg: 0 18px 40px rgba(15,23,42,0.18);
    --shadow-glow: 0 0 0 4px rgba(31,139,61,0.18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--ink-800);
    background: var(--ink-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--ayb-green-700); text-decoration: none; }
a:hover { color: var(--ayb-green-800); }

/* ============================== APP SHELL ================================= */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas: "sidebar topbar" "sidebar main";
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: linear-gradient(180deg, var(--ink-950) 0%, #0a3a1a 100%);
    color: var(--ink-200);
    padding: 20px 14px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px 18px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 14px;
}
.brand-logo {
    width: 42px; height: 42px;
    background: var(--ayb-yellow-500);
    color: var(--ayb-green-700);
    border-radius: 12px;
    display: grid; place-items: center;
    font-weight: 900; font-size: 20px;
    box-shadow: 0 6px 14px rgba(255,230,0,0.35);
}
.brand-text {
    line-height: 1.05;
}
.brand-text .t1 {
    color: var(--ayb-yellow-500);
    font-weight: 800; letter-spacing: 0.5px; font-size: 18px;
}
.brand-text .t2 {
    color: var(--ink-400); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
}

.nav-section { margin: 16px 0 6px; padding: 0 10px;
    color: var(--ink-500); font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--ink-300); font-weight: 500; font-size: 14px;
    margin: 2px 0;
    transition: all .18s ease;
    position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(255,230,0,0.15), rgba(31,139,61,0.05));
    color: var(--ayb-yellow-500);
}
.nav-item.active::before {
    content: "";
    position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; background: var(--ayb-yellow-500); border-radius: 0 3px 3px 0;
}
.nav-item .icon { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.9; }
.nav-item .badge {
    margin-left: auto;
    background: var(--err); color: white; font-size: 11px; padding: 1px 7px; border-radius: 10px;
    font-weight: 700;
}
.nav-item .badge.green { background: var(--ayb-green-500); }
.nav-item .badge.yellow { background: var(--ayb-yellow-500); color: var(--ink-900); }

/* Topbar */
.topbar {
    grid-area: topbar;
    background: white;
    border-bottom: 1px solid var(--ink-200);
    display: flex; align-items: center;
    padding: 0 24px;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 50;
}
.topbar-search {
    flex: 1; max-width: 480px;
    position: relative;
}
.topbar-search input {
    width: 100%; padding: 10px 14px 10px 40px;
    border: 1px solid var(--ink-200);
    border-radius: 10px;
    font-size: 14px;
    background: var(--ink-50);
    transition: all .15s;
}
.topbar-search input:focus {
    outline: none; background: white;
    border-color: var(--ayb-green-500);
    box-shadow: var(--shadow-glow);
}
.topbar-search .ic-search {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--ink-400);
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--ink-50); border: 1px solid var(--ink-200);
    color: var(--ink-600);
    display: grid; place-items: center; cursor: pointer;
    transition: all .15s; position: relative;
}
.icon-btn:hover { background: var(--ayb-green-50); color: var(--ayb-green-700); border-color: var(--ayb-green-100); }
.icon-btn .dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--err);
    border: 2px solid white;
}
.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px; border-radius: 10px;
    background: var(--ink-50); border: 1px solid var(--ink-200);
}
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    color: white; font-weight: 700; font-size: 13px;
    display: grid; place-items: center;
    background: var(--ayb-green-600);
}
.user-chip .name { font-size: 13px; font-weight: 600; color: var(--ink-800); line-height: 1.1; }
.user-chip .role { font-size: 11px; color: var(--ink-500); }

/* Tiger sync chip */
.tiger-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #fff7d6 0%, #fef3c7 100%);
    color: #7c5a00;
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    border: 1px solid #fde68a;
}
.tiger-chip .pulse {
    width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
    box-shadow: 0 0 0 0 rgba(22,163,74,0.6);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.6); }
    70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

/* Main */
.main { grid-area: main; padding: 24px; }
.page-header {
    display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-title { font-size: 26px; font-weight: 800; color: var(--ink-900); margin: 0; letter-spacing: -0.4px; }
.page-subtitle { color: var(--ink-500); font-size: 14px; margin-top: 4px; }
.breadcrumb { color: var(--ink-500); font-size: 13px; margin-bottom: 8px; }
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--ayb-green-700); }

/* Cards */
.card {
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ink-100);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--ink-900); margin: 0; }
.card-subtitle { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.card-body { padding: 20px; }

/* KPI Cards */
.kpi-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 24px;
}
.kpi {
    background: white; border-radius: var(--radius);
    padding: 18px; border: 1px solid var(--ink-200);
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--ayb-green-500);
}
.kpi.warn::before { background: var(--warn); }
.kpi.err::before { background: var(--err); }
.kpi.info::before { background: var(--info); }
.kpi.yellow::before { background: var(--ayb-yellow-500); }
.kpi.purple::before { background: var(--purple); }

.kpi-label { color: var(--ink-500); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 800; color: var(--ink-900); margin-top: 6px; line-height: 1; letter-spacing: -0.5px;}
.kpi-sub { font-size: 12px; color: var(--ink-500); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.delta-up { color: var(--ok); font-weight: 700; }
.delta-down { color: var(--err); font-weight: 700; }

/* Status pills */
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: var(--ink-100); color: var(--ink-700);
}
.pill.green { background: #dcfce7; color: #166534; }
.pill.red { background: #fee2e2; color: #991b1b; }
.pill.yellow { background: #fef3c7; color: #854d0e; }
.pill.blue { background: #dbeafe; color: #1e40af; }
.pill.purple { background: #f3e8ff; color: #6b21a8; }
.pill.gray { background: var(--ink-100); color: var(--ink-700); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease;
}
.btn-primary { background: var(--ayb-green-600); color: white; }
.btn-primary:hover { background: var(--ayb-green-700); transform: translateY(-1px); box-shadow: var(--shadow); color: white; }
.btn-secondary { background: white; color: var(--ink-800); border-color: var(--ink-300); }
.btn-secondary:hover { background: var(--ink-50); border-color: var(--ink-400); }
.btn-yellow { background: var(--ayb-yellow-500); color: var(--ink-900); }
.btn-yellow:hover { background: var(--ayb-yellow-600); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data {
    width: 100%; border-collapse: separate; border-spacing: 0;
    font-size: 13.5px;
}
table.data thead th {
    text-align: left; padding: 12px 16px;
    background: var(--ink-50); color: var(--ink-600);
    font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--ink-200);
}
table.data tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ink-100);
    color: var(--ink-800);
}
table.data tbody tr:hover td { background: var(--ayb-green-50); }
table.data tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 700; color: var(--ink-900); }
.cell-mono { font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace; font-size: 12.5px; color: var(--ink-700); }

/* Grid helpers */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1024px) {
    .grid-2, .grid-3, .grid-4, .grid-2-1 { grid-template-columns: 1fr; }
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--ink-300);
    border-radius: 10px; font-size: 14px;
    background: white; transition: all .15s;
}
.form-control:focus { outline: none; border-color: var(--ayb-green-500); box-shadow: var(--shadow-glow); }

/* Charts container */
.chart { position: relative; height: 280px; }
.chart-tall { height: 360px; }

/* Department chip */
.dept-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
    color: white;
}

/* Alert */
.alert {
    padding: 12px 16px; border-radius: 10px;
    font-size: 13px; display: flex; align-items: center; gap: 10px;
    border: 1px solid;
}
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-200); margin-bottom: 16px; }
.tab {
    padding: 10px 16px; cursor: pointer; font-size: 13px; font-weight: 600;
    color: var(--ink-500); border-bottom: 2px solid transparent;
    transition: all .15s;
}
.tab:hover { color: var(--ayb-green-700); }
.tab.active { color: var(--ayb-green-700); border-bottom-color: var(--ayb-green-600); }

/* Progress */
.progress {
    height: 8px; background: var(--ink-100); border-radius: 999px; overflow: hidden;
}
.progress > div { height: 100%; background: var(--ayb-green-500); border-radius: 999px; transition: width .6s ease; }
.progress.warn > div { background: var(--warn); }
.progress.err > div { background: var(--err); }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px;
    width: 2px; background: var(--ink-200);
}
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before {
    content: ""; position: absolute; left: -24px; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: white; border: 3px solid var(--ayb-green-500);
}
.timeline-item.err::before { border-color: var(--err); }
.timeline-item.warn::before { border-color: var(--warn); }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }
.fade-up-stagger > * { animation: fadeUp .5s ease both; }
.fade-up-stagger > *:nth-child(1) { animation-delay: .04s; }
.fade-up-stagger > *:nth-child(2) { animation-delay: .08s; }
.fade-up-stagger > *:nth-child(3) { animation-delay: .12s; }
.fade-up-stagger > *:nth-child(4) { animation-delay: .16s; }
.fade-up-stagger > *:nth-child(5) { animation-delay: .20s; }
.fade-up-stagger > *:nth-child(6) { animation-delay: .24s; }

/* Heatmap */
.heatmap { display: grid; gap: 4px; grid-template-columns: repeat(53, 12px); }
.heatmap .cell { width: 12px; height: 12px; border-radius: 3px; background: var(--ink-100); }
.heatmap .cell.l1 { background: #d8f1de; }
.heatmap .cell.l2 { background: #a7e2b6; }
.heatmap .cell.l3 { background: #4ec46b; }
.heatmap .cell.l4 { background: #1f8b3d; }
.heatmap .cell.l5 { background: #0d5023; }

/* Empty state */
.empty {
    text-align: center; padding: 60px 20px;
    color: var(--ink-500);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* Severity */
.sev { display: inline-flex; gap: 2px; }
.sev .seg { width: 6px; height: 14px; background: var(--ink-200); border-radius: 2px; }
.sev.s1 .seg:nth-child(-n+1), .sev.s2 .seg:nth-child(-n+2),
.sev.s3 .seg:nth-child(-n+3), .sev.s4 .seg:nth-child(-n+4) { background: currentColor; }
.sev.s1 { color: var(--info); }
.sev.s2 { color: var(--warn); }
.sev.s3 { color: #f97316; }
.sev.s4 { color: var(--err); }

/* Notification dropdown */
.notif-panel {
    position: absolute; top: 50px; right: 0;
    width: 360px; background: white; border: 1px solid var(--ink-200);
    border-radius: 12px; box-shadow: var(--shadow-lg);
    overflow: hidden; display: none;
    z-index: 100;
}
.notif-panel.open { display: block; animation: fadeUp .25s ease both; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--ink-100); display: flex; gap: 10px; align-items: start; }
.notif-item:hover { background: var(--ink-50); cursor: pointer; }
.notif-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--ayb-green-50); color: var(--ayb-green-700);
}
.notif-icon.warn { background: #fef3c7; color: #854d0e; }
.notif-icon.err { background: #fee2e2; color: #991b1b; }
.notif-text { font-size: 13px; color: var(--ink-800); }
.notif-time { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

/* ============================== LOGIN PAGE ============================== */
.login-shell {
    min-height: 100vh;
    display: grid; grid-template-columns: 1.1fr 1fr;
    background: var(--ink-950);
    overflow: hidden;
}
@media (max-width: 900px) { .login-shell { grid-template-columns: 1fr; } .login-art { display:none; } }

.login-art {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,230,0,0.15), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(31,139,61,0.4), transparent 40%),
        linear-gradient(135deg, #0d5023 0%, #0b1220 100%);
    overflow: hidden;
}
.login-art::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.login-art-inner {
    position: relative; z-index: 2;
    height: 100%; padding: 60px;
    display: flex; flex-direction: column; justify-content: space-between;
    color: white;
}
.login-brand {
    display: flex; align-items: center; gap: 14px;
    animation: fadeUp .7s ease both;
}
.login-brand .logo {
    width: 64px; height: 64px; border-radius: 18px;
    background: var(--ayb-yellow-500); color: var(--ayb-green-700);
    display: grid; place-items: center;
    font-weight: 900; font-size: 28px;
    box-shadow: 0 12px 40px rgba(255,230,0,0.4);
}
.login-brand .title { font-size: 28px; font-weight: 900; letter-spacing: -0.5px; color: var(--ayb-yellow-500); line-height: 1; }
.login-brand .subtitle { font-size: 13px; color: var(--ink-300); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 4px;}

.login-hero {
    animation: fadeUp .9s .15s ease both;
}
.login-hero h1 {
    font-size: 44px; font-weight: 900; line-height: 1.05; margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ffe600 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}
.login-hero p { color: var(--ink-300); font-size: 16px; margin-top: 18px; max-width: 520px; line-height: 1.6; }
.login-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px;
}
.login-feature {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 14px;
    backdrop-filter: blur(6px);
    animation: fadeUp .9s ease both;
}
.login-feature:nth-child(1) { animation-delay: .35s; }
.login-feature:nth-child(2) { animation-delay: .45s; }
.login-feature:nth-child(3) { animation-delay: .55s; }
.login-feature:nth-child(4) { animation-delay: .65s; }
.login-feature .ic {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--ayb-yellow-500), var(--ayb-green-500));
    color: var(--ink-900); font-weight: 800;
    display: grid; place-items: center; margin-bottom: 8px;
}
.login-feature .lbl { font-size: 13px; font-weight: 700; color: white; }
.login-feature .desc { font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }

.login-foot { color: var(--ink-500); font-size: 12px; }

/* Floating shapes */
.floaters span {
    position: absolute; border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,230,0,0.4), rgba(31,139,61,0.4));
    filter: blur(40px); opacity: 0.6;
    animation: float 14s ease-in-out infinite;
}
.floaters span:nth-child(1) { width: 220px; height: 220px; top: 10%;  left: 60%; }
.floaters span:nth-child(2) { width: 160px; height: 160px; top: 60%;  left: 10%; animation-delay: -4s; }
.floaters span:nth-child(3) { width: 140px; height: 140px; top: 30%;  left: 30%; animation-delay: -8s; }
@keyframes float {
    0%,100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-30px) translateX(20px); }
}

/* Login form panel */
.login-panel {
    background: white;
    display: grid; place-items: center;
    padding: 40px;
    position: relative;
}
.login-card {
    width: 100%; max-width: 420px;
    animation: fadeUp .8s .1s ease both;
}
.login-card h2 {
    font-size: 28px; font-weight: 800; color: var(--ink-900); margin: 0 0 6px;
    letter-spacing: -0.4px;
}
.login-card .lead { color: var(--ink-500); font-size: 14px; margin-bottom: 28px; }
.login-input {
    position: relative; margin-bottom: 16px;
}
.login-input input {
    width: 100%; padding: 14px 16px 14px 46px;
    border: 1.5px solid var(--ink-200); border-radius: 12px;
    font-size: 15px; background: var(--ink-50);
    transition: all .2s;
}
.login-input input:focus {
    outline: none; background: white;
    border-color: var(--ayb-green-500); box-shadow: var(--shadow-glow);
}
.login-input .ic {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--ink-400);
}
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 20px; }
.login-row label { font-size: 13px; color: var(--ink-600); }
.login-row a { font-size: 13px; font-weight: 600; }
.btn-login {
    width: 100%; padding: 14px; font-size: 15px; font-weight: 700;
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--ayb-green-600), var(--ayb-green-700));
    color: white; cursor: pointer; position: relative; overflow: hidden;
    transition: all .2s; box-shadow: 0 6px 20px rgba(31,139,61,0.35);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(31,139,61,0.45); }
.btn-login::after {
    content:""; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%); transition: transform .8s;
}
.btn-login:hover::after { transform: translateX(100%); }
.demo-creds {
    margin-top: 22px; padding: 14px; border-radius: 12px;
    background: var(--ink-50); border: 1px dashed var(--ink-300);
    font-size: 12px; color: var(--ink-600);
}
.demo-creds b { color: var(--ink-800); }
.demo-creds code {
    background: white; padding: 1px 6px; border-radius: 4px;
    border: 1px solid var(--ink-200); color: var(--ayb-green-700); font-weight: 700;
}

/* Tiger 3 sync status box */
.tiger-box {
    border: 1px solid #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 12px; padding: 14px;
    display: flex; align-items: center; gap: 12px;
    margin-top: 18px;
}
.tiger-box .logo {
    width: 44px; height: 44px; border-radius: 10px;
    background: white;
    display: grid; place-items: center; color: #b45309;
    font-weight: 900; font-size: 16px; letter-spacing: -1px;
    border: 1px solid #fde68a;
}
.tiger-box .info { flex: 1; }
.tiger-box .t { font-size: 13px; font-weight: 700; color: #78350f; }
.tiger-box .s { font-size: 11.5px; color: #92400e; display: flex; align-items: center; gap: 5px; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(4px);
    display: none; z-index: 200;
    animation: fadeIn .2s ease both;
}
.modal-backdrop.open { display: grid; place-items: center; padding: 20px; }
.modal {
    background: white; border-radius: 16px;
    width: 100%; max-width: 640px; max-height: 90vh;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn .3s cubic-bezier(.2,.7,.3,1.2) both;
}
.modal.modal-lg { max-width: 900px; }
.modal.modal-sm { max-width: 420px; }
.modal-header {
    padding: 18px 22px; border-bottom: 1px solid var(--ink-100);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--ink-900); margin: 0; }
.modal-close {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--ink-200); background: white;
    cursor: pointer; color: var(--ink-500); display: grid; place-items: center; font-size: 18px;
}
.modal-close:hover { background: var(--ink-50); color: var(--err); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--ink-100); display: flex; justify-content: flex-end; gap: 8px; background: var(--ink-50); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(-20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Toasts */
.toast-stack {
    position: fixed; top: 80px; right: 24px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 300; pointer-events: none;
}
.toast {
    background: white; border-radius: 12px; padding: 12px 16px;
    box-shadow: var(--shadow-lg); min-width: 280px; max-width: 420px;
    display: flex; align-items: start; gap: 10px;
    border-left: 4px solid var(--ayb-green-500);
    animation: toastIn .3s ease both;
    pointer-events: auto;
}
.toast.warn { border-left-color: var(--warn); }
.toast.err { border-left-color: var(--err); }
.toast.info { border-left-color: var(--info); }
.toast .ic {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--ayb-green-50); color: var(--ayb-green-700); font-weight: 800;
}
.toast.warn .ic { background: #fef3c7; color: #854d0e; }
.toast.err .ic { background: #fee2e2; color: #991b1b; }
.toast.info .ic { background: #dbeafe; color: #1e40af; }
.toast .text { font-size: 13px; color: var(--ink-800); line-height: 1.4; }
.toast .text b { color: var(--ink-900); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); height: 0; padding: 0; margin: 0; } }
.toast.closing { animation: toastOut .25s ease forwards; }

/* Inline form table for parts/items */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; padding: 14px; background: var(--ink-50); border-radius: 10px; }
.inline-form .form-group { margin: 0; flex: 1; min-width: 140px; }
.inline-form .form-label { font-size: 11px; margin-bottom: 4px; }

/* Photo thumb */
.photo-thumb {
    width: 100%; aspect-ratio: 4/3;
    background: var(--ink-100); border-radius: 10px; overflow: hidden;
    display: grid; place-items: center; color: var(--ink-400);
    border: 2px dashed var(--ink-300); position: relative;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.9); opacity: 0; transition: opacity .15s;
}
.photo-thumb:hover .overlay { opacity: 1; }
.photo-thumb input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

/* Print-only barcode */
@media print {
    .sidebar, .topbar, .page-header div[style], .btn, .no-print { display: none !important; }
    .main { padding: 0 !important; }
    .app { display: block !important; }
    body { background: white !important; }
    .print-only { display: block !important; }
}
.print-only { display: none; }

/* Action menu (3-dot kebab) */
.action-menu { position: relative; display: inline-block; }
.action-menu-btn {
    width: 32px; height: 32px; border-radius: 8px; background: transparent;
    border: 1px solid var(--ink-200); cursor: pointer; color: var(--ink-600);
    display: grid; place-items: center;
}
.action-menu-btn:hover { background: var(--ink-50); }
.action-menu-list {
    position: absolute; right: 0; top: 36px; z-index: 30;
    background: white; border: 1px solid var(--ink-200); border-radius: 10px;
    box-shadow: var(--shadow); min-width: 180px; padding: 4px;
    display: none;
}
.action-menu.open .action-menu-list { display: block; animation: fadeUp .15s ease both; }
.action-menu-list a, .action-menu-list button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: transparent; border: 0; text-align: left;
    padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--ink-700);
    cursor: pointer; font-family: inherit;
}
.action-menu-list a:hover, .action-menu-list button:hover { background: var(--ayb-green-50); color: var(--ayb-green-700); }
.action-menu-list .danger { color: var(--err); }
.action-menu-list .danger:hover { background: #fee2e2; color: #991b1b; }

/* Buttons utility */
.btn-icon-only { padding: 8px; }
.btn-danger { background: var(--err); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }

/* Filter chip */
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; font-size: 12px;
    background: var(--ayb-green-50); color: var(--ayb-green-700); font-weight: 600;
    border: 1px solid var(--ayb-green-100);
}
.filter-chip a { color: inherit; }

/* Stat strip (for spare part detail) */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 14px; }
.stat-strip > div { padding: 14px; background: var(--ink-50); border-radius: 10px; }
.stat-strip .l { font-size: 11px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 1px; }
.stat-strip .v { font-size: 22px; font-weight: 800; color: var(--ink-900); margin-top: 4px; }

/* Form helpers */
.required::after { content: " *"; color: var(--err); }
.help { font-size: 11px; color: var(--ink-500); margin-top: 4px; }

/* Empty action prompt */
.callout {
    padding: 16px 20px; border-radius: 12px;
    background: linear-gradient(135deg, var(--ayb-green-50), white);
    border: 1px solid var(--ayb-green-100);
    display: flex; gap: 14px; align-items: center;
}
.callout .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ayb-green-600); color: white; font-size: 18px; }

/* Avatar circles for users */
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 800; font-size: 20px; }
