/* =============================================================================
   Prefect Disciplinary Action System - Main CSS Theme & System Design
   Client: St. Agnes Academy of Caloocan Inc.
   Reversed Color Palette: Black-Pink (Obsidian Black primary with Vibrant Pink accents)
   Adaptive Dark & Light Mode System
   ============================================================================= */

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

:root {
  /* Brand Accent Tokens */
  --brand-pink: #E91E63;
  --brand-pink-hover: #D81B60;
  --accent-pink: #FF5FA2;
  --accent-pink-light: rgba(255, 95, 162, 0.15);

  /* Status Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* UI Tokens */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default / Dark Theme (Obsidian Black primary with Vibrant Pink accents) */
[data-theme="dark"], :root {
  --primary: #121216;
  --primary-hover: #1C1C24;
  --dark-bg: #0C0C0F;
  --secondary-bg: #16161D;
  --accent: #FF5FA2;
  --accent-light: rgba(255, 95, 162, 0.15);
  --card-bg: #181820;
  --card-bg-dark: #1E1E28;
  --text-dark: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-light: #F9FAFB;
  --border-color: rgba(255, 255, 255, 0.08);
  --input-bg: #111116;
  --input-border: rgba(255, 255, 255, 0.12);
  --topbar-bg: rgba(22, 22, 29, 0.85);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-pink: 0 8px 25px rgba(233, 30, 99, 0.25);
  --nav-active-bg: linear-gradient(135deg, #181822 0%, #2A1424 100%);
  --sidebar-border: rgba(255, 255, 255, 0.06);
}

/* Light Theme (Crisp Light surface with Black structural headers and Pink accents) */
[data-theme="light"] {
  --primary: #0F172A;
  --primary-hover: #1E293B;
  --dark-bg: #F8FAFC;
  --secondary-bg: #FFFFFF;
  --accent: #E91E63;
  --accent-light: rgba(233, 30, 99, 0.1);
  --card-bg: #FFFFFF;
  --card-bg-dark: #F1F5F9;
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #0F172A;
  --border-color: #E2E8F0;
  --input-bg: #F8FAFC;
  --input-border: #CBD5E0;
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-pink: 0 8px 20px rgba(233, 30, 99, 0.15);
  --nav-active-bg: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  --sidebar-border: #E2E8F0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary-bg);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-pink);
}

/* App Wrapper Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #101015 0%, #16101B 45%, #0D0D11 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(233, 30, 99, 0.45));
}

.sidebar-title h2 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.sidebar-title p {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

/* Sidebar Navigation Links */
.sidebar-menu {
  padding: 14px 12px;
  flex: 1;
  overflow-y: auto;
}

/* Sidebar custom scrollbar */
.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: var(--brand-pink);
}

.menu-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #7E7E94;
  padding: 14px 14px 6px 14px;
  letter-spacing: 1.1px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #A8A8BD;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin-bottom: 3px;
  border-left: 3px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}

.nav-item:hover {
  background: linear-gradient(90deg, rgba(255, 95, 162, 0.12) 0%, rgba(255, 95, 162, 0.02) 100%);
  color: #FFFFFF;
  border-left-color: rgba(255, 95, 162, 0.5);
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, #2D1425 0%, #1C1524 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.25);
}

.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: #8C8CA0;
  transition: var(--transition);
}

.nav-item:hover i {
  color: var(--accent);
}

.nav-item.active i {
  color: var(--accent);
}

.sidebar .nav-item[onclick*="logout"] {
  color: #F87171;
}

.sidebar .nav-item[onclick*="logout"] i {
  color: #F87171;
}

.sidebar .nav-item[onclick*="logout"]:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444 !important;
  border-left-color: #EF4444;
}

.sidebar .nav-item[onclick*="logout"]:hover i {
  color: #EF4444 !important;
}

/* Main Content View Container */
.main-content {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navbar */
.topbar {
  height: 70px;
  background-color: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.topbar-search {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  width: 320px;
}

.topbar-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-light);
  font-size: 0.88rem;
  width: 100%;
  margin-left: 10px;
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(233, 30, 99, 0.3);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--brand-pink);
  color: #FFFFFF;
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(233, 30, 99, 0.4);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #2D1424);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #FFFFFF;
  box-shadow: var(--shadow-pink);
}

.user-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-light);
}

.user-info p {
  font-size: 0.75rem;
  color: var(--accent);
}

/* Dynamic Page Container */
.page-container {
  padding: 30px;
  flex: 1;
}

/* Modern Card Utilities */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.card {
  background: var(--card-bg);
  color: var(--text-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 30, 99, 0.3);
}

.card-dark {
  background: var(--card-bg-dark);
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

