/* Vasant Valley Admin - Shared Styles
   Palette: Maroon #981B1E, Cream Beige #E4D2BC / #F2E8DA, Black #000
   Font: Outfit
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --vv-maroon: #981B1E;
  --vv-maroon-dark: #6e1316;
  --vv-maroon-light: #b8333a;
  --vv-cream: #F2E8DA;
  --vv-cream-deep: #E4D2BC;
  --vv-cream-soft: #FAF5EC;
  --vv-ink: #1a1313;
  --vv-muted: #6b5e54;
  --vv-border: #d9c8b3;
  --vv-success: #2f7d4f;
  --vv-warn: #c47a16;
  --vv-danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--vv-cream);
  color: var(--vv-ink);
  margin: 0;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 600; letter-spacing: -0.01em; }

a { color: var(--vv-maroon); text-decoration: none; }
a:hover { color: var(--vv-maroon-dark); }

/* ---------- Layout ---------- */
.vv-app { display: flex; min-height: 100vh; }

.vv-sidebar {
  width: 250px;
  background: var(--vv-maroon);
  color: #fff;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.vv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 16px;
}
.vv-brand-mark {
  width: 42px; height: 42px;
  background: var(--vv-cream);
  color: var(--vv-maroon);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.vv-brand-title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.vv-brand-sub { font-size: 11px; opacity: 0.7; letter-spacing: 0.05em; text-transform: uppercase; }

.vv-nav { list-style: none; padding: 0 12px; margin: 0; flex: 1; }
.vv-nav li { margin-bottom: 2px; }
.vv-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.85);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.vv-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.vv-nav a.active { background: rgba(255,255,255,0.14); color: #fff; }
.vv-nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.vv-nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 14px 8px;
  opacity: 0.55;
}

.vv-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
}
.vv-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--vv-cream-deep); color: var(--vv-maroon);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ---------- Main content ---------- */
.vv-main {
  flex: 1;
  padding: 28px 36px;
  max-width: 100%;
  overflow-x: auto;
}

.vv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.vv-page-title { font-size: 26px; margin: 0 0 4px; font-weight: 600; }
.vv-breadcrumb { font-size: 13px; color: var(--vv-muted); }
.vv-breadcrumb a { color: var(--vv-muted); }
.vv-breadcrumb .sep { margin: 0 6px; }
.vv-breadcrumb .current { color: var(--vv-ink); font-weight: 500; }

/* ---------- Cards ---------- */
.vv-card {
  background: #fff;
  border: 1px solid var(--vv-border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(75, 40, 30, 0.04);
}
.vv-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--vv-border);
}
.vv-card-title { font-size: 17px; font-weight: 600; margin: 0; }
.vv-card-sub { font-size: 13px; color: var(--vv-muted); margin-top: 4px; }

/* ---------- Stat tiles ---------- */
.vv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.vv-stat {
  background: #fff;
  border: 1px solid var(--vv-border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.vv-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--vv-muted); font-weight: 500; }
.vv-stat-value { font-size: 30px; font-weight: 700; margin: 8px 0 4px; color: var(--vv-ink); letter-spacing: -0.02em; }
.vv-stat-delta { font-size: 12px; color: var(--vv-success); font-weight: 500; }
.vv-stat-delta.down { color: var(--vv-danger); }
.vv-stat-icon {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px;
  background: var(--vv-cream); color: var(--vv-maroon);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Buttons ---------- */
.vv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.vv-btn-primary { background: var(--vv-maroon); color: #fff; }
.vv-btn-primary:hover { background: var(--vv-maroon-dark); color: #fff; }
.vv-btn-outline { background: transparent; color: var(--vv-maroon); border-color: var(--vv-maroon); }
.vv-btn-outline:hover { background: var(--vv-maroon); color: #fff; }
.vv-btn-ghost { background: transparent; color: var(--vv-ink); }
.vv-btn-ghost:hover { background: var(--vv-cream-deep); }
.vv-btn-soft { background: var(--vv-cream-deep); color: var(--vv-maroon); }
.vv-btn-soft:hover { background: var(--vv-cream); }
.vv-btn-sm { padding: 6px 12px; font-size: 13px; }
.vv-btn-lg { padding: 12px 24px; font-size: 15px; }
.vv-btn-danger { background: var(--vv-danger); color: #fff; }

/* ---------- Forms ---------- */
.vv-form-group { margin-bottom: 18px; }
.vv-label { display: block; font-size: 13px; font-weight: 500; color: var(--vv-ink); margin-bottom: 6px; }
.vv-label .req { color: var(--vv-danger); }
.vv-input, .vv-select, .vv-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--vv-cream-soft);
  border: 1px solid var(--vv-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--vv-ink);
  transition: all 0.15s ease;
}
.vv-input:focus, .vv-select:focus, .vv-textarea:focus {
  outline: none;
  border-color: var(--vv-maroon);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(152, 27, 30, 0.12);
}
.vv-help { font-size: 12px; color: var(--vv-muted); margin-top: 5px; }
.vv-radio-group { display: flex; gap: 14px; flex-wrap: wrap; }
.vv-radio-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--vv-cream-soft);
  border: 1px solid var(--vv-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}
.vv-radio-pill input { accent-color: var(--vv-maroon); }
.vv-radio-pill.active { background: var(--vv-cream-deep); border-color: var(--vv-maroon); color: var(--vv-maroon); font-weight: 500; }

/* ---------- Table ---------- */
.vv-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--vv-border); background: #fff; }
.vv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vv-table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--vv-cream-soft);
  color: var(--vv-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--vv-border);
}
.vv-table tbody td { padding: 14px 16px; border-bottom: 1px solid #f0e6d6; vertical-align: middle; }
.vv-table tbody tr:last-child td { border-bottom: none; }
.vv-table tbody tr:hover { background: var(--vv-cream-soft); }

/* ---------- Badges ---------- */
.vv-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.vv-badge-success { background: #e3f2e8; color: var(--vv-success); }
.vv-badge-warn { background: #fbeed3; color: var(--vv-warn); }
.vv-badge-danger { background: #fadcd9; color: var(--vv-danger); }
.vv-badge-neutral { background: var(--vv-cream-deep); color: var(--vv-maroon); }
.vv-badge-info { background: #dde7f0; color: #2c5d8b; }

/* ---------- Tabs ---------- */
.vv-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--vv-border); margin-bottom: 22px; }
.vv-tab {
  padding: 10px 18px;
  font-size: 14px;
  color: var(--vv-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.vv-tab.active { color: var(--vv-maroon); border-bottom-color: var(--vv-maroon); }

/* ---------- Toggle ---------- */
.vv-toggle {
  position: relative;
  width: 38px; height: 22px;
  background: #d6c6b1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.vv-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.vv-toggle.on { background: var(--vv-maroon); }
.vv-toggle.on::after { transform: translateX(16px); }

/* ---------- Upload zone ---------- */
.vv-upload {
  border: 2px dashed var(--vv-border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  background: var(--vv-cream-soft);
  transition: all 0.15s ease;
  cursor: pointer;
}
.vv-upload:hover { border-color: var(--vv-maroon); background: #fff; }
.vv-upload-icon {
  width: 56px; height: 56px;
  background: var(--vv-cream-deep); color: var(--vv-maroon);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.vv-upload-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.vv-upload-sub { font-size: 13px; color: var(--vv-muted); }

/* ---------- Permission grid ---------- */
.vv-perm-table th, .vv-perm-table td { text-align: center; }
.vv-perm-table th:first-child, .vv-perm-table td:first-child { text-align: left; }
.vv-perm-check { accent-color: var(--vv-maroon); width: 17px; height: 17px; }

/* ---------- Stepper ---------- */
.vv-stepper { display: flex; gap: 8px; margin-bottom: 28px; }
.vv-step {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--vv-border);
  border-radius: 12px;
  font-size: 14px;
}
.vv-step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--vv-cream-deep);
  color: var(--vv-maroon);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.vv-step.active { border-color: var(--vv-maroon); background: #fff; }
.vv-step.active .vv-step-num { background: var(--vv-maroon); color: #fff; }
.vv-step.done .vv-step-num { background: var(--vv-success); color: #fff; }
.vv-step-label { font-weight: 500; }
.vv-step-sub { font-size: 12px; color: var(--vv-muted); }

/* ---------- Login ---------- */
.vv-login-wrap {
  min-height: 100vh;
  display: flex;
  background: var(--vv-cream);
}
.vv-login-side {
  flex: 1;
  background: linear-gradient(135deg, var(--vv-maroon) 0%, var(--vv-maroon-dark) 100%);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.vv-login-side::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.vv-login-side::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.vv-login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.vv-login-form { width: 100%; max-width: 380px; }

/* ---------- Draw screen ---------- */
.vv-draw-screen {
  min-height: calc(100vh - 24px);
  margin: 12px;
  background: linear-gradient(180deg, var(--vv-cream) 0%, var(--vv-cream-deep) 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--vv-maroon);
  border-radius: 36px;
  box-shadow: 0 12px 32px rgba(152, 27, 30, 0.12);
}
.vv-draw-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 12px 20px;
}
.vv-draw-body { flex: 1; display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.vv-draw-stage {
  background: #fff;
  border: 1px solid var(--vv-border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.vv-draw-status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  background: var(--vv-cream-deep);
  color: var(--vv-maroon);
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 24px;
}
.vv-draw-status-pill.confirmed { background: #e3f2e8; color: var(--vv-success); }
.vv-draw-status-pill.waitlist { background: #fbeed3; color: var(--vv-warn); }
.vv-draw-status-pill.not_selected { background: var(--vv-cream-deep); color: var(--vv-muted); }
.vv-draw-slot {
  background: var(--vv-cream-soft);
  border-radius: 18px;
  padding: 36px 60px;
  min-width: 60%;
  border: 1px solid var(--vv-border);
}
.vv-draw-name {
  font-size: clamp(48px, 6vw, 92px);
  font-weight: 700;
  color: var(--vv-maroon);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  min-height: 1.1em;
}
.vv-draw-regno {
  font-size: clamp(20px, 2vw, 28px);
  color: var(--vv-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.vv-draw-controls { margin-top: 36px; display: flex; gap: 12px; }
.vv-draw-spinning .vv-draw-name { opacity: 0.7; animation: vv-slot-blur 0.08s linear infinite; }
@keyframes vv-slot-blur {
  0% { transform: translateY(-6px); filter: blur(2px); }
  50% { transform: translateY(6px); filter: blur(3px); }
  100% { transform: translateY(-6px); filter: blur(2px); }
}

.vv-draw-stats { display: flex; align-items: center; gap: 28px; }
.vv-draw-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--vv-muted); margin-bottom: 2px; }
.vv-draw-stat-value { font-size: 22px; font-weight: 700; }
.vv-draw-stat-value.confirmed { color: var(--vv-success); }
.vv-draw-stat-value.waitlist { color: var(--vv-warn); }

.vv-draw-ticker {
  flex-shrink: 0;
  height: 84px;
  background: #17171a;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.vv-draw-ticker-live {
  background: var(--vv-maroon);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  flex-shrink: 0;
  gap: 5px;
}
.vv-draw-ticker-live .vv-live-label { font-size: 11px; letter-spacing: 0.08em; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.vv-draw-ticker-live .vv-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: vv-pulse-dot 1.3s ease-in-out infinite; }
.vv-draw-ticker-live .vv-live-status { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
@keyframes vv-pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.vv-draw-ticker-viewport { flex: 1; overflow: hidden; position: relative; }
.vv-draw-ticker-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #6b6b70; font-size: 13px;
}
.vv-draw-ticker-track {
  display: flex; align-items: center; gap: 14px;
  position: absolute; top: 0; bottom: 0; left: 0;
  padding: 0 20px;
  white-space: nowrap;
  animation: vv-marquee linear infinite;
}
.vv-draw-ticker-track.vv-paused { animation-play-state: paused; }
@keyframes vv-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.vv-draw-ticker-item {
  display: flex; align-items: center; gap: 10px;
  background: #262629; border-radius: 10px; padding: 10px 14px; flex-shrink: 0;
}
.vv-draw-ticker-num { background: #3a3a3e; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.vv-draw-ticker-name { color: #fff; font-weight: 600; font-size: 14px; }
.vv-draw-ticker-reg { color: #9a9a9e; font-size: 12px; letter-spacing: 0.03em; }
.vv-draw-ticker-item .vv-badge { flex-shrink: 0; }

/* ---------- Misc ---------- */
.vv-icon { width: 18px; height: 18px; }
.vv-divider { height: 1px; background: var(--vv-border); margin: 18px 0; border: none; }
.vv-row { display: flex; gap: 16px; flex-wrap: wrap; }
.vv-row > * { flex: 1; min-width: 200px; }
.vv-mt-0 { margin-top: 0; }
.vv-text-muted { color: var(--vv-muted); }
.vv-text-center { text-align: center; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--vv-cream); }
::-webkit-scrollbar-thumb { background: var(--vv-cream-deep); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #cdb89c; }

/* Mockup navigator (links between pages) */
.vv-mock-nav {
  position: fixed; bottom: 14px; right: 14px;
  background: var(--vv-ink); color: #fff;
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; z-index: 999;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.vv-mock-nav a { color: #f0d9a8; }
