/* ============================================================
   VOLV Admin Portal Styles
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cyan:    #5BC4E8;
  --cyan2:   #3aadd4;
  --dark:    #111;
  --mid:     #555;
  --light:   #f5f5f5;
  --white:   #fff;
  --border:  #e0e0e0;
  --danger:  #e53e3e;
  --success: #38a169;
  --radius:  10px;
  --shadow:  0 2px 12px rgba(0,0,0,0.08);
  --font:    'Inter', -apple-system, sans-serif;
}

body { font-family: var(--font); background: var(--light); color: var(--dark); min-height: 100vh; }

/* ── Login Page ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img { height: 48px; filter: brightness(0); }

.login-logo h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--mid);
  margin-top: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-card .subtitle {
  color: var(--mid);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ── Forms ── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--cyan);
}

textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary { background: var(--cyan); color: var(--white); width: 100%; padding: 13px; font-size: 1rem; }
.btn-primary:hover { background: var(--cyan2); }

.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--dark); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #c53030; }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; border-radius: 50px; }

.btn-ghost { background: none; color: var(--mid); padding: 7px 12px; }
.btn-ghost:hover { color: var(--danger); }

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--cyan);
  font-size: 0.85rem;
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Error / Alert ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error   { background: #fff5f5; color: var(--danger); border: 1px solid #fed7d7; }
.alert-success { background: #f0fff4; color: var(--success); border: 1px solid #c6f6d5; }

/* ── Dashboard Layout ── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  background: #0a0a0a;
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo img { height: 36px; }

.sidebar-logo span {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font);
}

.nav-item:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.nav-item.active { background: rgba(91,196,232,0.15); color: var(--cyan); }

.nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── Main Content ── */
.main-content {
  padding: 36px 40px;
  overflow-y: auto;
}

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

.page-header h1 { font-size: 1.6rem; font-weight: 800; }
.page-header p  { color: var(--mid); font-size: 0.9rem; margin-top: 3px; }

/* ── Event Cards (Admin List) ── */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-admin-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.event-admin-card:hover { border-color: var(--cyan); box-shadow: var(--shadow); }

.event-admin-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  background: var(--light);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.event-admin-date .month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.event-admin-date .day {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.1;
}

.event-admin-info { flex: 1; min-width: 0; }
.event-admin-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.event-admin-info p  { font-size: 0.82rem; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.event-admin-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(91,196,232,0.12);
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
}

.event-admin-actions { display: flex; gap: 6px; align-items: center; }

.scheduled-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #805ad5;
  background: #faf5ff;
  border: 1px solid #d6bcfa;
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  transform: translateY(16px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: translateY(0); }

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

.modal-header h2 { font-size: 1.2rem; font-weight: 800; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--mid);
  line-height: 1;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Image Upload ── */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}

.image-upload-area:hover { border-color: var(--cyan); }
.image-upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-upload-area p { color: var(--mid); font-size: 0.85rem; }
.image-upload-area .icon { font-size: 2rem; margin-bottom: 6px; }

.image-preview {
  margin-top: 10px;
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
}

.image-preview img { width: 100%; max-height: 160px; object-fit: cover; display: block; }

/* ── Settings Panel ── */
.settings-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  max-width: 480px;
}

.settings-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.stat-card .num { font-size: 2rem; font-weight: 900; color: var(--cyan); }
.stat-card .lbl { font-size: 0.82rem; color: var(--mid); font-weight: 500; margin-top: 2px; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--mid);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.95rem; }

/* ── Confirm Modal ── */
.confirm-modal { max-width: 380px; text-align: center; }
.confirm-modal p { color: var(--mid); font-size: 0.9rem; margin-bottom: 20px; }

/* ── Mobile Topbar (hamburger for mobile) ── */
.mobile-topbar {
  display: none;
  background: #0a0a0a;
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-topbar img { height: 32px; }

.hamburger-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    width: 240px;
    z-index: 200;
    height: 100vh;
    transition: left 0.3s;
  }

  .sidebar.open { left: 0; }

  .main-content { padding: 24px 18px; }
  .mobile-topbar { display: flex; }

  .stats-bar { grid-template-columns: 1fr 1fr; }

  .event-admin-card { flex-wrap: wrap; }
  .event-admin-actions { width: 100%; justify-content: flex-end; }

  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 24px 18px; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; }

  .login-card { padding: 36px 24px; }
}
