/* ============================================================================
   GrammarQuest — Application Stylesheet
   Gaya Visual: Minimalis, Kalem, Bersih, dan Kompak (Modern British Academic)
   ============================================================================ */

:root {
  --navy: #152342;
  --navy2: #1e3567;
  --red: #c0203a;
  --red2: #9e142b;
  --paper: #FAF5EB; /* Kertas Putih Cream Buku Tulis */
  --card: #ffffff;
  --ink: #19243c;
  --muted: #64748b;
  --rule: #e2dcd0;
  --rule-light: #ece6dc;
  --gold: #d97706;
  --ok: #15803d;
  --okbg: #f0fdf4;
  --badbg: #fff1f2;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --shadow-sm: 0 2px 8px -1px rgba(21, 35, 66, 0.05), 0 1px 3px -1px rgba(21, 35, 66, 0.03);
  --shadow-md: 0 6px 20px -2px rgba(21, 35, 66, 0.07), 0 2px 6px -1px rgba(21, 35, 66, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(21, 35, 66, 0.10), 0 4px 10px -2px rgba(21, 35, 66, 0.04);
}

/* Utility & App Shell */
.hidden { display: none !important; }

/* Top Header: Ramping, Bersahaja, Profesional, & Bebas Tumpang Tindih */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  height: 52px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.header-inner {
  width: min(1440px, 100% - 2rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  height: 52px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-toggle-btn {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  place-items: center;
  transition: all 0.15s ease;
}
.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.site-header .logo {
  color: #fff;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.site-header .logo svg {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}
.site-header .logo b {
  color: #f87171;
}

/* Header Right: Stats Ramping & Tombol Masuk/Daftar yang Harmonis */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.74rem;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.stat-pill.gold {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fcd34d;
}
.icon-Sound-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.icon-Sound-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.header-auth-btns {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-header {
  font: 700 0.78rem var(--sans);
  padding: 0.32rem 0.85rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-header.ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn-header.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.btn-header.solid {
  background: var(--navy2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-header.solid:hover {
  background: #25427d;
}
.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.18rem 0.65rem 0.18rem 0.25rem;
  border-radius: 999px;
  font: 700 0.76rem var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
}
.profile-trigger .av-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}

/* ============================================================================
   APP SHELL: SIDEBAR BIRU NAVY ELEGAN & DAPAT MENGHILANG OTOMATIS
   ============================================================================ */
.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 50px);
  align-items: start;
  transition: grid-template-columns 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-shell.sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.app-shell.sidebar-hidden .app-sidebar {
  display: none;
}

/* Dynamic Hero Responsiveness & Game Card Shrink Animation when Sidebar is Open (Desktop) */
@media (min-width: 921px) {
  .app-shell:not(.sidebar-hidden) .hero .wrap {
    grid-template-columns: 1.28fr 0.82fr;
    gap: 1.75rem;
  }
  .app-shell:not(.sidebar-hidden) h1 {
    font-size: clamp(1.9rem, 3.15vw, 3.25rem);
  }
  .app-shell:not(.sidebar-hidden) .hero-line {
    white-space: nowrap;
  }
  .app-shell:not(.sidebar-hidden) .hero .lead {
    font-size: 1.05rem;
    max-width: 30rem;
    margin: 1.1rem 0 1.6rem;
  }
  .app-shell:not(.sidebar-hidden) .ex {
    transform: scale(0.85) rotate(0.8deg);
    transform-origin: center right;
    box-shadow: 6px 6px 0 var(--navy);
  }
}
.sidebar-backdrop {
  position: fixed;
  inset: 50px 0 0 0;
  background: rgba(10, 18, 38, 0.45);
  backdrop-filter: blur(2px);
  z-index: 44;
  display: none;
}
.sidebar-backdrop.show {
  display: block;
}
.app-sidebar {
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
  background: var(--red);
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  overflow-y: auto;
  z-index: 45;
  color: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
}
.sidebar-section {
  display: grid;
  gap: 0.25rem;
}
.sidebar-heading {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.2rem 0.65rem;
}
.sidebar-nav {
  display: grid;
  gap: 0.2rem;
}
.nav-tab,
.side-action-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  font: 600 0.86rem var(--sans);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  text-align: left;
  transition: all 0.15s ease;
}
.nav-tab:hover,
.side-action-btn:hover {
  background: var(--navy);
  color: #ffffff;
}
.nav-tab.active {
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.badge-count {
  margin-left: auto;
  background: var(--navy);
  color: #fff;
  font-size: 0.66rem;
  padding: 0.06rem 0.45rem;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Level A1 - B2 di Sidebar (Teks Bersih Tanpa Ikon) */
.sidebar-levels {
  display: grid;
  gap: 0.2rem;
}
.side-lvl-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  font: 600 0.84rem var(--sans);
  padding: 0.46rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  text-align: left;
  transition: all 0.15s ease;
}
.side-lvl-btn:hover {
  background: var(--navy);
  color: #ffffff;
}
.side-lvl-btn.active {
  background: var(--navy);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-weight: 700;
}
.lvl-txt {
  flex: 1;
}
.lvl-cnt {
  font-size: 0.7rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.06rem 0.42rem;
  border-radius: 99px;
  font-weight: 700;
}

/* Sidebar Footer: Info Akun di Sidebar Merah */
.sidebar-footer {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
}
.side-user-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.side-av {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.side-user-info {
  min-width: 0;
}
.side-user-info strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user-info small {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.82);
}
.side-auth-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
.side-auth-btns .btn.sm {
  padding: 0.32rem 0.5rem;
  font-size: 0.75rem;
  min-height: 30px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.side-auth-btns .btn.sm:hover {
  background: var(--navy);
  color: #ffffff;
}
.side-auth-btns .btn.solid.sm {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}
.side-auth-btns .btn.solid.sm:hover {
  background: var(--navy2);
}
/* Main Content Column with Ruled Cream Notebook Paper Background */
.app-main {
  min-width: 0;
  width: 100%;
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, rgba(38, 78, 148, 0.13) 1px, transparent 1px);
  background-size: 100% 30px;
}

/* Interactive App Workspace */
.app-workspace {
  padding: 1.25rem 0 3.5rem;
  min-height: calc(100vh - 120px);
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, rgba(38, 78, 148, 0.13) 1px, transparent 1px);
  background-size: 100% 30px;
}
.workspace-container {
  width: min(1140px, 100% - 2.2rem);
  margin-inline: auto;
}

/* ============================================================================
   MASTER DASHBOARD CARD: MENYATU, BERSIH & ESTETIS
   ============================================================================ */
.dash-unified-card {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.dash-unified-card:hover {
  box-shadow: 0 8px 24px -2px rgba(21, 35, 66, 0.09), 0 3px 8px -1px rgba(21, 35, 66, 0.04);
}

.dash-unified-card .dash-banner {
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding: 0.95rem 1.25rem;
}

.dash-unified-card .assignments-strip,
.dash-unified-card #dashAssignmentsStrip {
  border: none;
  border-top: 1px solid var(--rule-light);
  border-left: 4.5px solid var(--red);
  background: #fff8f8;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding: 0.8rem 1.25rem;
}

.dash-unified-card .path-toolbar {
  border: none;
  border-top: 1px solid var(--rule-light);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding: 0.95rem 1.25rem;
  background: #fafaf8;
}

/* Compact Student Status Bar */
.dash-banner {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.dash-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f1f5f9;
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.dash-user h2 {
  font-size: 0.98rem;
  line-height: 1.25;
  margin: 0;
  color: var(--navy);
  font-weight: 700;
}
.dash-meta {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}
.xp-progress-wrap {
  flex: 1;
  max-width: 260px;
  min-width: 160px;
}
.xp-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.xp-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: var(--navy2);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.dash-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Assignments Banner on Dashboard: Rapi, Sejajar & Tidak Tabrakan */
.assignments-strip,
#dashAssignmentsStrip {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 0.75rem 1.15rem;
  margin-bottom: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.assignments-strip.hidden,
#dashAssignmentsStrip.hidden {
  display: none !important;
}
.assignments-strip .assignment-info,
#dashAssignmentsStrip .assignment-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.assignments-strip strong,
#dashAssignmentsStrip strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.assignments-strip .assignment-meta,
#dashAssignmentsStrip .assignment-meta {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}
.assignments-strip #btnDoAssignment,
#dashAssignmentsStrip #btnDoAssignment {
  flex-shrink: 0;
  white-space: nowrap;
}


/* Path Toolbar: Level & Topik Ditampilkan Sangat Jelas */
.path-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.path-title-area {
  display: flex;
  flex-direction: column;
}
.path-level-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #eef2f6;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}
.path-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.path-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  font-size: 1.05rem;
  font-weight: 900;
  background: var(--navy);
  color: #ffffff;
  border-radius: 8px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(21, 35, 66, 0.18);
}
.path-title-area h2 {
  font-size: 1.22rem;
  line-height: 1.25;
  margin: 0 0 0.15rem 0;
  color: var(--navy);
  font-weight: 800;
}
.path-subtitle {
  display: block;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}
.path-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.mobile-only-pills {
  display: none;
  margin-bottom: 0.85rem;
}
.level-pills {
  gap: 0.45rem;
  flex-wrap: wrap;
}
.lvl-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--navy);
  font: 700 0.8rem var(--sans);
  cursor: pointer;
}
.lvl-pill .dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--navy));
}
.lvl-pill.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--paper);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
  cursor: pointer;
  user-select: none;
}
.toggle-label input {
  accent-color: var(--navy);
}

/* ============================================================================
   COLLAPSIBLE UNITS (Unit-Unit Bisa Digulung) & TOPIC CARDS: COMPACT & ELEGAN
   ============================================================================ */
.unit-block {
  margin-bottom: 1.15rem;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.unit-block:hover {
  box-shadow: var(--shadow-md);
}
.unit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  color: var(--navy);
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s ease;
}
.unit-header:hover {
  background: #f8fafc;
}
.unit-block.is-collapsed .unit-header {
  border-bottom-color: transparent;
}
.unit-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.unit-chevron {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease;
  user-select: none;
}
.unit-block.is-collapsed .unit-chevron {
  transform: rotate(-90deg);
}
.unit-header h3 {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  margin: 0;
}
.unit-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.unit-prog-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: #f1f5f9;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
}
.unit-prog-pill.all-done {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.unit-body {
  padding: 1.1rem;
  background-color: #F6F1E6;
  background-image: linear-gradient(to bottom, rgba(38, 78, 148, 0.11) 1px, transparent 1px);
  background-size: 100% 30px;
}
.unit-block.is-collapsed .unit-body {
  display: none;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 0.85rem;
}
.topic-card {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 2px 8px -1px rgba(21, 35, 66, 0.05), 0 1px 3px -1px rgba(21, 35, 66, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.topic-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px -2px rgba(21, 35, 66, 0.09), 0 3px 6px -1px rgba(21, 35, 66, 0.04);
  transform: translateY(-2px);
}
.topic-card.locked {
  opacity: 0.65;
  background: #f8fafc;
  box-shadow: none;
}
.topic-card.boss-card {
  background: #fafaf9;
  border-color: #d1d5db;
  border-left: 4px solid var(--navy2);
  box-shadow: 0 3px 10px -1px rgba(21, 35, 66, 0.07);
}
.topic-card.boss-card:hover {
  box-shadow: 0 10px 24px -2px rgba(21, 35, 66, 0.12);
  transform: translateY(-2px);
}
.tc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.tc-code {
  background: #f1f5f9;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.02em;
}
.boss-card .tc-code {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.tc-stars {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  margin-left: auto;
}
.tc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.32;
}
.tc-sub {
  font-size: 0.79rem;
  color: var(--muted);
  margin: 0.15rem 0 0.5rem;
  line-height: 1.35;
}
.tc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.btn.sm {
  padding: 0.36rem 0.75rem;
  font-size: 0.78rem;
  min-height: 33px;
  border-radius: 7px;
  border: 1px solid var(--rule);
  font-weight: 700;
}
.btn.solid,
.tc-actions .btn.solid,
#btnDoAssignment {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(200, 16, 46, 0.2);
}
.btn.solid:hover,
.tc-actions .btn.solid:hover,
#btnDoAssignment:hover {
  background: var(--red2);
  border-color: var(--red2);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Tombol Mulai Belajar: Berubah Biru Saat Disorot (Hover) & Diklik (Active) */
.btn.js-go-path:hover,
.btn.solid.js-go-path:hover {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(21, 35, 66, 0.25) !important;
  transform: translateY(-2px);
}
.btn.js-go-path:active,
.btn.solid.js-go-path:active {
  background: var(--navy2) !important;
  border-color: var(--navy2) !important;
  color: #ffffff !important;
  transform: translateY(1px) !important;
  box-shadow: 0 2px 6px rgba(21, 35, 66, 0.2) !important;
}

.btn.ghost {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--navy);
}
.btn.ghost:hover {
  background: #f1f5f9;
  color: var(--navy);
}

/* Game Modes Arena Grid */
.arena-controls {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.select-input {
  font: 700 0.92rem var(--sans);
  color: var(--navy);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  min-height: 42px;
  transition: border-color 0.15s;
}
.select-input:focus {
  border-color: var(--navy);
}
.arena-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}
.arena-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.arena-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.arena-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.arena-card h3 {
  font-size: 1.2rem;
  color: var(--navy);
}
.arena-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.35rem 0 0.8rem;
}
.arena-card q {
  display: block;
  font: italic 400 0.92rem var(--serif);
  background: var(--paper);
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--red);
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* ============================================================================
   GAME RUNNER SCREEN (Layar Permainan Utama)
   ============================================================================ */
.runner-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.runner-card {
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 22px;
  box-shadow: 10px 10px 0 var(--navy);
  overflow: hidden;
}
.runner-top {
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.runner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
}
.runner-progress-bar {
  height: 8px;
  background: #1d3268;
  width: 100%;
}
.runner-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.25s ease;
}

/* Boss Battle Header Bar */
.boss-arena-bar {
  background: linear-gradient(90deg, #231123, #4a1228);
  color: #fff;
  padding: 1rem 1.4rem;
  border-bottom: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.boss-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.boss-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 1.9rem;
}
.boss-hp-wrap {
  flex: 1;
  max-width: 280px;
}
.boss-hp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.boss-hp-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  overflow: hidden;
}
.boss-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4b6e, var(--gold));
  transition: width 0.3s ease;
}

.runner-body {
  padding: 1.8rem 1.6rem 1.5rem;
}
.runner-topic-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
  background: var(--badbg);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}
.runner-prompt {
  font: 600 clamp(1.35rem, 3vw, 1.75rem)/1.4 var(--serif);
  color: var(--ink);
  margin-bottom: 0.65rem;
}
.runner-prompt-id {
  font: italic 400 1.02rem var(--serif);
  color: var(--muted);
  margin-bottom: 1.2rem;
}

/* Fill the Gap Input */
.gap-input-wrap {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1.1rem 0;
}
.gap-input {
  flex: 1;
  min-width: 210px;
  font: 700 1.15rem var(--sans);
  padding: 0.8rem 1rem;
  border: 2px solid var(--navy);
  border-radius: 12px;
  background: var(--paper);
  color: var(--navy);
}
.gap-input:focus {
  outline: 3px solid var(--gold);
  background: #fff;
}

/* Queue Up! (Word Order Sentence Builder) */
.wo-answer-box {
  min-height: 64px;
  background: var(--paper);
  border: 2px dashed var(--navy2);
  border-radius: 14px;
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.wo-placeholder {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}
.wo-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}
.wo-tile {
  font: 700 1rem var(--sans);
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
  box-shadow: 0 3px 0 var(--navy);
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s, opacity 0.15s;
}
.wo-tile:active {
  transform: translateY(2px);
}
.wo-tile.used {
  opacity: 0.3;
  pointer-events: none;
  box-shadow: none;
}
.wo-tile.in-answer {
  background: var(--navy);
  color: #fff;
}

/* Spot the Slip (Error Hunter) */
.eh-sentence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  background: var(--paper);
  border-radius: 14px;
  border: 1px solid var(--rule);
}
.eh-word {
  font: 600 1.3rem var(--serif);
  background: #fff;
  border: 2px solid var(--rule);
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}
.eh-word:hover:not(:disabled) {
  border-color: var(--red);
  background: var(--badbg);
}
.eh-word.selected-slip {
  background: var(--badbg);
  border-color: var(--red);
  color: var(--red);
  text-decoration: underline wavy var(--red);
}
.eh-word.wrong-token {
  animation: shake 0.3s;
}
.eh-step2 {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
}
.eh-step2-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.65rem;
}

/* Post Box Sort (Categorize) */
.cat-item-stage {
  text-align: center;
  padding: 1rem;
  background: var(--paper);
  border-radius: 14px;
  margin-bottom: 1rem;
}
.cat-current-pill {
  display: inline-block;
  font: 800 1.35rem var(--sans);
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
  padding: 0.6rem 1.4rem;
  border-radius: 12px;
  margin: 0.4rem 0;
}
.cat-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.cat-box-btn {
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 14px;
  padding: 1rem;
  font: 800 1.02rem var(--sans);
  color: var(--navy);
  cursor: pointer;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s;
}
.cat-box-btn:hover:not(:disabled) {
  background: var(--navy);
  color: #fff;
}

/* Feedback Box in Runner */
.runner-fb {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: var(--paper);
  border: 2px solid var(--rule);
  font-size: 0.95rem;
}
.runner-fb.ok {
  background: var(--okbg);
  border-color: var(--ok);
  color: #0e5332;
}
.runner-fb.bad {
  background: var(--badbg);
  border-color: var(--red);
  color: #7d091c;
}
.runner-fb.almost {
  background: #fff8e1;
  border-color: var(--gold);
  color: #6b4c00;
}
.runner-fb-title {
  font-weight: 800;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.25rem;
}
.runner-tip {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}
.runner-foot {
  padding: 1rem 1.6rem;
  background: #fafbfe;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Modal / Drawer Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 48, 0.62);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  overflow-y: auto;
}
.modal-card {
  background: #fff;
  border: 2.5px solid var(--navy);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(16, 24, 48, 0.25);
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.65rem 1.75rem;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  background: var(--paper);
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.12s;
}
.modal-close:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.lesson-formula {
  background: var(--navy);
  color: var(--gold);
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0.9rem 0;
  line-height: 1.45;
}
.lesson-examples {
  list-style: none;
  padding: 0;
  margin: 0.95rem 0;
  display: grid;
  gap: 0.55rem;
}
.lesson-examples li {
  background: var(--paper);
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--navy2);
  border-radius: 8px;
}
.lesson-examples b {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.1rem;
}
.lesson-slip-box {
  background: var(--badbg);
  border: 1.5px solid #f5b6c0;
  border-left: 4px solid var(--red);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #7d091c;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.stage-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.stage-btn {
  background: #fff;
  border: 1.5px solid var(--navy);
  border-radius: 14px;
  padding: 0.95rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.stage-btn:hover {
  background: var(--navy);
  color: #fff;
}
.stage-btn b {
  display: block;
  font-size: 0.98rem;
}
.stage-btn span {
  font-size: 0.8rem;
  color: var(--muted);
}
.stage-btn:hover span {
  color: #dce5f8;
}

/* Badges & History in Progress Tab */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.badge-item {
  background: #fff;
  border: 2px solid var(--rule);
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  opacity: 0.5;
}
.badge-item.earned {
  opacity: 1;
  border-color: var(--navy);
  box-shadow: 4px 4px 0 var(--gold);
}
.badge-icon {
  font-size: 1.8rem;
}
.session-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.session-table th, .session-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.session-table th {
  background: var(--navy);
  color: #fff;
}

@media (max-width: 900px) {
  .dash-banner {
    grid-template-columns: 1fr;
  }
  .dash-actions {
    justify-content: flex-start;
  }
  .stage-picker {
    grid-template-columns: 1fr;
  }
  .nav-tabs {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* ============================================================================
   ADDITIONAL STYLES: ALL 17 MODES, SEARCH BAR, LEADERBOARD & GURU/ADMIN PANEL
   ============================================================================ */

.search-input {
  font: 600 0.88rem var(--sans);
  padding: 0.45rem 0.95rem;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  min-width: 220px;
}
.search-input:focus {
  outline: none;
  border-color: var(--navy);
}

/* Tea Time Story (Cloze Dropdown) */
.cloze-passage {
  font: 500 1.25rem/1.85 var(--serif);
  background: var(--paper);
  padding: 1.35rem 1.5rem;
  border: 2px solid var(--rule);
  border-left: 5px solid var(--navy);
  border-radius: 14px;
  margin: 1rem 0 1.25rem;
}
.cloze-select {
  font: 700 1.02rem var(--sans);
  color: var(--navy);
  background: #fff;
  border: 2px solid var(--red);
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
  margin: 0 0.2rem;
  cursor: pointer;
}
.cloze-select.ok {
  border-color: var(--ok);
  background: var(--okbg);
  color: var(--ok);
}
.cloze-select.bad {
  border-color: var(--red);
  background: var(--badbg);
  color: var(--red);
}

/* Rewrite It (Transformer) */
.transform-source {
  background: var(--paper);
  border-left: 4px solid var(--red);
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  font: 600 1.3rem var(--serif);
  color: var(--navy);
  margin: 0.8rem 0 1rem;
}

/* Twin Tickets (Match Pairs) */
.mp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.mp-col {
  display: grid;
  gap: 0.65rem;
}
.mp-card {
  font: 700 1rem var(--sans);
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  min-height: 52px;
}
.mp-card.selected {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(242, 182, 50, 0.45);
}
.mp-card.matched {
  background: var(--okbg);
  border-color: var(--ok);
  color: var(--ok);
  pointer-events: none;
}

/* Verb Forms Rush (V1 - V2 - V3) */
.vf-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 1rem 0;
}
.vf-box {
  background: var(--paper);
  border: 2px solid var(--rule);
  border-radius: 14px;
  padding: 0.9rem;
  text-align: center;
}
.vf-box small {
  display: block;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.vf-box strong {
  font-size: 1.4rem;
  color: var(--navy);
}
.vf-input {
  width: 100%;
  font: 700 1.1rem var(--sans);
  text-align: center;
  padding: 0.55rem;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: #fff;
}

/* Listen & Choose Speaker Bar */
.tts-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #eef3fb;
  border: 2px solid var(--navy2);
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  margin-bottom: 1rem;
}
.tts-btn {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: 700 0.92rem var(--sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tts-btn:hover {
  background: var(--red);
}

/* Live Quiz / Duel Kelas Scoreboard */
.duel-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(90deg, #12224a, #1e3a7b);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-bottom: 2px solid var(--gold);
}
.duel-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
}
.duel-team.active-turn {
  border-color: var(--gold);
  background: rgba(242, 182, 50, 0.22);
}


@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .app-shell.sidebar-hidden .app-sidebar {
    display: flex;
  }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 52px;
    width: 260px;
    height: calc(100vh - 52px);
    box-shadow: 8px 0 24px rgba(16, 24, 48, 0.18);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .app-sidebar.open,
  .app-sidebar.is-open {
    transform: translateX(0);
  }
  .mobile-only-pills {
    display: flex;
  }
}

@media (max-width: 700px) {
  .vf-board, .mp-grid {
    grid-template-columns: 1fr;
  }
  .hide-mobile {
    display: none !important;
  }
}

/* ============================================================================
   2-SESSION SKILL PROGRESSION & AUTH MODAL STYLES
   ============================================================================ */
.tc-sessions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.tc-sess-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.38rem 0.55rem;
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  cursor: pointer;
  transition: all 0.12s;
}
.tc-sess-pill:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.tc-sess-pill.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.tc-sess-pill.locked-pill {
  opacity: 0.6;
  border-style: dashed;
}
.tc-sess-pill .sess-tag {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.74rem;
}
.tc-sess-pill.done .sess-tag {
  color: #166534;
}
.tc-sess-pill .sess-state {
  font-size: 0.7rem;
  color: var(--muted);
}
.tc-sess-pill.done .sess-state {
  color: #15803d;
  font-weight: 700;
}

.tc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
}
.tc-status-badge.passed {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.tc-status-badge.partial {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}
.tc-status-badge.none {
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid #e2e8f0;
}

/* 2-Session Stage Picker inside Topic Modal */
.stage-picker.two-sessions {
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stage-btn.session-passed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.stage-btn.session-locked {
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
  color: var(--muted);
  opacity: 0.7;
}

/* Auth Modal: Elegan, Kalem, Minimalis */
.auth-status-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.auth-status-card b {
  display: block;
  font-size: 0.86rem;
  color: var(--navy);
}
.auth-status-card span {
  font-size: 0.76rem;
  color: var(--muted);
}
/* ============================================================================
   MODAL AKUN / PROFIL: BIRU CERAH (BRIGHT BLUE), SIMPEL, BERSIH, & RAPI
   ============================================================================ */
#profileModal .modal-card {
  background: linear-gradient(155deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 30, 75, 0.45);
  color: #ffffff;
  width: min(540px, 100%);
  padding: 1.55rem 1.75rem;
}
#profileModal .modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}
#profileModal .modal-close:hover {
  background: #ffffff;
  color: #1e40af;
}
#profileModal p.modal-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  margin: 0.2rem 0 0.85rem;
}

.auth-guest-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.85rem;
  color: #ffffff;
  font-size: 0.8rem;
}

.auth-simple-tabs {
  display: flex;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.22);
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 0.95rem;
}
.auth-simple-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: 700 0.84rem var(--sans);
  padding: 0.52rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.auth-simple-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.auth-simple-tab-btn.active {
  background: #ffffff;
  color: #1e40af;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

#profileModal .auth-field {
  display: grid;
  gap: 0.22rem;
}
#profileModal .auth-field label {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}
#profileModal .auth-field input {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
  width: 100%;
}
#profileModal .auth-field input:focus {
  border-color: #ffd166;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.35);
}

.pass-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-field-wrap input {
  width: 100%;
  padding-right: 4.8rem !important;
}
#profileModal .pass-toggle-btn {
  position: absolute;
  right: 0.4rem;
  background: #e2e8f0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font: 700 0.72rem var(--sans);
  color: var(--navy);
  padding: 0.25rem 0.55rem;
}

.auth-avatar-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.48rem;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.25rem;
  transition: all 0.15s ease;
}
.auth-avatar-pill input {
  display: none;
}
.auth-avatar-pill:hover,
.auth-avatar-pill.selected {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.btn-auth-submit {
  background: var(--red);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px;
  padding: 0.65rem 1rem;
  font: 800 0.92rem var(--sans);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  margin-top: 0.35rem;
}
.btn-auth-submit:hover {
  background: var(--red2);
  transform: translateY(-1px);
}

.auth-link-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font: 600 0.78rem var(--sans);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-link-btn:hover {
  color: #ffffff;
}

.auth-modal-footer-nav {
  margin-top: 0.95rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.auth-modal-footer-nav button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font: 700 0.78rem var(--sans);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.auth-modal-footer-nav button:hover {
  color: #ffffff;
}

.auth-logged-card {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}
.btn-auth-sub-action {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  font: 700 0.78rem var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-auth-sub-action:hover {
  background: #ffffff;
  color: #1e40af;
}
.btn-auth-sub-action.danger {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}
.btn-auth-sub-action.danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.auth-alert {
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}
.auth-alert.ok {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #34d399;
  color: #ffffff;
}
.auth-alert.bad {
  background: rgba(239, 68, 68, 0.28);
  border: 1px solid #f87171;
  color: #ffffff;
}

#profileModal .passport-box {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  padding: 0.85rem 1rem;
  color: #ffffff;
}
#profileModal .passport-box textarea {
  width: 100%;
  min-height: 52px;
  font: 600 0.76rem monospace;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: #ffffff;
  color: #0f172a;
  resize: vertical;
}


