/* datShip admin — ShopeeFood-style red & white, khớp với app. */

:root {
  --ds-primary: #dd0000;
  --ds-primary-dark: #a60000;
  --ds-primary-soft: #ffdede;
  --ds-accent: #ffc83d;
  --ds-bg: #f5f5f7;
  --ds-surface: #ffffff;
  --ds-border: #e5e5e5;
  --ds-text: #1a1a1a;
  --ds-text-muted: #6b6b6b;
  --ds-text-faded: #9aa0a6;
  --ds-shadow-card: 0 3px 10px rgba(0, 0, 0, 0.08);
  --ds-shadow-raised: 0 6px 16px rgba(0, 0, 0, 0.12);
}

html,
body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ds-text);
  background: var(--ds-bg);
}

/* ─── Header (top bar) ─── */
.ds-header {
  background: var(--ds-primary);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: var(--ds-shadow-raised);
  position: sticky;
  top: 0;
  z-index: 20;
}
.ds-header h1 {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.ds-header .subtitle {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
}
.ds-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ─── Sidebar (white) ─── */
.ds-sidebar {
  background: #fff;
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid var(--ds-border);
  display: flex;
  flex-direction: column;
}
.ds-brand {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ds-border);
}
.ds-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ds-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.5px;
}
.ds-brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--ds-border);
  flex-shrink: 0;
}
.ds-brand-name {
  font-weight: 800;
  color: var(--ds-text);
  font-size: 15px;
  line-height: 1.1;
}
.ds-brand-sub {
  font-size: 11px;
  color: var(--ds-text-muted);
}

#nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
#nav .nav-section {
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ds-text-faded);
  padding: 14px 18px 6px;
}
#nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--ds-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}
#nav a:hover {
  background: var(--ds-bg);
}
#nav a.active {
  background: var(--ds-primary-soft);
  color: var(--ds-primary-dark);
  font-weight: 700;
}

.ds-me-card {
  border-top: 1px solid var(--ds-border);
  padding: 14px 16px;
}
.ds-me-card .name {
  color: var(--ds-text);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}
.ds-me-card .role {
  color: var(--ds-text-muted);
  font-size: 11.5px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.05s;
  font-family: inherit;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--ds-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ds-primary-dark);
}
.btn-light {
  background: #fff;
  color: var(--ds-text);
  border-color: var(--ds-border);
}
.btn-light:hover {
  background: var(--ds-bg);
}
.btn-danger {
  background: #fff;
  color: var(--ds-primary);
  border-color: var(--ds-primary-soft);
}
.btn-danger:hover {
  background: var(--ds-primary-soft);
}
.btn-ghost {
  background: transparent;
  color: var(--ds-text-muted);
}
.btn-ghost:hover {
  background: var(--ds-bg);
  color: var(--ds-text);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Inputs ─── */
.input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--ds-border);
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
  font-family: inherit;
  color: var(--ds-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px var(--ds-primary-soft);
}
label.lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ds-text-muted);
  margin-bottom: 4px;
  display: block;
}

/* ─── Cards / KPI ─── */
.card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--ds-shadow-card);
}
.kpi {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--ds-shadow-card);
}
.kpi .label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ds-text-muted);
}
.kpi .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ds-text);
  margin-top: 2px;
}
.kpi .delta {
  font-size: 11.5px;
  color: var(--ds-text-muted);
  margin-top: 4px;
}

/* ─── Tables ─── */
.table-wrap {
  background: #fff;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--ds-shadow-card);
}
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.t th {
  text-align: left;
  background: #fff5f5;
  color: var(--ds-primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ds-border);
}
table.t td {
  padding: 11px 14px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}
table.t tr:last-child td {
  border-bottom: 0;
}
table.t tr:hover td {
  background: #fffafa;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-green {
  background: #e6f7ec;
  color: #047a3a;
}
.badge-yellow {
  background: #fff3d6;
  color: #8a5a00;
}
.badge-red {
  background: var(--ds-primary-soft);
  color: var(--ds-primary-dark);
}
.badge-blue {
  background: #e3f2fd;
  color: #1554a8;
}
.badge-slate {
  background: #eef0f3;
  color: #4a4a4a;
}
.badge-purple {
  background: #f3e5f5;
  color: #6a1b9a;
}
.badge-amber {
  background: #fff7e0;
  color: #8a4a00;
}

/* ─── Modal ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}
.modal-lg {
  max-width: 940px;
}
.modal-header {
  border-bottom: 1px solid var(--ds-border);
  padding: 16px 22px;
}
.modal-header h3 {
  font-weight: 800;
  font-size: 16px;
  color: var(--ds-text);
}
.modal-body {
  padding: 18px 22px;
}
.modal-footer {
  border-top: 1px solid var(--ds-border);
  padding: 14px 22px;
  background: var(--ds-bg);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-radius: 0 0 18px 18px;
}

/* ─── Toast ─── */
#toasts {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--ds-text);
  color: white;
  box-shadow: var(--ds-shadow-raised);
  min-width: 240px;
  animation: toast-in 0.18s ease-out;
}
.toast-error {
  background: var(--ds-primary-dark);
}
.toast-success {
  background: #047a3a;
}
@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ─── Spinner ─── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Utility ─── */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.muted {
  color: var(--ds-text-muted);
}
.faded {
  color: var(--ds-text-faded);
}
.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--ds-text-muted);
  font-size: 13px;
}
.section-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--ds-text);
  margin-bottom: 12px;
}
.divider {
  height: 1px;
  background: var(--ds-border);
  margin: 16px 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--ds-border);
}
