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

/* ==========================================================
   VARIABLES — Be Tech color palette (from learniaglobal.com)
   ========================================================== */
:root {
  /* Brand colors */
  --cyan:        #00C8D7;
  --cyan-dark:   #009BAA;
  --cyan-light:  #33D6E3;
  --cyan-pale:   #E6F8FA;
  --green:       #7BC144;
  --gray-text:   #5A6A7A;

  /* Neutral */
  --white:       #FFFFFF;
  --bg:          #F7FAFB;
  --border:      #DDE5EC;
  --border-light:#EEF3F6;
  --text:        #1C2B3A;
  --text-sub:    #4A5E6E;
  --text-muted:  #7A90A0;

  /* Status */
  --success:     #38A169;
  --error:       #E53E3E;
  --warning:     #D69E2E;

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(0,0,0,0.07);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
  --shadow:      0 4px 20px rgba(0,0,0,0.09);
  --shadow-cyan: 0 4px 18px rgba(0,200,215,0.28);

  /* Radii */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-xl:  24px;
}

/* ==========================================================
   RESET
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a  { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 4px; }

/* ==========================================================
   PAGE UTILITY
   ========================================================== */
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
}

/* ==========================================================
   LOGO / BRAND
   ========================================================== */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-logo .logo-betech {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.brand-logo .logo-betech em {
  font-style: normal;
  color: var(--cyan);
}
.brand-logo .logo-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 2px;
}
.brand-logo .logo-arrows span {
  display: block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
}
.brand-logo .logo-arrows span:nth-child(1) { background: var(--cyan); }
.brand-logo .logo-arrows span:nth-child(2) { background: var(--green); width: 7px; }

.brand-sub {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ==========================================================
   AUTH LAYOUT — split screen
   ========================================================== */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Left panel */
.auth-panel-left {
  background: linear-gradient(150deg, var(--cyan-dark) 0%, var(--cyan) 55%, var(--cyan-light) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  border: 60px solid rgba(255,255,255,0.08);
  top: -120px; right: -80px;
}
.auth-panel-left::after {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 50px solid rgba(255,255,255,0.06);
  bottom: -80px; left: -60px;
}

.auth-panel-left .panel-logo { margin-bottom: 52px; }
.auth-panel-left .panel-logo .brand-logo .logo-betech { color: white; font-size: 30px; }
.auth-panel-left .panel-logo .brand-logo .logo-betech em { color: rgba(255,255,255,0.8); }
.auth-panel-left .panel-logo .brand-sub { color: rgba(255,255,255,0.65); }

.panel-taglines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
}
.panel-taglines p {
  font-size: 22px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.panel-taglines p:nth-child(2) { opacity: 0.82; font-size: 20px; }
.panel-taglines p:nth-child(3) { opacity: 0.65; font-size: 18px; }

.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  position: relative;
  z-index: 1;
}
.panel-badge .dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Right panel */
.auth-panel-right {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  overflow-y: auto;
}

.auth-form-box {
  width: 100%;
  max-width: 400px;
}
.auth-form-box h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-form-box .form-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ==========================================================
   FORM CONTROLS
   ========================================================== */
.form-group { margin-bottom: 16px; }

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.form-group label .req { color: var(--error); margin-left: 1px; }

.field {
  position: relative;
  display: flex;
  align-items: center;
}
.field-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s;
  line-height: 1;
}
.field:focus-within .field-icon { opacity: 0.75; }

.field input,
.field select {
  width: 100%;
  padding: 11px 13px 11px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237A90A0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
  padding-right: 34px;
  cursor: pointer;
}
.field select option { color: var(--text); background: white; }

.field input::placeholder { color: #B8C8D0; }

.field input:focus,
.field select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,200,215,0.12);
}

/* Password toggle */
.pw-btn {
  position: absolute;
  right: 11px;
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  padding: 4px;
  transition: opacity 0.2s;
  line-height: 1;
}
.pw-btn:hover { opacity: 0.75; }
.field input.has-pw-btn { padding-right: 38px; }

/* ==========================================================
   PASSWORD STRENGTH
   ========================================================== */
.pw-strength { margin-top: 6px; display: none; }
.pw-strength.show { display: block; }
.pw-strength-track {
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: all 0.3s;
}
.pw-strength-label { font-size: 11px; font-weight: 600; }

.pw-weak   .pw-strength-fill { width: 30%; background: var(--error); }
.pw-fair   .pw-strength-fill { width: 65%; background: var(--warning); }
.pw-strong .pw-strength-fill { width: 100%; background: var(--success); }
.pw-weak   .pw-strength-label { color: var(--error); }
.pw-fair   .pw-strength-label { color: var(--warning); }
.pw-strong .pw-strength-label { color: var(--success); }

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.btn:active { transform: scale(0.98); }

.btn-cyan {
  background: var(--cyan);
  color: white;
  box-shadow: var(--shadow-cyan);
  width: 100%;
}
.btn-cyan:hover {
  background: var(--cyan-dark);
  box-shadow: 0 6px 22px rgba(0,200,215,0.38);
  transform: translateY(-1px);
}
.btn-cyan:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: white;
  color: var(--text-sub);
  border: 1.5px solid var(--border);
  width: 100%;
}
.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan-dark);
  background: var(--cyan-pale);
}

/* Spinner */
.btn .spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
}
.btn.loading .spinner  { display: block; }
.btn.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================
   ALERTS / FEEDBACK
   ========================================================== */
.alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1.5px solid;
}
.alert.show { display: flex; }

.alert-error   { background: #FFF5F5; border-color: #FEB2B2; color: #C53030; }
.alert-success { background: #F0FFF4; border-color: #9AE6B4; color: #276749; }
.alert-info    { background: var(--cyan-pale); border-color: rgba(0,200,215,0.3); color: var(--cyan-dark); }

/* ==========================================================
   DIVIDER
   ========================================================== */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 20px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ==========================================================
   AUTH FOOTER LINK
   ========================================================== */
.auth-footer-link {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-footer-link a {
  color: var(--cyan-dark);
  font-weight: 600;
  transition: color 0.2s;
}
.auth-footer-link a:hover { color: var(--cyan); }

/* ==========================================================
   LOADING SCREEN
   ========================================================== */
.loading-screen {
  position: fixed; inset: 0;
  background: white;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.3s;
}
.loading-screen.hide { opacity: 0; pointer-events: none; }

.ls-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ls-logo {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.ls-logo em { font-style: normal; color: var(--cyan); }
.ls-sub {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ls-bar {
  width: 100px; height: 3px;
  background: var(--border-light);
  border-radius: 2px; overflow: hidden;
}
.ls-bar-fill {
  height: 100%; background: var(--cyan);
  border-radius: 2px;
  animation: lsBar 1.1s ease-in-out infinite;
}
@keyframes lsBar {
  0%   { width: 0%; margin-left: 0; }
  50%  { width: 100%; margin-left: 0; }
  100% { width: 0%; margin-left: 100%; }
}
.ls-text { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ==========================================================
   DASHBOARD  LAYOUT
   ========================================================== */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 252px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  height: 100vh;
  z-index: 200;
  transition: transform 0.28s ease;
}

.sidebar-head {
  padding: 20px 18px 16px;
  border-bottom: 1.5px solid var(--border-light);
}

.sidebar-nav   { flex: 1; overflow-y: auto; padding: 16px 10px; }
.sidebar-foot  { padding: 12px 10px; border-top: 1.5px solid var(--border-light); }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin: 16px 0 6px;
}
.nav-section-label:first-child { margin-top: 0; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: none;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  margin-bottom: 2px;
}
.nav-btn:hover {
  background: var(--cyan-pale);
  color: var(--cyan-dark);
}
.nav-btn.active {
  background: var(--cyan-pale);
  color: var(--cyan-dark);
  font-weight: 600;
}
.nav-btn.active .nav-icon-box {
  background: var(--cyan);
  color: white;
}

.nav-icon-box {
  width: 28px; height: 28px;
  background: var(--bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.18s;
}

.nav-chip {
  margin-left: auto;
  background: var(--cyan);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

/* User card */
.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  background: var(--bg);
  border-radius: var(--r);
  border: 1.5px solid var(--border-light);
}
.user-av {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--cyan);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-year { font-size: 11px; color: var(--cyan-dark); font-weight: 500; }
.logout-btn {
  background: none; border: none;
  color: var(--text-muted); font-size: 15px;
  cursor: pointer; padding: 4px;
  border-radius: var(--r-sm);
  transition: all 0.18s;
  display: flex; align-items: center;
}
.logout-btn:hover { color: var(--error); background: #FFF5F5; }

/* --- Main --- */
.main-wrap {
  flex: 1;
  margin-left: 252px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* Topbar */
.topbar {
  height: 60px;
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.topbar-title  { font-size: 17px; font-weight: 700; color: var(--text); }
.topbar-sub    { font-size: 12px; color: var(--text-muted); }

.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cyan-pale);
  border: 1.5px solid rgba(0,200,215,0.25);
  border-radius: 50px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan-dark);
}
.year-pill .dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

.hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-size: 15px;
  padding: 6px 9px;
  cursor: pointer;
  transition: all 0.2s;
}
.hamburger:hover { border-color: var(--cyan); color: var(--cyan-dark); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Content area */
.content { padding: 24px 28px; }

/* ==========================================================
   WELCOME BANNER
   ========================================================== */
.welcome-banner {
  background: linear-gradient(130deg, var(--cyan-dark) 0%, var(--cyan) 60%, var(--cyan-light) 100%);
  border-radius: var(--r-xl);
  padding: 26px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  right: -30px; top: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.wb-text h3 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.wb-text p  { font-size: 13px; opacity: 0.88; line-height: 1.55; max-width: 340px; }
.wb-icon    { font-size: 44px; line-height: 1; flex-shrink: 0; position: relative; z-index: 1; }

/* ==========================================================
   STATS ROW
   ========================================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.stat-ic {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
}
.ic-cyan   { background: var(--cyan-pale); }
.ic-green  { background: #F0FFF4; }
.ic-yellow { background: #FFFBEB; }
.ic-blue   { background: #EBF8FF; }

.stat-val   { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 2px; }
.stat-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

/* ==========================================================
   SECTION HEADER
   ========================================================== */
.sec-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sec-title { font-size: 16px; font-weight: 700; color: var(--text); }
.sec-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================
   GUIDE CARDS
   ========================================================== */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.guide-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s;
}
.guide-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.guide-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.guide-num {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
  color: white; flex-shrink: 0;
}
.gn-1 { background: var(--cyan); }
.gn-2 { background: var(--green); }
.gn-3 { background: #F6AD55; }
.gn-4 { background: #FC8181; }

.guide-tag {
  display: inline-flex;
  align-items: center;
  background: var(--cyan-pale);
  color: var(--cyan-dark);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1.5px solid rgba(0,200,215,0.2);
  letter-spacing: 0.3px;
}
.guide-title {
  font-size: 14.5px; font-weight: 700;
  color: var(--text); line-height: 1.35;
}
.guide-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.65;
}
.guide-foot {
  padding-top: 12px; margin-top: auto;
  border-top: 1.5px solid var(--border-light);
}
.guide-btn-group {
  display: flex; gap: 8px;
}
.dl-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px;
  background: var(--cyan);
  color: white; border: none; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,200,215,0.22);
  transition: all 0.2s;
  font-family: inherit;
}
.dl-btn:hover {
  background: var(--cyan-dark);
  box-shadow: 0 4px 14px rgba(0,200,215,0.32);
  transform: translateY(-1px);
}
.dl-btn:disabled {
  opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none;
}
.view-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px;
  background: transparent;
  color: var(--cyan-dark); border: 1.5px solid var(--cyan);
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.view-btn:hover {
  background: var(--cyan-pale);
  transform: translateY(-1px);
}

/* ==========================================================
   PDF VIEWER MODAL
   ========================================================== */
.pdf-modal {
  position: fixed; inset: 0;
  background: rgba(10,20,40,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.pdf-modal.open {
  opacity: 1; pointer-events: all;
}
.pdf-modal-inner {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: min(92vw, 960px);
  height: min(90vh, 780px);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s;
}
.pdf-modal.open .pdf-modal-inner {
  transform: translateY(0) scale(1);
}
.pdf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--border-light);
  flex-shrink: 0;
}
.pdf-modal-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%;
}
.pdf-modal-actions { display: flex; align-items: center; gap: 8px; }
.pdf-dl-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: var(--cyan); color: white;
  border: none; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.pdf-dl-btn:hover { background: var(--cyan-dark); }
.pdf-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--border);
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
.pdf-close-btn:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.pdf-frame-wrap {
  flex: 1; overflow: hidden;
}
.pdf-frame-wrap iframe {
  width: 100%; height: 100%; border: none; display: block;
}

/* ==========================================================
   PROFILE CARD
   ========================================================== */
.profile-wrap { max-width: 440px; }
.profile-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}
.profile-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1.5px solid var(--border-light);
}
.profile-av-lg {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--cyan); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.profile-name  { font-size: 17px; font-weight: 700; color: var(--text); }
.profile-email { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.profile-field { margin-bottom: 14px; }
.pf-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px;
}
.pf-val { font-size: 14px; font-weight: 600; color: var(--text); }

/* ==========================================================
   TOAST NOTIFICATIONS
   ========================================================== */
.toast-wrap {
  position: fixed; top: 18px; right: 18px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 11px 16px;
  display: flex; align-items: center; gap: 9px;
  min-width: 250px; max-width: 340px;
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500; color: var(--text);
  animation: toastIn 0.28s ease;
}
.toast-ok  { border-color: #9AE6B4; background: #F0FFF4; }
.toast-err { border-color: #FEB2B2; background: #FFF5F5; }

@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(110%); opacity: 0; } }
.toast.removing { animation: toastOut 0.28s ease forwards; }

/* ==========================================================
   MOBILE OVERLAY
   ========================================================== */
.mob-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,43,58,0.38);
  z-index: 199;
  backdrop-filter: blur(3px);
}
.mob-overlay.show { display: block; }

/* ==========================================================
   BOTTOM NAV (mobile only — hidden on desktop)
   ========================================================== */
.bottom-nav {
  display: none;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1040px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 32px; }
}

@media (max-width: 860px) {
  /* Sidebar oculta — se abre con hamburger en tablet */
  .sidebar      { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrap    { margin-left: 0; }
  .hamburger    { display: flex; }
  .form-row     { grid-template-columns: 1fr; }
  .stats-row    { grid-template-columns: repeat(3, 1fr); }
  .welcome-banner { flex-direction: column; text-align: center; gap: 10px; padding: 20px 22px; }
  .wb-text h3   { font-size: 16px; }
  .wb-text p    { font-size: 12px; }
  .wb-icon      { font-size: 32px; }
  .guides-grid  { grid-template-columns: 1fr; }
  .content      { padding: 16px 14px; }
  .topbar       { padding: 0 14px; height: 54px; }
  .topbar-title { font-size: 15px; }
}

/* ---- Mobile (<= 600px): bottom nav, full-screen feel ---- */
@media (max-width: 600px) {
  /* Ocultar hamburger — la navegación va en el bottom nav */
  .hamburger    { display: none; }

  /* Main tiene padding-bottom para no quedar tapado por bottom nav */
  .main-wrap    { padding-bottom: 68px; }

  /* Bottom nav bar */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--white);
    border-top: 1.5px solid var(--border);
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
  }
  .bnav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    transition: color 0.18s;
    -webkit-tap-highlight-color: transparent;
    padding: 6px 0;
  }
  .bnav-btn.active {
    color: var(--cyan-dark);
  }
  .bnav-icon { font-size: 20px; line-height: 1; }
  .bnav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
  .bnav-btn.active .bnav-label { font-weight: 700; }

  /* Stats en columna simple */
  .stats-row    { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card    { padding: 12px 10px; }
  .stat-val     { font-size: 18px; }
  .stat-ic      { width: 28px; height: 28px; font-size: 13px; margin-bottom: 6px; }
  .stat-label   { font-size: 10px; }

  /* Guide cards más compactas */
  .guide-card   { padding: 16px; }
  .guide-num    { width: 38px; height: 38px; font-size: 16px; border-radius: 9px; }
  .guide-title  { font-size: 13.5px; }
  .guide-desc   { font-size: 11.5px; }
  .guide-btn-group { flex-direction: row; gap: 6px; }
  .view-btn, .dl-btn { flex: 1; justify-content: center; padding: 9px 8px; font-size: 12px; }

  /* Topbar compacto */
  .topbar       { padding: 0 14px; height: 52px; }
  .topbar-title { font-size: 14px; }
  .topbar-sub   { font-size: 11px; }
  .year-pill    { padding: 4px 10px; font-size: 11px; }

  /* PDF modal como bottom sheet */
  .pdf-modal    { align-items: flex-end; }
  .pdf-modal-inner {
    width: 100%;
    height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    transform: translateY(100%);
  }
  .pdf-modal.open .pdf-modal-inner {
    transform: translateY(0);
  }
  .pdf-modal-title { font-size: 13px; max-width: 55%; }

  /* Welcome banner */
  .content      { padding: 14px 12px; }

  /* Profile full width */
  .profile-wrap { max-width: 100%; }

  /* Toasts desde abajo en mobile */
  .toast-wrap   { top: auto; bottom: 74px; right: 12px; left: 12px; align-items: stretch; }
  .toast        { min-width: unset; max-width: 100%; }
}

@media (max-width: 400px) {
  .stats-row    { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .auth-panel-right { padding: 24px 16px; }
  .guide-btn-group { flex-direction: column; }
  .view-btn, .dl-btn { width: 100%; justify-content: center; }
}

/* ==========================================================
   FOCUS
   ========================================================== */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }