/* ===========================================================
   Defne Catering — Design System v2 (Modern SaaS)
   Tasarım kaynağı: claude.ai/design (dark sidebar + emerald accent)
   =========================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --dc-primary: #10b981;
  --dc-primary-dark: #047857;
  --dc-primary-soft: #ecfdf5;
  --dc-primary-softer: #f0fdf4;

  /* Surfaces */
  --dc-surface: #f8fafc;
  --dc-canvas: #f1f5f4;
  --dc-card: #ffffff;
  --dc-border: #e5e7eb;
  --dc-border-soft: #eef2f1;
  --dc-border-strong: #d1d5db;

  /* Text */
  --dc-text: #0f172a;
  --dc-text-soft: #334155;
  --dc-text-muted: #64748b;
  --dc-text-faint: #94a3b8;

  /* Status */
  --dc-amber: #f59e0b;
  --dc-amber-soft: #fffbeb;
  --dc-amber-text: #b45309;
  --dc-amber-border: #fde68a;

  --dc-emerald: #10b981;
  --dc-emerald-soft: #ecfdf5;
  --dc-emerald-text: #047857;
  --dc-emerald-border: #a7f3d0;

  --dc-blue: #3b82f6;
  --dc-blue-soft: #eff6ff;
  --dc-blue-text: #1d4ed8;
  --dc-blue-border: #bfdbfe;

  --dc-red: #ef4444;
  --dc-red-soft: #fef2f2;
  --dc-red-text: #b91c1c;
  --dc-red-border: #fecaca;

  --dc-slate: #94a3b8;
  --dc-slate-soft: #f1f5f9;
  --dc-slate-text: #475569;
  --dc-slate-border: #e2e8f0;

  --dc-violet: #8b5cf6;
  --dc-violet-soft: #f5f3ff;
  --dc-violet-text: #6d28d9;
  --dc-violet-border: #ddd6fe;

  /* Sidebar (admin = dark) */
  --dc-sidebar-bg: #0b1220;
  --dc-sidebar-surface: #111a2c;
  --dc-sidebar-border: #1e2a44;
  --dc-sidebar-text: #e2e8f0;
  --dc-sidebar-muted: #94a3b8;
  --dc-sidebar-hover: #182238;
  --dc-sidebar-active: #0f1a2e;

  /* Shadows */
  --dc-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .03);
  --dc-shadow-md: 0 4px 14px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04);
  --dc-shadow-lg: 0 14px 40px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .05);

  /* Sidebar width */
  --dc-sidebar-width: 260px;
  --dc-sidebar-width-customer: 240px;
  --dc-topbar-height: 64px;

  /* Font */
  --dc-font: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--dc-font);
  background: var(--dc-surface);
  color: var(--dc-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ---------- Layout shell ---------- */
.dc-shell {
  display: flex;
  min-height: 100vh;
  background: var(--dc-surface);
}

.dc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: var(--dc-sidebar-width);
  min-height: 100vh;
}
.dc-shell--customer .dc-main { margin-left: var(--dc-sidebar-width-customer); }

.dc-content {
  flex: 1;
  padding: 28px 32px 40px;
  min-height: 0;
}

/* ---------- Sidebar (admin: dark) ---------- */
.dc-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--dc-sidebar-width);
  background: var(--dc-sidebar-bg);
  color: var(--dc-sidebar-text);
  border-right: 1px solid var(--dc-sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
}

.dc-sidebar__brand {
  padding: 20px 20px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--dc-sidebar-border);
}
.dc-sidebar__brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--dc-primary), var(--dc-primary-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .35);
  flex-shrink: 0;
}
.dc-sidebar__brand-mark svg { width: 18px; height: 18px; fill: #fff; }
.dc-sidebar__brand-title { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.dc-sidebar__brand-subtitle { font-size: 10.5px; color: var(--dc-sidebar-muted); font-weight: 500; white-space: nowrap; margin-top: 1px; }

.dc-sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.dc-sidebar__nav::-webkit-scrollbar { width: 6px; }
.dc-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

.dc-sidebar__group { margin-top: 18px; }
.dc-sidebar__group:first-child { margin-top: 0; }
.dc-sidebar__group-title {
  padding: 6px 10px 8px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(148, 163, 184, .65);
}

.dc-sidebar__link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0;
  border-radius: 7px;
  color: var(--dc-sidebar-text);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.dc-sidebar__link:hover { background: var(--dc-sidebar-hover); color: #fff; }
.dc-sidebar__link.is-active {
  background: var(--dc-sidebar-hover);
  color: #fff;
  font-weight: 600;
}
.dc-sidebar__link.is-active::before {
  content: '';
  position: absolute; left: -10px; top: 6px; bottom: 6px;
  width: 3px; background: var(--dc-primary);
  border-radius: 0 3px 3px 0;
}
.dc-sidebar__link i { font-size: 16px; width: 18px; text-align: center; color: var(--dc-sidebar-muted); }
.dc-sidebar__link.is-active i { color: var(--dc-primary); }
.dc-sidebar__link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dc-sidebar__badge {
  font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--dc-red); color: #fff;
}
.dc-sidebar__badge--amber { background: var(--dc-amber); }
.dc-sidebar__badge--emerald { background: var(--dc-emerald); }

.dc-sidebar__footer {
  border-top: 1px solid var(--dc-sidebar-border);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
}
.dc-sidebar__avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #64748b, #334155);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.dc-sidebar__user { flex: 1; min-width: 0; }
.dc-sidebar__user-name { font-size: 13px; font-weight: 600; color: #fff; }
.dc-sidebar__user-meta { font-size: 11px; color: var(--dc-sidebar-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Sidebar (customer: light) ---------- */
.dc-sidebar--customer {
  width: var(--dc-sidebar-width-customer);
  background: #fff;
  color: var(--dc-text);
  border-right: 1px solid var(--dc-border);
}
.dc-sidebar--customer .dc-sidebar__brand { border-bottom-color: var(--dc-border-soft); }
.dc-sidebar--customer .dc-sidebar__brand-title { color: var(--dc-text); }
.dc-sidebar--customer .dc-sidebar__brand-subtitle { color: var(--dc-text-muted); }
.dc-sidebar--customer .dc-sidebar__brand-mark { box-shadow: 0 4px 12px rgba(16, 185, 129, .25); }

.dc-sidebar--customer .dc-sidebar__group-title { color: var(--dc-text-muted); }
.dc-sidebar--customer .dc-sidebar__link {
  color: var(--dc-text-soft);
}
.dc-sidebar--customer .dc-sidebar__link i { color: var(--dc-text-muted); }
.dc-sidebar--customer .dc-sidebar__link:hover { background: var(--dc-surface); color: var(--dc-text); }
.dc-sidebar--customer .dc-sidebar__link.is-active {
  background: var(--dc-emerald-soft);
  color: var(--dc-emerald-text);
}
.dc-sidebar--customer .dc-sidebar__link.is-active::before { background: var(--dc-emerald); }
.dc-sidebar--customer .dc-sidebar__link.is-active i { color: var(--dc-emerald); }

.dc-sidebar--customer .dc-sidebar__footer {
  border-top-color: var(--dc-border-soft);
}
.dc-sidebar--customer .dc-sidebar__user-name { color: var(--dc-text); }
.dc-sidebar--customer .dc-sidebar__user-meta { color: var(--dc-text-muted); }

.dc-sidebar__company-card {
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--dc-emerald-soft);
  border: 1px solid var(--dc-emerald-border);
  display: flex; align-items: center; gap: 10px;
}
.dc-sidebar__company-card .dc-sidebar__company-avatar {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--dc-emerald), var(--dc-primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.dc-sidebar__company-name { font-size: 12.5px; font-weight: 600; color: var(--dc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-sidebar__company-meta { font-size: 10.5px; color: var(--dc-emerald-text); font-weight: 500; }

/* ---------- Topbar ---------- */
.dc-topbar {
  height: var(--dc-topbar-height);
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--dc-border);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 5;
}

.dc-topbar__breadcrumb {
  display: flex; align-items: center; gap: 0;
  font-size: 13.5px;
  flex: 1; min-width: 0;
  list-style: none; padding: 0; margin: 0;
}
.dc-topbar__breadcrumb .breadcrumb-item {
  display: inline-flex; align-items: center;
  font-size: 13.5px; padding: 0;
}
.dc-topbar__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: '\F285'; /* bi-chevron-right */
  font-family: 'bootstrap-icons';
  color: var(--dc-text-faint);
  font-size: 11px;
  margin: 0 8px;
  padding: 0;
  float: none;
}
.dc-topbar__breadcrumb a { color: var(--dc-text-muted); font-weight: 500; }
.dc-topbar__breadcrumb a:hover { color: var(--dc-text); }
.dc-topbar__breadcrumb .breadcrumb-item.active,
.dc-topbar__breadcrumb .breadcrumb-item:last-child {
  color: var(--dc-text); font-weight: 600;
}

.dc-topbar__title { flex: 1; min-width: 0; }
.dc-topbar__title-text { font-size: 15px; font-weight: 600; color: var(--dc-text); letter-spacing: -0.005em; }
.dc-topbar__subtitle { font-size: 12px; color: var(--dc-text-muted); margin-top: 2px; }

.dc-topbar__search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 36px; border-radius: 8px;
  background: var(--dc-surface); border: 1px solid var(--dc-border);
  width: 320px; color: var(--dc-text-muted); font-size: 13px;
}
.dc-topbar__search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 13px; font-family: inherit; color: var(--dc-text);
}
.dc-topbar__kbd {
  font-size: 10.5px; padding: 2px 6px; border-radius: 4px;
  background: #fff; border: 1px solid var(--dc-border);
  color: var(--dc-text-muted); font-weight: 600;
}

.dc-topbar__icon-btn {
  position: relative;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--dc-border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--dc-text-soft);
  transition: background .15s, border-color .15s;
}
.dc-topbar__icon-btn:hover { background: var(--dc-surface); }
.dc-topbar__icon-btn i { font-size: 17px; }
.dc-topbar__icon-btn .dc-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 4px;
  background: var(--dc-red); border: 2px solid #fff;
}

.dc-topbar__user {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 8px 4px 4px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
  color: var(--dc-text);
}
.dc-topbar__user:hover { background: var(--dc-surface); }
.dc-topbar__user-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #047857);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.dc-topbar__user-name { font-size: 13px; font-weight: 600; }

/* ---------- Buttons ---------- */
.dc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap; text-decoration: none;
  background: #fff; color: var(--dc-text-soft);
  border-color: var(--dc-border);
}
.dc-btn:hover { background: var(--dc-surface); }
.dc-btn:active { transform: translateY(1px); }
.dc-btn i { font-size: 15px; }

.dc-btn--primary {
  background: var(--dc-primary); border-color: var(--dc-primary); color: #fff;
  box-shadow: 0 1px 2px rgba(16, 185, 129, .25);
}
.dc-btn--primary:hover { background: var(--dc-primary-dark); border-color: var(--dc-primary-dark); }

.dc-btn--danger { background: var(--dc-red); border-color: var(--dc-red); color: #fff; }
.dc-btn--danger:hover { background: #dc2626; border-color: #dc2626; }

.dc-btn--ghost { background: transparent; border-color: transparent; color: var(--dc-text-muted); }
.dc-btn--ghost:hover { background: var(--dc-surface); color: var(--dc-text); }

.dc-btn--sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; gap: 5px; }
.dc-btn--sm i { font-size: 13px; }
.dc-btn--lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 10px; }

.dc-btn--icon { width: 36px; padding: 0; }
.dc-btn--icon.dc-btn--sm { width: 30px; }

/* ---------- Cards ---------- */
.dc-card {
  background: var(--dc-card);
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  box-shadow: var(--dc-shadow-sm);
}
.dc-card--padded { padding: 18px; }
.dc-card__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--dc-border-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.dc-card__title { font-size: 14px; font-weight: 600; color: var(--dc-text); letter-spacing: -0.005em; }
.dc-card__subtitle { font-size: 11.5px; color: var(--dc-text-muted); margin-top: 2px; }
.dc-card__body { padding: 16px 20px; }
.dc-card__footer {
  padding: 12px 20px; border-top: 1px solid var(--dc-border-soft);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--dc-text-muted);
}

/* ---------- Stat card ---------- */
.dc-stat {
  background: #fff; border: 1px solid var(--dc-border);
  border-radius: 14px; padding: 18px; box-shadow: var(--dc-shadow-sm);
  position: relative;
}
.dc-stat__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.dc-stat__icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.dc-stat__icon--amber { background: var(--dc-amber-soft); color: var(--dc-amber); }
.dc-stat__icon--blue { background: var(--dc-blue-soft); color: var(--dc-blue); }
.dc-stat__icon--emerald { background: var(--dc-emerald-soft); color: var(--dc-emerald); }
.dc-stat__icon--red { background: var(--dc-red-soft); color: var(--dc-red); }
.dc-stat__icon--violet { background: var(--dc-violet-soft); color: var(--dc-violet); }

.dc-stat__label { font-size: 12.5px; color: var(--dc-text-muted); font-weight: 500; margin-bottom: 4px; }
.dc-stat__value {
  font-size: 28px; font-weight: 700; color: var(--dc-text);
  letter-spacing: -0.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dc-stat__delta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 12px;
}
.dc-stat__delta-value { font-weight: 600; }
.dc-stat__delta--up .dc-stat__delta-value { color: var(--dc-emerald-text); }
.dc-stat__delta--down .dc-stat__delta-value { color: var(--dc-red-text); }
.dc-stat__delta--neutral .dc-stat__delta-value { color: var(--dc-text-soft); }
.dc-stat__delta-label { color: var(--dc-text-muted); }

/* ---------- Badges ---------- */
.dc-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  border: 1px solid;
}
.dc-badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 3px;
  background: currentColor; opacity: .7;
}
.dc-badge--sm { padding: 2px 8px; font-size: 10.5px; }

.dc-badge--pending    { background: var(--dc-amber-soft);   color: var(--dc-amber-text);   border-color: var(--dc-amber-border); }
.dc-badge--confirmed  { background: var(--dc-emerald-soft); color: var(--dc-emerald-text); border-color: var(--dc-emerald-border); }
.dc-badge--delivered  { background: var(--dc-blue-soft);    color: var(--dc-blue-text);    border-color: var(--dc-blue-border); }
.dc-badge--cancelled,
.dc-badge--rejected   { background: var(--dc-red-soft);     color: var(--dc-red-text);     border-color: var(--dc-red-border); }
.dc-badge--draft      { background: var(--dc-slate-soft);   color: var(--dc-slate-text);   border-color: var(--dc-slate-border); }
.dc-badge--submitted  { background: var(--dc-violet-soft);  color: var(--dc-violet-text);  border-color: var(--dc-violet-border); }
.dc-badge--neutral    { background: var(--dc-slate-soft);   color: var(--dc-slate-text);   border-color: var(--dc-slate-border); }

/* Plain pill (no dot) */
.dc-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--dc-slate-soft); color: var(--dc-slate-text);
  border: 1px solid var(--dc-slate-border);
}
.dc-pill--emerald { background: var(--dc-emerald-soft); color: var(--dc-emerald-text); border-color: var(--dc-emerald-border); }
.dc-pill--amber   { background: var(--dc-amber-soft);   color: var(--dc-amber-text);   border-color: var(--dc-amber-border); }
.dc-pill--red     { background: var(--dc-red-soft);     color: var(--dc-red-text);     border-color: var(--dc-red-border); }
.dc-pill--blue    { background: var(--dc-blue-soft);    color: var(--dc-blue-text);    border-color: var(--dc-blue-border); }

/* ---------- Tables ---------- */
.dc-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.dc-table th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--dc-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 12px 16px;
  background: var(--dc-surface);
  border-bottom: 1px solid var(--dc-border);
  white-space: nowrap;
}
.dc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--dc-border-soft);
  color: var(--dc-text);
  vertical-align: middle;
}
.dc-table tr:last-child td { border-bottom: 0; }
.dc-table tbody tr:hover { background: var(--dc-surface); }
.dc-table--num { font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
.dc-label {
  display: block;
  font-size: 11.5px; color: var(--dc-text-soft); font-weight: 600;
  margin-bottom: 6px;
}
.dc-input, .dc-select, .dc-textarea {
  width: 100%; height: 40px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--dc-border);
  background: #fff; color: var(--dc-text);
  font-size: 13.5px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.dc-textarea { height: auto; padding: 10px 14px; resize: vertical; min-height: 90px; }
.dc-select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
.dc-input:focus, .dc-select:focus, .dc-textarea:focus {
  border-color: var(--dc-emerald-border);
  box-shadow: 0 0 0 3px var(--dc-emerald-soft);
}
.dc-input::placeholder { color: var(--dc-text-faint); }

.dc-input-group { display: flex; align-items: stretch; gap: 0; }
.dc-input-group .dc-input { border-radius: 8px 0 0 8px; }
.dc-input-group__addon {
  display: inline-flex; align-items: center; padding: 0 12px;
  background: var(--dc-surface); border: 1px solid var(--dc-border); border-left: 0;
  border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--dc-text-muted); font-weight: 500;
}

/* ---------- Alerts ---------- */
.dc-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid; font-size: 13px; line-height: 1.5;
  margin-bottom: 16px;
}
.dc-alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.dc-alert__body { flex: 1; min-width: 0; }
.dc-alert__title { font-weight: 600; margin-bottom: 2px; }
.dc-alert__close { background: transparent; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0 4px; font-size: 18px; line-height: 1; }
.dc-alert__close:hover { opacity: 1; }

.dc-alert--success { background: var(--dc-emerald-soft); color: var(--dc-emerald-text); border-color: var(--dc-emerald-border); }
.dc-alert--warning { background: var(--dc-amber-soft); color: var(--dc-amber-text); border-color: var(--dc-amber-border); }
.dc-alert--danger  { background: var(--dc-red-soft);   color: var(--dc-red-text);   border-color: var(--dc-red-border); }
.dc-alert--info    { background: var(--dc-blue-soft);  color: var(--dc-blue-text);  border-color: var(--dc-blue-border); }

/* ---------- Toast ---------- */
.dc-toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 1090;
  display: flex; flex-direction: column; gap: 8px;
}
.dc-toast {
  min-width: 280px; max-width: 360px;
  background: #fff; border: 1px solid var(--dc-border); border-left: 4px solid var(--dc-emerald);
  border-radius: 10px; padding: 12px 14px;
  box-shadow: var(--dc-shadow-lg);
  font-size: 13px; color: var(--dc-text);
  display: flex; align-items: flex-start; gap: 10px;
  animation: dcToastIn .25s ease;
}
.dc-toast--danger { border-left-color: var(--dc-red); }
.dc-toast--warning { border-left-color: var(--dc-amber); }
.dc-toast--info { border-left-color: var(--dc-blue); }
@keyframes dcToastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ---------- Greeting / Hero banner ---------- */
.dc-greeting {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 60%, #fff 100%);
  border: 1px solid var(--dc-emerald-border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; position: relative; overflow: hidden;
}
.dc-greeting::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.18) 0%, transparent 70%);
  pointer-events: none;
}
.dc-greeting__date {
  font-size: 12px; color: var(--dc-emerald-text);
  font-weight: 600; letter-spacing: 0.04em; margin-bottom: 4px;
}
.dc-greeting__title {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0;
}
.dc-greeting__sub {
  font-size: 14px; color: var(--dc-text-soft);
  margin: 6px 0 0; max-width: 520px;
}
.dc-greeting__actions { display: flex; gap: 10px; position: relative; }

/* ---------- Grid utils ---------- */
.dc-grid { display: grid; gap: 16px; }
.dc-grid--4 { grid-template-columns: repeat(4, 1fr); }
.dc-grid--3 { grid-template-columns: repeat(3, 1fr); }
.dc-grid--2 { grid-template-columns: repeat(2, 1fr); }
.dc-grid--main { grid-template-columns: 1fr 340px; }
.dc-grid--main-2 { grid-template-columns: 1.5fr 1fr; }

@media (max-width: 1100px) {
  .dc-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .dc-grid--main, .dc-grid--main-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dc-grid--4, .dc-grid--3, .dc-grid--2 { grid-template-columns: 1fr; }
}

/* ---------- Timeline list ---------- */
.dc-timeline {
  display: flex; flex-direction: column;
}
.dc-timeline__row {
  display: grid; grid-template-columns: 72px 20px 1fr auto;
  align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--dc-border-soft);
}
.dc-timeline__row:last-child { border-bottom: 0; }
.dc-timeline__time {
  font-size: 13px; font-weight: 600; color: var(--dc-text);
  font-variant-numeric: tabular-nums;
}
.dc-timeline__dot {
  width: 10px; height: 10px; border-radius: 5px;
  margin: 0 auto;
  background: var(--dc-slate);
  box-shadow: 0 0 0 4px var(--dc-slate-soft);
}
.dc-timeline__dot--pending   { background: var(--dc-amber);   box-shadow: 0 0 0 4px var(--dc-amber-soft); }
.dc-timeline__dot--confirmed { background: var(--dc-emerald); box-shadow: 0 0 0 4px var(--dc-emerald-soft); }
.dc-timeline__dot--delivered { background: var(--dc-blue);    box-shadow: 0 0 0 4px var(--dc-blue-soft); }
.dc-timeline__dot--draft     { background: var(--dc-slate);   box-shadow: 0 0 0 4px var(--dc-slate-soft); }
.dc-timeline__title { font-size: 13.5px; font-weight: 600; color: var(--dc-text); margin-bottom: 3px; }
.dc-timeline__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dc-text-muted); flex-wrap: wrap; }
.dc-timeline__meta-sep { width: 3px; height: 3px; border-radius: 2px; background: var(--dc-text-faint); }
.dc-timeline__actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Sparkline / mini chart helpers ---------- */
.dc-sparkline { display: block; }
.dc-progress {
  height: 5px; border-radius: 3px;
  background: var(--dc-slate-soft); overflow: hidden;
}
.dc-progress__bar {
  height: 100%; background: var(--dc-emerald); border-radius: 3px;
  transition: width .3s;
}
.dc-progress__bar--amber { background: var(--dc-amber); }
.dc-progress__bar--red { background: var(--dc-red); }

/* ---------- Quick action card ---------- */
.dc-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dc-quick-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px; border-radius: 10px;
  background: var(--dc-surface); border: 1px solid var(--dc-border);
  cursor: pointer; transition: background .15s, border-color .15s;
  font-size: 12.5px; font-weight: 600; color: var(--dc-text);
  text-decoration: none;
}
.dc-quick-action:hover { background: #fff; border-color: var(--dc-emerald-border); color: var(--dc-text); }
.dc-quick-action i { font-size: 17px; color: var(--dc-emerald-text); }

/* ---------- Mobile sidebar toggle ---------- */
.dc-sidebar-toggle {
  display: none;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--dc-border); background: #fff;
  color: var(--dc-text-soft); cursor: pointer;
  align-items: center; justify-content: center;
}
.dc-sidebar-toggle i { font-size: 18px; }

.dc-sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5); z-index: 1035;
}
.dc-sidebar-overlay.is-open { display: block; }

@media (max-width: 991.98px) {
  .dc-sidebar-toggle { display: inline-flex; }
  .dc-sidebar { transform: translateX(-100%); }
  .dc-sidebar.is-open { transform: translateX(0); }
  .dc-main { margin-left: 0 !important; }
  .dc-content { padding: 20px 16px 32px; }
  .dc-topbar { padding: 0 16px; gap: 12px; }
  .dc-topbar__search { display: none; }
}

/* ---------- Login split layout ---------- */
.dc-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: #fff;
  font-family: var(--dc-font);
}
.dc-login__brand {
  background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #059669 100%);
  color: #fff;
  padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.dc-login__brand::before {
  content: ''; position: absolute; top: -120px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(16, 185, 129, .25); filter: blur(60px);
}
.dc-login__brand::after {
  content: ''; position: absolute; bottom: -80px; left: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(52, 211, 153, .3); filter: blur(50px);
}
.dc-login__brand > * { position: relative; }
.dc-login__brand-mark {
  display: flex; align-items: center; gap: 12px;
}
.dc-login__brand-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.dc-login__brand-icon svg { width: 22px; height: 22px; fill: #fff; }
.dc-login__brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.dc-login__brand-tag { font-size: 11px; opacity: 0.75; margin-top: 1px; }

.dc-login__hero h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 16px; }
.dc-login__hero p { font-size: 14.5px; opacity: 0.85; line-height: 1.6; margin: 0; max-width: 440px; }
.dc-login__hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  font-size: 11px; font-weight: 600; margin-bottom: 18px;
  backdrop-filter: blur(10px);
}
.dc-login__hero-pill::before { content: ''; width: 5px; height: 5px; border-radius: 3px; background: #34d399; }

.dc-login__stats { display: flex; gap: 28px; margin-top: 28px; }
.dc-login__stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.dc-login__stat-label { font-size: 11.5px; opacity: 0.75; margin-top: 2px; }

.dc-login__brand-foot {
  font-size: 11.5px; opacity: 0.65;
  display: flex; justify-content: space-between;
}

.dc-login__form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 56px;
}
.dc-login__form { width: 100%; max-width: 380px; }
.dc-login__eyebrow {
  font-size: 11.5px; color: var(--dc-emerald-text); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.dc-login__title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--dc-text); }
.dc-login__subtitle { font-size: 13.5px; color: var(--dc-text-muted); margin: 0 0 28px; }
.dc-login__subtitle a { color: var(--dc-emerald-text); font-weight: 600; }

.dc-login__divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
}
.dc-login__divider::before, .dc-login__divider::after {
  content: ''; flex: 1; height: 1px; background: var(--dc-border-soft);
}
.dc-login__divider span { font-size: 11px; color: var(--dc-text-muted); font-weight: 600; letter-spacing: 0.05em; }

.dc-login__legal { font-size: 11px; color: var(--dc-text-muted); text-align: center; margin-top: 22px; line-height: 1.6; }
.dc-login__legal a { color: var(--dc-text-soft); font-weight: 600; }

.dc-checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--dc-text-soft); cursor: pointer;
}
.dc-checkbox input { display: none; }
.dc-checkbox__box {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--dc-border-strong); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.dc-checkbox__box i { font-size: 11px; color: #fff; opacity: 0; }
.dc-checkbox input:checked + .dc-checkbox__box {
  background: var(--dc-primary); border-color: var(--dc-primary);
}
.dc-checkbox input:checked + .dc-checkbox__box i { opacity: 1; }

@media (max-width: 880px) {
  .dc-login { grid-template-columns: 1fr; }
  .dc-login__brand { padding: 32px 24px; min-height: 320px; }
  .dc-login__hero h1 { font-size: 28px; }
  .dc-login__form-wrap { padding: 32px 24px; }
}

/* ---------- Helpers ---------- */
.dc-num { font-variant-numeric: tabular-nums; }
.dc-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-text-muted { color: var(--dc-text-muted); }
.dc-text-soft { color: var(--dc-text-soft); }
.dc-text-emerald { color: var(--dc-emerald-text); }
.dc-text-amber { color: var(--dc-amber-text); }
.dc-text-red { color: var(--dc-red-text); }
.dc-mt-0 { margin-top: 0; }
.dc-mb-0 { margin-bottom: 0; }
.dc-flex { display: flex; }
.dc-flex-col { display: flex; flex-direction: column; }
.dc-flex-1 { flex: 1; min-width: 0; }
.dc-items-center { align-items: center; }
.dc-justify-between { justify-content: space-between; }
.dc-gap-2 { gap: 8px; }
.dc-gap-3 { gap: 12px; }
.dc-gap-4 { gap: 16px; }

/* ---------- Print ---------- */
@media print {
  .dc-sidebar, .dc-topbar, .dc-sidebar-toggle, .dc-toast-container { display: none !important; }
  .dc-main { margin-left: 0 !important; }
  body { background: #fff; }
}
