/* LUXORIA styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f0eb; color: #333; }
nav { background: #5c4033; color: white; padding: 0.6rem 1.2rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
nav h1 { font-size: 1.1rem; font-weight: 600; white-space: nowrap; }
nav button { background: none; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 0.3rem 0.6rem; border-radius: 4px; cursor: pointer; font-size: 0.75rem; white-space: nowrap; }
nav button:hover, nav button.active { background: rgba(255,255,255,0.2); border-color: white; }
nav .nav-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
/* FB Kaisa 2026-06-12: sektsioonide laius ühtlustatud — laiadel ekraanidel
   kasutavad KÕIK moodulid (Artiklid, Tootearendus, Tootmine jne) ruumi nagu
   Finants/Müük; 1100px cap jättis nt pakendi-tabeli (min-width:900px) kitsa
   sisuveeru sisse lõikuma. */
.container { max-width: min(1600px, 96vw); margin: 2rem auto; padding: 0 1rem; }
.section { display: none; }
.section.active { display: block; }
.card { background: white; border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
h2 { margin-bottom: 1rem; color: #5c4033; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid #eee; }
th { background: #faf6f2; color: #5c4033; font-weight: 600; position: sticky; top: 0; z-index: 5; box-shadow: inset 0 -1px 0 #e0d5cc, 0 2px 4px rgba(0,0,0,0.06); }
.low-stock { color: #c0392b; font-weight: 600; }
.btn { padding: 0.4rem 0.9rem; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.btn-primary { background: #5c4033; color: white; }
.btn-success { background: #1e8449; color: white; }
.btn-danger { background: #c0392b; color: white; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
.form-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.form-row label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 500; flex: 1; min-width: 150px; }
.form-row input, .form-row select, .form-row textarea { padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-planned, .badge-confirmed { background: #f0e6d3; color: #5c4033; }
.badge-approved { background: #d4efdf; color: #1e8449; }
.badge-active, .badge-new { background: #d6eaf8; color: #1a5276; }
.badge-completed { background: #d4efdf; color: #1e8449; }
.badge-shipped { background: #d5f5e3; color: #1e8449; }
.badge-rejected, .badge-cancelled { background: #fadbd8; color: #922b21; }
.progress-bar { background: #eee; border-radius: 4px; height: 20px; position: relative; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: white; }
.progress-ok { background: #27ae60; }
.progress-warn { background: #f39c12; }
.progress-over { background: #c0392b; }
.capacity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.wc-card { border: 1px solid #e0d5cc; border-radius: 8px; padding: 1rem; }
.wc-card h3 { color: #5c4033; margin-bottom: 0.5rem; font-size: 1rem; }
.shelf-info { font-size: 0.8rem; color: #595959; }
.alert { padding: 0.8rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-danger { background: #fadbd8; color: #922b21; }
.alert-success { background: #d4efdf; color: #1e8449; }
.inci-box { background: #faf6f2; padding: 1rem; border-radius: 4px; font-style: italic; margin-top: 0.5rem; }
.recipe-items-list { margin: 0.5rem 0; }
.recipe-item-row { display: flex; gap: 0.5rem; align-items: end; margin-bottom: 0.4rem; }
.recipe-item-row select, .recipe-item-row input { padding: 0.4rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.85rem; }
.stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.stat-card { background: white; border-radius: 8px; padding: 1.2rem; flex: 1; min-width: 180px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); text-align: center; }
.stat-card .number { font-size: 2rem; font-weight: 700; color: #5c4033; }
.stat-card .label { font-size: 0.85rem; color: #595959; margin-top: 0.3rem; }

/* ── Dashboard Action Center ─────────────────────────────── */
.action-center { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin-bottom: 1.2rem; }
.action-center .ac-header { display:flex; align-items:center; justify-content:space-between; font-size:0.78rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color: #595959; margin: 0.2rem 0 0.4rem; }
.action-center .ac-empty { background:#e8f5e9; border-left:4px solid #27ae60; padding:0.9rem 1.2rem; border-radius:6px; color:#1e8449; font-size:0.9rem; }
.action-item { display:flex; align-items:center; gap:0.9rem; background:white; border-left:4px solid transparent; border-radius:6px; padding:0.7rem 1rem; box-shadow:0 1px 3px rgba(0,0,0,0.06); cursor:pointer; transition: transform 0.15s, box-shadow 0.15s; }
.action-item:hover { transform: translateX(2px); box-shadow:0 2px 8px rgba(0,0,0,0.1); }
.action-item.critical { border-left-color:#c0392b; background: linear-gradient(to right, #fdf2f2, white 30%); }
.action-item.warning  { border-left-color:#e67e22; background: linear-gradient(to right, #fdf6ed, white 30%); }
.action-item.info     { border-left-color:#2980b9; background: linear-gradient(to right, #edf6fd, white 30%); }
.action-item .ai-icon { font-size:1.3rem; width:28px; text-align:center; flex-shrink:0; }
.action-item .ai-body { flex:1; min-width:0; }
.action-item .ai-title { font-weight:600; color:#333; font-size:0.92rem; line-height:1.3; }
.action-item .ai-sub { font-size:0.8rem; color: #595959; margin-top:0.15rem; }
.action-item .ai-chev { color:#ccc; font-size:1.1rem; }

/* ── Today metrics (compact KPI strip) ──────────────────── */
.today-metrics { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:0.8rem; margin-bottom:1.2rem; }
.tm-card { background:white; border-radius:8px; padding:1rem 1.2rem; box-shadow:0 1px 4px rgba(0,0,0,0.08); cursor:pointer; transition: box-shadow 0.15s; }
.tm-card:hover { box-shadow:0 3px 10px rgba(0,0,0,0.1); }
.tm-label { font-size:0.72rem; text-transform:uppercase; letter-spacing:0.4px; color: #595959; font-weight:600; }
.tm-value { font-size:1.7rem; font-weight:700; color:#5c4033; line-height:1.1; margin-top:0.3rem; }
.tm-delta { font-size:0.75rem; margin-top:0.25rem; color: #595959; }
.tm-delta.up   { color:#1e8449; }
.tm-delta.down { color:#c0392b; }
/* Modal */
.modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:1000; justify-content:center; align-items:flex-start; padding:2rem; overflow-y:auto; }
.modal-overlay.open { display:flex; }
/* FB Kaisa 2026-06-12: pop-up ala ekraani suhtes laiem — kõigis vaadetes üle CRM-i */
.modal { background:white; border-radius:12px; max-width:min(1100px, 94vw); width:100%; padding:2rem; position:relative; box-shadow:0 8px 32px rgba(0,0,0,0.2); }
.modal-close { position:absolute; top:1rem; right:1rem; background:none; border:none; font-size:1.5rem; cursor:pointer; color: #595959; }
.modal-close:hover { color:#333; }
.product-card-header { display:flex; gap:1.5rem; margin-bottom:1.5rem; }
.product-card-img { width:200px; height:200px; object-fit:contain; border-radius:8px; background:#faf6f2; flex-shrink:0; }
.product-card-img-placeholder { width:200px; height:200px; border-radius:8px; background:#faf6f2; display:flex; align-items:center; justify-content:center; color:#ccc; font-size:3rem; flex-shrink:0; }
.product-card-info h2 { color:#5c4033; margin-bottom:0.5rem; font-size:1.2rem; }
.product-card-meta { font-size:0.85rem; color:#666; line-height:1.8; }
.product-card-meta strong { color:#333; }
.inci-section { background:#faf6f2; padding:1rem; border-radius:8px; margin-top:1rem; }
.inci-section h3 { font-size:0.9rem; color:#5c4033; margin-bottom:0.5rem; }
.inci-section p { font-size:0.85rem; line-height:1.6; font-style:italic; color:#555; }
.product-row { cursor:pointer; }
.product-row:hover { background:#faf6f2; }
/* Orders & price lists */
.order-card { border: 1px solid #e0d5cc; border-radius: 8px; padding: 1.2rem; margin-bottom: 1rem; }
.order-card:hover { border-color: #5c4033; }
.order-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.8rem; }
/* FB Kaisa 2026-06-12: read ei tohi modal'i alast välja joosta — wrap + min-width:0 */
.order-line-row { display:flex; flex-wrap:wrap; gap:0.5rem; align-items:end; margin-bottom:0.4rem; }
.order-line-row > select, .order-line-row > input { min-width:0; max-width:100%; }
/* FB: müügitellimuse tooterea kitsam ja wrappiv paigutus */
#orderLines .order-line-row, [id^="eoLines-"] .order-line-row { align-items:start; flex-wrap:wrap; gap:0.4rem; padding-bottom:0.3rem; border-bottom:1px dashed #f0ebe5; }
#orderLines .order-line-row > input, [id^="eoLines-"] .order-line-row > input { padding:0.4rem; border:1px solid #ccc; border-radius:4px; font-size:0.9rem; box-sizing:border-box; }
/* Tabs */
.tab-bar { display:flex; gap:0; border-bottom:2px solid #e0d5cc; margin-bottom:1.5rem; }
.tab-btn { padding:0.6rem 1.2rem; border:none; background:none; cursor:pointer; font-size:0.9rem; color: #595959; border-bottom:2px solid transparent; margin-bottom:-2px; }
.tab-btn:hover { color:#5c4033; }
.tab-btn.active { color:#5c4033; font-weight:600; border-bottom-color:#5c4033; }

/* Inline filter-pill (segament-control kohaliku filtrina, nt segamispartiide nimekirja kohal) */
.mb-filter-tabs { display:flex; gap:0.2rem; background:#f0ebe6; padding:3px; border-radius:6px; }
.mb-filter-btn { border:none; background:transparent; padding:0.4rem 0.85rem; border-radius:4px; cursor:pointer; font-size:0.85rem; color:#666; transition:background 0.15s ease, color 0.15s ease; white-space:nowrap; }
.mb-filter-btn:hover { background:rgba(255,255,255,0.6); color:#5c4033; }
.mb-filter-btn.active { background:white; color:#5c4033; font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,0.08); }
.mb-filter-count { display:inline-block; background:rgba(92,64,51,0.12); padding:1px 7px; border-radius:10px; font-size:0.72rem; margin-left:0.3rem; font-weight:500; min-width:1.3em; text-align:center; }
.mb-filter-btn.active .mb-filter-count { background:#5c4033; color:white; }

/* ── Vertikaalne moodulisisene külgriba (UX pack D) ───────────
 * Kasutab CSS :has() — ei vaja DOM muudatusi.
 * Sektsioonid millel on otsene .tab-bar laps, muutuvad 2-veeruliseks grid'iks:
 *   [tab-bar vasakul] | [tab-content paremal]
 * Kõik olemasolevad selectorid (#sales > .tab-bar) jäävad tööle.
 */
.section.active:has(> .tab-bar) {
    display: grid;
    grid-template-columns: 210px 1fr;
    column-gap: 1.5rem;
    align-items: start;
}
.section.active:has(> .tab-bar) > h2 {
    grid-column: 1 / -1;
}
.section.active:has(> .tab-bar) > .tab-bar {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    gap: 0.1rem;
    border-bottom: none;
    border-right: 2px solid #e0d5cc;
    padding-right: 0.5rem;
    margin-bottom: 0;
    position: sticky;
    top: 4.5rem;
    /* v1.1.798: tihedam vertikaalne tab-bar, et 19+ tab'i (production, settings, sales)
       mahuks väikese laptopi vaates (1366×768) enne kui sticky aktiveerub. Pakkimine:
       19 × ~28px + gaps = ~560px, mahub 671px-i (vt FB Jimmy 2026-05-11). */
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}
.section.active:has(> .tab-bar) > .tab-bar .tab-btn {
    text-align: left;
    padding: 0.32rem 0.7rem;
    border: none;
    border-right: 3px solid transparent;
    border-radius: 4px 0 0 4px;
    margin-bottom: 0;
    margin-right: -2px;
    font-size: 0.85rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.section.active:has(> .tab-bar) > .tab-bar .tab-btn:hover {
    background: #faf6f2;
}
.section.active:has(> .tab-bar) > .tab-bar .tab-btn.active {
    border-right-color: #5c4033;
    border-bottom-color: transparent;
    background: #faf6f2;
    color: #5c4033;
    font-weight: 600;
}
.section.active:has(> .tab-bar) > .tab-content {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}
/* Mitte-tab-sisu (nt .card, .stats, formid) pärast tab-bar'i — samuti paremasse veergu */
.section.active:has(> .tab-bar) > :not(h2):not(.tab-bar):not(.tab-content) {
    grid-column: 2;
}

@media (max-width: 900px) {
    .section.active:has(> .tab-bar) {
        display: block;
    }
    .section.active:has(> .tab-bar) > .tab-bar {
        position: static;
        flex-direction: row;
        border-right: none;
        border-bottom: 2px solid #e0d5cc;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
        padding-right: 0;
        margin-bottom: 1rem;
    }
    .section.active:has(> .tab-bar) > .tab-bar .tab-btn {
        border-right: none;
        border-bottom: 3px solid transparent;
        border-radius: 4px 4px 0 0;
    }
    .section.active:has(> .tab-bar) > .tab-bar .tab-btn.active {
        border-right-color: transparent;
        border-bottom-color: #5c4033;
    }
}
.tab-content { display:none; }
.tab-content.active { display:block; }
/* Customer sub-tabs */
.cust-sub-btn.active { color:#5c4033; font-weight:600; border-bottom-color:#5c4033 !important; }
.cust-sub-btn:hover { color:#5c4033; }
.pl-status-draft { color: #595959; }
.pl-status-confirmed { color:#1e8449; font-weight:600; }
.pl-status-expired { color:#c0392b; }

/* Gantt kalender */
.gantt-container { overflow-x:auto; margin-top:0.5rem; }
.gantt-table { border-collapse:collapse; min-width:100%; }
.gantt-table th, .gantt-table td { border:1px solid #e0d5cc; }
.gantt-wc-header { position:sticky; left:0; background:#faf6f2; z-index:2; min-width:140px; padding:0.5rem; font-size:0.85rem; }
.gantt-wc-name { position:sticky; left:0; background:white; z-index:1; min-width:140px; font-weight:600; vertical-align:top; padding:0.5rem; border-right:2px solid #e0d5cc; font-size:0.85rem; }
.gantt-week-header { text-align:center; min-width:90px; font-size:0.8rem; padding:0.4rem; background:#faf6f2; }
.gantt-cell { min-width:90px; min-height:55px; vertical-align:top; padding:3px; cursor:pointer; position:relative; }
.gantt-cell:hover { outline:2px solid #5c4033; outline-offset:-2px; }
.gantt-util-0 { background:white; }
.gantt-util-low { background:#eafaf1; }
.gantt-util-mid { background:#fef9e7; }
.gantt-util-high { background:#fdedec; }
.gantt-util-over { background:#fadbd8; }
.gantt-bar { border-radius:4px; padding:3px 6px; font-size:0.7rem; line-height:1.3; color:white; cursor:pointer; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gantt-bar:hover { opacity:0.85; }
.gantt-status-draft { background:#aaa; }
.gantt-status-confirmed { background:#2980b9; }
.gantt-status-in_progress { background:#e67e22; }
.gantt-status-completed { background:#27ae60; }

/* ── Gantt drag & drop ─────────────────────────────── */
.gantt-bar[draggable="true"] { cursor:grab; }
.gantt-bar[draggable="true"]:active { cursor:grabbing; }
.gantt-bar.gantt-dragging { opacity:0.4; }
.gantt-cell.gantt-drop-valid { outline:2px dashed #27ae60; outline-offset:-2px; background:#eafaf1 !important; }
.gantt-cell.gantt-drop-invalid { outline:2px dashed #e74c3c; outline-offset:-2px; background:#fdedec !important; }
.gantt-cell.gantt-drop-over { outline:3px solid #27ae60; outline-offset:-2px; }
.gantt-capacity-badge { position:absolute; bottom:2px; right:3px; font-size:0.6rem; font-weight:700; padding:1px 3px; border-radius:2px; pointer-events:none; }
.gantt-capacity-ok { background:#1e8449; color:white; }
.gantt-capacity-warn { background:#f39c12; color:white; }
.gantt-capacity-over { background:#e74c3c; color:white; }

/* ── Ligipääsetavus ────────────────────────────────── */
input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid #5c4033;
    outline-offset: 1px;
}
button:focus-visible { outline: 2px solid #5c4033; outline-offset: 2px; }

button:disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
input:disabled, select:disabled, textarea:disabled {
    background: #f0f0f0;
    color: #595959;
}

/* ── Vormi valideerimine ──────────────────────────── */
input.field-error, select.field-error { border-color: #c0392b; background: #fdf0ef; }
input.field-success, select.field-success { border-color: #27ae60; }
.field-error-msg { color: #c0392b; font-size: 0.8rem; margin-top: 2px; }

/* ── Laadimisanimatsioon ──────────────────────────── */
.spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 3px solid #e0d6cc; border-top-color: #5c4033;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7); display: flex;
    align-items: center; justify-content: center; z-index: 100;
}

/* ── Mobiilivaade ─────────────────────────────────── */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 0.5rem; }
    nav { flex-wrap: wrap; gap: 0.3rem; padding: 0.5rem; }
    nav .nav-buttons { display: flex; flex-wrap: wrap; gap: 0.3rem; }
    .form-row { flex-direction: column; }
    .form-row label { min-width: auto; }
    .capacity-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .modal-content { max-width: 95%; margin: 1rem; }
    .stat-card { min-width: 120px; }
}

/* Hamburger-btn: vaikimisi peidetud, mobiilis (≤768px) nähtav.
   NB: see reegel PEAB olema enne @media-blokki, et media query'i `display: block`
   saaks selle korrektselt üle kirjutada (CSS-cascade eeldab et default on enne). */
.hamburger-btn { display: none; }

/* Mobile (max 768px) */
@media (max-width: 768px) {
    body { font-size: 14px; overflow-x: hidden; }
    html { overflow-x: hidden; }
    nav { position: relative; flex-wrap: wrap; padding: 0.4rem 0.5rem; overflow: visible !important; }
    nav .nav-brand { width: 100%; text-align: center; margin-bottom: 0.3rem; display: flex; justify-content: space-between; align-items: center; }
    nav .nav-buttons.collapsed { display: none; }
    /* FB Jimmy 2026-05-12: mobiilis nav-buttons on dropdown all nav-i alt.
       Vanal flex-row layoutil oli see surutud width=0 (nav child ilma flex-grow'ta).
       Position absolute + top:100% paneb selle nav-i alla täis-laiusega. */
    nav .nav-buttons.expanded {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
        padding: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a3a5c;
        z-index: 100;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    nav .nav-buttons.expanded button {
        width: 100%;
        text-align: left;
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
        min-height: 44px;  /* iOS soovituslik touch-target */
    }
    nav button { font-size: 0.75rem; padding: 0.4rem 0.7rem; min-height: 36px; }
    .hamburger-btn { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: white; padding: 0.3rem; }
    .container { margin: 0.5rem auto; max-width: 100%; padding: 0 0.5rem; }
    .card { padding: 0.8rem; margin-bottom: 0.8rem; }
    table { font-size: 0.85rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    th, td { padding: 0.3rem 0.4rem; white-space: nowrap; }
    .modal-content { max-width: 100%; margin: 0; min-height: 100vh; border-radius: 0; }
    .modal-close { top: 0.5rem; right: 0.5rem; font-size: 1.5rem; padding: 0.5rem; }
    .stat-cards { flex-direction: column; }
    .stat-card { min-width: auto; }
    .product-card-header { flex-direction: column; gap: 0.5rem; }
    /* FB Jimmy 2026-05-12: mobiili tab-bar — scroll-snap + scroll-fade. */
    .tab-bar {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        /* Visuaalne vihje: paremas servas fade näitab, et saab scroll'ida */
        mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
        position: relative;
    }
    /* flex-shrink:0 — tab-btn'id ei surutaks 25px-le.
       min-height 44px — iOS touch-target soovituslik suurus.
       scroll-snap-align — touch-swipe pärast nupule. */
    .tab-btn {
        font-size: 0.82rem;
        padding: 0.6rem 0.9rem;
        min-height: 44px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    /* Tab-popout (↗) on hover-only feature — mobiilis pole hover'it. Peida. */
    .tab-popout { display: none !important; }
    .btn { min-height: 36px; padding: 0.4rem 0.8rem; }

    /* FB Jimmy 2026-05-12: mobiilis sundi inline `grid-template-columns` 1 veeruks.
       JS-failides on ~64 inline grid-mustri kohta (2-3 veeruga), mis mobiilis
       paneeb sisu viewportist välja → horisontaalne scroll. */
    [style*="display:grid"][style*="grid-template-columns"],
    [style*="display: grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Diagrammid responsive */
    canvas { max-width: 100% !important; height: auto !important; }

    /* Chat-paneel mobiilis: täislaius alt-üles, mitte 340px parem-paremale */
    .lux-chat-panel { right: 0.5rem !important; left: 0.5rem !important; width: auto !important; max-width: none !important; bottom: 70px !important; }
    /* AI chat-paneel sama */
    #aiChatPanel { right: 0.5rem !important; left: 0.5rem !important; width: auto !important; max-width: none !important; }
    /* Stuck-helper FAB ei takista nuppude vajutust mobiilis */
    .lux-feedback-fab, .lux-chat-fab, .lux-ai-fab { transform: scale(0.85); transform-origin: bottom right; }

    /* Tabelite responsive vaade */
    .responsive-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .hide-mobile { display: none !important; }
    .stats { flex-wrap: wrap; }
    .stats .stat-card { flex: 1 1 45%; min-width: 120px; }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
    body { font-size: 13px; }
    nav button { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
    .btn { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1rem; }
    .card { padding: 0.5rem; }
    .gantt-container { font-size: 0.75rem; }
    .order-card { padding: 0.5rem; }
}

/* UX-audit: mobiilis sisu jäi paremale tühjaks (overflow), floating-nupud katsid sisu */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    .container, main, .section { max-width: 100vw; box-sizing: border-box; padding-left: 0.5rem; padding-right: 0.5rem; }
    /* Floating-nupud (chat, AI, feedback) ei tohi katta sisu — vähenda + nihuta */
    .lux-feedback-fab, .lux-chat-fab, .lux-ai-fab,
    [class*="floating-btn"], [id*="ChatFab"], [id*="FeedbackFab"], [id*="AssistantFab"] {
        transform: scale(0.85);
        transform-origin: bottom right;
    }
    /* Tabelitele lisa horisontaalne kerimisruum */
    .card > table { display: block; overflow-x: auto; max-width: 100%; }
}

/* ── Printimine ──────────────────────────────────── */
@media print {
    nav, .btn, .modal-overlay, .tab-bar, .no-print { display: none !important; }
    body { font-size: 12pt; color: #000; background: #fff; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    table { border-collapse: collapse; }
    th, td { border: 1px solid #ccc; padding: 4px 8px; }
}

/* ── Dark mode ───────────────────────────────────── */
[data-theme="dark"] {
    --bg: #1a1a2e; --bg-card: #16213e; --bg-nav: #0f3460;
    --text: #e0e0e0; --text-secondary: #a0a0b0; --border: #2a2a4a;
    --accent: #e67e22; --accent-bg: #2a2a4a;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] nav { background: var(--bg-nav); }
[data-theme="dark"] .card { background: var(--bg-card); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
[data-theme="dark"] h2, [data-theme="dark"] h3 { color: var(--accent); }
[data-theme="dark"] th { background: var(--accent-bg); color: var(--text); box-shadow: inset 0 -1px 0 var(--border), 0 1px 0 var(--border); }
[data-theme="dark"] td, [data-theme="dark"] th { border-bottom-color: var(--border); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--bg); color: var(--text); border-color: var(--border); }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: var(--text-secondary); }
[data-theme="dark"] .stat-card, [data-theme="dark"] .modal, [data-theme="dark"] #searchModal > div,
[data-theme="dark"] #notifPanel, [data-theme="dark"] .gantt-wc-header, [data-theme="dark"] .gantt-wc-name { background: var(--bg-card); }
[data-theme="dark"] .stat-card .number { color: var(--accent); }
[data-theme="dark"] .stat-card .label { color: var(--text-secondary); }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .tab-btn { color: var(--text-secondary); }
[data-theme="dark"] .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
[data-theme="dark"] .tab-bar, [data-theme="dark"] #notifPanel > div:first-child,
[data-theme="dark"] #onlinePanel > div:first-child { border-bottom-color: var(--border); }
[data-theme="dark"] .order-card, [data-theme="dark"] .wc-card { border-color: var(--border); }
[data-theme="dark"] .product-row:hover, [data-theme="dark"] tr:hover { background: var(--accent-bg); }
[data-theme="dark"] .inci-section, [data-theme="dark"] .inci-box,
[data-theme="dark"] .gantt-week-header, [data-theme="dark"] #onlinePanel > div:first-child { background: var(--accent-bg); }
[data-theme="dark"] .alert-success { background: #1e3a2f; color: #7dcea0; }
[data-theme="dark"] .alert-danger { background: #3a1e1e; color: #f1948a; }
[data-theme="dark"] a { color: #5dade2; }
[data-theme="dark"] #searchInput { background: var(--bg); color: var(--text); border-bottom-color: var(--border); }
[data-theme="dark"] #onlinePanel { background: var(--bg-card); color: var(--text); }
[data-theme="dark"] .btn { border-color: var(--border); color: var(--text); }
[data-theme="dark"] .btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
[data-theme="dark"] .btn-danger { background: #c0392b; color: white; }
[data-theme="dark"] table { color: var(--text); }
tr[style*="cursor:pointer"]:hover { background: #edf2fa; }
[data-theme="dark"] .progress-bar { background: var(--border); }
[data-theme="dark"] label, [data-theme="dark"] #onlinePanel > div:first-child { color: var(--text); }
[data-theme="dark"] option { background: var(--bg-card); color: var(--text); }

/* ── AI Assistent vidin ────────────────────────────────────────────────────── */
#aiChatBtn {
    position: fixed;
    bottom: 1rem;
    right: 4rem;
    z-index: 910;
    background: #5c4033;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
#aiChatBtn:hover { background: #7a5545; transform: scale(1.08); }
#aiChatBtn.ai-btn-active { background: #3a2820; }

#aiChatPanel {
    position: fixed;
    bottom: 4.5rem;
    right: 4rem;
    width: 370px;
    max-height: 0;
    overflow: hidden;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 911;
    display: flex;
    flex-direction: column;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
#aiChatPanel.ai-panel-open {
    max-height: 520px;
    opacity: 1;
}

#aiChatHeader {
    background: #5c4033;
    color: white;
    padding: 0.65rem 1rem;
    border-radius: 14px 14px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
#aiChatClose {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.2rem;
    opacity: 0.8;
}
#aiChatClose:hover { opacity: 1; }

#aiChatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.ai-bubble {
    max-width: 88%;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
}
.ai-bubble-user {
    align-self: flex-end;
    background: #5c4033;
    color: white;
    border-bottom-right-radius: 3px;
}
.ai-bubble-assistant {
    align-self: flex-start;
    background: #f4f0ed;
    color: #2c1a10;
    border-bottom-left-radius: 3px;
}
.ai-bubble pre.ai-code {
    background: rgba(0,0,0,0.08);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 0.3rem 0 0;
    white-space: pre-wrap;
}
.ai-inline-code {
    background: rgba(0,0,0,0.1);
    padding: 0 3px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Trükkimisanimatsioon */
.ai-typing { padding: 0.6rem 0.9rem; }
.ai-typing span {
    display: inline-block;
    width: 7px; height: 7px;
    background: #5c4033;
    border-radius: 50%;
    margin: 0 2px;
    animation: ai-bounce 1.1s infinite;
    opacity: 0.7;
}
.ai-typing span:nth-child(2) { animation-delay: 0.18s; }
.ai-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes ai-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

#aiQuickBtns {
    padding: 0.4rem 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex-shrink: 0;
    border-top: 1px solid #ede6e1;
}
.ai-quick-btn {
    background: #f4f0ed;
    border: 1px solid #d4c8c1;
    color: #5c4033;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s;
}
.ai-quick-btn:hover { background: #e8ddd6; }

#aiChatInputRow {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    border-top: 1px solid #ede6e1;
    flex-shrink: 0;
}
#aiChatInput {
    flex: 1;
    border: 1px solid #d4c8c1;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
    color: #2c1a10;
    outline: none;
}
#aiChatInput:focus { border-color: #5c4033; }
#aiChatSend {
    background: #5c4033;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-end;
    transition: background 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#aiChatSend:hover { background: #7a5545; }
#aiChatSend:disabled { background: #b0a0a0; cursor: not-allowed; }

/* Mobiil */
@media (max-width: 480px) {
    #aiChatPanel { width: calc(100vw - 2rem); right: 1rem; }
    #aiChatBtn { right: 3.5rem; }
}

/* Dark mode AI */
[data-theme="dark"] #aiChatPanel { background: #16213e; }
[data-theme="dark"] .ai-bubble-assistant { background: #1e2d4a; color: #e0e0e0; }
[data-theme="dark"] #aiQuickBtns, [data-theme="dark"] #aiChatInputRow { border-top-color: #2a2a4a; }
[data-theme="dark"] .ai-quick-btn { background: #1e2d4a; border-color: #2a2a4a; color: #e0e0e0; }
[data-theme="dark"] .ai-quick-btn:hover { background: #2a3d5a; }
[data-theme="dark"] #aiChatInput { background: #1a1a2e; color: #e0e0e0; border-color: #2a2a4a; }

/* ── ABC/XYZ analüüs ───────────────────────────────────────────────────────── */
.xyz-matrix-table { border-collapse: collapse; width: 100%; margin-bottom: 1.2rem; }
.xyz-matrix-table th, .xyz-matrix-table td {
    border: 1px solid #d4c8c1;
    padding: 0.55rem 0.8rem;
    text-align: center;
}
.xyz-matrix-table th { background: #5c4033; color: white; font-weight: 600; }
.xyz-matrix-table td { font-size: 0.95rem; }
.xyz-matrix-table .matrix-cell { font-weight: 700; font-size: 1.05rem; }

.badge-abc { display:inline-block; padding:1px 8px; border-radius:12px; font-weight:700; font-size:0.8rem; }
.badge-A { background:#d5f0df; color:#1a7a3a; }
.badge-B { background:#fdebd0; color:#a05000; }
.badge-C { background:#fde0df; color:#a01010; }
.badge-xyz { display:inline-block; padding:1px 8px; border-radius:12px; font-weight:700; font-size:0.8rem; }
.badge-X { background:#d5eaf9; color:#1050a0; }
.badge-Y { background:#fff0cc; color:#806000; }
.badge-Z { background:#ffe0f0; color:#900050; }
.badge-combo { display:inline-block; padding:2px 10px; border-radius:12px; font-weight:700; font-size:0.82rem; }
.badge-AX { background:#c8f0d8; color:#105020; }
.badge-AY { background:#d8ecc8; color:#205010; }
.badge-AZ { background:#e8d8b0; color:#604010; }
.badge-BX { background:#d0e8f8; color:#104060; }
.badge-BY { background:#e0e8e0; color:#304030; }
.badge-BZ { background:#f0e0c8; color:#604020; }
.badge-CX { background:#e8e8e8; color:#404040; }
.badge-CY { background:#f0e0e0; color:#602020; }
.badge-CZ { background:#f8d0d0; color:#800000; }

/* ── Tab popout ikoon ("↗ Ava uues aknas") — nähtav ainult tab hover'il ─── */
.tab-btn { position: relative; }
.tab-popout {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.65rem;
    line-height: 1;
    padding: 1px 3px;
    color: currentColor;
    cursor: pointer;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    user-select: none;
    pointer-events: none;
    font-weight: normal;
}
.tab-btn:hover .tab-popout {
    opacity: 0.7;
    pointer-events: auto;
}
.tab-popout:hover {
    opacity: 1 !important;
    background: rgba(92, 64, 51, 0.15);
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  v1.1.477 — MODERN UI POLISH                                     ║
   ║  Globaalne UX/visuaali parandus. Kõik olemasolev jääb tööle —    ║
   ║  see kiht lisab smooth animatsioone, paremaid hover-effects,     ║
   ║  modaalide fade-in, kaartide lift-on-hover, gradient-badge'id.   ║
   ╚══════════════════════════════════════════════════════════════════╝ */

:root {
    --brand: #5c4033;
    --brand-light: #7a5645;
    --brand-dark: #3d2a22;
    --accent: #d4a574;
    --bg: #f5f0eb;
    --surface: #ffffff;
    --surface-soft: #faf6f2;
    --border: #e8ddd3;
    --text: #2c2520;
    --muted: #8a7d75;
    --success: #27ae60;
    --warning: #e67e22;
    --danger: #c0392b;
    --info: #2980b9;
    --shadow-sm: 0 1px 3px rgba(60,40,30,0.06);
    --shadow-md: 0 4px 12px rgba(60,40,30,0.08);
    --shadow-lg: 0 12px 28px rgba(60,40,30,0.14);
    --radius: 8px;
    --radius-lg: 12px;
    --ease: cubic-bezier(.4,0,.2,1);
}

body { background: linear-gradient(180deg, #f7f2ec 0%, #f5f0eb 100%); color: var(--text); }

/* ── Nupud: smooth lift, press-feedback, focus glow ─────────────── */
.btn {
    transition: transform 0.12s var(--ease), box-shadow 0.18s var(--ease), background 0.15s, filter 0.15s;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
}
.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
    filter: brightness(0.96);
}
.btn-primary { background: linear-gradient(180deg, #6b4a3c 0%, var(--brand) 100%); }
.btn-success { background: linear-gradient(180deg, #2ecc71 0%, var(--success) 100%); }
.btn-danger  { background: linear-gradient(180deg, #e74c3c 0%, var(--danger)  100%); }
.btn-sm { transition: transform 0.1s var(--ease), background 0.15s, filter 0.15s; }

/* ── Kaardid: smooth lift on hover ──────────────────────────────── */
.card {
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(232, 221, 211, 0.5);
}
.card:hover { box-shadow: var(--shadow-md); }

/* Stat-cards (dashboard) — "edevam" hover-effekt */
.stat-card {
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    border: 1px solid rgba(232, 221, 211, 0.6);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
    opacity: 0.7;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card .number {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Today metrics polish */
.tm-card { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); border:1px solid rgba(232,221,211,0.5); }
.tm-card:hover { transform: translateY(-2px); }

/* ── Vormi-input: smooth focus-glow ─────────────────────────────── */
.form-row input,
.form-row select,
.form-row textarea,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="search"],
select,
textarea {
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(92, 64, 51, 0.12);
    outline: none;
}

/* ── Tabelite read: smooth hover ────────────────────────────────── */
table tbody tr { transition: background 0.12s; }
table th { background: linear-gradient(180deg, #faf6f2 0%, #f3ece4 100%) !important; }

/* ── Badge: subtle glow ─────────────────────────────────────────── */
.badge {
    transition: transform 0.15s var(--ease);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05);
}
.badge:hover { transform: scale(1.05); }

/* ── Modaal: fade-in + scale ────────────────────────────────────── */
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.modal-overlay { animation: overlayFadeIn 0.18s var(--ease); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal { animation: modalFadeIn 0.22s var(--ease); box-shadow: 0 20px 60px rgba(60,40,30,0.25); border: 1px solid rgba(232,221,211,0.6); }
.modal-close { transition: transform 0.15s var(--ease), color 0.15s; }
.modal-close:hover { transform: rotate(90deg); color: var(--brand); }

/* ── Tab-content: smooth fade kui aktiivseks vahetatakse ────────── */
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tab-content.active { animation: tabFadeIn 0.2s var(--ease); }
.section.active { animation: tabFadeIn 0.18s var(--ease); }

/* ── Tab-btn aktiivne — smooth underline ─────────────────────────── */
.tab-btn { transition: color 0.18s, background 0.18s, border-color 0.18s; }
.tab-btn.active {
    box-shadow: inset 0 -2px 0 var(--brand);
}

/* ── Nav-button hover lift ──────────────────────────────────────── */
nav button { transition: background 0.15s, transform 0.12s var(--ease); }
nav button:hover:not(.active) { transform: translateY(-1px); }

/* ── Action-item: smooth slide on hover ─────────────────────────── */
.action-item { transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.action-item:hover { transform: translateX(3px); }

/* ── Pulse animation (status-badge'idele kasutamiseks: class="pulse") ── */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
}
.pulse { animation: pulse 2s infinite; }

/* ── Skeleton loading (kasutamiseks: <div class="skeleton" style="width:200px;height:16px"></div>) ── */
@keyframes skeletonShimmer {
    0%   { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #ece4dc 0%, #f5f0eb 50%, #ece4dc 100%);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 4px;
    display: inline-block;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

/* ── Toast (showToast()) — kui pole olemas, kuvatakse fixed-bottom-right ── */
#toastContainer, .toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast, .toast-msg {
    background: white;
    color: var(--text);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--brand);
    font-size: 0.9rem;
    pointer-events: auto;
    animation: toastSlideIn 0.25s var(--ease);
    max-width: 380px;
}
.toast.success, .toast-msg.success { border-left-color: var(--success); }
.toast.error,   .toast-msg.error   { border-left-color: var(--danger);  }
.toast.warning, .toast-msg.warning { border-left-color: var(--warning); }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Scrollbar polish (Webkit) ──────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: #c9bdb2;
    border-radius: 5px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-light); }

/* ── Tabel rida hover-glow ──────────────────────────────────────── */
tr[onclick] { cursor: pointer; }
tr[onclick]:hover {
    background: linear-gradient(90deg, rgba(92,64,51,0.04) 0%, rgba(92,64,51,0.02) 50%, transparent 100%) !important;
}

/* ── Spinner väiksema variant valikuline ────────────────────────── */
.spinner-sm { width: 14px; height: 14px; border-width: 2px; vertical-align: middle; }

/* ── Empty-state komponendi UX ──────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; opacity: 0.4; margin-bottom: 0.5rem; }
.empty-state .empty-title { font-size: 1.05rem; color: var(--text); margin-bottom: 0.3rem; }
.empty-state .empty-sub { font-size: 0.85rem; }

/* ── Visual polish: nav logo subtle glow, brand title gradient ──── */
nav h1 {
    background: linear-gradient(90deg, #ffffff 0%, #f7e5d3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
nav img { transition: transform 0.2s var(--ease), filter 0.2s; }
nav img:hover { transform: scale(1.08); filter: brightness(1.1) drop-shadow(0 0 4px rgba(255,255,255,0.4)); }

/* ── Detail-row (klikitav peatabi rida nagu Tellimused/Pakkumised) ── */
tr[id^="orderDetail-"] > td > div,
tr[id^="quoteDetail-"] > td > div {
    animation: tabFadeIn 0.22s var(--ease);
}

/* ── Smooth: vältida liigseid animatsioone reduced-motion seadega ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  v1.1.480 — ETAPP 3 (edevamad vidinad)                           ║
   ║  Stagger fade-in dashboardi kaartidele, low-stock pulse-glow,    ║
   ║  badge-id elavamad, ripple-effekt nuppudele, action-item subtle  ║
   ║  shimmer kriitilistele.                                          ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* Stagger fade-in — stat-card / tm-card saavad järjest sisse libiseda */
@keyframes statSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.today-metrics .tm-card,
.stats .stat-card {
    animation: statSlideUp 0.4s var(--ease) both;
}
.today-metrics .tm-card:nth-child(1) { animation-delay: 0.00s; }
.today-metrics .tm-card:nth-child(2) { animation-delay: 0.06s; }
.today-metrics .tm-card:nth-child(3) { animation-delay: 0.12s; }
.today-metrics .tm-card:nth-child(4) { animation-delay: 0.18s; }
.today-metrics .tm-card:nth-child(5) { animation-delay: 0.24s; }
.stats .stat-card:nth-child(1) { animation-delay: 0.00s; }
.stats .stat-card:nth-child(2) { animation-delay: 0.06s; }
.stats .stat-card:nth-child(3) { animation-delay: 0.12s; }
.stats .stat-card:nth-child(4) { animation-delay: 0.18s; }
.stats .stat-card:nth-child(5) { animation-delay: 0.24s; }
.stats .stat-card:nth-child(6) { animation-delay: 0.30s; }

/* Madal laoseis pulse-glow — annab kriitilise info silmapaisul */
@keyframes lowStockPulse {
    0%, 100% { color: #c0392b; text-shadow: 0 0 0 rgba(192, 57, 43, 0); }
    50%      { color: #d4291a; text-shadow: 0 0 6px rgba(192, 57, 43, 0.5); }
}
.low-stock { animation: lowStockPulse 2.4s ease-in-out infinite; }

/* Action-item kriitilised shimmer-vihje (subtle gradient liigub vasakult) */
@keyframes acShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.action-item.critical::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(192,57,43,0.08) 50%, transparent 65%);
    background-size: 200% 100%;
    animation: acShimmer 4s linear infinite;
    pointer-events: none;
    border-radius: inherit;
}
.action-item { position: relative; overflow: hidden; }

/* Ripple-effekt nuppudel (klõpsu visuaalne tagasiside) */
.btn { position: relative; overflow: hidden; }
.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s, opacity 0.5s;
    opacity: 0;
    pointer-events: none;
}
.btn:active::after { width: 200px; height: 200px; opacity: 1; transition: 0s; }

/* Badge-id elavamad — gradient + subtle bounce hover-il */
@keyframes badgeBounce {
    0%, 100% { transform: scale(1.05); }
    50%      { transform: scale(1.08); }
}
.badge:hover { animation: badgeBounce 0.5s ease-in-out; }

/* Tab-switch glow — aktiivse tabi indicator subtle pulse */
@keyframes tabActiveGlow {
    0%, 100% { box-shadow: inset 0 -2px 0 var(--brand); }
    50%      { box-shadow: inset 0 -2px 0 var(--brand), 0 4px 12px rgba(92,64,51,0.1); }
}
.section.active:has(> .tab-bar) > .tab-bar .tab-btn.active {
    animation: tabActiveGlow 3s ease-in-out infinite;
}

/* (Card slide-in eemaldatud — tab-content fade-in on piisav, väldib animatsiooni-üleküllust) */

/* Status-badge tüüp `urgent` — käsitsi lisatav "jäjj" pulse */
.badge-urgent {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(192,57,43,0.3);
}
.badge-urgent.pulse-strong {
    animation: pulseStrong 1.4s ease-in-out infinite;
}
@keyframes pulseStrong {
    0%, 100% { box-shadow: 0 2px 6px rgba(192,57,43,0.3), 0 0 0 0 rgba(231, 76, 60, 0.5); }
    50%      { box-shadow: 0 2px 6px rgba(192,57,43,0.3), 0 0 0 8px rgba(231, 76, 60, 0); }
}

/* Hover-pop-out subtle nuppude jaoks tab-aktiivse-vahekarda lähedal */
.tab-btn .tab-popout { transition: opacity 0.18s, transform 0.15s, background 0.15s; }
.tab-btn:hover .tab-popout { transform: translateX(0); }

/* Hinnakirja "active" indicator + linked summa "live" indicator */
@keyframes liveDot {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}
.live-indicator {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 4px;
    animation: liveDot 1.5s ease-in-out infinite;
}

/* Loading-skeleton kompaktsem variant tabelitele */
.skeleton-row {
    display: flex; gap: 0.5rem; padding: 0.5rem 0;
}
.skeleton-row > * {
    height: 14px;
    background: linear-gradient(90deg, #ece4dc 0%, #f5f0eb 50%, #ece4dc 100%);
    background-size: 200px 100%;
    border-radius: 3px;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  v1.1.481 — ETAPP 4 vidinad                                      ║
   ║  Tooltip utility ([data-tip] atribuut), kena chip-stiil          ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* Tooltip — lisa elemendile data-tip="text" ja saad smooth tooltipi */
[data-tip] { position: relative; }
[data-tip]::before,
[data-tip]::after {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
    z-index: 9000;
}
[data-tip]::before {
    content: attr(data-tip);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #2c2520;
    color: #fbf6f0;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    line-height: 1.3;
}
[data-tip]::after {
    content: '';
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 4px solid transparent;
    border-top-color: #2c2520;
    width: 0; height: 0;
}
[data-tip]:hover::before,
[data-tip]:hover::after,
[data-tip]:focus-visible::before,
[data-tip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
[data-tip][data-tip-pos="bottom"]::before { bottom: auto; top: calc(100% + 8px); }
[data-tip][data-tip-pos="bottom"]::after  { bottom: auto; top: calc(100% + 4px); border-top-color: transparent; border-bottom-color: #2c2520; }

/* Chip / tag-stiilis pisikese märgi jaoks */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 14px;
    background: #f0e6dc;
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e0d5cc;
    transition: background 0.15s, border-color 0.15s;
}
.chip:hover { background: #e8d8c8; border-color: var(--brand-light); }
.chip.chip-success { background: #d4efdf; color: #1e8449; border-color: #b8e1c5; }
.chip.chip-warning { background: #fdebd0; color: #9c640c; border-color: #f5cba7; }
.chip.chip-danger  { background: #fadbd8; color: #922b21; border-color: #f5b7b1; }
.chip.chip-info    { background: #d6eaf8; color: #1a5276; border-color: #aed6f1; }

/* Filtri-bari ühtne stiil — kogu rakenduses kasutamiseks */
.filter-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}
.filter-bar input[type="text"],
.filter-bar input[type="search"],
.filter-bar select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.filter-bar input[type="text"],
.filter-bar input[type="search"] { min-width: 220px; flex: 1; max-width: 320px; }
.filter-bar .filter-count { color: #595959; font-size: 0.8rem; margin-left: auto; }

/* ── Mu töö (v1.1.507) — iPad-sõbralikud kaardid + suured nupud ── */
.mw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.8rem;
}
.mw-card {
    background: white;
    border-radius: 12px;
    padding: 0.9rem;
    border: 1px solid #e0d5cc;
    box-shadow: 0 2px 6px rgba(92,64,51,0.05);
    display: flex;
    flex-direction: column;
}
.mw-card-active { border-left: 4px solid #27ae60; }
.mw-card-active[data-status="paused"] { border-left-color: #e67e22; background: #fffbf5; }
.mw-card-available { background: #faf8f5; }
.mw-card-head {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.mw-card-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}
/* Suured touch-sobivad nupud (min 44px kõrgus, iOS HIG) */
.mw-btn {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    flex: 1;
    min-width: 130px;
    min-height: 44px;
    transition: opacity 0.15s;
}
.mw-btn:active { opacity: 0.7; transform: scale(0.98); }
.mw-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mw-btn-primary { background: #5c4033; color: white; }
.mw-btn-success { background: #1e8449; color: white; }
.mw-btn-secondary { background: #95a5a6; color: white; }
.mw-btn-warning { background: #f39c12; color: white; }
.mw-btn-danger { background: #c0392b; color: white; }
.mw-filter.active { background: #5c4033; color: white; }

/* Mobile/tablet: täislaius kaardid + suuremad puudealad */
@media (max-width: 768px) {
    .mw-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .mw-card { padding: 1rem; }
    .mw-btn { min-height: 50px; font-size: 1rem; flex-basis: 100%; }
}

/* ── Tootmisjuhi pult (v1.1.510) ── */
.pm-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.pm-kpi {
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 1px 3px rgba(92,64,51,0.04);
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.pm-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92,64,51,0.15);
}
.pm-kpi:active { transform: translateY(0); }
.pm-kpi-urgent {
    animation: pm-pulse 2s infinite;
}
@keyframes pm-pulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(192,57,43,0.1); }
    50% { box-shadow: 0 0 12px rgba(192,57,43,0.4); }
}
/* v1.1.808: KPI klõpsamise järgne sektsiooni-highlight pulseerimine */
.pm-section-highlight {
    animation: pm-section-flash 2s ease-out;
}
@keyframes pm-section-flash {
    0%   { box-shadow: 0 0 0 0 rgba(201,169,110,0.8); }
    25%  { box-shadow: 0 0 0 8px rgba(201,169,110,0.5); }
    100% { box-shadow: 0 0 0 0 rgba(201,169,110,0); }
}
.pm-section {
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.9rem;
}
.pm-section-attention {
    border-color: #c0392b;
    background: linear-gradient(180deg, #fdedec 0%, white 30px);
}
.pm-section-ok {
    background: #f0f9f3;
    border-color: #27ae60;
}
.pm-section-curing {
    background: #f8f4fb;
    border-color: #b9a4d3;
}
.pm-subsection { margin-top: 0.6rem; }
.pm-subsection-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5c4033;
    margin-bottom: 0.3rem;
    padding-left: 0.3rem;
    border-left: 3px solid #c9a96e;
}
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
}
.pm-card {
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}
.pm-card-blocker {
    border-left: 4px solid #c0392b;
    background: #fdf3f2;
    animation: pm-pulse-bg 3s infinite;
}
@keyframes pm-pulse-bg {
    0%, 100% { background: #fdf3f2; }
    50% { background: #fce5e2; }
}
.pm-card-qc { border-left: 4px solid #e67e22; background: #fef7ef; }
.pm-card-overdue { border-left: 4px solid #c0392b; background: #fdf3f2; }
.pm-card-active { border-left: 4px solid #27ae60; }
.pm-card-today { border-left: 4px solid #5c4033; }
.pm-card-today-claimed { background: #f0f9f3; border-left-color: #27ae60; }
.pm-card-curing { border-left: 4px solid #8e44ad; }
.pm-card-head { display: flex; gap: 0.5rem; align-items: flex-start; }
.pm-blocker-note {
    background: #c0392b;
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-style: italic;
}
.pm-progress-bar {
    background: #f0ebe5;
    border-radius: 10px;
    height: 14px;
    margin-top: 0.4rem;
    position: relative;
    overflow: hidden;
}
.pm-progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    height: 100%;
    transition: width 0.3s;
}
.pm-progress-label {
    position: absolute;
    top: 0;
    right: 6px;
    font-size: 0.7rem;
    line-height: 14px;
    color: #333;
    font-weight: 600;
}
.pm-workers {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.pm-worker-chip {
    background: #ecf5ee;
    color: #1e7e3c;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}
.pm-worker-chip.paused {
    background: #fef3e0;
    color: #b06d12;
}

/* ── Staffing-info (v1.1.511) — kui mitu töötajat vaja vs kohal ── */
.pm-staff-warning, .pm-staff-info {
    margin-top: 0.4rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}
.pm-staff-empty {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}
.pm-staff-need {
    background: #fef5e0;
    color: #b06d12;
    border: 1px solid #f9d39c;
}
.pm-staff-ok {
    background: #e8f6ec;
    color: #1e7e3c;
    border: 1px solid #a3d4b3;
}
.pm-staff-extra {
    background: #e8f0f7;
    color: #2471a3;
    border: 1px solid #aac6e0;
}
.pm-card-needs-action { border-left-color: #c0392b !important; }
.pm-card-understaffed { border-left-color: #e67e22 !important; }

/* Sama Mu töö vaates (suurem touch-ala iPad-i jaoks) */
.mw-staff-chip {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
}
.mw-staff-empty { background: #fdecea; color: #c0392b; }
.mw-staff-need { background: #fef5e0; color: #b06d12; }
.mw-staff-ok { background: #e8f6ec; color: #1e7e3c; }
.mw-staff-extra { background: #e8f0f7; color: #2471a3; }

/* Inline edit-nupud staffing-info kõrval (v1.1.512) */
.pm-staff-edit {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 0 0.4rem;
    font-size: 0.78rem;
    cursor: pointer;
    margin-left: 0.4rem;
    color: #5c4033;
    font-weight: 600;
}
.pm-staff-edit:hover { background: white; border-color: #5c4033; }
.pm-staff-edit-inline {
    background: #faf6f2;
    border: 1px dashed #c9a96e;
    border-radius: 4px;
    padding: 0 0.4rem;
    font-size: 0.78rem;
    cursor: pointer;
    color: #5c4033;
    font-weight: 600;
    margin-left: 0.3rem;
}
.pm-staff-edit-inline:hover { background: white; border-style: solid; }
.pm-staff-quiet {
    background: #f5f0eb;
    color: #595959;
    border: 1px solid #e8ddd3;
}

/* ── Aastaplaan (v1.1.513) ── */
.ap-monthly-totals { margin-bottom: 0.8rem; }
.ap-totals-grid {
    display: grid;
    grid-template-columns: 110px repeat(12, 1fr) 110px;
    gap: 1px;
    background: #e8ddd3;
    padding: 1px;
    border-radius: 6px;
    overflow: hidden;
}
.ap-total-cell {
    background: white;
    padding: 0.4rem 0.3rem;
    text-align: center;
    font-size: 0.85rem;
}
.ap-total-header {
    background: #5c4033;
    color: white;
    font-weight: 600;
}
.ap-grid-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 6px;
}
.ap-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.ap-grid thead th {
    position: sticky;
    top: 0;
    background: #5c4033;
    color: white;
    padding: 0.5rem 0.3rem;
    text-align: center;
    z-index: 2;
}
.ap-grid .ap-th-product { text-align: left; min-width: 260px; max-width: 320px; padding-left: 0.6rem; resize: horizontal; overflow: auto; }
.ap-grid .ap-th-month { min-width: 60px; }
.ap-grid .ap-th-total { background: #c9a96e; min-width: 70px; }
.ap-grid .ap-th-stock { background: #95a5a6; min-width: 60px; }
.ap-grid tbody tr:nth-child(even) { background: #fafafa; }
.ap-grid tbody tr:hover { background: #fef9e7; }
.ap-td-product {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #f0ebe5;
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
}
.ap-cell {
    border-bottom: 1px solid #f0ebe5;
    padding: 0;
    text-align: center;
}
.ap-cell-input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    padding: 0.4rem 0.2rem;
    font-size: 0.85rem;
    font-family: inherit;
}
.ap-cell-input:focus {
    outline: 2px solid #c9a96e;
    background: #fef9e7;
}
.ap-cell-input:disabled {
    background: #f5f0eb;
    color: #595959;
    cursor: not-allowed;
}
.ap-cell-overridden { background: #eaf2f8; }
.ap-cell-overridden .ap-cell-input { font-weight: 700; color: #2980b9; }
.ap-cell-zero .ap-cell-input { color: #ccc; }
.ap-td-total {
    text-align: right;
    padding: 0.4rem 0.6rem;
    background: #fef9e7;
    border-bottom: 1px solid #f0ebe5;
}
.ap-td-stock {
    text-align: right;
    padding: 0.4rem 0.6rem;
    color: #666;
    border-bottom: 1px solid #f0ebe5;
}
.ap-mrp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.ap-mrp-table thead th {
    background: #5c4033;
    color: white;
    padding: 0.5rem;
    text-align: left;
}
.ap-mrp-table tbody td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #e8ddd3;
}

/* ── Demand-planner dialoog (v1.1.515) ── */
.dp-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center; justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.dp-modal-content {
    background: white;
    border-radius: 10px;
    max-width: 1100px;
    width: 100%;
    margin: auto;
    padding: 1.2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    max-height: 95vh;
    overflow-y: auto;
}
.dp-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e8ddd3;
}
.dp-modal-close {
    background: none; border: none; font-size: 1.6rem; cursor: pointer;
    color: #595959; padding: 0 0.5rem;
}
.dp-modal-foot {
    display: flex; justify-content: flex-end; gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e8ddd3;
}
.dp-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.6rem;
}
.dp-form-row label {
    display: flex; flex-direction: column; gap: 0.2rem;
    font-size: 0.85rem;
}
.dp-form-row label strong { color: #5c4033; }
@media (max-width: 768px) {
    .dp-form-row { grid-template-columns: 1fr 1fr; }
}
.dp-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.dp-summary-card {
    background: #faf6f2;
    border-left: 4px solid #c9a96e;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
}
.dp-summary-label { font-size: 0.78rem; color: #595959; font-weight: 600; }
.dp-summary-big { font-size: 1.4rem; font-weight: 700; color: #5c4033; margin: 0.2rem 0; }
.dp-summary-sub { font-size: 0.8rem; color: #555; line-height: 1.4; }
.dp-section {
    margin-top: 1rem;
    padding: 0.8rem;
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 8px;
}
.dp-rm-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.dp-rm-table thead th {
    background: #5c4033; color: white;
    padding: 0.4rem 0.5rem; text-align: left;
}
.dp-rm-table tbody td {
    padding: 0.3rem 0.5rem; border-bottom: 1px solid #f0ebe5;
}
.dp-wc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}
@media (max-width: 768px) {
    .dp-wc-grid { grid-template-columns: 1fr; }
}
.dp-wc-list { list-style: none; padding-left: 0; margin: 0.3rem 0 0; font-size: 0.85rem; }
.dp-wc-list li { padding: 0.3rem 0.5rem; border-radius: 4px; margin-bottom: 0.2rem; }
.dp-wc-list li.dp-wc-recommended {
    background: #e8f6ec;
    border-left: 3px solid #27ae60;
}

/* ── Tootmiskalender (v1.1.516) ── */
.pc-legend {
    margin-bottom: 0.6rem;
    padding: 0.4rem 0.6rem;
    background: #faf6f2;
    border-radius: 6px;
}
.pc-legend-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
    font-size: 0.78rem;
}
.pc-legend-chip {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}
.pc-legend-spacer { flex: 1; }
.pc-grid-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 6px;
}
.pc-grid {
    border-collapse: collapse;
    font-size: 0.82rem;
}
.pc-grid thead th {
    position: sticky; top: 0;
    background: #5c4033;
    color: white;
    padding: 0.3rem 0.4rem;
    text-align: center;
    z-index: 2;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.pc-th-weekday { font-size: 0.72rem; opacity: 0.75; font-weight: 600; }
.pc-th-date { font-size: 0.85rem; }
/* Tänase päeva päise veerg — kuldne taust + tume tekst (kontrast K4 fix) */
.pc-grid thead th.pc-today,
.pc-grid thead th.pc-today .pc-th-weekday,
.pc-grid thead th.pc-today .pc-th-date {
    color: #2c1810 !important;
}
.pc-th-wc {
    text-align: left !important;
    min-width: 160px;
    position: sticky; left: 0;
    z-index: 3 !important;
}
.pc-th-day { min-width: 80px; }
.pc-th-day.pc-today { background: #c9a96e !important; color: #2c1810; }
.pc-th-day.pc-weekend { background: #6e4f3d; }
.pc-section-row td {
    background: #faf6f2;
    color: #5c4033;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-bottom: 2px solid #c9a96e;
}
.pc-td-wc {
    background: white;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid #f0ebe5;
    border-right: 1px solid #e8ddd3;
    position: sticky; left: 0;
    z-index: 1;
    min-width: 160px;
}
.pc-td-cell {
    border: 1px solid #f0ebe5;
    vertical-align: top;
    padding: 2px;
    min-width: 80px;
    min-height: 50px;
}
.pc-td-cell.pc-today { background: #fef9e7; }
.pc-td-cell.pc-weekend { background: #f8f4f0; }
.pc-batch {
    padding: 0.2rem 0.4rem;
    margin-bottom: 2px;
    border-radius: 4px;
    color: white;
    font-size: 0.72rem;
    cursor: pointer;
    line-height: 1.15;
    transition: transform 0.1s;
}
.pc-batch:hover { transform: scale(1.04); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.pc-batch-label { font-weight: 600; }
.pc-batch-qty { font-size: 0.66rem; opacity: 0.92; }

/* ── Worker kioskirežiim iPadidele (v1.1.517 + v1.1.523 K3/K5 fix) ── */
/* K5: peida kõik nav-nupud peale Mu töö, exit-režiim ja logout */
body.worker-mode nav button:not(#navMyWork):not(#workerExitBtn):not(#logoutBtn) {
    display: none !important;
}
/* K3: peida kõik floating + abistavad nupud kioskirežiimis */
body.worker-mode #aiAssistantBtn,
body.worker-mode #aiAssistantPanel,
body.worker-mode #shortcutsHelp,
body.worker-mode .feedback-fab,
body.worker-mode #feedbackFab,
body.worker-mode #scrollTopBtn,
body.worker-mode .ai-fab,
body.worker-mode [id$="-fab"],
body.worker-mode #notifBtn,
body.worker-mode #langSelect,
body.worker-mode nav > select,
body.worker-mode #onlineCount,
body.worker-mode #navVersion,
body.worker-mode #navUserInfo {
    display: none !important;
}
/* Logi välja nupp suuremaks worker-režiimis */
body.worker-mode #logoutBtn {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    padding: 0.5rem 0.9rem !important;
    font-size: 0.95rem !important;
    border-radius: 6px !important;
    margin-left: auto !important;
}
body.worker-mode .section:not(#my-work):not(#loginScreen):not(#forcedPwChangeScreen) {
    display: none !important;
}
body.worker-mode #navMyWork {
    background: #27ae60 !important;
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    font-weight: 700;
}

/* ── Lea kasutusjuhend (v1.1.518) ── */
.lg-hero {
    background: linear-gradient(135deg, #faf6f2 0%, #fef9e7 100%);
    border-left: 6px solid #c9a96e;
    padding: 1.2rem 1.4rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}
.lg-section {
    margin-bottom: 1.8rem;
    padding: 1rem 1.2rem;
    background: white;
    border: 1px solid #e8ddd3;
    border-radius: 8px;
}
.lg-h {
    margin: 0 0 0.8rem;
    color: #5c4033;
    font-size: 1.15rem;
    border-bottom: 2px solid #c9a96e;
    padding-bottom: 0.3rem;
}
.lg-ol { line-height: 1.7; padding-left: 1.4rem; }
.lg-ol li { margin-bottom: 0.4rem; }
.lg-ol ul { margin-top: 0.3rem; }
.lg-tip {
    background: #fef9e7;
    border-left: 3px solid #c9a96e;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 0.88rem;
    margin-top: 0.6rem;
}
.lg-scenario, .lg-faq {
    margin-bottom: 0.6rem;
    border: 1px solid #e8ddd3;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    background: #fafafa;
}
.lg-scenario summary, .lg-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: #5c4033;
    padding: 0.2rem 0;
    user-select: none;
}
.lg-scenario summary:hover, .lg-faq summary:hover { color: #2c1810; }
.lg-scenario[open] summary, .lg-faq[open] summary {
    border-bottom: 1px solid #e8ddd3;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
}
.lg-scenario[open] { background: white; }
.lg-cheat {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.lg-cheat th, .lg-cheat td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #f0ebe5;
}
.lg-cheat th {
    background: #5c4033;
    color: white;
    font-weight: 600;
}
.lg-cheat tr:nth-child(even) td { background: #fafafa; }
.lg-cheat tr:hover td { background: #fef9e7; }
.lg-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #faf6f2;
    border-radius: 8px;
    text-align: center;
}

/* ── Worker mode laiendused (v1.1.520) — täielik iPad-kogemus ── */

/* Kiosk-login: suuremad väljad, lihtsam paigutus */
body.worker-mode #loginScreen {
    max-width: 460px !important;
    margin-top: 4% !important;
}
body.worker-mode #loginScreen h2 {
    font-size: 2rem !important;
}
body.worker-mode #loginScreen input {
    font-size: 1.2rem !important;
    padding: 0.7rem 0.8rem !important;
    min-height: 56px !important;
}
body.worker-mode #loginScreen button {
    font-size: 1.2rem !important;
    padding: 0.8rem 1rem !important;
    min-height: 56px !important;
}

/* Mu töö suuremad fondid worker-režiimis */
body.worker-mode #my-work {
    font-size: 1.05rem;
}
body.worker-mode #my-work h2 { font-size: 1.6rem; }
body.worker-mode #my-work h3 { font-size: 1.3rem; }
body.worker-mode .mw-card { padding: 1rem 1.1rem; }
body.worker-mode .mw-card-head > div:nth-child(2) > div:first-child {
    font-size: 1.1rem !important;
}
body.worker-mode .mw-btn {
    min-height: 56px !important;
    font-size: 1.05rem !important;
}

/* Tervitus-banner */
body.worker-mode .wm-banner {
    background: linear-gradient(135deg, #faf6f2 0%, #fef9e7 100%);
    border-left: 6px solid #c9a96e;
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 6px rgba(92,64,51,0.06);
}
body.worker-mode .wm-banner-inner {
    color: #5c4033;
}

/* Footer kasutaja-vahetuse jaoks */
body.worker-mode .wm-footer {
    margin-top: 2rem;
    padding: 1rem;
    background: #faf6f2;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e8ddd3;
}
body.worker-mode .wm-footer-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.9rem 1.6rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 56px;
    min-width: 220px;
}
body.worker-mode .wm-footer-btn:active { opacity: 0.7; transform: scale(0.98); }

/* Ühte mahuvad nupud — telefonis/iPadis täislaius */
@media (max-width: 1024px) {
    body.worker-mode .mw-grid { grid-template-columns: 1fr !important; gap: 0.8rem !important; }
    body.worker-mode .mw-card { padding: 1.2rem !important; }
    body.worker-mode .mw-btn { min-height: 64px !important; font-size: 1.1rem !important; flex-basis: 100% !important; }
}

/* Päise kogu */
body.worker-mode nav {
    padding: 0.5rem 0.8rem !important;
}
body.worker-mode nav h1 { font-size: 1.2rem !important; }
body.worker-mode #navMyWork {
    font-size: 1.2rem !important;
    padding: 0.7rem 1.2rem !important;
}

/* Idle-hoiatus toast — paksum */
body.worker-mode .toast {
    font-size: 1.1rem;
    padding: 1rem 1.4rem;
}

/* S10 (v1.1.525): Mu töö h2 peidetud worker-režiimis (nav-i "📋 Mu töö" piisab) */
body.worker-mode #my-work .my-work-header h2 {
    display: none;
}
body.worker-mode #my-work .my-work-header {
    justify-content: flex-end;
}

/* ── Step-by-step juhend modal (v1.1.521) — iPad ── */
.wg-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}
.wg-modal-content {
    background: white;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.wg-modal-head {
    background: #5c4033;
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: flex-end;
}
.wg-close-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}
.wg-close-btn:active { opacity: 0.7; }

.wg-hero {
    background: linear-gradient(135deg, #faf6f2 0%, #fef9e7 100%);
    padding: 1.4rem 1.6rem;
    border-bottom: 4px solid #c9a96e;
}
.wg-batch-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: #5c4033;
}
.wg-recipe {
    font-size: 1.2rem;
    color: #5c4033;
    margin-top: 0.3rem;
}
.wg-bulk {
    font-size: 1.05rem;
    color: #555;
    margin-top: 0.3rem;
}

.wg-phase-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.8rem 1.2rem;
    background: #f5f0eb;
    overflow-x: auto;
    border-bottom: 1px solid #e8ddd3;
}
.wg-phase-pill {
    background: white;
    border: 2px solid #ccc;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
}
.wg-phase-pill.active {
    background: #5c4033;
    color: white;
    border-color: #5c4033;
}
.wg-phase-pill.done {
    background: #d5e8d4;
    color: #2c5f2d;
    border-color: #88c178;
}

.wg-phase-content {
    padding: 1.4rem 1.6rem;
    flex: 1;
}
.wg-phase-notes {
    background: #fef9e7;
    border-left: 4px solid #c9a96e;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}
.wg-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wg-item {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: white;
    border: 2px solid #e8ddd3;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}
.wg-item:hover { border-color: #c9a96e; }
.wg-item input[type="checkbox"] {
    width: 32px;
    height: 32px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #27ae60;
}
.wg-item-body {
    display: grid;
    grid-template-columns: 110px 1fr 60px;
    gap: 0.6rem;
    align-items: center;
    flex: 1;
}
.wg-item-qty {
    font-size: 1.4rem;
    font-weight: 700;
    color: #5c4033;
    text-align: right;
}
.wg-item-name {
    font-size: 1rem;
    line-height: 1.3;
}
.wg-item-pct {
    font-size: 0.9rem;
    color: #595959;
    text-align: right;
}
.wg-item-done {
    background: #eafaf1;
    border-color: #27ae60;
    text-decoration: line-through;
    opacity: 0.7;
}

.wg-section {
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid #f0ebe5;
}
.wg-bulk-info {
    background: #f5f0eb;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    line-height: 1.6;
    font-size: 1rem;
}
.wg-bulk-info > div { margin-bottom: 0.2rem; }

.wg-steps {
    background: #fafafa;
}
.wg-steps-list {
    line-height: 1.8;
    font-size: 1rem;
    padding-left: 1.6rem;
}
.wg-steps-list li { margin-bottom: 0.4rem; }

.wg-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 1.2rem 1.6rem;
    background: #faf6f2;
    border-top: 2px solid #e8ddd3;
    position: sticky;
    bottom: 0;
}
.wg-btn {
    padding: 1rem 1.6rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 56px;
}
.wg-btn-primary { background: #5c4033; color: white; }
.wg-btn-success { background: #27ae60; color: white; }
.wg-btn-secondary { background: #95a5a6; color: white; }
.wg-btn:active { opacity: 0.7; transform: scale(0.98); }

/* Mobile/iPad portrait — large enough touch */
@media (max-width: 1024px) {
    .wg-item-body { grid-template-columns: 100px 1fr 50px; }
    .wg-item-qty { font-size: 1.5rem; }
    .wg-btn { padding: 1.2rem 1.4rem; min-height: 64px; font-size: 1.15rem; }
}

/* mw-btn-info klass — info-värvi nupp Mu töö kaartidel */
.mw-btn-info { background: #2980b9; color: white; }

/* ── Custom dialog (v1.1.524) — asendab confirm/prompt ── */
.cd-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: none;
    align-items: center; justify-content: center;
    padding: 1rem;
}
.cd-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    max-width: 480px;
    width: 100%;
}
.cd-message {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #2c1810;
    margin-bottom: 1rem;
}
.cd-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}
.cd-input:focus {
    outline: 2px solid #c9a96e;
    border-color: #c9a96e;
}
.cd-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.cd-buttons .btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* ── Touch-targets ≥44px (S8 fix) — iOS HIG ─────────────────────── */
.btn, .btn-sm {
    min-height: 32px;  /* btn-sm väiksem aga klõpsamiseks ikka piisav */
}
.btn:not(.btn-sm) {
    min-height: 40px;
}
button:not(.btn-sm):not(.tab-btn):not(.cd-input):not([class*="mw-btn"]):not([class*="wg-btn"]) {
    min-height: 38px;
}
/* Modal'ide nupud peavad alati olema piisavalt suured */
.cd-buttons .btn { min-height: 44px !important; }

/* ── Loading indikaatorid (v1.1.525, S11 fix) ── */
.lux-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid #e8ddd3;
    border-top-color: #5c4033;
    border-radius: 50%;
    animation: lux-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
}
@keyframes lux-spin { to { transform: rotate(360deg); } }
.lux-loading {
    color: #595959;
    font-size: 0.95rem;
    padding: 1.2rem;
    text-align: center;
    background: #faf6f2;
    border-radius: 8px;
}

/* ── Drag-drop kalendri animatsioon (v1.1.525, V3 fix) ── */
.pc-batch.pc-draggable {
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.pc-batch.pc-dragging {
    opacity: 0.5;
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}
.pc-td-cell.pc-drop-active {
    background: rgba(39, 174, 96, 0.15) !important;
    box-shadow: inset 0 0 0 2px #27ae60;
}
.pc-td-cell.pc-drop-invalid {
    background: rgba(192, 57, 43, 0.1) !important;
    box-shadow: inset 0 0 0 2px #c0392b;
    cursor: not-allowed;
}

/* ── Tab-bar grupeerimine (v1.1.525, S2 + S3 fix) ── */
.tab-divider {
    display: inline-block;
    width: 1px;
    align-self: stretch;
    background: #d4c5b5;
    margin: 0.2rem 0.4rem;
    flex-shrink: 0;
}
/* Esiletoodud tab-id: konsistentsed klassid (S3 — ühtlane stiil) */
.tab-btn.tab-highlight {
    color: white;
    font-weight: 600;
}
.tab-btn.tab-h-brown { background: #5c4033; }
.tab-btn.tab-h-gold { background: #806638; }
.tab-btn.tab-h-purple { background: #8e44ad; }
.tab-btn.tab-h-green { background: #1e8449; }
.tab-btn.tab-h-brown:hover { background: #4a332a; }
.tab-btn.tab-h-gold:hover { background: #5e4b29; }
.tab-btn.tab-h-purple:hover { background: #76399b; }
.tab-btn.tab-h-green:hover { background: #196b3b; }

/* ── Nav layout (v1.1.527, S1 fix) — horizontal scroll mobiilis ── */
nav {
    flex-wrap: wrap;
}
@media (max-width: 1024px) {
    nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    nav::-webkit-scrollbar { height: 4px; }
    nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }
    nav button {
        flex-shrink: 0;
    }
    /* V2: peida version-string mobiilis */
    nav #navVersion { display: none; }
}

/* V1: Logo + LUXORIA tekst suurem kontrast */
nav img[alt="Nurme"], nav .luxoria-logo {
    filter: brightness(1.05) drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* S7: Floating-nupud (AI bot, feedback) ümberpaigutatud — vasakul küljel */
#aiAssistantBtn, #feedbackFab, .ai-fab {
    /* Säilitame paremal aga lisame puuteala et ei kataks tabelid */
}
@media (max-width: 1024px) {
    #aiAssistantBtn, #feedbackFab, .ai-fab {
        bottom: 4rem !important;  /* Tõsta footerist kõrgemale et ei kattuks vajaliku sisu */
    }
}
/* Sügavam fix: kui hover, tee poolläbipaistvaks et alla näha */
#aiAssistantBtn:not(:hover), #feedbackFab:not(:hover), .ai-fab:not(:hover) {
    opacity: 0.85;
    transition: opacity 0.2s;
}
#aiAssistantBtn:hover, #feedbackFab:hover, .ai-fab:hover { opacity: 1; }

/* ── Kaalu-meeter (v1.1.528) — pakendaja iPad ── */
.wg-weight-meter {
    background: linear-gradient(180deg, #fef9e7 0%, #faf6f2 100%);
    border-top: 3px solid #c9a96e;
    border-bottom: 3px solid #c9a96e;
    padding: 1.4rem 1.6rem;
    text-align: center;
}
.wg-weight-meter-warn {
    background: #fef5e7;
    border-color: #e67e22;
    color: #b06d12;
}
.wg-weight-title {
    font-size: 1.05rem;
    color: #5c4033;
    font-weight: 600;
}
.wg-weight-big {
    font-size: 3.2rem;
    font-weight: 700;
    color: #27ae60;
    line-height: 1;
    margin: 0.3rem 0;
    letter-spacing: -1px;
}
.wg-weight-big small {
    font-size: 1.4rem;
    color: #595959;
    margin-left: 0.2rem;
}
.wg-weight-bar {
    position: relative;
    height: 56px;
    background: #f0ebe5;
    border-radius: 12px;
    overflow: hidden;
    margin: 0.6rem 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.wg-weight-zone {
    position: absolute;
    top: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.wg-zone-min { background: linear-gradient(90deg, #e74c3c 0%, #f0a39a 100%); }
.wg-zone-ok  { background: linear-gradient(90deg, #58c98c 0%, #27ae60 50%, #58c98c 100%); }
.wg-zone-max { background: linear-gradient(90deg, #f0a39a 0%, #e74c3c 100%); }
.wg-weight-target {
    position: absolute;
    top: -6px; bottom: -6px;
    width: 4px;
    background: #2c1810;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}
.wg-weight-target::before {
    content: "▼";
    position: absolute;
    top: -16px; left: -8px;
    color: #2c1810;
    font-size: 1.2rem;
}
.wg-weight-labels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.6rem;
    font-size: 0.85rem;
}
.wg-weight-label-min { color: #c0392b; }
.wg-weight-label-tgt { color: #1e7e3c; font-size: 0.95rem; }
.wg-weight-label-max { color: #c0392b; }
.wg-weight-label-min strong, .wg-weight-label-max strong { font-size: 1.15rem; }
.wg-weight-label-tgt strong { font-size: 1.4rem; }
.wg-weight-nominal {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: #595959;
    font-style: italic;
}
@media (max-width: 1024px) {
    .wg-weight-big { font-size: 4rem; }
    .wg-weight-label-tgt strong { font-size: 1.8rem; }
}

/* ── BRUTO-box toote-kaardil (v1.1.530) ── */
.epm-bruto-box {
    background: #f5f0eb;
    border-left: 4px solid #c9a96e;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin: 0.6rem 0;
    line-height: 1.4;
}
.epm-bruto-box:empty { display: none; }

/* NETO/Tara info-rida pakendaja iPadis (v1.1.530) */
.wg-weight-net-info {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #5c4033;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.5rem;
}
@media (max-width: 1024px) {
    .wg-weight-net-info { font-size: 0.95rem; }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  THEMES (v1.1.531) — Nurme brand'i värvilahenduse prototüübid    ║
   ║  Variant A "Nurme Klassik" — sügav navy + kollane aktsent        ║
   ║  Variant B "Nurme Soft"    — sama navy/kollane + sooja kreemi    ║
   ║  Aktiveeri body[data-brand="nurme-a"] / "nurme-b" — vaikimisi    ║
   ║  jääb pruun teema (data-brand puudub). data-theme="dark" on      ║
   ║  iseseisev mehhanism (html-l) ja töötab brand'iga koos.          ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ── Variant A "Nurme Klassik" ─────────────────────────────── */
body[data-brand="nurme-a"] {
    --brand: #1B3865;
    --brand-light: #3B5A91;
    --brand-dark: #102849;
    --accent: #F7C941;
    --accent-soft: #FFF7DA;
    --bg: #F5F8FB;
    --surface: #FFFFFF;
    --surface-soft: #E8EEF6;
    --border: #D6E0EF;
    --text: #1A2845;
    --muted: #6B7280;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F8FB 100%) !important;
    color: var(--text);
}
body[data-brand="nurme-a"] nav { background: #1B3865; }
body[data-brand="nurme-a"] nav .luxoria-logo,
body[data-brand="nurme-a"] nav h1 { color: #F7C941; }
body[data-brand="nurme-a"] h2 { color: #1B3865; }
body[data-brand="nurme-a"] th {
    background: linear-gradient(180deg, #E8EEF6 0%, #DCE5F1 100%) !important;
    color: #1B3865;
    box-shadow: inset 0 -1px 0 #BFD0E8, 0 2px 4px rgba(27,56,101,0.06);
}
body[data-brand="nurme-a"] .btn-primary {
    background: linear-gradient(180deg, #2A4A82 0%, #1B3865 100%);
    color: #FFFFFF;
}
body[data-brand="nurme-a"] .badge-planned,
body[data-brand="nurme-a"] .badge-confirmed {
    background: #FFF7DA;
    color: #8A6300;
}
body[data-brand="nurme-a"] .badge-active,
body[data-brand="nurme-a"] .badge-new {
    background: #DCE5F1;
    color: #1B3865;
}
body[data-brand="nurme-a"] .wc-card { border-color: #D6E0EF; }
body[data-brand="nurme-a"] .wc-card h3,
body[data-brand="nurme-a"] .stat-card .number,
body[data-brand="nurme-a"] .tm-value,
body[data-brand="nurme-a"] .product-card-info h2,
body[data-brand="nurme-a"] .inci-section h3 { color: #1B3865; }
body[data-brand="nurme-a"] .inci-box,
body[data-brand="nurme-a"] .product-card-img,
body[data-brand="nurme-a"] .product-card-img-placeholder,
body[data-brand="nurme-a"] .inci-section { background: #E8EEF6; }
body[data-brand="nurme-a"] .product-row:hover { background: #E8EEF6; }
body[data-brand="nurme-a"] .order-card { border-color: #D6E0EF; }
body[data-brand="nurme-a"] .order-card:hover { border-color: #1B3865; }
body[data-brand="nurme-a"] .tab-bar { border-bottom-color: #D6E0EF; }
body[data-brand="nurme-a"] .tab-btn:hover { color: #1B3865; }
body[data-brand="nurme-a"] .tab-btn.active { color: #1B3865; border-bottom-color: #F7C941; }
body[data-brand="nurme-a"] .cust-sub-btn.active { color:#1B3865; border-bottom-color:#F7C941 !important; }
body[data-brand="nurme-a"] .cust-sub-btn:hover { color:#1B3865; }
body[data-brand="nurme-a"] table th,
body[data-brand="nurme-a"] .gantt-table th,
body[data-brand="nurme-a"] .gantt-table td { border-color: #D6E0EF; }
body[data-brand="nurme-a"] .gantt-wc-header,
body[data-brand="nurme-a"] .gantt-week-header { background: #E8EEF6; }
body[data-brand="nurme-a"] .gantt-cell:hover { outline-color: #1B3865; }
body[data-brand="nurme-a"] button:focus-visible { outline-color: #F7C941; }
body[data-brand="nurme-a"] .xyz-matrix-table th { background: #1B3865; }
body[data-brand="nurme-a"] .mw-btn-primary,
body[data-brand="nurme-a"] .mw-filter.active,
body[data-brand="nurme-a"] .pm-card-today,
body[data-brand="nurme-a"] .wg-btn-primary { background: #1B3865 !important; }
body[data-brand="nurme-a"] .pm-card-today { border-left-color: #1B3865; background: #FFFFFF !important; }
body[data-brand="nurme-a"] .ap-grid .ap-th-total { background: #F7C941; color: #1A2845; }
body[data-brand="nurme-a"] .pc-th-day.pc-today { background: #F7C941 !important; color: #1A2845; }
body[data-brand="nurme-a"] .lg-section-head,
body[data-brand="nurme-a"] .pm-staff-card-name { color: #1B3865; }
body[data-brand="nurme-a"] .epm-bruto-box {
    background: #E8EEF6;
    border-left-color: #F7C941;
}
body[data-brand="nurme-a"] .pm-staff-add { border-color: #F7C941; }
body[data-brand="nurme-a"] .wg-item:hover { border-color: #F7C941; }
body[data-brand="nurme-a"] .dp-summary { background: #E8EEF6; border-left-color: #F7C941; }
body[data-brand="nurme-a"] .dp-summary-big { color: #1B3865; }

/* ── Variant B "Nurme Soft" ─────────────────────────────── */
body[data-brand="nurme-b"] {
    --brand: #1B3865;
    --brand-light: #3B5A91;
    --brand-dark: #102849;
    --accent: #F7C941;
    --accent-soft: #FFF4C9;
    --bg: #FEFBF3;
    --surface: #FFFFFF;
    --surface-soft: #FAF6E8;
    --border: #E5DFC8;
    --text: #1A2845;
    --muted: #7A6A52;
    background: linear-gradient(180deg, #FEFBF3 0%, #FAF6E8 100%) !important;
    color: var(--text);
}
body[data-brand="nurme-b"] nav { background: #1B3865; }
body[data-brand="nurme-b"] nav .luxoria-logo,
body[data-brand="nurme-b"] nav h1 { color: #F7C941; }
body[data-brand="nurme-b"] h2 { color: #1B3865; }
body[data-brand="nurme-b"] th {
    background: linear-gradient(180deg, #FAF6E8 0%, #F2EAD0 100%) !important;
    color: #1B3865;
    box-shadow: inset 0 -1px 0 #E5DFC8, 0 2px 4px rgba(27,56,101,0.06);
}
body[data-brand="nurme-b"] .btn-primary {
    background: linear-gradient(180deg, #2A4A82 0%, #1B3865 100%);
    color: #FFFFFF;
}
body[data-brand="nurme-b"] .badge-planned,
body[data-brand="nurme-b"] .badge-confirmed {
    background: #FFF4C9;
    color: #8A6300;
}
body[data-brand="nurme-b"] .badge-active,
body[data-brand="nurme-b"] .badge-new {
    background: #E8EEF6;
    color: #1B3865;
}
body[data-brand="nurme-b"] .wc-card { border-color: #E5DFC8; }
body[data-brand="nurme-b"] .wc-card h3,
body[data-brand="nurme-b"] .stat-card .number,
body[data-brand="nurme-b"] .tm-value,
body[data-brand="nurme-b"] .product-card-info h2,
body[data-brand="nurme-b"] .inci-section h3 { color: #1B3865; }
body[data-brand="nurme-b"] .inci-box,
body[data-brand="nurme-b"] .product-card-img,
body[data-brand="nurme-b"] .product-card-img-placeholder,
body[data-brand="nurme-b"] .inci-section { background: #FAF6E8; }
body[data-brand="nurme-b"] .product-row:hover { background: #FAF6E8; }
body[data-brand="nurme-b"] .order-card { border-color: #E5DFC8; }
body[data-brand="nurme-b"] .order-card:hover { border-color: #1B3865; }
body[data-brand="nurme-b"] .tab-bar { border-bottom-color: #E5DFC8; }
body[data-brand="nurme-b"] .tab-btn:hover { color: #1B3865; }
body[data-brand="nurme-b"] .tab-btn.active { color: #1B3865; border-bottom-color: #F7C941; }
body[data-brand="nurme-b"] .cust-sub-btn.active { color:#1B3865; border-bottom-color:#F7C941 !important; }
body[data-brand="nurme-b"] .cust-sub-btn:hover { color:#1B3865; }
body[data-brand="nurme-b"] table th,
body[data-brand="nurme-b"] .gantt-table th,
body[data-brand="nurme-b"] .gantt-table td { border-color: #E5DFC8; }
body[data-brand="nurme-b"] .gantt-wc-header,
body[data-brand="nurme-b"] .gantt-week-header { background: #FAF6E8; }
body[data-brand="nurme-b"] .gantt-cell:hover { outline-color: #1B3865; }
body[data-brand="nurme-b"] button:focus-visible { outline-color: #F7C941; }
body[data-brand="nurme-b"] .xyz-matrix-table th { background: #1B3865; }
body[data-brand="nurme-b"] .mw-btn-primary,
body[data-brand="nurme-b"] .mw-filter.active,
body[data-brand="nurme-b"] .wg-btn-primary { background: #1B3865 !important; }
body[data-brand="nurme-b"] .pm-card-today { border-left-color: #1B3865; background: #FFFFFF !important; }
body[data-brand="nurme-b"] .ap-grid .ap-th-total { background: #F7C941; color: #1A2845; }
body[data-brand="nurme-b"] .pc-th-day.pc-today { background: #F7C941 !important; color: #1A2845; }
body[data-brand="nurme-b"] .lg-section-head,
body[data-brand="nurme-b"] .pm-staff-card-name { color: #1B3865; }
body[data-brand="nurme-b"] .epm-bruto-box {
    background: #FAF6E8;
    border-left-color: #F7C941;
}
body[data-brand="nurme-b"] .pm-staff-add { border-color: #F7C941; }
body[data-brand="nurme-b"] .wg-item:hover { border-color: #F7C941; }
body[data-brand="nurme-b"] .dp-summary { background: #FAF6E8; border-left-color: #F7C941; }
body[data-brand="nurme-b"] .dp-summary-big { color: #1B3865; }

/* Theme-picker UI (Settings tab) ──────────────────────────── */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.theme-card {
    border: 2px solid #e0d5cc;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    background: white;
}
.theme-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.theme-card.active { border-color: #F7C941; box-shadow: 0 0 0 3px rgba(247,201,65,0.2); }
.theme-card-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.4rem; }
.theme-card-desc { font-size: 0.8rem; color: #595959; margin-bottom: 0.6rem; }
.theme-swatches { display: flex; gap: 0.3rem; }
.theme-swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); }
.theme-card-preview {
    margin-top: 0.6rem; padding: 0.5rem; border-radius: 6px; font-size: 0.75rem;
    display: flex; gap: 0.4rem; align-items: center; justify-content: space-between;
}
.theme-pv-btn { padding: 0.2rem 0.6rem; border-radius: 4px; font-weight: 600; font-size: 0.75rem; }

/* UX-audit: destruktiivsed rea-tegevused (Maha, X) — hover-ainult, et vältida kogemata-klikki */
tr .row-danger-action { opacity: 0.25; transition: opacity 0.15s ease; }
tr:hover .row-danger-action { opacity: 1; }
tr .row-danger-action:focus,
tr .row-danger-action:hover { opacity: 1; }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  WORLD-CLASS REDESIGN — "Apothecary Precision"  (v2 layer)            ║
   ║  Lisatud KÕIGE lõppu → võidab allikajärjestuses; täielikult           ║
   ║  tagasipööratav (kustuta see blokk). Token-põhine → dark/brand-       ║
   ║  variandid kaskaadivad edasi. Ankur: --brand #5c4033 puutumata.       ║
   ║  Faas 1 tüpo+tokenid · 2 sidebar · 3 komponendid · 4 dashboard · 5 utils ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ── FAAS 1 · Tüpograafia + rafineeritud tokenid ───────────────────────── */
:root {
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    --sidebar-w: 240px;
    /* Sooja paberi neutraalid (lisanduvad, ei kustuta olemasolevaid) */
    --paper: #f3ede4;
    --paper-2: #efe7dc;
    --line-soft: #efe7da;
    --ink-3: #9a8d7f;
    --sage: #7c8a6a;
    --brass: #b08a4f;
    --clay: #b0694c;
    /* Pehmemad, soojemad varjud */
    --shadow-sm: 0 1px 2px rgba(60,40,25,.05), 0 1px 3px rgba(60,40,25,.04);
    --shadow-md: 0 4px 14px -4px rgba(60,40,25,.12), 0 2px 6px -2px rgba(60,40,25,.07);
    --shadow-lg: 0 18px 50px -12px rgba(50,32,20,.26);
    --radius: 10px;
    --radius-lg: 16px;
}
body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(1100px 560px at 82% -6%, #fbf6ee 0%, transparent 58%),
        radial-gradient(820px 460px at -6% 108%, #ece2d3 0%, transparent 55%),
        linear-gradient(180deg, #f6f1ea 0%, var(--paper) 100%);
    background-attachment: fixed;
}
h1, h2, h3, .stat-card .number, .tm-value,
.product-card-info h2, nav h1 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}
h2 { font-weight: 600; }
h3 { font-weight: 600; }
/* numbrid joonduvad tabelites ja mõõdikutes */
table, .tm-value, .stat-card .number, .num { font-variant-numeric: tabular-nums; }

/* ── FAAS 2 · (EEMALDATUD v1.1.963) ────────────────────────────────────────
   Vasak külgriba (peamenüü) pööratud tagasi — Jimmy FB 15.06: konfliktis
   sektsioonide enda vasaku alam-tab-loendiga (Müük/Ladu jt → kaks vasakut
   veergu, alam-tabid kadusid). Peamenüü jääb ülemine horisontaalriba.
   Ülejäänud redesign (tüpo/värvid/komponendid) säilib. ────────────────── */

/* ── FAAS 3 · Komponentide rafineerimine (kõik vaated, klassipõhine) ───── */
.nav-utils { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }

.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}
h2 { color: var(--brand); }

/* Tabelid: rohkem õhku, rahulikum joon, peen zebra */
th, td { padding: 0.72rem 1rem; }
th {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid var(--line-soft); }
tbody tr:hover { background: var(--surface-soft); }

/* Badge'id → puhtam "pill" (täpiga staatus) */
.badge {
    border-radius: 999px; padding: 0.2rem 0.65rem;
    font-size: 0.72rem; letter-spacing: 0.01em;
    box-shadow: none; text-shadow: none;
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.badge::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; opacity: 0.85; flex-shrink: 0;
}
.badge:hover { transform: none; }

/* Sisendid: pehmem raam + rohkem padding */
.form-row input, .form-row select, .form-row textarea {
    border-radius: 8px; border-color: var(--border);
    padding: 0.55rem 0.7rem;
}

/* Tab-bar: rahulikum */
.tab-bar { border-bottom-color: var(--border); }

/* ── FAAS 4 · Dashboard (KPI-riba + tegevuskeskus) ─────────────────────── */
.today-metrics { gap: 1rem; }
.tm-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.1rem 1.25rem;
    position: relative; overflow: hidden;
}
.tm-card::after {
    content: ""; position: absolute; right: -28px; top: -28px;
    width: 84px; height: 84px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,165,116,.16), transparent 70%);
}
.tm-label { font-size: 0.7rem; letter-spacing: 0.1em; }
.tm-value { font-size: 2rem; font-weight: 600; line-height: 1; margin-top: 0.5rem; }
.action-center .ac-header { letter-spacing: 0.08em; }
.action-item { border-radius: 12px; }
.action-item .ai-title { font-weight: 600; }

/* Dashboard'i kaartide pealkirjad → display-font, rahulik suurus */
.card > h3, .card > h2 { font-family: var(--font-display); font-weight: 600; }

/* ── FAAS 5 · Utility-klassid (inline-stiilide järkjärguliseks migreerimiseks) ─
   Annab sõnavara, et 6505 inline style="" saaks aja jooksul klassideks viia.
   Kasuta uutes vaadetes ja FB-paranduste käigus. */
.u-row     { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.u-row-sb  { display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; }
.u-col     { display: flex; flex-direction: column; gap: 0.5rem; }
.u-grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.u-mt      { margin-top: 1rem; }  .u-mt-sm { margin-top: 0.5rem; }
.u-mb      { margin-bottom: 1rem; } .u-mb-sm { margin-bottom: 0.5rem; }
.u-muted   { color: var(--muted); }
.u-sm      { font-size: 0.85rem; }
.u-xs      { font-size: 0.78rem; }
.u-right   { text-align: right; }
.u-center  { text-align: center; }
.u-brand   { color: var(--brand); }
.u-danger  { color: var(--danger); }
.u-success { color: var(--success); }
.u-bold    { font-weight: 600; }
.u-card-accent-danger  { border-left: 4px solid var(--danger); }
.u-card-accent-info    { border-left: 4px solid var(--info); }
.u-card-accent-brand   { border-left: 4px solid var(--brand); }

/* ── Mobiil (≤900px): nav jääb top-bariks; utils-grupp püsib reas ──────── */
@media (max-width: 900px) {
    .nav-utils { flex-wrap: wrap; }
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  TEST-/STAGING-KESKKOND  (body[data-instance="test"])                 ║
   ║  Aktiveerub AINULT kui server jookseb LUXORIA_INSTANCE=test env'iga.  ║
   ║  Eesmärk: kasutaja ei aja test- ja päris-süsteemi segamini —          ║
   ║  (1) eristav teal-värvilahendus, (2) püsiv "TEST-KESKKOND" riba.      ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
#testEnvBanner {
    position: fixed; top: 0; left: 0; right: 0; height: 30px; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: #3a2a00;
    background: repeating-linear-gradient(45deg, #f7c948 0 18px, #f0b429 18px 36px);
    box-shadow: 0 2px 6px rgba(0,0,0,.25); border-bottom: 2px solid #b88a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 1rem;
}
#testEnvBanner strong { color: #1f3a3a; }

/* Riba teeb ruumi: kogu sisu nihkub 30px alla */
body[data-instance="test"] { padding-top: 30px; }

/* Eristav värvilahendus — teal (selgelt erinev pruunist prodist) */
body[data-instance="test"] {
    --brand: #0e7490;
    --brand-light: #2b9bbd;
    --brand-dark: #0c5e75;
    --accent: #5eead4;
}
/* Top-nav teal (mitte pruun) + "TEST" silt pealkirja kõrvale */
body[data-instance="test"] nav {
    background: linear-gradient(180deg, #0c5e75 0%, #0e7490 100%) !important;
}
body[data-instance="test"] nav h1::after {
    content: " · TEST";
    -webkit-text-fill-color: #ffd66b; color: #ffd66b;
    font-size: 0.7em; letter-spacing: 0.1em; font-weight: 700;
}
/* Tabelipäised + h2 teal-toonis (var(--brand) kaudu juba, aga gradient th üle) */
body[data-instance="test"] th {
    background: linear-gradient(180deg, #e6f6f9 0%, #d3edf2 100%) !important;
    color: #0c5e75;
}
/* Õhuke teal raam ümber vaate (lisamärguanne) */
body[data-instance="test"] .container { box-shadow: inset 0 0 0 2px rgba(14,116,144,.12); border-radius: 8px; }

/* Prod-navis "🧪 TEST" link test-keskkonda (kuvatakse ainult prodis, vt index.html instance!='test') */
#navTestLink {
    display: inline-flex; align-items: center; gap: 0.2rem;
    background: #f0b429; color: #3a2a00; font-weight: 700; font-size: 0.72rem;
    padding: 3px 10px; border-radius: 999px; text-decoration: none;
    letter-spacing: 0.03em; border: 1px solid #b88a1a; white-space: nowrap;
    transition: transform .12s, box-shadow .15s, filter .15s;
}
#navTestLink:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(240,180,41,.5); filter: brightness(1.05); }
