:root {
    --sidebar-w: 230px;
    --brand: #0d3b66;
    --brand-light: #124a80;
    --accent: #f4a261;
}
html, body { height: 100%; }
body { background: #f4f6f9; font-size: 14px; }
.guest-body { background: linear-gradient(135deg, #0d3b66 0%, #1b5e9b 100%); }

.app-wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); background: var(--brand); color: #cfd8e3; flex-shrink: 0;
    position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1030; transition: transform .2s;
}
.sidebar-brand { padding: 18px 16px; font-weight: 700; font-size: 17px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; gap: 10px; align-items: center; }
.sidebar-nav { list-style: none; margin: 0; padding: 8px 0; }
.sidebar-nav li a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: #cfd8e3; text-decoration: none; font-size: 14px; }
.sidebar-nav li a:hover { background: var(--brand-light); color: #fff; }
.sidebar-nav li.active a { background: var(--brand-light); color: #fff; border-left: 3px solid var(--accent); padding-left: 15px; }
.sidebar-nav li a i { font-size: 16px; width: 20px; }

.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e3e6ea; padding: 10px 20px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1020; }
.topbar-title { font-weight: 600; font-size: 16px; }
.content { padding: 20px; flex: 1; }
.footer { padding: 10px 20px; border-top: 1px solid #e3e6ea; background: #fff; }

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 18px; }
.card-header { background: #fff; font-weight: 600; border-bottom: 1px solid #eef0f3; }
.kpi { border-left: 4px solid var(--brand); }
.kpi .kpi-label { font-size: 12px; color: #6c757d; text-transform: uppercase; letter-spacing: .4px; }
.kpi .kpi-value { font-size: 22px; font-weight: 700; }
.kpi.success { border-left-color: #198754; } .kpi.warning { border-left-color: #ffc107; } .kpi.danger { border-left-color: #dc3545; } .kpi.info { border-left-color: #0dcaf0; }

.table { font-size: 13px; }
.table th { background: #f8f9fb; font-weight: 600; white-space: nowrap; }
.table td { vertical-align: middle; }
.grid-view .filters input, .grid-view .filters select { font-size: 12px; padding: 2px 6px; }
.text-mono { font-family: Consolas, monospace; }
.form-label { font-weight: 500; margin-bottom: 2px; font-size: 13px; }
.form-control, .form-select { font-size: 13px; }
.required > label::after { content: " *"; color: #dc3545; }
.help-block { color: #dc3545; font-size: 12px; }
.breadcrumb { font-size: 12px; margin-bottom: 10px; }
.timeline { list-style: none; padding-left: 0; }
.timeline li { position: relative; padding-left: 26px; padding-bottom: 14px; border-left: 2px solid #dee2e6; margin-left: 8px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline li.current::before { background: #198754; }
.login-card { max-width: 400px; margin: 60px auto; }
.freight-box { background: #f8f9fb; border: 1px dashed #c9d1dc; border-radius: 6px; padding: 10px; }
.pkg-row input { font-size: 12px; }
.summary-table td { padding: 3px 8px; }
.summary-table td:last-child { text-align: right; font-family: Consolas, monospace; }
