/* =============================================
   SHAN FAST FOOD OFFICIAL — Admin Dashboard CSS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #dc2626; --accent: #f59e0b;
  --bg: #0a0a0a; --bg2: #111; --bg3: #1a1a1a;
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
  --text: #f5f5f5; --text-muted: #9ca3af;
  --green: #22c55e; --red: #dc2626; --amber: #f59e0b;
  --font: 'Inter', sans-serif; --radius: 12px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }
input, select, textarea, button { font-family: var(--font); }
select optgroup { background: var(--accent); color: #fff; font-weight: 700; }
select option { background: var(--bg2); color: var(--text); font-weight: 500; }

/* ===== LOGIN ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 40% 50%, rgba(139,0,0,0.35) 0%, transparent 60%), var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.login-box {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 48px; width: min(420px, 95vw);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}
.login-logo { text-align: center; margin-bottom: 36px; }
.logo-icon-big {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900; color: white;
  box-shadow: 0 0 30px rgba(220,38,38,0.5);
}
.login-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--text-muted); }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { font-size: 13px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 6px; }
.login-form input {
  width: 100%; padding: 13px 16px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); color: var(--text);
  font-size: 16px; text-align: center; letter-spacing: 6px;
  transition: all 0.3s;
}
.login-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), #c71d1d);
  border: none; border-radius: 50px; color: white;
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(220,38,38,0.4); transition: all 0.3s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(220,38,38,0.6); }
.login-error { color: var(--primary); font-size: 13px; text-align: center; margin-top: 12px; display: none; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard { display: grid; grid-template-columns: 230px 1fr; height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--bg2); border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 16px; border-bottom: 1px solid var(--glass-border);
}
.logo-icon-sm {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: white; flex-shrink: 0;
  box-shadow: 0 0 15px rgba(220,38,38,0.4);
}
.sidebar-brand { font-size: 13px; font-weight: 800; }
.sidebar-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  background: none; border: none; color: var(--text-muted);
  padding: 11px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer;
  text-align: left; transition: all 0.2s;
}
.nav-item:hover { background: var(--glass); color: var(--text); }
.nav-item.active { background: rgba(220,38,38,0.15); color: var(--primary); font-weight: 700; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--glass-border); }
.btn-logout {
  width: 100%; padding: 10px; background: var(--glass);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* ===== MAIN CONTENT ===== */
.main-content { overflow-y: auto; background: var(--bg); }
.tab-content { display: none; padding: 28px; min-height: 100%; }
.tab-content.active { display: block; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 14px;
}
.page-title { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.page-sub { font-size: 13px; color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.status-badges { display: flex; gap: 8px; }

.badge {
  padding: 5px 14px; border-radius: 50px; font-size: 12px; font-weight: 700;
  border: 1px solid;
}
.badge.pending { background: rgba(245,158,11,0.15); color: var(--amber); border-color: rgba(245,158,11,0.3); }
.badge.confirmed { background: rgba(34,197,94,0.15); color: var(--green); border-color: rgba(34,197,94,0.3); }

.btn-add-order {
  padding: 10px 18px; background: linear-gradient(135deg, var(--primary), #c71d1d);
  border: none; border-radius: var(--radius); color: white;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-add-order:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(220,38,38,0.4); }

/* ===== ORDERS LAYOUT ===== */
.orders-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; height: calc(100vh - 170px); }

.orders-list-panel {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}

.panel-header {
  padding: 16px; border-bottom: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 10px;
}
.panel-header h3 { font-size: 14px; font-weight: 700; }
.order-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text-muted); transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.orders-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.order-row {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 14px; cursor: pointer; transition: all 0.2s;
}
.order-row:hover, .order-row.selected { border-color: var(--primary); background: rgba(220,38,38,0.08); }
.order-row.pending .order-status-dot { background: var(--amber); }
.order-row.confirmed .order-status-dot { background: var(--green); }
.order-row.cancelled .order-status-dot { background: var(--red); }

.order-row-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.order-id-name { display: flex; align-items: center; gap: 8px; }
.order-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.order-name { font-size: 14px; font-weight: 700; }
.order-status-label { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 50px; }
.order-row.pending .order-status-label { background: rgba(245,158,11,0.15); color: var(--amber); }
.order-row.confirmed .order-status-label { background: rgba(34,197,94,0.15); color: var(--green); }
.order-row.cancelled .order-status-label { background: rgba(220,38,38,0.15); color: var(--red); }
.order-preview { font-size: 12px; color: var(--text-muted); }
.order-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Detail Panel */
.order-detail-panel {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: var(--radius); overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
}
.detail-empty { text-align: center; color: var(--text-muted); font-size: 14px; }
.order-detail-content { padding: 24px; width: 100%; }
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.detail-order-id { font-size: 20px; font-weight: 900; }
.detail-status-badge { padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 700; }

.detail-section { margin-bottom: 20px; }
.detail-section-title { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-info-item { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; padding: 12px; }
.detail-info-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.detail-info-val { font-size: 14px; font-weight: 600; }

.detail-items-list { display: flex; flex-direction: column; gap: 8px; }
.detail-item-row { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; font-size: 14px; }
.detail-item-price { color: var(--accent); font-weight: 700; }

.detail-totals { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px; }
.total-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--text-muted); }
.total-row.grand { font-size: 18px; font-weight: 800; color: var(--text); padding-top: 12px; border-top: 1px solid var(--glass-border); margin-top: 8px; }
.total-row.grand .grand-val { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.action-btn {
  flex: 1; padding: 12px; border: none; border-radius: 50px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-call { background: linear-gradient(135deg, #1d4ed8, #2563eb); color: white; box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
.btn-verify { background: linear-gradient(135deg, #16a34a, #15803d); color: white; box-shadow: 0 4px 12px rgba(22,163,74,0.4); }
.btn-reject { background: linear-gradient(135deg, var(--primary), #c71d1d); color: white; box-shadow: 0 4px 12px rgba(220,38,38,0.4); }
.action-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ===== MENU CONTROL ===== */
.menu-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.menu-cat-box { background: var(--bg2); border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; }
.menu-cat-title { padding: 14px 16px; border-bottom: 1px solid var(--glass-border); font-size: 14px; font-weight: 700; }
.menu-item-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.menu-item-toggle:last-child { border-bottom: none; }
.item-toggle-name { flex: 1; color: var(--text); }
.item-toggle-name.oos { text-decoration: line-through; color: var(--text-muted); }
.item-price-small { font-size: 12px; color: var(--text-muted); margin-right: 14px; }

.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(220,38,38,0.3);
  border-radius: 50px; cursor: pointer; transition: all 0.3s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  left: 3px; top: 3px; background: var(--text-muted);
  transition: all 0.3s;
}
.toggle input:checked + .toggle-slider { background: rgba(34,197,94,0.3); }
.toggle input:checked + .toggle-slider:before { transform: translateX(18px); background: var(--green); }

/* ===== AGENTS TAB ===== */
.agents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.agent-card { background: var(--bg2); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 24px; }
.agent-icon { font-size: 40px; margin-bottom: 12px; }
.agent-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.agent-number { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.agent-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.agent-script { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; padding: 14px; }
.script-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.script-text { font-size: 12px; color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; }

.delivery-slabs-card { background: var(--bg2); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 24px; }
.delivery-slabs-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.slabs-table { width: 100%; border-collapse: collapse; }
.slabs-table th, .slabs-table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--glass-border); }
.slabs-table th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.slab-active { background: rgba(34,197,94,0.15); color: var(--green); padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; }
.slab-inactive { background: rgba(220,38,38,0.15); color: var(--primary); padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; }

/* ===== ANALYTICS TAB ===== */
.analytics-grid { display: flex; flex-direction: column; gap: 24px; }
.analytics-summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.analytics-card { background: var(--bg2); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 24px; }
.stat-card { display: flex; align-items: center; gap: 16px; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-3px); }
.stat-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.stat-content { flex: 1; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-val { font-size: 26px; font-weight: 800; color: var(--text); }
.layout-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width: 900px) { .layout-2col { grid-template-columns: 1fr; } }
.list-card .card-title { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--glass-border); padding-bottom: 12px; }
.list-headers { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding: 0 4px; }
.analytics-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; padding-right: 4px; }
.analytics-list-item { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.analytics-list-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.list-item-name { font-size: 14px; font-weight: 600; color: var(--text); }
.list-item-val { font-size: 13px; font-weight: 800; color: var(--accent); background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); padding: 4px 12px; border-radius: 50px; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 28px; width: min(500px, 95vw);
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px; }
.modal-body { font-size: 13px; color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); color: var(--text); font-size: 13px; transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 90px; }
.modal-actions { display: flex; gap: 10px; }
.btn-cancel { flex: 1; padding: 12px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 50px; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-save { flex: 2; padding: 12px; background: linear-gradient(135deg, var(--primary), #c71d1d); border: none; border-radius: 50px; color: white; font-size: 13px; font-weight: 700; cursor: pointer; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
