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

:root {
  /* Paleta Oficial International School Tegucigalpa */
  --ist-navy-950: #060c18;
  --ist-navy-900: #0a1324;
  --ist-navy-850: #0e1a32;
  --ist-navy-800: #132243;
  --ist-navy-700: #1b2f5c;

  --ist-gold-500: #c99318;
  --ist-gold-400: #dfa82c;
  --ist-gold-600: #a7770e;
  --ist-gold-surface: rgba(201, 147, 24, 0.12);

  --ist-emerald: #059669;
  --ist-rose: #e11d48;
  --ist-slate-100: #f8fafc;
  --ist-slate-200: #e2e8f0;
  --ist-slate-300: #cbd5e1;
  --ist-slate-400: #94a3b8;
  --ist-slate-500: #64748b;
  --ist-slate-700: #334155;
  --ist-slate-800: #1e293b;

  /* Superficies Institucionales Sólidas (Anti-AI Slop: Cero neón ni blur fantasioso) */
  --bg-primary: #0a1222;
  --bg-surface: #0f1c34;
  --bg-surface-alt: #132442;
  --bg-card: #0e1a33;
  --border-subtle: #1e3155;
  --border-strong: #2c4475;
  --border-gold: #c99318;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-gold: #e2ad38;

  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 10px 30px rgba(0, 0, 0, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  /* Fondo sobrio, institucional de imprenta formal */
  background-image: linear-gradient(180deg, #09101e 0%, #0c1527 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.015em;
  font-weight: 700;
}

/* Placa y Encabezado de Navegación Institucional */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #060c18;
  border-bottom: 2px solid var(--border-gold);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: #fff;
}

.nav-brand img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.nav-brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.nav-brand-text span {
  font-size: 0.72rem;
  color: var(--ist-gold-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botones de Estilo Institucional Limpio */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--ist-gold-500);
  color: #070d18;
  font-weight: 700;
  border-color: var(--ist-gold-600);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--ist-gold-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 147, 24, 0.3);
}

.btn-primary:disabled {
  background-color: #2a3950;
  color: #64748b;
  border-color: #243247;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--bg-surface-alt);
  color: var(--ist-slate-200);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background-color: #1b3054;
  border-color: var(--border-strong);
  color: #fff;
}

.btn-danger {
  background-color: var(--ist-rose);
  color: #fff;
}

.btn-danger:hover {
  background-color: #be123c;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* Badges Institucionales */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active {
  background-color: rgba(5, 150, 105, 0.2);
  color: #34d399;
  border: 1px solid rgba(5, 150, 105, 0.4);
}

.badge-paused {
  background-color: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Notificaciones Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: #0d182e;
  border-left: 4px solid var(--ist-gold-500);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #fff;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  min-width: 300px;
  max-width: 420px;
}

.toast.error {
  border-left-color: var(--ist-rose);
}

.toast.success {
  border-left-color: var(--ist-emerald);
}

/* Modales */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(5, 10, 20, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background-color: #0e1a33;
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--border-gold);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
  color: #fff;
}

.modal-body {
  padding: 24px;
  max-height: 65vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background-color: #091224;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Utilidades Comunes */
.official-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ist-gold-400);
  display: block;
  margin-bottom: 4px;
}

.official-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 24px 0;
}
