/* ============================================================
   EventoraX v1.0 — Master Stylesheet
   ============================================================ */

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

:root {
  --primary:   #6366f1;
  --primary-d: #4f46e5;
  --accent:    #f59e0b;
  --accent-d:  #d97706;
  --green:     #10b981;
  --red:       #ef4444;
  --blue:      #3b82f6;
  --purple:    #8b5cf6;
  --orange:    #f97316;

  --bg1:  #0a0c14;
  --bg2:  #10121e;
  --bg3:  #181b2e;
  --bg4:  #1f2340;
  --card: #13162a;

  --text1: #f0f2ff;
  --text2: #a0a8cc;
  --text3: #606480;

  --border:  rgba(255,255,255,.07);
  --shadow:  0 4px 24px rgba(0,0,0,.4);
  --radius:  12px;
  --radius-s:8px;

  --sidebar-w: 260px;
  --header-h:  64px;
}

[data-theme="light"] {
  --bg1: #f4f5fb; --bg2: #eef0fa; --bg3: #e4e7f5; --bg4: #d8dced;
  --card: #ffffff;
  --text1: #1a1d2e; --text2: #4a4f6a; --text3: #8890aa;
  --border: rgba(0,0,0,.08); --shadow: 0 4px 24px rgba(0,0,0,.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg1);
  color: var(--text1);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform .3s;
}

.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.sidebar-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }

.nav-section { margin-bottom: .5rem; }

.nav-section-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text3);
  padding: .5rem 1.5rem .3rem;
}

.nav-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1.5rem; color: var(--text2);
  font-size: .875rem; font-weight: 500;
  border-radius: 0; transition: all .2s;
  border-left: 3px solid transparent;
}

.nav-link:hover { color: var(--text1); background: var(--bg3); }

.nav-link.active {
  color: var(--primary); background: rgba(99,102,241,.1);
  border-left-color: var(--primary);
}

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

.nav-badge {
  margin-left: auto; background: var(--primary);
  color: #fff; font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--text1); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

.page-content { flex: 1; padding: 1.5rem; }

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: .95rem;
}

.card-body { padding: 1.25rem; }

/* ── STATS GRID ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  text-align: center; transition: transform .2s;
}

.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 2rem; margin-bottom: .5rem; }
.stat-value { font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--text2); font-size: .82rem; margin-top: .25rem; }
.stat-sub { font-size: .75rem; color: var(--green); margin-top: .2rem; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius-s);
  font-size: .875rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .2s;
  line-height: 1;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); box-shadow: 0 4px 16px rgba(99,102,241,.4); }

.btn-accent { background: var(--accent); color: #1a1d2e; }
.btn-accent:hover { background: var(--accent-d); }

.btn-success { background: var(--green); color: #fff; }
.btn-danger  { background: var(--red);   color: #fff; }

.btn-ghost {
  background: transparent; color: var(--text2);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text1); }

.btn-sm  { padding: .3rem .7rem; font-size: .8rem; }
.btn-lg  { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-full{ width: 100%; justify-content: center; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block; margin-bottom: .4rem;
  font-size: .82rem; font-weight: 600;
  color: var(--text2);
}

.form-control {
  width: 100%; padding: .6rem .9rem;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text1); border-radius: var(--radius-s);
  font-size: .875rem; transition: border-color .2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.form-control::placeholder { color: var(--text3); }

select.form-control { appearance: none; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

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

.form-hint { font-size: .75rem; color: var(--text3); margin-top: .25rem; }

/* ── TABLES ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: .875rem; }

.table th {
  background: var(--bg3); color: var(--text2);
  font-weight: 600; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .04em;
  padding: .75rem 1rem; text-align: left;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: .75rem 1rem; color: var(--text1);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:hover { background: var(--bg3); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: .72rem; font-weight: 700;
}
.badge-green   { background: rgba(16,185,129,.15); color: var(--green); }
.badge-blue    { background: rgba(59,130,246,.15);  color: var(--blue); }
.badge-red     { background: rgba(239,68,68,.15);   color: var(--red); }
.badge-yellow  { background: rgba(245,158,11,.15);  color: var(--accent); }
.badge-purple  { background: rgba(139,92,246,.15);  color: var(--purple); }
.badge-gray    { background: rgba(128,128,128,.15); color: var(--text2); }
.badge-orange  { background: rgba(249,115,22,.15);  color: var(--orange); }

/* ── ALERTS ─────────────────────────────────────────────────── */
.alert {
  padding: .875rem 1rem; border-radius: var(--radius-s);
  margin-bottom: 1rem; font-size: .875rem;
  border-left: 4px solid;
}
.alert-success { background: rgba(16,185,129,.1);  border-color: var(--green);  color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,.1);   border-color: var(--red);    color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,.1);  border-color: var(--accent); color: #fcd34d; }
.alert-info    { background: rgba(59,130,246,.1);  border-color: var(--blue);   color: #93c5fd; }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%;
  max-width: 600px; max-height: 90vh; overflow-y: auto;
  margin: 1rem; box-shadow: 0 24px 64px rgba(0,0,0,.6);
  animation: modalIn .2s ease;
}

@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(-10px); } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem; font-weight: 700;
}

.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 1.3rem; padding: .25rem;
}
.modal-close:hover { color: var(--red); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; gap: .75rem; justify-content: flex-end;
}

/* ── TABS ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }

.tab {
  padding: .6rem 1.1rem; font-size: .875rem; font-weight: 600;
  color: var(--text2); cursor: pointer; border: none;
  background: none; border-bottom: 2px solid transparent;
  transition: all .2s; white-space: nowrap;
}
.tab:hover { color: var(--text1); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── LOGIN PAGE ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 2rem;
  background: var(--bg1);
  background-image: radial-gradient(rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.login-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.login-brand { text-align: center; margin-bottom: 2rem; }
.login-brand-icon { font-size: 3rem; margin-bottom: .75rem; }
.login-brand h1 {
  font-family: 'Playfair Display', serif; font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-brand p { color: var(--text2); font-size: .875rem; margin-top: .25rem; }

/* ── LANDING PAGE ───────────────────────────────────────────── */
.landing { background: var(--bg1); overflow-x: hidden; }

.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: rgba(10,12,20,.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 2rem; height: 64px; gap: 1rem;
}

.landing-brand {
  font-family: 'Playfair Display', serif; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-size: 1.25rem;
}

.landing-nav-links { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.landing-nav-links a { font-size: .875rem; color: var(--text2); transition: color .2s; }
.landing-nav-links a:hover { color: var(--primary); }

.hero-section {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center;
  padding: 8rem 2rem 4rem; position: relative; overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-orb {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.07), transparent 70%);
  width: 600px; height: 600px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: orb-pulse 8s ease-in-out infinite;
}
@keyframes orb-pulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.1); }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.3);
  color: var(--primary); font-size: .8rem; font-weight: 600;
  padding: .35rem .9rem; border-radius: 99px; margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Playfair Display', serif; font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-sub { font-size: 1.1rem; color: var(--text2); max-width: 560px; margin: 0 auto 2.5rem; }

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── FYP SECTION ────────────────────────────────────────────── */
.fyp-section {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
}

.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; max-width: 1200px; margin: 0 auto;
}

.team-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.4); }

.team-photo {
  width: 90px; height: 90px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1rem;
  border: 3px solid var(--primary);
}

.team-name { font-size: 1.1rem; font-weight: 700; }
.team-role { color: var(--primary); font-size: .82rem; font-weight: 600; margin-top: .25rem; }
.team-bio  { color: var(--text2); font-size: .82rem; margin-top: .6rem; }

/* ── LICENSE BANNER ─────────────────────────────────────────── */
.license-banner {
  background: linear-gradient(135deg, rgba(245,158,11,.1), rgba(239,68,68,.1));
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-s); padding: .75rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.5rem; font-size: .85rem;
}

/* ── TOGGLE SWITCH ──────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: .75rem; }

.toggle {
  position: relative; width: 44px; height: 24px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg4); border-radius: 12px;
  transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── QR SCANNER ─────────────────────────────────────────────── */
.qr-scanner-container {
  background: var(--bg3); border-radius: var(--radius);
  padding: 1.5rem; text-align: center;
}
#qr-video { width: 100%; max-width: 400px; border-radius: var(--radius-s); }

/* ── CERTIFICATE PREVIEW ────────────────────────────────────── */
.cert-preview {
  background: #fff; color: #1a1d2e;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}

/* ── PRICING CARDS ──────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; max-width: 1100px; margin: 0 auto;
}

.pricing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  position: relative; transition: transform .2s;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 16px 40px rgba(99,102,241,.2);
}
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: .25rem .9rem; border-radius: 99px;
}
.pricing-name { font-size: 1rem; font-weight: 700; }
.pricing-price { font-size: 2.5rem; font-weight: 800; margin: .75rem 0 .25rem; }
.pricing-period { font-size: .8rem; color: var(--text2); }
.pricing-features { list-style: none; margin: 1.5rem 0; }
.pricing-features li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; padding: .3rem 0; color: var(--text2);
}
.pricing-features li .check { color: var(--green); }
.pricing-features li .cross { color: var(--text3); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2rem; }
  .landing-nav-links a:not(.btn) { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── UTILS ──────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text2); }
.text-small  { font-size: .8rem; }
.text-bold   { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.p-1 { padding: .5rem; } .p-2 { padding: 1rem; } .p-3 { padding: 1.5rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
