/* JetRestaurant dashboard — light minimal (imports design system) */
@import url('./css/tokens.css');
@import url('./css/shell.css');
@import url('./css/components.css');

/* ——— Shared cards / sections ——— */
.jet-card,
.main-content .card,
.content .card {
  border: 1px solid var(--dash-border) !important;
  border-radius: var(--dash-radius) !important;
  box-shadow: none !important;
  background: var(--dash-surface) !important;
}

.content .card:hover {
  transform: none !important;
  box-shadow: none !important;
}

.main-content .card-header,
.jet-card-header,
.content .card-header,
.content .card-header.bg-primary,
.content .card-header.bg-success,
.content .card-header.bg-info,
.content .card-header.text-white {
  background: var(--dash-surface-2) !important;
  color: var(--dash-text) !important;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--dash-border) !important;
  border-radius: 0 !important;
  padding: 0.7rem 1rem !important;
}

.content .card-body {
  padding: 1rem !important;
}

.page-intro {
  color: var(--dash-muted);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  max-width: 52rem;
  line-height: 1.5;
}

.section-panel {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.filter-panel,
.filter-options {
  background: var(--dash-surface) !important;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 0.85rem 1rem !important;
  box-shadow: none;
  margin-bottom: 1rem;
}

.btn-brand {
  border: 0;
  border-radius: var(--dash-radius);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: var(--dash-brand);
  color: #fff;
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
}

.btn-brand:hover {
  filter: brightness(1.04);
  color: #fff;
}

/* KPI strips */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  background: var(--dash-surface);
  overflow: hidden;
  margin-bottom: 1rem;
}

.kpi-cell {
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--dash-border);
  min-width: 0;
}

.kpi-cell:last-child { border-right: 0; }

.kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dash-muted);
  margin-bottom: 0.35rem;
}

.kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--dash-text);
  line-height: 1.1;
}

.kpi-cell .kpi-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--dash-muted);
}

.action-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  background: var(--dash-surface);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.action-strip a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  color: var(--dash-text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  border-right: 1px solid var(--dash-border);
  border-bottom: 1px solid var(--dash-border);
}

.action-strip a i {
  color: var(--dash-brand);
  width: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.action-strip a:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.action-strip a.d-none { display: none !important; }

@media (max-width: 900px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-cell:nth-child(2n) { border-right: 0; }
  .kpi-cell:nth-child(-n+2) { border-bottom: 1px solid var(--dash-border); }
}

/* Home hero — light */
.home-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  background: var(--dash-surface);
  color: var(--dash-text);
  border-radius: var(--dash-radius);
  border: 1px solid var(--dash-border);
}

.home-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dash-muted);
  margin: 0 0 0.4rem;
}

.home-hero h2 {
  color: var(--dash-text);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

.home-hero p {
  margin: 0;
  color: var(--dash-muted);
  font-size: 0.88rem;
  max-width: 36rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.home-hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--dash-radius);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--dash-border);
  color: var(--dash-text);
  background: #fff;
}

.home-hero-actions a:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.home-hero-actions a.is-primary {
  background: var(--dash-brand);
  border-color: var(--dash-brand);
  color: #fff;
}

@media (max-width: 768px) {
  .home-hero {
    grid-template-columns: 1fr;
  }
  .home-hero-actions { justify-content: flex-start; }
}

/* Support / tickets */
.ticket-item {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ticket-item:hover {
  border-color: var(--dash-border-strong);
  background: #fafbfc;
}

.ticket-status-badge {
  font-size: 0.7rem;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.status-open { background-color: #fee2e2; color: #b91c1c; }
.status-pending_customer { background-color: #fef3c7; color: #b45309; }
.status-pending_admin { background-color: #dbeafe; color: #1d4ed8; }
.status-closed { background-color: var(--dash-brand-soft); color: var(--brand-dark, #089956); }

.message-item {
  border-radius: var(--dash-radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--dash-border);
}

.message-item.admin-response {
  background: #f8fafc;
  text-align: left;
}

.message-item.customer-message {
  background: #f7fbf9;
  text-align: right;
}

.message-header {
  font-size: 0.75rem;
  color: var(--dash-muted);
  margin-bottom: 0.3rem;
}

.message-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--dash-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.assist-char-count {
  font-size: 0.75rem;
  color: var(--dash-muted);
  text-align: right;
  margin-top: 0.25rem;
}

.assist-status-banner {
  border-radius: var(--dash-radius);
  border: 1px solid var(--dash-border);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  background: #fefce8;
  border-color: #fde68a;
  color: #92400e;
}

.assist-status-banner.is-waiting {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.assist-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ticket-item.has-unread {
  border-color: rgba(0, 179, 107, 0.35);
  background: #f7fbf9;
}

.ticket-item .ticket-meta-line {
  font-size: 0.78rem;
  color: var(--dash-muted);
}

.assist-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.assist-attach-list a {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--dash-border);
  background: #f8fafc;
}

.assist-attach-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assist-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.assist-attach-preview .chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--dash-surface-2);
  color: var(--dash-muted);
}

.priority-badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
}

.priority-low { background: #f1f5f9; color: #64748b; }
.priority-normal { background: #eff6ff; color: #1d4ed8; }
.priority-high { background: #fff7ed; color: #c2410c; }
.priority-urgent { background: #fef2f2; color: #b91c1c; }

.sla-pill {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.sla-warning { background: #fef3c7; color: #b45309; }
.sla-critical { background: #fee2e2; color: #b91c1c; }

.assist-row.is-sla-warning { border-color: #fcd34d; }
.assist-row.is-sla-critical { border-color: #f87171; background: #fff7f7; }

.assist-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.assist-note {
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.assist-note time {
  display: block;
  font-size: 0.68rem;
  color: var(--dash-muted);
  margin-bottom: 2px;
}

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.type-chip:has(input:checked),
.type-chip.is-active {
  border-color: var(--dash-brand);
  background: var(--dash-brand-soft);
  color: var(--brand-dark, #089956);
}

.assist-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.assist-hero-card,
.assist-hero-side {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 1.1rem 1.2rem;
}

.assist-hero-side {
  background: var(--dash-surface-2);
}

.assist-hero-side ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--dash-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .assist-hero { grid-template-columns: 1fr; }
}

/* Tables (Bootstrap) */
.table {
  margin-bottom: 0;
  font-size: 0.85rem;
}

.table thead th {
  background: var(--dash-surface-2) !important;
  color: var(--dash-muted);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--dash-border) !important;
  padding: 0.6rem 0.85rem !important;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.65rem 0.85rem !important;
  border-color: var(--dash-border) !important;
  vertical-align: middle;
}

.table-hover tbody tr:hover { background: #fafbfc; }

.table-responsive {
  border-radius: var(--dash-radius);
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
}

/* Onboarding */
.onboard-panel {
  background: var(--dash-surface);
  border-radius: var(--dash-radius);
  border: 1px solid var(--dash-border);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}

.onboard-progress {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--brand-dark, #089956);
  background: var(--dash-brand-soft);
  border-radius: var(--dash-radius-sm);
  padding: 0.25rem 0.55rem;
}

.onboard-steps {
  display: grid;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  overflow: hidden;
}

.onboard-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--dash-border);
  background: var(--dash-surface);
}

.onboard-step:last-child { border-bottom: 0; }

.onboard-step.is-done { background: #f7fbf9; }

.onboard-step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--dash-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--dash-muted);
}

.onboard-step.is-done .onboard-step-num {
  background: var(--dash-brand);
  color: #fff;
  border-color: var(--dash-brand);
}

.onboard-step-body p {
  color: var(--dash-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.menu-content {
  background-color: var(--dash-surface-2);
  border-right: 1px solid var(--dash-border);
  min-height: 100vh;
}

.menu-iframe {
  width: 100%;
  height: 100%;
  border: none;
  overflow: hidden;
}
