:root {
  color-scheme:dark;
  --bg:#0c1017;
  --sidebar:#10151e;
  --panel:#151c27;
  --border:#273140;
  --text:#e8edf5;
  --muted:#8290a5;
  --blue:#168bff;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
button{font:inherit;cursor:pointer}
.sidebar{position:fixed;inset:0 auto 0 0;width:260px;background:var(--sidebar);border-right:1px solid var(--border);padding:26px 16px;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;margin:0 8px 46px}
.brand-icon{width:43px;height:43px;border:1px solid #347dba;border-radius:10px;display:grid;place-items:center;font-size:29px;font-weight:800;color:var(--blue);background:#13263b}
.brand-name{font-size:23px;font-weight:800;letter-spacing:1px;color:#c5cbd5}
.brand-name span{color:var(--blue)}
.brand-sub{font-size:10px;letter-spacing:2px;color:var(--muted);margin-top:4px}
.nav-label{font-size:10px;font-weight:700;letter-spacing:2px;color:#64738a;margin:0 14px 12px}
nav{display:grid;gap:5px;margin-bottom:35px}
.nav-item{border:0;background:transparent;color:#94a2b7;padding:13px 15px;text-align:left;border-radius:8px;display:flex;gap:13px;align-items:center;font-size:14px}
.nav-item:hover{background:#1b2635;color:#fff}
.nav-item.active{background:#152c46;color:#4da9ff;border-left:3px solid var(--blue)}
.nav-item span{color:inherit}
.sidebar-bottom{margin-top:auto;display:flex;align-items:center;gap:9px;color:#9cabbc;font-size:11px;letter-spacing:1px;padding:15px}
.status-dot,.server-dot{height:8px;width:8px;border-radius:50%;background:#697586;display:inline-block}
.status-dot.online,.server-dot.online{background:#21c782;box-shadow:0 0 10px #21c78255}
.main{margin-left:260px;min-height:100vh}
.topbar{height:75px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:0 38px;background:#10151d}
.breadcrumb{font-size:13px;color:#9ba7b9}.breadcrumb span{margin-left:9px;color:#dce5f1}
.top-right{display:flex;align-items:center;gap:10px;font-size:12px;color:#9ba9bb}
.server-label{font-size:10px;letter-spacing:1px;margin-right:15px}
.content{padding:38px;max-width:1600px;margin:auto}
.page{display:none}.page.active{display:block}
.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;gap:20px}
.eyebrow{color:var(--blue);font-size:10px;letter-spacing:2.4px;font-weight:800;margin-bottom:10px}
h1{font-size:30px;margin:0 0 10px;font-weight:700}
p{color:var(--muted);font-size:14px;line-height:1.6;margin:0}
.primary{background:var(--blue);border:1px solid #329aff;border-radius:8px;color:#fff;padding:12px 20px;font-size:13px;font-weight:700}
.primary:hover{background:#0876dd}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}
.stat-card,.panel{background:var(--panel);border:1px solid var(--border);border-radius:12px}
.stat-card{padding:23px}
.stat-label{font-size:10px;letter-spacing:1.2px;color:#94a3b8;font-weight:700}
.stat-value{font-size:34px;font-weight:750;margin:17px 0 12px}
.stat-foot{font-size:11px;color:#718197}
.panel{padding:24px;margin-bottom:22px}
.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}
h2{font-size:16px;margin:0}.muted{color:var(--muted);font-size:12px}
.system-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.system-item{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#111822;border:1px solid #253142;padding:18px;border-radius:8px;font-size:13px}
.system-item strong{font-size:12px;color:#23d18b}
.system-item strong.pending{color:#e8b65c}
.empty{text-align:center;padding:60px 20px}
.empty-icon{font-size:38px;color:#467aa9;margin-bottom:18px}
.empty h3{font-size:16px;margin:0 0 10px}
.dropzone{border:2px dashed #35506b;background:#111b29;border-radius:12px;padding:65px 20px;text-align:center}
.dropzone.dragover{border-color:var(--blue);background:#142942}
.upload-icon{font-size:48px;color:var(--blue);margin-bottom:18px}
.dropzone h2{margin-bottom:10px}
.dropzone p{margin-bottom:22px}
.file-list{margin-top:18px}
.file-item{padding:13px 15px;background:#111822;border:1px solid var(--border);border-radius:7px;margin-bottom:8px;font-size:13px;overflow-wrap:anywhere}
.notice{margin-top:20px;padding:15px;background:#30291b;border:1px solid #67522d;border-radius:8px;color:#e4bd74}
.setting-row{display:flex;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--border);font-size:13px;gap:20px}
.setting-row:last-child{border:0}
.setting-row span{color:var(--muted)}
a{color:#4baaff;text-decoration:none}
@media(max-width:1100px){.stats{grid-template-columns:repeat(2,1fr)}.system-grid{grid-template-columns:1fr}}
@media(max-width:700px){.sidebar{width:65px;padding:20px 7px}.brand{margin:0 0 35px}.brand>div:last-child,.nav-label,.nav-item span,.sidebar-bottom span:last-child{display:none}.nav-item{justify-content:center;padding:13px}.main{margin-left:65px}.topbar{padding:0 15px}.server-label{display:none}.content{padding:20px}.stats{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:15px}.stat-value{font-size:26px}.page-heading{align-items:flex-start;flex-direction:column}.system-item{flex-direction:column;align-items:flex-start}.panel{padding:16px}}

/* DAHLBAR Logout */
.logout-button {
  margin-left:18px;
  padding:9px 15px;
  background:#172334;
  border:1px solid #30455e;
  border-radius:8px;
  color:#b8c8da;
  font-size:12px;
  font-weight:600;
  transition:background .2s,border-color .2s;
}
.logout-button:hover {
  background:#203a57;
  border-color:#168bff;
  color:#fff;
}

/* DAHLBAR Logout Button – Design 2.0 */
#logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 36px;
    padding: 0 14px;
    margin-left: 14px;
    background: #151e2b;
    border: 1px solid #304c68;
    border-radius: 8px;
    color: #dce8f5;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
}

#logout-button::before {
    content: "↪";
    color: #168bff;
    font-size: 17px;
    line-height: 1;
}

#logout-button:hover {
    background: #1b3048;
    border-color: #168bff;
    color: #ffffff;
}

#logout-button:disabled {
    opacity: .6;
    cursor: wait;
}

/* DAHLBAR Invoice Review 2.0 */
.invoice-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.invoice-pdf-panel,
.invoice-data-panel {
    min-width: 0;
    background: #101722;
    border: 1px solid #26364b;
    border-radius: 10px;
    overflow: hidden;
}

.invoice-pdf-toolbar {
    height: 48px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #26364b;
}

.invoice-pdf-toolbar a {
    color: #168bff;
    font-size: 12px;
    text-decoration: none;
}

#review-pdf-frame {
    display: block;
    width: 100%;
    height: 720px;
    border: 0;
    background: #202733;
}

.invoice-data-panel {
    padding: 16px;
    max-height: 768px;
    overflow-y: auto;
}

.invoice-data-panel .system-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
    .invoice-review-layout {
        grid-template-columns: 1fr;
    }

    #review-pdf-frame {
        height: 600px;
    }
}
