/* ============================================================
   DESIGN TOKENS
   Palette: Deep Slate-Teal (trust/education) + Warm Gold (premium accent)
   Type: Fraunces (display/serif, warmth+credibility) + Inter (body/UI)
   ============================================================ */
:root {
  --ink:        #142524;   /* near-black teal-slate for text/dark surfaces */
  --teal:       #0F5A56;   /* primary brand teal */
  --teal-dark:  #0B403D;
  --teal-light: #E4F0EE;
  --gold:       #C9962B;   /* premium accent */
  --gold-light: #F5E6C4;
  --paper:      #FAF9F5;   /* soft background, used sparingly */
  --white:      #FFFFFF;
  --ink-soft:   #445452;
  --border:     #E4E7E1;
  --success-bg: #E4F4E8; --success-fg: #1E6B3A;
  --error-bg:   #FBE7E5;  --error-fg: #B3261E;
  --radius:     10px;
  --shadow:     0 2px 10px rgba(15, 90, 86, 0.08);
  --shadow-lg:  0 8px 30px rgba(15, 90, 86, 0.14);
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .logo, .stat-num {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===== SIGNATURE: hand-drawn underline accent ===== */
.underline-mark {
  position: relative;
  display: inline-block;
}
.underline-mark::after {
  content: '';
  position: absolute;
  left: -2px; right: -2px; bottom: -6px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M2 9 C 40 2, 80 11, 120 5 C 150 1, 175 9, 198 4' stroke='%23C9962B' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}

/* ===== PUBLIC SITE ===== */
.site-header {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: var(--white);
  padding: 26px 0;
  box-shadow: var(--shadow);
}
.site-header .logo { color: var(--white); font-size: 24px; }
.site-header .tagline { margin-top: 6px; opacity: .82; font-size: 14.5px; font-weight: 500; }

main.container { padding: 48px 24px 60px; min-height: 60vh; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--teal-dark) 55%, var(--teal) 100%);
  color: var(--white);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(201,150,43,.28) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(201,150,43,.16);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-title { font-size: 40px; line-height: 1.2; margin-bottom: 16px; color: var(--white); }
.hero-title .underline-mark::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M2 9 C 40 2, 80 11, 120 5 C 150 1, 175 9, 198 4' stroke='%23C9962B' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hero-sub { font-size: 16.5px; opacity: .88; max-width: 540px; margin-bottom: 26px; }
.hero-cta { font-size: 16px; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-num { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; color: var(--gold-light); }
.hero-stat-label { font-size: 12.5px; opacity: .78; margin-top: 2px; }

.section-title { margin-bottom: 24px; font-size: 24px; color: var(--teal-dark); text-align: center; }

/* ===== FEATURES ===== */
.features-section { margin: 56px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--white);
  padding: 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 30px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; color: var(--teal-dark); }
.feature-card p { font-size: 13.5px; color: var(--ink-soft); }

/* ===== STEPS ===== */
.steps-section { margin: 56px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.step-card { text-align: center; padding: 10px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 16px; margin-bottom: 6px; color: var(--teal-dark); }
.step-card p { font-size: 13.5px; color: var(--ink-soft); }

.profile-section {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 48px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
}
.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold-light);
  box-shadow: 0 0 0 3px var(--teal);
}
.profile-info h2 { font-size: 26px; margin: 6px 0 10px; color: var(--teal-dark); }
.profile-phone {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 8px; font-weight: 600; font-size: 15px;
  background: var(--teal-light); color: var(--teal-dark);
  padding: 6px 14px; border-radius: 30px;
}
.profile-phone a { color: var(--teal-dark); }
.profile-bio { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }

/* ===== MULTIPLE PROFILES / TEACHERS GRID ===== */
.profiles-section { margin: 48px 0; }
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}
.profile-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.profile-card .profile-photo {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-light);
  box-shadow: 0 0 0 2px var(--teal);
  margin: 0 auto 14px;
  display: block;
}
.profile-card h3 { font-family: 'Fraunces', serif; font-size: 18px; color: var(--teal-dark); margin-bottom: 8px; }
.profile-card .profile-phone { font-size: 13.5px; padding: 5px 12px; }
.profile-card .profile-bio { font-size: 13.5px; margin-top: 10px; text-align: left; }
.profile-phone {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 8px; font-weight: 600; font-size: 15px;
  background: var(--teal-light); color: var(--teal-dark);
  padding: 6px 14px; border-radius: 30px;
}
.profile-phone a { color: var(--teal-dark); }
.profile-bio { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }

.cities-section h2, .other-cities h2 { margin-bottom: 18px; font-size: 22px; color: var(--teal-dark); }

.city-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.city-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  padding: 16px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  transition: all .18s ease;
}
.city-box-icon { font-size: 16px; flex-shrink: 0; }
.city-box:hover {
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.city-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.city-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: left;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  transition: all .18s ease;
}
.city-list li a::before { content: '📍'; font-size: 13px; }
.city-list li a:hover {
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.breadcrumb { margin-bottom: 22px; font-size: 13.5px; color: var(--ink-soft); }

.page-heading {
  text-align: center;
  font-size: 34px;
  margin: 8px 0 32px;
  color: var(--teal-dark);
}

.page-content {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: 24px 0 36px;
  font-size: 15.5px;
}

.city-content {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: 24px 0;
  font-size: 15.5px;
}
.city-content br + br { content: ''; display: block; margin-top: 10px; }

.cta-box {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
  margin: 36px 0;
  box-shadow: var(--shadow-lg);
}
.cta-box p { font-size: 16px; margin-bottom: 6px; opacity: .92; }
.cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  padding: 13px 30px;
  border-radius: 30px;
  font-weight: 700;
  margin-top: 12px;
  font-size: 15.5px;
  box-shadow: 0 4px 14px rgba(201,150,43,.4);
  transition: transform .15s ease;
}
.cta-btn:hover { background: #d9a63a; text-decoration: none; transform: translateY(-2px); }

.other-cities { margin-top: 44px; }

.faq-section { margin: 36px 0; }
.faq-section h2 { margin-bottom: 18px; font-size: 22px; color: var(--teal-dark); }
.faq-item {
  background: var(--white);
  padding: 18px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  margin-bottom: 12px;
}
.faq-q { font-size: 15.5px; color: var(--teal-dark); margin-bottom: 6px; font-family: 'Fraunces', serif; font-weight: 600; }
.faq-a { font-size: 14.5px; color: var(--ink-soft); }

.site-footer {
  background: var(--ink);
  color: #C9D6D3;
  text-align: center;
  padding: 24px 0;
  font-size: 13.5px;
}

/* ===== LOGIN PAGE ===== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, var(--teal-dark), var(--ink));
  font-family: 'Inter', sans-serif;
}
.login-box {
  background: var(--white);
  padding: 40px 36px;
  border-radius: 14px;
  width: 340px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-box h2 { margin-bottom: 22px; text-align: center; color: var(--teal-dark); font-size: 24px; }
.login-box label { display: block; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.login-box input {
  width: 100%;
  padding: 11px 12px;
  margin-top: 6px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14.5px;
}
.login-box input:focus { border-color: var(--teal); outline: none; }
.login-box button {
  width: 100%;
  margin-top: 22px;
  padding: 13px;
  background: var(--teal);
  color: var(--white);
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.login-box button:hover { background: var(--teal-dark); }

/* ===== ADMIN PANEL ===== */
.admin-body { background: #F3F5F4; font-family: 'Inter', sans-serif; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px;
  background: var(--ink);
  color: #fff;
  padding: 24px 18px;
  flex-shrink: 0;
}
.admin-logo { font-size: 19px; margin-bottom: 28px; font-family: 'Fraunces', serif; color: var(--gold-light); }
.admin-sidebar nav a {
  display: block;
  color: #C9D6D3;
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s ease;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: var(--teal);
  color: #fff;
  text-decoration: none;
}
.admin-sidebar nav a.logout { margin-top: 22px; color: #E8918C; }

.admin-content { flex: 1; padding: 34px 44px; max-width: 900px; }
.admin-content h1 { margin-bottom: 6px; color: var(--teal-dark); font-size: 27px; }
.admin-content h2 { margin: 28px 0 14px; font-size: 18px; color: var(--teal-dark); }
.welcome { color: var(--ink-soft); margin-bottom: 22px; }
.hint { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 16px; }

.stat-grid { display: flex; gap: 20px; margin: 22px 0 32px; flex-wrap: wrap; }
.stat-card {
  background: var(--white);
  padding: 22px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  min-width: 150px;
}
.stat-num { font-size: 30px; font-weight: 700; color: var(--teal); }
.stat-label { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; text-transform: uppercase; letter-spacing: .04em; }

.admin-form {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 680px;
}
.admin-form label { display: block; font-weight: 600; font-size: 13.5px; margin: 15px 0 6px; color: var(--ink); }
.admin-form input[type=text], .admin-form input[type=password], .admin-form textarea, .admin-form input[type=file] {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--teal); outline: none; }
.admin-form textarea { resize: vertical; }
.admin-form button {
  margin-top: 22px;
  padding: 13px 28px;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.admin-form button:hover { background: var(--teal-dark); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: normal !important; }
.checkbox-label input { width: auto !important; }
.preview-img, .thumb { border-radius: 8px; margin-top: 10px; }
.preview-img { width: 100px; height: 100px; object-fit: cover; }
.thumb { width: 46px; height: 46px; object-fit: cover; }

.info-note {
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-top: 18px;
  border-left: 3px solid var(--teal);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.admin-table th { background: #F4F6F5; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; }
.admin-table tr:hover td { background: #FAFBFA; }
.admin-table .actions a { margin-right: 12px; font-size: 13px; font-weight: 600; }
.admin-table .actions .danger { color: var(--error-fg); }

.search-form { margin-bottom: 16px; display: flex; gap: 8px; }
.search-form input { padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 8px; width: 260px; }
.search-form button { padding: 9px 18px; background: var(--teal); color: #fff; border: 0; border-radius: 8px; cursor: pointer; font-weight: 600; }

.alert-success { background: var(--success-bg); color: var(--success-fg); padding: 13px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert-error { background: var(--error-bg); color: var(--error-fg); padding: 13px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }

/* ===== BULK ADD PROGRESS UI ===== */
.progress-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin-top: 22px;
  max-width: 680px;
}
.progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-head #progressText { font-weight: 600; font-size: 14px; color: var(--teal-dark); }
.progress-bar-outer { background: #EDF1EF; border-radius: 20px; height: 10px; overflow: hidden; }
.progress-bar-inner { background: linear-gradient(90deg, var(--teal), var(--gold)); height: 100%; width: 0%; transition: width .25s ease; }
.progress-log { list-style: none; margin-top: 16px; max-height: 260px; overflow-y: auto; }
.progress-log li { padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid #F1F3F1; }
.progress-log .log-ok { color: var(--success-fg); }
.progress-log .log-fail { color: var(--error-fg); }
.log-slug { color: var(--ink-soft); font-weight: 400; margin-left: 4px; }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid var(--teal-light);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-content { padding: 24px; }
  .profile-section { flex-direction: column; text-align: center; }
}