/* GH Logistic - blue theme */
:root {
  --brand: #1565c0;
  --brand-dark: #0d47a1;
  --brand-soft: #e8f1fc;
  --ink: #12263f;
  --bs-primary: #1565c0;
  --bs-primary-rgb: 21, 101, 192;
  --bs-link-color: #0d47a1;
  --bs-link-hover-color: #0a3680;
  --bs-link-color-rgb: 13, 71, 161;
  --bs-body-bg: #f4f7fb;
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
body { background: var(--bs-body-bg); color: #27384d; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: #0a3680; --bs-btn-active-border-color: #0a3680;
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-dark); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); --bs-btn-active-color: #fff;
}
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(21,101,192,.18); }
.page-link { color: var(--brand-dark); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress-bar.bg-primary { background: var(--brand) !important; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex: 0 0 250px; background: linear-gradient(180deg, #0f2a4d 0%, #091a31 100%);
  color: #dce8f7; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1030;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.2rem; background: var(--brand); color: #fff; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 1.3rem; }
.brand-text { font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.brand-text small { display: block; font-weight: 400; font-size: .72rem; opacity: .9; letter-spacing: .5px; }
.side-nav { padding: .6rem .6rem 2rem; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: #7f9cc4; padding: 1rem .8rem .3rem; }
.nav-item-link { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; border-radius: 8px; color: #dce8f7; text-decoration: none; font-size: .9rem; }
.nav-item-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #7fb4ee; }
.nav-item-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item-link.active { background: var(--brand); color: #fff; }
.nav-item-link.active i { color: #fff; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 3px solid var(--brand); padding: .6rem 1.2rem; display: flex; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 1020; }
.topbar-title { font-weight: 600; color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-weight: 600; margin-right: .4rem; }
.user-chip { text-decoration: none; color: var(--ink); }
.notif-dot { position: absolute; top: -6px; right: -9px; font-size: .62rem; }
.page { padding: 1.4rem; flex: 1; }
.page-footer { padding: .8rem 1.4rem; font-size: .8rem; color: #6b7c93; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.4rem; margin: 0; color: var(--ink); font-weight: 700; }
.card { border: 0; border-radius: 12px; box-shadow: 0 1px 3px rgba(10,40,90,.08); }
.card-header { background: transparent; border-bottom: 1px solid #dde7f3; font-weight: 600; color: var(--ink); }
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { background: var(--brand-soft); color: #0d47a1; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 0; white-space: nowrap; }
.status-pill { font-weight: 500; }

.kpi { border-left: 4px solid var(--brand); }
.kpi .kpi-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .6px; color: #6b7c93; }
.kpi .kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.kpi .kpi-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-size: 1.3rem; }
.detail-table th { width: 34%; color: #6b7c93; font-weight: 500; }
.tree-indent { color: #7f9cc4; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #42a5f5 0%, #0d47a1 100%); padding: 1rem; }
.login-card { width: 100%; max-width: 410px; }
.login-card .brand-mark { background: var(--brand-soft); color: var(--brand-dark); width: 56px; height: 56px; font-size: 1.8rem; margin: 0 auto; }

@media (max-width: 991px) {
  .sidebar { position: fixed; left: -260px; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 0 0 30px rgba(0,0,0,.4); }
}
@media print {
  .sidebar, .topbar, .page-footer, .no-print, .btn { display: none !important; }
  .page { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* logistics extras */
.timeline { list-style: none; padding-left: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1.1rem 1.8rem; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: #cfe0f5; }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.timeline li.done::after { background: var(--brand); }
.stepper { display: flex; gap: 4px; flex-wrap: wrap; }
.stepper .st { flex: 1 1 0; min-width: 80px; text-align: center; font-size: .72rem; padding: .35rem .2rem; border-radius: 6px; background: #e3ecf7; color: #6b7c93; }
.stepper .st.on { background: var(--brand); color: #fff; font-weight: 600; }
.track-hero { background: linear-gradient(135deg, #1565c0, #0d47a1); color: #fff; padding: 3rem 1rem; }
.sig-pad { border: 2px dashed #9db8d9; border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 160px; }
.mobile-card { border-radius: 14px; }
.label-sheet { width: 4in; border: 2px solid #000; padding: 10px; font-family: Arial, sans-serif; background: #fff; color: #000; }
.label-sheet h4 { margin: 0; }
