:root {
  --rb-green-primary: #00B050;
  --rb-green-dark: #007A33;
  --rb-green-light: #31B85A;
  --rb-purple: #A64CA6;
  --rb-orange: #F28C28;
  --rb-gray-text: #2F2F2F;
  --rb-gray-muted: #6B7280;
  --rb-bg-page: #F5F6F8;
  --rb-bg-card: #FFFFFF;
  --rb-border: #E5E7EB;
  --rb-border-soft: #ECEFF3;
  --rb-grid: #E9EDF2;
  --rb-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--rb-bg-page);
  color: var(--rb-gray-text);
}

/* =========================
   GLOBAL DASHBOARD BASE
========================= */

.app-shell {
  min-height: 100vh;
  background: var(--rb-bg-page);
}

.page-wrapper {
  padding-bottom: 40px;
}

.page-title-main {
  font-size: 34px;
  font-weight: 800;
  margin: 0;
  color: var(--rb-gray-text);
  line-height: 1;
  display: flex;
  align-items: center;
}

.page-subtitle-main {
  color: var(--rb-gray-muted);
  margin-top: 4px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--rb-gray-text);
}

.global-filter-wrapper {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border);
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--rb-gray-text);
}

.kpi-card {
  background: var(--rb-bg-card);
  border: 1px solid rgba(0, 176, 80, 0.15);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--rb-shadow);
  min-height: 130px;
}

.kpi-title {
  color: var(--rb-gray-muted);
  font-size: 15px;
  font-weight: 600;
}

.kpi-value {
  color: var(--rb-green-dark);
  font-size: 42px;
  font-weight: 700;
  margin-top: 12px;
  line-height: 1;
}

.kpi-subtitle {
  color: #9CA3AF;
  font-size: 12px;
  margin-top: 8px;
}

.chart-card,
.summary-card,
.placeholder-box,
.table-card,
.profile-card-large {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border-soft);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--rb-shadow);
}

.summary-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--rb-gray-muted);
}

.summary-card-body {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--rb-gray-text);
}

.placeholder-box {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rb-gray-muted);
  font-size: 16px;
}

/* Dash dropdown / react-select */
.Select-control,
.Select__control {
  border-radius: 12px !important;
  border: 1px solid var(--rb-border) !important;
  box-shadow: none !important;
}

.Select-control:hover,
.Select__control:hover {
  border-color: var(--rb-green-primary) !important;
}

.is-focused:not(.is-open) > .Select-control,
.Select__control--is-focused {
  border-color: var(--rb-green-primary) !important;
  box-shadow: 0 0 0 2px rgba(0, 176, 80, 0.12) !important;
}

.VirtualizedSelectOption {
  font-size: 14px;
}

.VirtualizedSelectFocusedOption {
  background-color: rgba(0, 176, 80, 0.10) !important;
  color: var(--rb-green-dark) !important;
}

.js-plotly-plot .plotly .modebar {
  top: 8px !important;
  right: 8px !important;
}

/* =========================
   LOGIN PAGE
========================= */

.login-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--rb-bg-page);
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.66)),
    url('/assets/bg-login.png') center center / cover no-repeat;
  z-index: 0;
}

.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 176, 80, 0.10), transparent 32%),
    radial-gradient(circle at 85% 25%, rgba(166, 76, 166, 0.10), transparent 28%),
    radial-gradient(circle at 60% 82%, rgba(59, 130, 246, 0.08), transparent 24%);
  z-index: 0;
}

.login-card {
  width: 510px;
  max-width: 94vw;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.14);
  padding: 30px 24px 22px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.login-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 8px;
  background: linear-gradient(90deg, var(--rb-green-primary), #5f8dd3, var(--rb-purple));
  opacity: 0.95;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-bg-accent {
  position: absolute;
  bottom: -120px;
  left: -90px;
  width: 620px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, #86efac, #22c55e);
  opacity: 0.12;
  filter: blur(42px);
  z-index: 0;
}

.login-head {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 18px;
}

.login-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 0 0 8px;
  color: var(--rb-gray-text);
}

.login-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--rb-gray-muted);
  line-height: 1.6;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.login-logos {
  display: flex;
  gap: 26px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 18px;
}

.login-logos img {
  height: 42px;
  object-fit: contain;
  display: block;
}

.login-logos-plain {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.login-btn {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--rb-green-primary), var(--rb-green-dark));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 20px rgba(0, 176, 80, 0.18);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  margin-bottom: 16px;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 176, 80, 0.22);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-google-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-google-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.login-status-box {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  text-align: center;
}

.login-status-label {
  font-size: 12px;
  color: var(--rb-gray-muted);
  margin-bottom: 4px;
}

.login-status-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--rb-gray-text);
}

.login-message {
  margin-top: 4px;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
  word-break: break-word;
  color: #334155;
}

.login-alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #b00020;
  font-size: 13px;
  text-align: center;
}

.login-footer {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(100, 116, 139, 0.9);
}

.login-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.6);
  margin-top: 7px;
}

.login-card-footer {
  margin: 18px -24px -22px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #e6f9f1, #f0fdf9);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  font-size: 11px;
  color: #065f46;
  font-weight: 600;
}

.login-dev-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.login-dev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
  border: 1px solid #c7d2fe;
}

.login-dev-btn.secondary {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* =========================
   TRANSPORTER DASHBOARD
========================= */

.dashboard-body {
  background: var(--rb-bg-page);
}

.transporter-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  min-width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--rb-border);
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  transition: width .25s ease, min-width .25s ease, transform .25s ease, padding .25s ease;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}

.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  overflow: hidden;
}

.sidebar-brand img {
  height: 34px;
  object-fit: contain;
  transition: opacity .2s ease;
}

.sidebar-profile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--rb-border-soft);
  background: #f9fafb;
  border-radius: 18px;
  margin-bottom: 18px;
  transition: padding .2s ease;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rb-green-primary), var(--rb-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 42px;
}

.profile-meta {
  min-width: 0;
}

.profile-name {
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.profile-role,
.profile-email {
  font-size: 12px;
  color: var(--rb-gray-muted);
  line-height: 1.45;
  word-break: break-word;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: auto;
}

.sidebar-link,
.sidebar-logout {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  border-radius: 14px;
  color: #3F3F46;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  width: 100%;
}

.sidebar-link:hover {
  background: rgba(0,176,80,.08);
  color: var(--rb-green-dark);
}

.sidebar-link.active {
  background: var(--rb-purple);
  color: #fff;
}

.sidebar-footer {
  padding-top: 18px;
}

.sidebar-logout {
  background: #f3f4f6;
  color: var(--rb-gray-text);
}

.hamburger,
.sidebar-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--rb-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--rb-gray-text);
}

.hamburger:hover,
.sidebar-close:hover {
  background: #f8fafc;
}

.main-panel {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 32px;
  transition: padding-left .25s ease;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--rb-gray-muted);
  margin-bottom: 16px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item.active {
  color: var(--rb-gray-text);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--rb-gray-muted);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-btn,
.filter-btn,
.table-action-btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 600;
}

.topbar-btn {
  padding: 10px 14px;
  background: var(--rb-green-dark);
  color: #fff;
}

.global-message {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--rb-border);
  border-radius: 14px;
  color: var(--rb-gray-muted);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto auto;
  gap: 10px;
}

/* Filter grid tanpa transporter dropdown (4 kolom) */
.filter-grid.no-transporter {
  grid-template-columns: 2fr 1fr auto auto;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--rb-border);
  border-radius: 12px;
  background: #fff;
}

.filter-btn {
  padding: 11px 14px;
  background: var(--rb-green-primary);
  color: #fff;
}

.filter-btn.secondary {
  background: #e5e7eb;
  color: var(--rb-gray-text);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--rb-border-soft);
  text-align: left;
  font-size: 13px;
}

.data-table th {
  color: var(--rb-gray-muted);
  font-weight: 700;
  background: #f8fafc;
}

.data-table tbody tr:nth-child(odd)  { background: #ffffff; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover           { background: #f0fdf4; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Status standar — Planning ──────────────────────────────────── */
.status-outstanding     { background: #f1f5f9; color: #475569; }
.status-planned         { background: #dbeafe; color: #1d4ed8; }
.status-dispatched      { background: #e0f2fe; color: #0369a1; }

/* ── Status standar — Container ─────────────────────────────────── */
.status-requested       { background: #faf5ff; color: #7c3aed; }
.status-cancel-requested{ background: #fef3c7; color: #b45309; }
.status-cancelled       { background: #fee2e2; color: #b91c1c; }

/* ── Status standar — Delivery & Container ──────────────────────── */
.status-intransit       { background: #dcfce7; color: #047857; }
.status-delivered       { background: #bbf7d0; color: #065f46; }
.status-pod             { background: #a7f3d0; color: #064e3b; font-weight: 900; }

/* ── Status standar — Receipt ───────────────────────────────────── */
.status-draft           { background: #f1f5f9; color: #64748b; }
.status-ready           { background: #fef9c3; color: #a16207; }
.status-confirmed       { background: #dcfce7; color: #15803d; }
.status-printed         { background: #d1fae5; color: #065f46; }

/* ── Legacy — tetap ada supaya tidak rusak kalau masih terpakai ─── */
.status-badge.ontrack   { background: #dcfce7; color: #166534; }
.status-badge.not-ontrack { background: #fee2e2; color: #991b1b; }
.status-badge.delayed   { background: #fef3c7; color: #92400e; }

.table-action-btn {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
  background: #eef2ff;
  color: #3730a3;
}
.table-action-btn.danger    { background: #fee2e2; color: #b91c1c; }
.table-action-btn.secondary { background: #f1f5f9; color: #475569; }
.table-action-btn.info      { background: #f0f9ff; color: #0369a1; }

.filter-btn.danger { background: #ef4444; color: #fff; }
.filter-btn.danger:hover { background: #dc2626; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-field-label {
  font-size: 12px;
  color: var(--rb-gray-muted);
  margin-bottom: 6px;
}

.profile-field-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--rb-gray-text);
}

.sidebar-backdrop {
  display: none;
}

/* Desktop collapsed state */
.transporter-shell.sidebar-collapsed .sidebar {
  width: 92px;
  min-width: 92px;
  padding-left: 10px;
  padding-right: 10px;
}

.transporter-shell.sidebar-collapsed .sidebar-brand {
  justify-content: center;
}

.transporter-shell.sidebar-collapsed .sidebar-brand img:last-child,
.transporter-shell.sidebar-collapsed .profile-meta,
.transporter-shell.sidebar-collapsed .sidebar-link-text {
  display: none;
}

.transporter-shell.sidebar-collapsed .sidebar-profile {
  justify-content: center;
}

.transporter-shell.sidebar-collapsed .sidebar-link,
.transporter-shell.sidebar-collapsed .sidebar-logout {
  text-align: center;
  padding-left: 10px;
  padding-right: 10px;
}

/* Tablet & mobile */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .14);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
    z-index: 20;
  }

  .sidebar-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

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

  .filter-grid,
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Small mobile */
@media (max-width: 640px) {
  .login-page {
    padding: 16px;
  }

  .login-card {
    width: 100%;
    max-width: 95vw;
    padding: 24px 18px 18px;
    border-radius: 20px;
  }

  .login-card-footer {
    margin: 16px -18px -18px;
  }

  .login-title {
    font-size: 18px;
  }

  .login-logos {
    gap: 18px;
    flex-wrap: wrap;
  }

  .login-logos img {
    height: 34px;
  }

  .login-btn {
    font-size: 14px;
    padding: 13px 14px;
  }

  .main-panel {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-left,
  .topbar-right {
    width: 100%;
  }

  .topbar-btn {
    width: 100%;
  }

  .dashboard-grid,
  .filter-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .page-title-main {
    font-size: 24px;
  }
}

/* =========================
   ADMIN PORTAL
========================= */

.admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--rb-bg-page);
}

.admin-sidebar {
  width: 280px;
  min-width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--rb-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  transition: width .25s ease, min-width .25s ease, transform .25s ease, padding .25s ease;
}

.admin-sidebar-top {
  display: flex;
  flex-direction: column;
}

.admin-main-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 0 4px;
  text-decoration: none;
}

.admin-main-logo {
  height: 42px;
  max-width: 100%;
  object-fit: contain;
}

.admin-profile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--rb-border-soft);
  background: #f9fafb;
  border-radius: 18px;
  margin-bottom: 18px;
  transition: .2s ease;
}

.admin-profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rb-green-primary), var(--rb-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  flex: 0 0 42px;
}

.admin-profile-meta {
  min-width: 0;
}

.admin-profile-name {
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.admin-profile-role,
.admin-profile-email {
  font-size: 12px;
  color: var(--rb-gray-muted);
  line-height: 1.45;
  word-break: break-word;
}

.admin-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
}

.admin-sidebar-link {
  text-align: left;
  border: 0;
  background: #f3f4f6;
  padding: 14px 16px;
  border-radius: 16px;
  color: #3F3F46;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  width: 100%;
}

.admin-sidebar-link:hover {
  background: rgba(0,176,80,.08);
  color: var(--rb-green-dark);
}

.admin-sidebar-link.active {
  background: var(--rb-purple);
  color: #fff;
}

.admin-sidebar-bottom {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-side-logos {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.admin-side-logos img {
  height: 42px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.admin-sidebar-footer {
  padding-top: 0;
  width: 100%;
}

.admin-sidebar-logout {
  width: 100%;
  text-align: left;
  border: 0;
  background: #f3f4f6;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--rb-gray-text);
  font-weight: 600;
  cursor: pointer;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 32px;
  transition: padding-left .25s ease;
}

.admin-topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-topbar-left .page-title-main {
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.admin-topbar-toggle {
  width: 58px;
  height: 58px;
  border: 1px solid var(--rb-border);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--rb-gray-text);
  flex: 0 0 58px;
}

.admin-topbar-toggle:hover {
  background: #f8fafc;
}

.admin-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-menu-card {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border-soft);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: var(--rb-shadow);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.admin-menu-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.admin-menu-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(0, 176, 80, 0.10);
  color: var(--rb-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}

.admin-menu-card-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--rb-gray-text);
  margin: 0 0 16px;
  text-align: center;
}

.admin-menu-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--rb-green-primary);
  color: #fff;
  font-weight: 700;
  transition: .2s ease;
  min-width: 90px;
}

.admin-menu-card-action:hover {
  background: var(--rb-green-dark);
}

.admin-sidebar-backdrop {
  display: none;
}

/* Desktop collapsed */
.admin-shell.sidebar-collapsed .admin-sidebar {
  width: 92px;
  min-width: 92px;
  padding-left: 10px;
  padding-right: 10px;
}

.admin-shell.sidebar-collapsed .admin-main-logo,
.admin-shell.sidebar-collapsed .admin-profile-meta,
.admin-shell.sidebar-collapsed .admin-sidebar-link,
.admin-shell.sidebar-collapsed .admin-side-logos,
.admin-shell.sidebar-collapsed .admin-sidebar-logout {
  display: none;
}

.admin-shell.sidebar-collapsed .admin-profile {
  justify-content: center;
  padding: 10px;
}

.admin-shell.sidebar-collapsed .admin-sidebar-top {
  align-items: center;
}

.admin-shell.sidebar-collapsed .admin-sidebar-bottom {
  display: none;
}

@media (min-width: 1440px) {
  .admin-menu-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1700px) {
  .admin-menu-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .14);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
    z-index: 20;
  }

  .admin-sidebar-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-menu-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-menu-card {
    min-height: 150px;
  }

  .admin-menu-card-title {
    font-size: 17px;
  }
}


.admin-menu-card-button {
  border: 0;
  cursor: pointer;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all .2s ease;
  z-index: 100;
}

.admin-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all .2s ease;
  z-index: 110;
}

.admin-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-modal-card {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--rb-border-soft);
  box-shadow: 0 18px 40px rgba(2, 6, 23, .14);
  overflow: hidden;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rb-border-soft);
}

.admin-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--rb-gray-text);
}

.admin-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 16px;
}

.admin-modal-body {
  padding: 20px;
}

.admin-modal-text {
  margin: 0 0 10px;
  color: var(--rb-gray-text);
}

.admin-modal-list {
  margin: 0 0 18px 18px;
  padding: 0;
  color: var(--rb-gray-muted);
}

.admin-run-status {
  background: #f9fafb;
  border: 1px solid var(--rb-border-soft);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid var(--rb-border-soft);
}

.admin-modal-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.admin-modal-btn.primary {
  background: var(--rb-green-primary);
  color: #fff;
}

.admin-modal-btn.primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.admin-modal-btn.secondary {
  background: #e5e7eb;
  color: var(--rb-gray-text);
}


.admin-menu-card-button {
  border: 0;
  cursor: pointer;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all .2s ease;
  z-index: 100;
}

.admin-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all .2s ease;
  z-index: 110;
}

.admin-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-modal-card {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--rb-border-soft);
  box-shadow: 0 18px 40px rgba(2, 6, 23, .14);
  overflow: hidden;
}

.admin-modal-card-wide {
  max-width: 760px;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rb-border-soft);
}

.admin-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--rb-gray-text);
}

.admin-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 16px;
}

.admin-modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.admin-modal-text {
  margin: 0 0 14px;
  color: var(--rb-gray-text);
  line-height: 1.6;
}

.admin-run-status {
  background: #f9fafb;
  border: 1px solid var(--rb-border-soft);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid var(--rb-border-soft);
}

.admin-modal-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.admin-modal-btn.primary {
  background: var(--rb-green-primary);
  color: #fff;
}

.admin-modal-btn.primary:disabled,
.admin-modal-btn.danger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.admin-modal-btn.secondary {
  background: #e5e7eb;
  color: var(--rb-gray-text);
}

.admin-modal-btn.danger {
  background: #ef4444;
  color: #fff;
}

.admin-preview-wrapper {
  margin-top: 18px;
}

.admin-preview-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--rb-gray-text);
}

.admin-preview-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rb-border-soft);
  border-radius: 14px;
}

.admin-preview-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: #fff;
}

.admin-preview-table th,
.admin-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rb-border-soft);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

.admin-preview-table th {
  background: #f8fafc;
  color: var(--rb-gray-muted);
  font-weight: 800;
}

.admin-modal-btn.primary:disabled,
.admin-modal-btn.danger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* =========================
   TRANSPORTER MODERN (LIKE ADMIN)
========================= */

.transporter-shell-modern {
  display: flex;
  min-height: 100vh;
  background: var(--rb-bg-page);
}

.transporter-sidebar-modern {
  width: 280px;
  min-width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--rb-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  transition: width .25s ease, min-width .25s ease, transform .25s ease, padding .25s ease;
}

.transporter-sidebar-top {
  display: flex;
  flex-direction: column;
}

.transporter-main-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 0 4px;
  text-decoration: none;
}

.transporter-main-logo {
  height: 42px;
  max-width: 100%;
  object-fit: contain;
}

.transporter-profile-modern {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--rb-border-soft);
  background: #f9fafb;
  border-radius: 18px;
  margin-bottom: 18px;
}

.transporter-sidebar-menu-modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
}

.transporter-sidebar-menu-modern .sidebar-link {
  text-align: left;
  border: 0;
  background: #f3f4f6;
  padding: 14px 16px;
  border-radius: 16px;
  color: #3F3F46;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  width: 100%;
}

.transporter-sidebar-menu-modern .sidebar-link:hover {
  background: rgba(0,176,80,.08);
  color: var(--rb-green-dark);
}

.transporter-sidebar-menu-modern .sidebar-link.active {
  background: var(--rb-purple);
  color: #fff;
}

.transporter-sidebar-bottom {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.transporter-side-logos {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.transporter-side-logos img {
  height: 42px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.transporter-sidebar-footer-modern {
  width: 100%;
  padding-top: 0;
}

.transporter-sidebar-footer-modern .sidebar-logout {
  width: 100%;
  text-align: left;
  border: 0;
  background: #f3f4f6;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--rb-gray-text);
  font-weight: 600;
  cursor: pointer;
}

.transporter-main-modern {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 32px;
  transition: padding-left .25s ease;
}

.transporter-topbar-modern {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.transporter-topbar-left-modern {
  display: flex;
  align-items: center;
  gap: 14px;
}

.transporter-topbar-left-modern .page-title-main {
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.transporter-toggle-modern {
  width: 58px;
  height: 58px;
  border: 1px solid var(--rb-border);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--rb-gray-text);
  flex: 0 0 58px;
}

.transporter-toggle-modern:hover {
  background: #f8fafc;
}

/* Desktop collapsed */
.transporter-shell-modern.sidebar-collapsed .transporter-sidebar-modern {
  width: 92px;
  min-width: 92px;
  padding-left: 10px;
  padding-right: 10px;
}

.transporter-shell-modern.sidebar-collapsed .transporter-main-logo,
.transporter-shell-modern.sidebar-collapsed .profile-meta,
.transporter-shell-modern.sidebar-collapsed .sidebar-link-text,
.transporter-shell-modern.sidebar-collapsed .transporter-side-logos,
.transporter-shell-modern.sidebar-collapsed .sidebar-logout {
  display: none;
}

.transporter-shell-modern.sidebar-collapsed .transporter-profile-modern {
  justify-content: center;
  padding: 10px;
}

.transporter-shell-modern.sidebar-collapsed .transporter-sidebar-top {
  align-items: center;
}

.transporter-shell-modern.sidebar-collapsed .transporter-sidebar-bottom {
  display: none;
}

@media (max-width: 992px) {
  .transporter-sidebar-modern {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .14);
  }

  .transporter-sidebar-modern.is-open {
    transform: translateX(0);
  }

  .transporter-main-modern {
    padding: 18px;
  }

  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-grid input[type="text"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Transporter filter dropdown — locked state untuk role transporter */
.filter-transporter-select:disabled {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
  opacity: 1;
  border-color: #e2e8f0;
}

/* =========================
   MODAL (dashboard.blade.php)
========================= */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: #ffffff;
  width: 460px;
  max-width: calc(100vw - 32px);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--rb-gray-text);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rb-border);
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
}

