/* ================================
   MOUNT EDMUND SECONDARY SCHOOL
   Theme Configuration & Design System
   ================================ */

:root {
  /* PRIMARY COLORS - Green (70%) */
  --primary-green: #2E9D39;
  --primary-green-light: #3BAF43;
  --primary-green-dark: #1F5A28;
  --primary-green-pale: #E8F5E9;
  
  /* SECONDARY COLORS - Blue (20%) */
  --secondary-blue: #1146D9;
  --secondary-blue-light: #4A70E6;
  --secondary-blue-dark: #0A2BA8;
  --secondary-blue-pale: #EBF0F9;
  
  /* ACCENT COLORS - Red (10%) */
  --accent-red: #E12626;
  --accent-red-light: #FF5B5B;
  --accent-red-dark: #C21414;
  --accent-red-pale: #FFEBEE;
  
  /* GOLD/YELLOW ACCENT */
  --accent-gold: #F5D232;
  --accent-gold-dark: #D4AF1A;
  
  /* NEUTRALS */
  --color-white: #FFFFFF;
  --color-bg-light: #F7FAF7;
  --color-bg-pale: #F2F8F5;
  --color-text-dark: #1F5A28;
  --color-text-primary: #2C2C2C;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9AB5BB;
  --color-border: #D4E4D9;
  --color-border-light: #E8F0EB;
  
  /* SHADOWS */
  --shadow-sm: 0 2px 8px rgba(46, 157, 57, 0.08);
  --shadow-md: 0 4px 16px rgba(46, 157, 57, 0.12);
  --shadow-lg: 0 8px 32px rgba(46, 157, 57, 0.15);
  
  /* GRADIENTS */
  --gradient-primary: linear-gradient(135deg, #2E9D39 0%, #3BAF43 100%);
  --gradient-secondary: linear-gradient(135deg, #1146D9 0%, #2E9D39 100%);
  --gradient-accent: linear-gradient(135deg, #E12626 0%, #FF5B5B 100%);
  --gradient-green-to-blue: linear-gradient(135deg, #2E9D39 0%, #1146D9 100%);
  
  /* BORDER RADIUS */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 26px;
  
  /* SPACING */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  
  /* TRANSITIONS */
  --transition-fast: 0.14s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg-light);
  color: var(--color-text-primary);
  overflow-x: hidden;
}

/* ===== HEADERS & BRANDING ===== */
.header-wave {
  background: var(--gradient-primary);
}

.header-wave::before {
  background: rgba(255, 255, 255, 0.1);
}

.header {
  background: var(--gradient-primary);
  color: var(--color-white);
}

.school-name {
  color: var(--color-white);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.school-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.gold-bar {
  background: var(--accent-gold);
  width: 42px;
  height: 3px;
  border-radius: 2px;
}

/* ===== CARDS & CONTAINERS ===== */
.card,
.box {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}

.card {
  border-top: 3px solid var(--primary-green);
}

.box {
  border-left: 4px solid var(--primary-green);
}

.box-title {
  color: var(--primary-green-dark);
  font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn,
button,
.signin-btn,
.btn-action,
.btn-primary {
  font-family: 'Poppins', sans-serif;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Primary Button */
.btn-primary,
.signin-btn {
  background: var(--gradient-primary);
  color: var(--color-white);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled),
.signin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled),
.signin-btn:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.btn-secondary {
  background: var(--color-white);
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
  padding: 12px 18px;
}

.btn-secondary:hover {
  background: var(--primary-green-pale);
}

/* Danger Button */
.btn-danger,
.btn-decline {
  background: var(--gradient-accent);
  color: var(--color-white);
  padding: 12px 16px;
}

.btn-danger:hover,
.btn-decline:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Success Button */
.btn-accept,
.btn-success {
  background: var(--primary-green-pale);
  color: var(--primary-green-dark);
  border: 1px solid var(--primary-green);
}

.btn-accept:hover,
.btn-success:hover {
  background: #D5F4D9;
}

/* Action Buttons - Table/List Actions */
.btn-action {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--color-bg-pale);
  border-radius: var(--radius-xl);
  padding: 4px;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.tab svg {
  width: 20px;
  height: 20px;
  transition: all var(--transition-base);
  stroke: currentColor;
}

.tab.active {
  background: var(--color-white);
  color: var(--primary-green);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.tab-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-red);
  display: none;
}

.tab.active .tab-dot {
  display: block;
}

/* ===== INPUT FIELDS ===== */
.input-wrap,
.input-group input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  border-radius: var(--radius-lg);
  border: 1.8px solid var(--color-border);
  transition: all var(--transition-base);
  font-family: 'Poppins', sans-serif;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg-pale);
  padding: 14px 16px;
}

.input-wrap:focus-within {
  border-color: var(--primary-green);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(46, 157, 57, 0.1);
}

.input-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color var(--transition-base);
  display: flex;
}

.input-wrap:focus-within .input-icon {
  color: var(--primary-green);
}

.input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  outline: none;
  min-width: 0;
}

.input-wrap input::placeholder {
  color: var(--color-text-muted);
  font-weight: 400;
}

.input-wrap.error {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 3px rgba(225, 38, 38, 0.12) !important;
}

/* ===== NAVIGATION ===== */
.nav-item,
.nav-link {
  transition: all var(--transition-base);
}

.nav-item.active,
.nav-link.active {
  background: var(--primary-green);
  color: var(--color-white);
  position: relative;
}

.nav-item.active::after,
.nav-link.active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
}

.nav-item:hover,
.nav-link:hover {
  background: var(--primary-green-pale);
}

/* ===== STATUS INDICATORS ===== */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
}

.status-dot.success {
  background: var(--primary-green);
}

.status-dot.pending {
  background: var(--accent-gold);
}

.status-dot.info {
  background: var(--secondary-blue);
}

/* ===== BADGES ===== */
.badge,
.role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-primary {
  background: var(--primary-green-pale);
  color: var(--primary-green-dark);
}

.badge-danger {
  background: var(--accent-red-pale);
  color: var(--accent-red-dark);
}

.badge-success {
  background: var(--primary-green-pale);
  color: var(--primary-green-dark);
}

.badge-warning {
  background: rgba(245, 210, 50, 0.2);
  color: #B8860B;
}

/* ===== LABELS & TEXT ===== */
.field-label,
.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.label-primary {
  color: var(--primary-green);
  font-weight: 700;
}

/* ===== DIVIDERS ===== */
.divider {
  background: var(--color-border-light);
  height: 1px;
}

.divider-text {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

/* ===== MODALS ===== */
.modal-box,
.popup-overlay {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.popup-overlay {
  background: rgba(31, 90, 40, 0.5);
  backdrop-filter: blur(3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(46, 157, 57, 0.2);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ===== UTILITIES ===== */
.text-primary-green {
  color: var(--primary-green);
}

.text-secondary-blue {
  color: var(--secondary-blue);
}

.text-accent-red {
  color: var(--accent-red);
}

.bg-primary-green {
  background: var(--primary-green);
}

.bg-secondary-blue {
  background: var(--secondary-blue);
}

.bg-accent-red {
  background: var(--accent-red);
}

.border-primary-green {
  border-color: var(--primary-green);
}

.border-secondary-blue {
  border-color: var(--secondary-blue);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --space-lg: 14px;
    --space-xl: 18px;
  }
}
