/* Manager dashboard — dark theme (style.css tokens), spacious layout */

.dash-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.dash-main {
  flex: 1;
  padding: 1.25rem 1rem 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 640px) {
  .dash-main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .dash-main {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }
}

.dash-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--muted);
}

.dash-loading__text {
  font-size: 0.95rem;
}

.dash-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-hero {
  margin-bottom: 0.35rem;
}

.dash-title {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.dash-sub {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.dash-sub--tight {
  margin-bottom: 0.35rem;
}

.dash-cards {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

/* Summary: 1 col phone → 2 col → 3 → 5 on wide screens */
.dash-cards--primary {
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .dash-cards--primary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 840px) {
  .dash-cards--primary {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .dash-cards--primary {
    grid-template-columns: repeat(5, 1fr);
  }
}

.dash-ops-strip {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: flex-start;
}

.dash-card__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  line-height: 1.25;
}

.dash-card__value {
  font-size: clamp(1.15rem, 3vw, 1.42rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.dash-card__hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: auto;
}

.dash-card--accent {
  border-color: rgba(61, 156, 253, 0.35);
  background: linear-gradient(165deg, var(--surface) 0%, rgba(61, 156, 253, 0.08) 100%);
}

/* Two-column main */
.dash-two-col {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 900px) {
  .dash-two-col {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
}

.dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.dash-section__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.dash-section__lede {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* Sales breakdown */
.dash-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 520px) {
  .dash-bar-row {
    grid-template-columns: 6.5rem 1fr minmax(7.5rem, auto);
    align-items: center;
    gap: 0.65rem;
  }
}

.dash-bar-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.dash-bar-track {
  height: 11px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  min-width: 2px;
  transition: width 0.35s ease;
}

.dash-bar-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

@media (min-width: 520px) {
  .dash-bar-meta {
    text-align: right;
  }
}

.dash-bar-amt {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.dash-bar-pct {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.dash-bar-count {
  font-size: 0.72rem;
}

.dash-main .muted {
  color: var(--muted);
  font-weight: 500;
}

/* Low stock */
.dash-low-stock {
  min-height: 2rem;
}

.dash-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(320px, 45vh);
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

.dash-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.dash-list li:last-child {
  border-bottom: none;
}

.dash-list__name {
  font-weight: 600;
  line-height: 1.35;
}

.dash-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: var(--amber-dim);
  color: var(--amber);
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-empty,
.dash-empty-cell {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}

.dash-empty-cell {
  padding: 1rem 0.35rem !important;
  text-align: center;
}

/* Activity table */
.dash-table-wrap {
  overflow-x: auto;
  margin: 0 -0.15rem;
}

.dash-activity {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.dash-activity th,
.dash-activity td {
  text-align: left;
  padding: 0.5rem 0.45rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dash-activity th {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

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

.dash-activity .tabular {
  font-variant-numeric: tabular-nums;
}

.dash-status {
  font-weight: 700;
  text-transform: capitalize;
  font-size: 0.8rem;
}

.dash-status--closed {
  color: var(--muted);
}

.dash-status--open {
  color: var(--accent);
}

.dash-status--ready {
  color: var(--green);
}

.dash-status--kitchen {
  color: var(--purple, #a78bfa);
}

.dash-status--active {
  color: var(--amber);
}

/* Quick actions */
.dash-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 400px) {
  .dash-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

.dash-action:hover {
  background: var(--accent-dim);
  border-color: rgba(61, 156, 253, 0.4);
}

.dash-action:active {
  transform: scale(0.99);
}

.dash-err {
  padding: 1rem 1.15rem;
  background: var(--red-dim);
  color: var(--red);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
