:root{--d-bg:#f4f7fb;--d-card:#fff;--d-card2:#f8fafc;--d-text:#0f172a;--d-muted:#64748b;--d-line:#e2e8f0;--d-blue:#2563eb;--d-green:#16a34a;--d-amber:#d97706;--d-red:#dc2626;--d-purple:#7c3aed;--d-shadow:0 12px 34px rgba(15,23,42,.08)}
html[data-theme="dark"],body.wms-dark{--d-bg:#07111f;--d-card:#0f1b2d;--d-card2:#0b1627;--d-text:#f8fafc;--d-muted:#94a3b8;--d-line:#26354c;--d-shadow:0 18px 40px rgba(0,0,0,.28)}
*{box-sizing:border-box}.dashboard-v2{min-height:100vh;background:var(--d-bg);color:var(--d-text);padding:18px;transition:.2s}.dash-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;background:linear-gradient(135deg,var(--d-card),var(--d-card2));border:1px solid var(--d-line);border-radius:22px;padding:20px;box-shadow:var(--d-shadow)}.dash-eyebrow{font-size:12px;font-weight:800;letter-spacing:.11em;color:var(--d-blue)}.dash-top h1{margin:5px 0 4px;font-size:clamp(25px,3vw,38px)}.dash-top p{margin:0;color:var(--d-muted)}.top-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.meta-chip{min-height:46px;padding:8px 12px;border:1px solid var(--d-line);border-radius:13px;background:var(--d-card);display:flex;flex-direction:column;justify-content:center}.meta-chip small{color:var(--d-muted);font-size:11px}.meta-chip strong{font-size:13px}.system-chip{display:flex;align-items:center;gap:8px}.system-dot{width:9px;height:9px;border-radius:50%;background:var(--d-amber);box-shadow:0 0 0 4px rgba(217,119,6,.12)}.system-dot.ok{background:var(--d-green);box-shadow:0 0 0 4px rgba(22,163,74,.12)}.shortcut-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.shortcut-row a{border:1px solid var(--d-line);background:var(--d-card);color:var(--d-text);padding:9px 12px;border-radius:11px;text-decoration:none;font-weight:700;font-size:13px}.shortcut-row a.primary{background:var(--d-blue);border-color:var(--d-blue);color:#fff}.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-top:14px}.kpi{position:relative;overflow:hidden;background:var(--d-card);border:1px solid var(--d-line);border-radius:18px;padding:16px;text-decoration:none;color:var(--d-text);box-shadow:var(--d-shadow)}.kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent,var(--d-blue))}.kpi small{display:block;color:var(--d-muted);font-weight:700}.kpi b{display:block;margin:7px 0 3px;font-size:31px}.kpi span{font-size:12px;color:var(--d-muted)}.dash-main{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);gap:14px;margin-top:14px}.dash-panel{background:var(--d-card);border:1px solid var(--d-line);border-radius:20px;box-shadow:var(--d-shadow);min-width:0}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 17px;border-bottom:1px solid var(--d-line)}.panel-head h2{font-size:17px;margin:0}.panel-head p{font-size:12px;color:var(--d-muted);margin:3px 0 0}.live-badge{display:flex;align-items:center;gap:7px;color:var(--d-green);font-size:12px;font-weight:800}.live-badge i{width:8px;height:8px;border-radius:50%;background:var(--d-green);animation:pulse 1.7s infinite}@keyframes pulse{50%{opacity:.35}}.activity-list{max-height:485px;overflow:auto}.activity-item{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:11px;padding:13px 17px;border-bottom:1px solid var(--d-line)}.activity-avatar{width:38px;height:38px;border-radius:12px;background:var(--d-card2);display:grid;place-items:center;font-weight:900;color:var(--d-blue)}.activity-item strong{font-size:13px}.activity-item p{margin:3px 0;color:var(--d-muted);font-size:13px;line-height:1.4}.activity-item time{font-size:11px;color:var(--d-muted);white-space:nowrap}.empty{padding:28px;text-align:center;color:var(--d-muted)}.actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px}.action-card{display:flex;gap:11px;align-items:center;min-height:78px;padding:13px;border-radius:15px;background:var(--d-card2);border:1px solid var(--d-line);color:var(--d-text);text-decoration:none}.action-card i{width:38px;height:38px;border-radius:12px;background:#dbeafe;color:#1d4ed8;display:grid;place-items:center;font-style:normal;font-size:18px}.action-card strong{display:block;font-size:13px}.action-card small{display:block;color:var(--d-muted);font-size:11px;margin-top:3px}.action-card.disabled{opacity:.65;cursor:not-allowed}.health-list{padding:8px 14px 14px}.health-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid var(--d-line);font-size:13px}.health-row:last-child{border-bottom:0}.status-pill{padding:4px 8px;border-radius:99px;background:#e2e8f0;color:#475569;font-size:10px;font-weight:900;text-transform:uppercase}.status-pill.ok{background:#dcfce7;color:#166534}.status-pill.warn{background:#fef3c7;color:#92400e}.theme-dark .action-card i,html[data-theme="dark"] .action-card i{background:#172554;color:#bfdbfe}@media(max-width:1350px){.kpi-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:980px){.dash-main{grid-template-columns:1fr}.dash-top{grid-template-columns:1fr}.top-meta{justify-content:flex-start}}@media(max-width:700px){.dashboard-v2{padding:10px}.kpi-grid{grid-template-columns:repeat(2,1fr)}.actions-grid{grid-template-columns:1fr}.activity-item{grid-template-columns:34px minmax(0,1fr)}.activity-item time{grid-column:2}.top-meta{display:grid;grid-template-columns:1fr 1fr;width:100%}.meta-chip{min-width:0}}@media(max-width:420px){.kpi-grid{grid-template-columns:1fr}.top-meta{grid-template-columns:1fr}.dash-top{padding:15px}}


/* Correcto WMS 18.0.8 — compact mobile dashboard */
@media(max-width:700px){
  .dash-top{padding:16px}
  .dash-top .top-meta{display:none!important}
  .shortcut-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%}
  .shortcut-row a{display:flex;align-items:center;justify-content:center;min-height:54px;text-align:center;padding:10px 8px}
  .actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .action-card{min-height:92px;display:grid;grid-template-columns:1fr;text-align:center;justify-items:center;padding:12px 8px}
  .action-card i{width:36px;height:36px}
  .action-card small{line-height:1.25}
}
@media(max-width:420px){
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
  .kpi{padding:13px 11px;min-width:0}
  .kpi b{font-size:27px}
  .kpi small,.kpi span{overflow-wrap:anywhere}
  .shortcut-row,.actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
/* Correcto WMS 18.0.16 — Dashboard shipment charts */
.dashboard-charts{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}.chart-panel{min-width:0}.chart-eyebrow{display:block;color:#38bdf8;font-size:12px;font-weight:900;letter-spacing:.18em;margin-bottom:6px}.bar-chart{height:260px;border:1px solid var(--line,#243148);border-radius:16px;padding:18px 12px 10px;display:flex;align-items:end;gap:8px;overflow:hidden;background:rgba(8,20,36,.35)}.bar-col{height:100%;min-width:0;flex:1;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:7px}.bar-track{width:100%;height:calc(100% - 30px);display:flex;align-items:end;background:rgba(56,189,248,.07);border-radius:9px 9px 3px 3px;overflow:hidden}.bar-fill{width:100%;min-height:3px;background:linear-gradient(180deg,#38bdf8,#2563eb);border-radius:8px 8px 2px 2px;position:relative}.bar-value{position:absolute;top:-22px;left:50%;transform:translateX(-50%);font-size:11px;color:var(--text,#fff);font-weight:800}.bar-label{font-size:10px;color:var(--muted,#94a3b8);white-space:nowrap}.hourly-chart{gap:4px;height:190px}.hourly-chart .bar-label{font-size:8px}.hourly-chart .bar-value{font-size:9px;top:-18px}@media(max-width:900px){.dashboard-charts{grid-template-columns:1fr}.bar-chart{height:220px}.hourly-chart{height:180px;overflow-x:auto}.hourly-chart .bar-col{min-width:22px}}[data-theme="light"] .bar-chart{background:#f8fafc;border-color:#d7e0ea}[data-theme="light"] .bar-track{background:#eaf3fb}

/* 19.8.0 - Pošiljke po statusu */
.shipment-status-panel{margin:0 0 18px}.shipment-status-panel .panel-head>a{color:var(--dash-blue,#60a5fa);font-weight:800;text-decoration:none}.shipment-status-grid{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px}.shipment-status-card{min-width:0;padding:14px 16px;border:1px solid var(--dash-line,#263247);border-radius:14px;background:var(--dash-surface-2,#0b1424);text-decoration:none;color:inherit;display:flex;align-items:center;justify-content:space-between;gap:10px}.shipment-status-card span{font-size:.82rem;color:var(--dash-muted,#94a3b8);font-weight:700;overflow-wrap:anywhere}.shipment-status-card b{font-size:1.45rem}.shipment-status-card:hover{border-color:#3b82f6;transform:translateY(-1px)}
@media(max-width:1050px){.shipment-status-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:620px){.shipment-status-grid{grid-template-columns:repeat(2,1fr)}.shipment-status-card{padding:12px}.shipment-status-card b{font-size:1.2rem}}

/* 19.9.4 build 2026.08.20.1630 — Control Tower */
.control-tower{display:grid;gap:14px;margin:14px 0 16px}.today-strip{display:grid;grid-template-columns:1.2fr repeat(5,minmax(120px,1fr));gap:1px;overflow:hidden;border:1px solid var(--dash-line,#26364f);border-radius:18px;background:var(--dash-line,#26364f)}.today-strip>*{min-width:0;background:var(--dash-panel,#0f1b2e);padding:16px 18px}.today-title{display:flex;flex-direction:column;justify-content:center}.today-title span{font-size:11px;font-weight:900;letter-spacing:.12em;color:#60a5fa}.today-title strong{font-size:18px;margin-top:4px}.today-strip a{text-decoration:none;color:inherit;display:grid;align-content:center}.today-strip a:hover{background:#13233b}.today-strip b{font-size:30px;line-height:1}.today-strip a span{margin-top:6px;color:#9fb0c7;font-size:12px;font-weight:700}.attention-panel{border:1px solid var(--dash-line,#26364f);border-radius:18px;background:var(--dash-panel,#0f1b2e);padding:18px}.attention-panel>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.attention-panel h2{margin:4px 0 0}.attention-total{border:1px solid #334155;border-radius:999px;padding:7px 11px;color:#cbd5e1;font-size:12px;font-weight:800}.attention-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.attention-item{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:13px;border:1px solid #26364f;border-radius:13px;background:#0b1728;color:#fff;text-decoration:none;min-width:0}.attention-item:hover{border-color:#3b82f6;transform:translateY(-1px)}.attention-item .attention-dot{width:11px;height:11px;border-radius:50%}.attention-item.critical .attention-dot{background:#ef4444}.attention-item.warning .attention-dot{background:#f97316}.attention-item.notice .attention-dot{background:#eab308}.attention-item strong{font-size:24px}.attention-item span{font-size:12px;color:#cbd5e1;line-height:1.3}.attention-item.zero{opacity:.48}.attention-arrow{font-size:18px;color:#60a5fa}.attention-empty{padding:14px;border:1px solid #21462f;border-radius:12px;background:#0c2115;color:#86efac;font-weight:800}
@media(max-width:1100px){.today-strip{grid-template-columns:repeat(3,1fr)}.today-title{grid-column:1/-1}.attention-list{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.today-strip{grid-template-columns:1fr 1fr}.today-strip a,.today-strip>*{padding:13px}.today-strip b{font-size:24px}.attention-panel{padding:13px}.attention-panel>header{align-items:flex-start;flex-direction:column}.attention-list{grid-template-columns:1fr}}

/* === CORRECTO DASHBOARD FINAL UX START === */

/* =========================================================
   DASHBOARD
   Page-specific layout only.
   Theme/colors remain owned by wms-core.css.
   ========================================================= */


/* ---------- PAGE ---------- */

body.wms-has-sidebar main,
body.wms-has-sidebar .wrap{
    min-width:0;
}

body.wms-has-sidebar .wrap{
    width:100%;
    max-width:1680px;
    margin:0 auto;
}


/* ---------- DASHBOARD HEADER ---------- */

.dashboard-header,
.dashboard-hero,
.dashboard-title-row,
.dashboard-section-header{
    min-width:0;
}

.dashboard-header,
.dashboard-title-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
}

.dashboard-header > *,
.dashboard-title-row > *{
    min-width:0;
}

.dashboard-header h1,
.dashboard-title-row h1{
    margin:0;
}

.dashboard-header p,
.dashboard-title-row p{
    margin-top:6px;
    margin-bottom:0;
}


/* ---------- SECTION ---------- */

.dashboard-section{
    margin-bottom:18px;
    overflow:hidden;
}

.dashboard-section-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;

    margin-bottom:12px;
}

.dashboard-section-header h2,
.dashboard-section-header h3{
    margin:0;
}


/* ---------- KPI / STAT GRID ---------- */

.dashboard-stats,
.stats-grid,
.metrics,
.dashboard-metrics,
.kpi-grid{
    display:grid;
    grid-template-columns:
        repeat(4,minmax(0,1fr));
    gap:12px;
    width:100%;
}

.dashboard-stats > *,
.stats-grid > *,
.metrics > *,
.dashboard-metrics > *,
.kpi-grid > *{
    min-width:0;
}


/* ---------- KPI CARDS ---------- */

.stat,
.stat-card,
.metric-card,
.dashboard-stat,
.dashboard-kpi{
    position:relative;

    min-width:0;
    min-height:112px;

    padding:16px;

    background:var(--wms-surface) !important;

    border:
        1px solid
        var(--wms-line) !important;

    border-radius:14px;

    box-shadow:var(--wms-shadow);

    overflow:hidden;
}

.stat:hover,
.stat-card:hover,
.metric-card:hover,
.dashboard-stat:hover,
.dashboard-kpi:hover{
    border-color:
        var(--wms-line-strong) !important;

    box-shadow:var(--wms-shadow-hover);
}

.stat .value,
.stat-card .value,
.metric-card .value,
.dashboard-stat .value,
.dashboard-kpi .value,
.stat .num,
.stat-card .num{
    display:block;

    margin-top:7px;

    color:var(--wms-heading) !important;

    font-size:clamp(25px,2.1vw,34px);
    line-height:1;
    font-weight:800;

    letter-spacing:-.035em;
}

.stat .label,
.stat-card .label,
.metric-card .label,
.dashboard-stat .label,
.dashboard-kpi .label{
    color:var(--wms-muted) !important;

    font-size:12px;
    line-height:1.35;
    font-weight:700;
}


/* ---------- ATTENTION / ALERT CARDS ---------- */

.dashboard-attention,
.attention-grid,
.alert-grid{
    display:grid;
    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap:10px;
}

.dashboard-attention > *,
.attention-grid > *,
.alert-grid > *{
    min-width:0;
}

.attention-card,
.alert-card{
    display:flex;
    align-items:center;

    gap:12px;

    min-width:0;

    padding:13px 14px;

    background:var(--wms-surface-2);

    border:1px solid var(--wms-line);

    border-radius:12px;
}

.attention-card:hover,
.alert-card:hover{
    background:var(--wms-hover);
    border-color:var(--wms-line-strong);
}

.attention-card > *,
.alert-card > *{
    min-width:0;
}


/* ---------- DASHBOARD CONTENT GRID ---------- */

.dashboard-grid,
.dashboard-main-grid,
.dashboard-content-grid{
    display:grid;

    grid-template-columns:
        minmax(0,1.55fr)
        minmax(300px,.75fr);

    gap:14px;

    align-items:start;
}

.dashboard-grid > *,
.dashboard-main-grid > *,
.dashboard-content-grid > *{
    min-width:0;
}


/* ---------- CARDS ---------- */

.dashboard-card{
    min-width:0;

    background:var(--wms-surface);

    border:1px solid var(--wms-line);

    border-radius:14px;

    overflow:hidden;

    box-shadow:var(--wms-shadow);
}

.dashboard-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:12px;

    padding:14px 16px;

    border-bottom:1px solid var(--wms-line);
}

.dashboard-card-header h2,
.dashboard-card-header h3{
    margin:0;
}

.dashboard-card-body{
    min-width:0;
    padding:14px 16px;
}


/* ---------- TABLES ---------- */

.dashboard-section table,
.dashboard-card table{
    width:100%;
    min-width:0;
}

.dashboard-section th,
.dashboard-card th{
    white-space:nowrap;
}

.dashboard-section td,
.dashboard-card td{
    vertical-align:middle;
}

.dashboard-section tbody tr:last-child td,
.dashboard-card tbody tr:last-child td{
    border-bottom:0;
}


/* ---------- ACTIONS ---------- */

.dashboard-actions,
.quick-actions,
.quick-action-grid{
    display:grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap:8px;
}

.dashboard-actions > *,
.quick-actions > *,
.quick-action-grid > *{
    min-width:0;
}

.dashboard-actions a,
.dashboard-actions button,
.quick-actions a,
.quick-actions button,
.quick-action-grid a,
.quick-action-grid button{
    width:100%;

    min-height:46px;

    display:flex;
    align-items:center;
    justify-content:center;

    gap:7px;

    text-align:center;

    white-space:normal;
}


/* ---------- STATUS ---------- */

.dashboard-section .status-pill,
.dashboard-card .status-pill,
.dashboard-section .badge,
.dashboard-card .badge{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    min-height:26px;

    padding:4px 9px;

    line-height:1.15;

    white-space:nowrap;
}


/* ---------- EMPTY STATE ---------- */

.dashboard-section .empty-state,
.dashboard-card .empty-state{
    padding:28px 18px;

    text-align:center;

    color:var(--wms-muted);
}


/* ---------- LINKS ---------- */

.dashboard-section a:not(.primary):not(.btn-primary),
.dashboard-card a:not(.primary):not(.btn-primary){
    text-decoration:none;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width:1500px){

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

}


/* =========================================================
   LAPTOP
   ========================================================= */

@media (max-width:1280px){

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

    .dashboard-attention,
    .attention-grid,
    .alert-grid{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width:980px){

    .dashboard-grid,
    .dashboard-main-grid,
    .dashboard-content-grid{
        grid-template-columns:1fr;
    }

    .dashboard-stats,
    .stats-grid,
    .metrics,
    .dashboard-metrics,
    .kpi-grid{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

}


/* =========================================================
   PHONE
   ========================================================= */

@media (max-width:600px){

    .dashboard-header,
    .dashboard-title-row,
    .dashboard-section-header{
        align-items:stretch;
        flex-direction:column;
    }

    .dashboard-stats,
    .stats-grid,
    .metrics,
    .dashboard-metrics,
    .kpi-grid{
        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap:8px;
    }

    .stat,
    .stat-card,
    .metric-card,
    .dashboard-stat,
    .dashboard-kpi{
        min-height:96px;

        padding:12px;

        border-radius:12px;
    }

    .stat .value,
    .stat-card .value,
    .metric-card .value,
    .dashboard-stat .value,
    .dashboard-kpi .value,
    .stat .num,
    .stat-card .num{
        font-size:25px;
    }

    .dashboard-attention,
    .attention-grid,
    .alert-grid{
        grid-template-columns:1fr;
    }

    .dashboard-actions,
    .quick-actions,
    .quick-action-grid{
        grid-template-columns:1fr;
    }

    .dashboard-card-header,
    .dashboard-card-body{
        padding-left:12px;
        padding-right:12px;
    }

}


/* =========================================================
   SMALL PDA
   ========================================================= */

@media (max-width:380px){

    .dashboard-stats,
    .stats-grid,
    .metrics,
    .dashboard-metrics,
    .kpi-grid{
        grid-template-columns:1fr;
    }

    .stat,
    .stat-card,
    .metric-card,
    .dashboard-stat,
    .dashboard-kpi{
        min-height:auto;
    }

}


/* =========================================================
   DARK PAGE FIXES
   ========================================================= */

html[data-theme="dark"] .dashboard-section,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .dashboard-stat,
html[data-theme="dark"] .dashboard-kpi{
    background:var(--wms-surface) !important;

    color:var(--wms-text) !important;

    border-color:var(--wms-line) !important;
}

html[data-theme="dark"] .attention-card,
html[data-theme="dark"] .alert-card{
    background:var(--wms-surface-2) !important;

    color:var(--wms-text) !important;
}


/* =========================================================
   LIGHT PAGE FIXES
   ========================================================= */

html:not([data-theme="dark"]) .dashboard-section,
html[data-theme="light"] .dashboard-section,
html:not([data-theme="dark"]) .dashboard-card,
html[data-theme="light"] .dashboard-card,
html:not([data-theme="dark"]) .stat,
html[data-theme="light"] .stat,
html:not([data-theme="dark"]) .stat-card,
html[data-theme="light"] .stat-card,
html:not([data-theme="dark"]) .metric-card,
html[data-theme="light"] .metric-card{
    background:var(--wms-surface) !important;

    color:var(--wms-text) !important;

    border-color:var(--wms-line) !important;
}


/* === CORRECTO DASHBOARD FINAL UX END === */

/* REMOVED LEGACY BLOCK: DASHBOARD REAL LIGHT FIX */
