/* =============================================================================
   DinePort Merchant Portal - Stylesheet
   ============================================================================= */

:root {
  --primary: #ff6b35;
  --primary-hover: #fa571b;
  --bg-dark: #0f1017;
  --sidebar-bg: #151622;
  --card-bg: #1c1d2e;
  --surface: #24263d;
  --border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #9498ac;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* Sidebar */
.shop-sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.shop-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.shop-logo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 122, 41, 0.55);
  box-shadow: 0 4px 18px rgba(255, 107, 53, 0.4), 0 0 10px rgba(255, 122, 41, 0.22);
  flex-shrink: 0;
}

.shop-nav {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-link:hover, .nav-link.active {
  background: var(--surface);
  color: white;
}

.nav-link.active {
  border-left: 3px solid var(--primary);
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.badge-count {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Main Area */
.shop-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-topbar {
  padding: 16px 28px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shop-status-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
}

.status-dot.paused {
  background: var(--warning);
}

.content-area {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.portal-section {
  display: none;
}

.portal-section.active {
  display: block;
}

/* Grid & Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.kpi-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
}

/* Dispatch Board */
.dispatch-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.dispatch-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dispatch-col-header {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.order-dispatch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-action {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}

.btn-action.accept {
  background: var(--success);
  color: white;
}

.btn-action.reject {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-action.progress {
  background: var(--primary);
  color: white;
}

/* Forms & Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table th, .data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 600;
}

.input-control {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: white;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

/* Chart Layouts & Visualizations */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 107, 53, 0.15);
  color: var(--primary);
  font-weight: 600;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 260px;
}
