/* ===================================================================
   MAESTRO EDUPROG ARENA — THEME STYLESHEET
   Green/Blue palette, mobile-first, dark mode via [data-theme="dark"]
   =================================================================== */

:root {
  --primary: #0f766e;       /* teal-green */
  --primary-dark: #0b5c56;
  --secondary: #1d4ed8;      /* blue */
  --secondary-dark: #1739a8;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #182231;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #2a3646;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .2s ease, color .2s ease;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  transition: transform .1s ease, opacity .2s ease;
}
.btn:hover { opacity: 0.92; text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ---------- Cards / Forms ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--border);
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card .logo {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }

[data-theme="dark"] .alert-success { background: #14351f; color: #86efac; }
[data-theme="dark"] .alert-error   { background: #3a1717; color: #fca5a5; }
[data-theme="dark"] .alert-info    { background: #142943; color: #93c5fd; }

/* ---------- Top Navbar (public site) ---------- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.navbar .brand { font-weight: 800; font-size: 20px; color: var(--primary); }
.navbar .nav-links { display: flex; gap: 22px; align-items: center; }
.navbar .nav-links a { color: var(--text); font-weight: 500; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

/* ---------- Sidebar (dashboards) ---------- */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: var(--primary-dark);
  color: #fff;
  flex-shrink: 0;
  padding: 20px 0;
  transition: margin-left .2s ease;
}
.sidebar .brand { padding: 0 20px 20px; font-weight: 800; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.sidebar nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.85);
  font-size: 14.5px;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(255,255,255,0.08);
  border-left-color: #fff;
  text-decoration: none;
  color: #fff;
}
.main-content { flex: 1; padding: 24px; max-width: 100%; overflow-x: hidden; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Mobile: collapse sidebar */
.sidebar-toggle { display: none; background: var(--primary); color: #fff; border: none; padding: 8px 14px; border-radius: 8px; }
@media (max-width: 900px) {
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; display: none; }
  .sidebar.open { display: block; }
  .sidebar-toggle { display: inline-block; }
}

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card .value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card .label { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
table.data-table th { background: var(--bg); font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 12px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ===================================================================
   PUBLIC WEBSITE
   =================================================================== */
.navbar .nav-links a.cta {
  background: var(--primary); color: #fff !important; padding: 8px 18px; border-radius: 8px; font-weight: 600;
}
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }

.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
  color: #fff; padding: 80px 0 90px; text-align: center;
}
.hero h1 { font-size: 40px; margin-bottom: 14px; line-height: 1.2; }
.hero p { font-size: 18px; opacity: 0.92; max-width: 640px; margin: 0 auto 28px; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); }

.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; margin-bottom: 10px; }
.section-title p { color: var(--text-muted); font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature-card .icon { font-size: 32px; margin-bottom: 12px; }

.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: 50px 0 24px; margin-top: 40px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,0.75); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.footer-bottom { text-align: center; padding-top: 24px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 13px; color: rgba(255,255,255,0.6); }

.blog-card img, .program-card img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }

@media (max-width: 800px) {
  .navbar .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border); display: none; }
  .navbar .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 30px; }
}
