/* ═══════════════════════════════════════════════
   VELORA GO – Portal Style v1.0
   Colors: Warm White, Black, Rose Gold, Purple, Emerald
   Design Language: Clean, Premium, Apple/Notion style
   ═══════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --bg: #FDFBF8;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-section: #F7F4F0;
  --border: rgba(0,0,0,0.06);

  --text-primary: #1A1A2E;
  --text-secondary: #6B6B80;
  --text-muted: #A0A0B0;

  --rose-gold: #C8A27A;
  --rose-gold-light: #E8D5B8;
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-gradient: linear-gradient(135deg, #7C3AED, #A855F7);
  --emerald: #10B981;
  --emerald-bg: #D1FAE5;
  --emerald-text: #065F46;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.05);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: 200ms ease;
  --sidebar-width: 260px;
}

/* ─── Reset ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}
button, input, select, textarea { font-family: inherit; }

/* ─── Layout ─── */
.admin-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
}
.logo span {
  color: var(--rose-gold);
  font-weight: 400;
}
.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.nav-btn:hover {
  background: var(--bg-section);
  color: var(--text-primary);
}
.nav-btn.active {
  background: var(--text-primary);
  color: white;
}
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}
.shop-selector-wrapper label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.shop-selector-wrapper select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.content-header {
  height: 70px;
  border-bottom: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}
.header-title h2 { font-size: 1.25rem; font-weight: 700; }
.header-title p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.badge {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-online {
  background: #D1FAE5;
  color: #065F46;
}

.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}
.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}
.tab-pane.active {
  display: block;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.stat-icon {
  font-size: 1.8rem;
  position: absolute;
  top: 20px;
  right: 24px;
  opacity: 0.8;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── Card Styles ─── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}
.card-body {
  padding: 24px;
}
.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ─── Grids ─── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 24px;
}
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─── Table ─── */
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th, .table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.table th {
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-section);
}
.table tr:last-child td {
  border-bottom: none;
}
.text-center { text-align: center; }

/* ─── Forms ─── */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  outline: none;
  font-size: 0.85rem;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--rose-gold);
}
.flex-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}
.flex-checkbox input {
  width: auto;
}
.flex-checkbox label {
  margin-bottom: 0;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}
.btn-primary {
  background: var(--text-primary);
  color: white;
}
.btn-primary:hover {
  background: var(--rose-gold);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-section);
}
.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
}
.btn-danger:hover {
  background: #FECACA;
}
.btn-success {
  background: #D1FAE5;
  color: #065F46;
}
.btn-success:hover {
  background: #A7F3D0;
}

/* ─── AI Insights ─── */
.card-ai-insights {
  border: 1px solid var(--purple-light);
}
.ai-insight-box {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(124,58,237,0.03);
  border-radius: var(--radius-md);
  border: 1px dashed var(--purple-light);
  margin-bottom: 14px;
}
.ai-insight-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.ai-insight-content h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.ai-insight-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* ─── List Container ─── */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-section);
  border-radius: var(--radius-md);
}
.list-item-info h4 { font-size: 0.88rem; font-weight: 600; }
.list-item-info p { font-size: 0.75rem; color: var(--text-muted); }

/* ─── AI Output box ─── */
.ai-generated-output {
  flex: 1;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-y: auto;
  margin-bottom: 16px;
}
.empty-state-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}
.empty-state-small .icon {
  font-size: 2rem;
  margin-bottom: 10px;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.output-actions {
  display: flex;
  align-items: center;
}
.status-pill {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-pill.pending { background: #FEF3C7; color: #92400E; }
.status-pill.confirmed { background: #D1FAE5; color: #065F46; }
.status-pill.completed { background: #DBEAFE; color: #1E40AF; }
.status-pill.cancelled { background: #FEE2E2; color: #991B1B; }
