/* AnnotateIQ — Main Stylesheet */
/* Design: Deep Navy + Gold Accent, Playfair Display + DM Sans */

:root {
  --navy: #0D1B2A;
  --navy-mid: #1A2E45;
  --navy-light: #243B55;
  --gold: #C9A84C;
  --gold-light: #E8C76B;
  --gold-pale: #F7EDD8;
  --cream: #FAF7F2;
  --text: #1C2B3A;
  --text-muted: #6B7C8D;
  --border: #D8E2EC;
  --white: #FFFFFF;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #D97706;
  --info: #2563EB;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(13,27,42,0.10);
  --shadow-lg: 0 12px 48px rgba(13,27,42,0.16);
}

* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.65;
}

/* ── NAVBAR ──────────────────────────────────── */
.aiq-navbar {
  background: var(--navy) !important;
  border-bottom: 2px solid var(--gold);
  padding: .85rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.brand-icon {
  background: var(--gold);
  color: var(--navy);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: -.01em;
}
.brand-accent { color: var(--gold); }
.aiq-navbar .nav-link {
  color: rgba(255,255,255,.8) !important;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: all .2s;
}
.aiq-navbar .nav-link:hover { color: var(--gold) !important; background: rgba(255,255,255,.07); }

.user-badge {
  display: flex !important;
  align-items: center;
  gap: .5rem;
}
.user-avatar {
  width: 30px; height: 30px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aiq-dropdown {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

/* ── BUTTONS ──────────────────────────────────── */
.btn-aiq {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: .6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
}
.btn-aiq:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(201,168,76,.4); }
.btn-aiq-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  padding: .6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
}
.btn-aiq-outline:hover { background: var(--gold); color: var(--navy); }

/* ── CARDS ──────────────────────────────────── */
.aiq-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: box-shadow .2s, transform .2s;
}
.aiq-card:hover { box-shadow: var(--shadow-lg); }
.aiq-card-header {
  border-bottom: 2px solid var(--gold-pale);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}
.aiq-card-header h4, .aiq-card-header h5 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin: 0;
}

/* ── STAT CARDS ──────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gold);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: var(--navy);
  font-weight: 700;
  line-height: 1;
}
.stat-label { font-size: .85rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-top: .4rem; }
.stat-icon { font-size: 2rem; margin-bottom: .5rem; }

/* ── FORMS ──────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
  outline: none;
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: .4rem; }
.form-text { color: var(--text-muted); font-size: .82rem; }

/* ── PAGE HEADER ──────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; right: -100px; top: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
}
.page-hero .subtitle { color: rgba(255,255,255,.7); font-size: 1rem; }

/* ── HOMEPAGE HERO ──────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1a3a5c 100%);
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
  top: -150px; right: -150px;
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
}
.hero-label {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.35);
  color: var(--gold);
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.hero-title span { color: var(--gold); }
.hero-desc { color: rgba(255,255,255,.72); font-size: 1.1rem; line-height: 1.7; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}
.demo-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .9rem 1.2rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: all .3s;
}
.demo-item:hover { background: rgba(201,168,76,.1); border-color: rgba(201,168,76,.3); }
.demo-label-badge {
  font-size: .75rem;
  padding: .25rem .75rem;
  border-radius: 50px;
  font-weight: 600;
}
.demo-text { color: rgba(255,255,255,.85); font-size: .88rem; }

/* ── HOW IT WORKS ──────────────────────────────── */
.steps-section { padding: 5rem 0; background: var(--cream); }
.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  transition: all .3s;
  height: 100%;
}
.step-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.step-number {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 1.2rem;
}
.step-card h5 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: .6rem;
}

/* ── FEATURES ──────────────────────────────── */
.features-section { padding: 5rem 0; background: var(--navy); color: var(--white); }
.feature-item {
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.07);
  transition: all .3s;
  height: 100%;
}
.feature-item:hover { border-color: rgba(201,168,76,.3); background: rgba(201,168,76,.05); }
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(201,168,76,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--gold);
  flex-shrink: 0;
}
.feature-item h6 { font-family: 'Playfair Display', serif; font-size: .95rem; margin-bottom: .3rem; color: var(--white); }
.feature-item p { font-size: .85rem; color: rgba(255,255,255,.6); margin: 0; }

/* ── LANGUAGE BADGES ──────────────────────────── */
.lang-badges { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.lang-badge {
  padding: .4rem 1rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.25);
  color: var(--gold);
}

.progress-aiq {
  height: 10px;
  border-radius: 5px;
  background: var(--border);
  overflow: hidden;
  display: block; 
  width: 100%;   
}

.progress-aiq .progress-bar {
  height: 100%;   
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 5px;
  transition: width .6s ease;
  display: block; 
}

/* ── BADGES & TAGS ──────────────────────────── */
.badge-status-active { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-status-completed { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-status-draft { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.badge-status-archived { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.role-badge-uploader { background: #fef3c7; color: #92400e; border-radius: 4px; padding: .2rem .5rem; font-size:.75rem; }
.role-badge-annotator { background: #ede9fe; color: #5b21b6; border-radius: 4px; padding: .2rem .5rem; font-size:.75rem; }
.role-badge-admin { background: #fee2e2; color: #991b1b; border-radius: 4px; padding: .2rem .5rem; font-size:.75rem; }

/* ── ANNOTATION QUESTION CARD ──────────────────── */
.question-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: border-color .2s;
}
.question-card.annotated { border-color: var(--gold); background: #fffef7; }
.question-num {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .5rem;
}
.question-text {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-family: 'DM Sans', sans-serif;
}
.label-options { display: flex; flex-wrap: wrap; gap: .6rem; }
.label-btn {
  padding: .45rem 1.2rem;
  border-radius: 50px;
  border: 2px solid;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  transition: all .2s;
  background: var(--white);
}
.label-btn.selected { color: var(--white) !important; }
.label-btn:not(.selected):hover { opacity: .8; transform: scale(1.03); }

/* ── AUTH PAGES ──────────────────────────────── */
.auth-wrapper {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 2rem;
}
.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
}
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo .brand-text { font-size: 1.6rem; }
.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: .4rem;
}
.auth-sub { text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 1.8rem; }

/* ── TABLE ──────────────────────────────────── */
.aiq-table { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.aiq-table table { margin: 0; background: var(--white); }
.aiq-table thead th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none;
  padding: 1rem 1.2rem;
}
.aiq-table tbody td { padding: .9rem 1.2rem; border-color: var(--border); vertical-align: middle; }
.aiq-table tbody tr:hover { background: #fafbfc; }

/* ── FILE UPLOAD ZONE ──────────────────────────── */
.upload-zone {
  border: 2.5px dashed var(--gold);
  border-radius: var(--radius);
  background: var(--gold-pale);
  padding: 3rem 2rem;
  text-align: center;
  transition: all .3s;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over {
  background: #f5e8cc;
  border-color: var(--gold-light);
}
.upload-zone .upload-icon { font-size: 3rem; color: var(--gold); margin-bottom: 1rem; }

/* ── PAGINATION ──────────────────────────────── */
.page-link { color: var(--navy); border-color: var(--border); }
.page-item.active .page-link { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; }
.page-link:hover { background: var(--gold-pale); color: var(--navy); }

/* ── ALERT ──────────────────────────────────── */
.aiq-alert { border-radius: var(--radius-sm); border: none; font-size: .92rem; }

/* ── SECTION TITLES ──────────────────────────── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--navy);
  font-weight: 700;
}
.section-title.light { color: var(--white); }
.section-subtitle { color: var(--text-muted); font-size: 1rem; }
.section-subtitle.light { color: rgba(255,255,255,.65); }
.title-divider {
  width: 50px; height: 3px;
  background: var(--gold);
  margin: .8rem auto 0;
  border-radius: 2px;
}

/* ── PROGRESS TRACKER ──────────────────────────── */
.annotate-progress-bar {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 72px;
  z-index: 10;
  border-bottom: 1px solid rgba(201,168,76,.3);
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .home-hero { min-height: auto; padding: 4rem 0; }
  .hero-title { font-size: 2rem; }
  .stat-number { font-size: 1.8rem; }
}

/* ── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .55s ease forwards; }
.fade-up-1 { animation-delay: .1s; opacity: 0; }
.fade-up-2 { animation-delay: .2s; opacity: 0; }
.fade-up-3 { animation-delay: .3s; opacity: 0; }
.fade-up-4 { animation-delay: .4s; opacity: 0; }

.page-content { flex: 1; }
.aiq-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 1.5rem 0;
  border-top: 2px solid var(--gold);
}
.aiq-footer .brand-text { color: var(--white); }

/* Color picker helper */
.color-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(0,0,0,.1);
  cursor: pointer;
  transition: transform .2s;
}
.color-swatch:hover { transform: scale(1.2); }
