/* ==========================================================================
   FastFood - Executive Dashboard (Taste-Skill & Stitch Spec Architecture)
   ========================================================================== */

.dashboard-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--bg-canvas);
  overflow-y: auto;
  padding: 22px 28px;
  gap: 20px;
}

/* Dashboard Top Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 4px;
}

.dashboard-title-group h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.dashboard-title-group p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-quick-btn {
  height: 38px;
  padding: 0 16px;
  background: #141722;
  border: 1px solid #232a3b;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--trans-fast);
}

.dashboard-quick-btn:hover {
  background: #1c2233;
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

.dashboard-quick-btn:active {
  transform: translateY(1px);
}

.dashboard-quick-btn.primary {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.dashboard-quick-btn.primary:hover {
  background: #059669;
  border-color: #059669;
}

/* Key Metrics Grid (Asymmetric & Deep Contrast) */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) {
  .dashboard-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dashboard-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.dash-metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 100%), #12151e;
  border: 1px solid #1f2638;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all var(--trans-fast);
  position: relative;
  overflow: hidden;
}

.dash-metric-card:hover {
  border-color: #334155;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.dash-metric-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.dash-metric-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  letter-spacing: -0.03em;
  font-family: var(--font-sans);
}

.dash-metric-sub {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hourly Sales Velocity & Channel Breakdown */
.dash-channel-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-channel-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.dash-channel-tag.dine-in {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.dash-channel-tag.takeaway {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.dash-channel-tag.delivery {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
}

.dash-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 90px;
  padding: 10px 4px 4px 4px;
  border-bottom: 1px solid #1f2533;
}

.dash-bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.dash-bar {
  width: 100%;
  max-width: 24px;
  background: #1e293b;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  min-height: 8px;
}

.dash-bar:hover {
  background: #38bdf8;
  transform: scaleY(1.05);
}

.dash-bar.peak {
  background: #10b981;
}

.dash-bar-time {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

/* Main Two-Column Layout */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card Surface */
.dash-card {
  background: #12151e;
  border: 1px solid #1f2638;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.dash-card-header {
  padding: 14px 18px;
  background: #0f121a;
  border-bottom: 1px solid #1c2233;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
}

.dash-card-action {
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  transition: all var(--trans-fast);
}

.dash-card-action:hover {
  color: #ffffff;
  text-decoration: underline;
}

.dash-card-body {
  padding: 16px 18px;
}

/* Mini Kitchen Queue Preview */
.dash-kitchen-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.dash-mini-ticket {
  min-width: 220px;
  background: #151822;
  border: 1px solid #242c3d;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 3px solid #ef4444;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all var(--trans-fast);
}

.dash-mini-ticket:hover {
  transform: translateY(-2px);
  border-color: #334155;
}

.dash-mini-ticket.warning {
  border-top-color: #f59e0b;
}

.dash-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-mini-token {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.dash-mini-items {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  font-weight: 500;
}

.dash-mini-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.dash-mini-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--trans-fast);
}

.dash-mini-btn.start {
  background: #1e293b;
  color: #ffffff;
}

.dash-mini-btn.ready {
  background: #10b981;
  color: #ffffff;
}

/* Recent Orders Table */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dash-table th {
  text-align: left;
  padding: 10px 14px;
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid #1e2433;
  font-size: 0.74rem;
  background: #0f121a;
}

.dash-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1a202c;
  color: #cbd5e1;
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.dash-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
}

.dash-token-badge {
  font-weight: 700;
  color: #ffffff;
}

.dash-status-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
  display: inline-block;
}

/* Top Selling Products List */
.dash-top-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1a202c;
}

.dash-product-row:last-child {
  border-bottom: none;
}

.dash-product-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-product-rank {
  width: 24px;
  height: 24px;
  background: #1e2433;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
}

.dash-product-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
}

.dash-product-sold {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

/* Register & Staff Status */
.dash-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.82rem;
}

.dash-info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1a202c;
}

.dash-info-item:last-child {
  border-bottom: none;
}

.dash-info-key {
  color: #94a3b8;
}

.dash-info-val {
  color: #ffffff;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Light Mode Overrides (Taste-Skill Warm Slate Light System)
   -------------------------------------------------------------------------- */
[data-theme="light"] .dash-metric-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .dash-metric-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .dash-metric-val {
  color: #0f172a;
}

[data-theme="light"] .dash-metric-label {
  color: #64748b;
}

[data-theme="light"] .dashboard-title-group h2 {
  color: #0f172a;
}

[data-theme="light"] .dashboard-quick-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .dashboard-quick-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .dash-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .dash-card-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .dash-card-title {
  color: #0f172a;
}

[data-theme="light"] .dash-mini-ticket {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .dash-mini-token {
  color: #0f172a;
}

[data-theme="light"] .dash-mini-items {
  color: #334155;
}

[data-theme="light"] .dash-mini-btn.start {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .dash-table th {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
  color: #64748b;
}

[data-theme="light"] .dash-table td {
  border-bottom-color: #f1f5f9;
  color: #334155;
}

[data-theme="light"] .dash-table tr:hover td {
  background: #f8fafc;
  color: #0f172a;
}

[data-theme="light"] .dash-token-badge {
  color: #0f172a;
}

[data-theme="light"] .dash-product-name {
  color: #0f172a;
}

[data-theme="light"] .dash-product-rank {
  background: #f1f5f9;
  color: #475569;
}

[data-theme="light"] .dash-product-row,
[data-theme="light"] .dash-info-item {
  border-bottom-color: #f1f5f9;
}

[data-theme="light"] .dash-info-val {
  color: #0f172a;
}

[data-theme="light"] .dash-bar {
  background: #e2e8f0;
}

[data-theme="light"] .dash-bar:hover {
  background: #0284c7;
}

[data-theme="light"] .dash-chart-bars {
  border-bottom-color: #e2e8f0;
}
