/* ===== Management Dashboard - change colours here ===== */
:root { }
body { margin:0; font-family:"Segoe UI", Tahoma, Arial, sans-serif; font-size:13px; background:#f3f5f8; color:#1f2937; }
a { color:#1d4ed8; text-decoration:none; }
a:hover { text-decoration:underline; }

/* Header */
.hdr { background:#0f2b46; color:#fff; padding:0 18px; height:52px; display:flex; align-items:center; justify-content:space-between; }
.hdr .brand { font-size:18px; font-weight:600; letter-spacing:.3px; }
.hdr .brand small { font-weight:400; opacity:.7; margin-left:6px; font-size:12px; }
.hdr .nav a { color:#cfe0f3; margin-left:18px; }
.hdr .nav a:hover { color:#fff; }
.hdr .user { color:#cfe0f3; margin-left:24px; }
.page { padding:16px 18px 40px; }

/* Filter bar */
.filter { background:#fff; border:1px solid #e3e8ef; border-radius:8px; padding:12px 14px; margin-bottom:14px; }
.filter .row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.filter .lbl { font-weight:600; color:#475569; }
.plants td { padding:2px 10px 2px 0; white-space:nowrap; }
.plants label { margin-left:3px; }
.input { border:1px solid #cbd5e1; border-radius:5px; padding:5px 7px; font-size:13px; width:105px; }
.ddl { border:1px solid #cbd5e1; border-radius:5px; padding:5px; font-size:13px; }
.btn { background:#1d4ed8; color:#fff; border:0; border-radius:5px; padding:6px 14px; cursor:pointer; font-size:13px; }
.btn:hover { background:#1e40af; }
.btn2 { background:#fff; color:#1d4ed8; border:1px solid #1d4ed8; border-radius:5px; padding:5px 12px; cursor:pointer; font-size:13px; }
.btn3 { background:#e2e8f0; color:#334155; border:0; border-radius:5px; padding:6px 12px; cursor:pointer; font-size:13px; }
.msg { color:#b91c1c; }
.note { color:#64748b; font-size:12px; }

/* KPI cards */
.section-title { font-size:15px; font-weight:600; margin:18px 0 8px; color:#0f2b46; }
.cards { display:flex; flex-wrap:wrap; gap:12px; }
.card { background:#fff; border:1px solid #e3e8ef; border-radius:8px; padding:12px 14px; min-width:170px; flex:1 1 170px; box-shadow:0 1px 2px rgba(0,0,0,.03); }
.card:hover { border-color:#93b4f5; box-shadow:0 2px 8px rgba(29,78,216,.12); }
.card a { color:inherit; display:block; text-decoration:none; }
.card .ttl { color:#64748b; font-size:12px; text-transform:uppercase; letter-spacing:.4px; }
.card .val { font-size:22px; font-weight:600; margin-top:4px; color:#0f172a; }
.card .sub { font-size:12px; color:#64748b; margin-top:2px; }
.card.diesel { border-left:4px solid #d97706; }
.card.cash { border-left:4px solid #059669; }
.card.mod { border-left:4px solid #1d4ed8; }

/* Plant KPI table */
.grid { border-collapse:collapse; width:100%; background:#fff; }
.grid th { background:#eef2f7; color:#334155; text-align:left; padding:6px 8px; border-bottom:1px solid #d9e0ea; font-weight:600; white-space:nowrap; }
.grid td { padding:5px 8px; border-bottom:1px solid #eef1f5; white-space:nowrap; }
.grid tr:hover td { background:#f5f8ff; }
.grid .num { text-align:right; }
.grid .total td { background:#e7f6e9; font-weight:600; }
.grid .head td { background:#f1f5f9; font-weight:600; }
.gridwrap { overflow:auto; border:1px solid #e3e8ef; border-radius:8px; background:#fff; }

.charts { display:flex; flex-wrap:wrap; gap:12px; }
.chartbox { background:#fff; border:1px solid #e3e8ef; border-radius:8px; padding:8px; flex:1 1 460px; }
.chartbox .ttl { font-weight:600; color:#334155; margin:2px 4px 6px; }

/* Drill-down popup */
.overlay { position:fixed; left:0; top:0; right:0; bottom:0; background:rgba(15,23,42,.45); z-index:100; }
.popup { position:fixed; left:3%; top:3%; width:94%; height:92%; background:#fff; border-radius:10px; z-index:101; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,.3); }
.popup .ph { padding:10px 14px; border-bottom:1px solid #e3e8ef; display:flex; justify-content:space-between; align-items:center; }
.popup .ph .t { font-size:16px; font-weight:600; color:#0f2b46; }
.popup .pf { padding:8px 14px; border-bottom:1px solid #eef1f5; background:#f8fafc; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.popup .pb { padding:10px 14px; overflow:auto; flex:1; }
.crumbs a, .crumbs span { margin-right:4px; }
.crumbs .sep { color:#94a3b8; margin-right:4px; }
.status { font-size:12px; color:#64748b; margin:4px 0 8px; }

/* Login */
.loginbox { width:340px; margin:90px auto; background:#fff; border:1px solid #e3e8ef; border-radius:10px; padding:26px 28px; box-shadow:0 6px 24px rgba(0,0,0,.06); }
.loginbox h2 { margin:0 0 4px; color:#0f2b46; }
.loginbox .input { width:100%; box-sizing:border-box; margin:4px 0 12px; padding:8px; }
.loginbox .btn { width:100%; padding:9px; }

.updprogress { position:fixed; top:60px; right:20px; background:#fef3c7; color:#92400e; border:1px solid #fcd34d; padding:6px 12px; border-radius:6px; z-index:200; }

/* Header drop-down menu groups (e.g. Approvals) */
.hdr .nav .grp { position:relative; display:inline-block; margin-left:18px; }
.hdr .nav .grp > a { margin-left:0; }
.hdr .nav .grp .sub { display:none; position:absolute; right:0; top:100%; background:#0f2b46; min-width:230px; padding:6px 0; z-index:300; box-shadow:0 6px 16px rgba(0,0,0,.25); border-radius:0 0 6px 6px; }
.hdr .nav .grp .sub a { display:block; margin:0; padding:7px 14px; white-space:nowrap; }
.hdr .nav .grp .sub a:hover { background:#1d4ed8; color:#fff; text-decoration:none; }
.hdr .nav .grp:hover .sub { display:block; }
.hdr { position:relative; z-index:250; }

/* Single-plant bar on approval pages */
.plantbar { background:#fff7ed; border-bottom:2px solid #f59e0b; padding:8px 18px; display:flex; align-items:center; gap:10px; font-family:"Segoe UI", Tahoma, Arial, sans-serif; font-size:13px; }
.plantbar .lbl { font-weight:600; color:#92400e; }
.plantbar .plantname { font-size:16px; font-weight:700; color:#b45309; }
.page.erp { font-size:11px; }

.formtbl td { padding:4px 10px 4px 0; }
.formtbl td:nth-child(odd) { font-weight:600; color:#475569; white-space:nowrap; }
