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

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-darker: #0369A1;
  --primary-light: #7DD3FC;
  --primary-lighter: #BAE6FD;
  --primary-bg: #F0F9FF;
  --primary-bg-alt: #E0F2FE;

  --dark: #0F172A;
  --dark-secondary: #1E293B;
  --dark-tertiary: #334155;
  --text: #334155;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --info: #6366F1;
  --info-bg: #EEF2FF;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --sidebar-width: 260px;
  --header-height: 70px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  outline: none;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 30%, #7DD3FC 60%, #BAE6FD 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(2%, -2%) rotate(1deg);
  }

  50% {
    transform: translate(-1%, 3%) rotate(-1deg);
  }

  75% {
    transform: translate(3%, 1%) rotate(0.5deg);
  }
}

/* Floating shapes */
.login-page .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: var(--white);
}

.login-page .shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: float1 15s ease-in-out infinite;
}

.login-page .shape-2 {
  width: 250px;
  height: 250px;
  bottom: -50px;
  left: -50px;
  animation: float2 12s ease-in-out infinite;
}

.login-page .shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 10%;
  animation: float3 18s ease-in-out infinite;
}

.login-page .shape-4 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  right: 15%;
  animation: float1 10s ease-in-out infinite reverse;
}

@keyframes float1 {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

@keyframes float2 {

  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  50% {
    transform: translateX(20px) rotate(10deg);
  }
}

@keyframes float3 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(15px, -20px);
  }

  66% {
    transform: translate(-10px, 15px);
  }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
  }

  50% {
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.45);
  }
}

.login-logo i {
  font-size: 32px;
  color: var(--white);
}

.login-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-header p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-light);
  transition: var(--transition-fast);
  z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.input-wrapper select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8.825a.7.7 0 0 1-.5-.2L2.075 5.2a.674.674 0 0 1-.2-.513.69.69 0 0 1 .213-.512.726.726 0 0 1 .5-.2c.192 0 .358.067.5.2L6 7.1l2.913-2.925a.674.674 0 0 1 .512-.2.69.69 0 0 1 .513.212.726.726 0 0 1 .2.5.676.676 0 0 1-.2.5L6.5 8.625a.7.7 0 0 1-.5.2Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.input-wrapper input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.input-wrapper input:focus+i,
.input-wrapper input:focus~i,
.input-wrapper select:focus+i,
.input-wrapper select:focus~i {
  color: var(--primary);
}

/* Reverse icon and input order visually */
.input-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.input-wrapper input,
.input-wrapper select {
  flex: 1;
}

.input-wrapper input[type="password"] {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-fast);
  z-index: 1;
}

.password-toggle:hover {
  color: var(--primary);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.forgot-link:hover {
  color: var(--primary-dark);
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.35);
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

.btn-login.loading .btn-text {
  display: none;
}

.btn-login.loading .spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.login-footer p {
  font-size: 13px;
  color: var(--text-light);
}

.error-message {
  display: none;
  padding: 12px 16px;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: shake 0.4s ease;
}

.error-message.show {
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(8px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-icon i {
  font-size: 20px;
  color: var(--white);
}

.sidebar-brand-text h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-brand-text span {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.sidebar-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  margin-top: 8px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
  margin-bottom: 2px;
  cursor: pointer;
}

.sidebar-nav-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.sidebar-nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info .role {
  font-size: 11px;
  color: var(--text-light);
}

.btn-logout {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  padding: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-logout:hover {
  color: var(--danger);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text);
  padding: 6px;
  cursor: pointer;
}

.page-title h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.page-title p {
  font-size: 13px;
  color: var(--text-secondary);
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: var(--transition-fast);
  position: relative;
  border: none;
  cursor: pointer;
}

.header-icon-btn:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.header-icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.header-date {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  padding-right: 12px;
  border-right: 1px solid var(--border);
}

/* Content Area */
.content-area {
  padding: 28px 32px;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #0369A1 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  border-radius: 50%;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: 5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  border-radius: 50%;
}

.welcome-banner h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  letter-spacing: -0.02em;
}

.welcome-banner p {
  font-size: 15px;
  opacity: 0.85;
  position: relative;
  font-weight: 400;
}

.welcome-banner .welcome-icon {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  opacity: 0.15;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card-icon.blue {
  background: var(--primary-bg);
  color: var(--primary);
}

.stat-card-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card-icon.yellow {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-card-icon.red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card-icon.purple {
  background: var(--info-bg);
  color: var(--info);
}

.stat-card-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.stat-card-trend.up {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card-trend.down {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card p {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

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

.dashboard-card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-card-header h3 i {
  color: var(--primary);
  font-size: 18px;
}

.btn-view-all {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.btn-view-all:hover {
  background: var(--primary-bg);
}

.dashboard-card-body {
  padding: 20px 24px;
}

/* Notice Items */
.notice-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.notice-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.notice-item:first-child {
  padding-top: 0;
}

.notice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.notice-dot.urgent {
  background: var(--danger);
}

.notice-dot.info {
  background: var(--primary);
}

.notice-dot.general {
  background: var(--success);
}

.notice-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-secondary);
  margin-bottom: 2px;
}

.notice-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Timetable */
.timetable-slot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.timetable-slot:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timetable-slot:first-child {
  padding-top: 0;
}

.slot-time {
  min-width: 70px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slot-subject {
  flex: 1;
  background: var(--primary-bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.slot-subject h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-secondary);
}

.slot-subject p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Quick Actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.quick-action-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.quick-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-lighter);
}

.quick-action-card .action-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
}

.quick-action-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.quick-action-card p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Feature cards for coming soon */
.feature-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.feature-tag.active {
  background: var(--success-bg);
  color: var(--success);
}

.feature-tag.coming-soon {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .btn-sidebar-toggle {
    display: block;
  }

  .top-header {
    padding: 0 20px;
  }

  .content-area {
    padding: 20px;
  }

  .welcome-banner {
    padding: 24px;
  }

  .welcome-banner h2 {
    font-size: 20px;
  }

  .welcome-banner .welcome-icon {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-card {
    padding: 36px 28px;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 32px 24px;
  }

  .header-date {
    display: none;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== UTILITY ANIMATIONS ===== */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.1s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.2s;
}

.stagger-5 {
  animation-delay: 0.25s;
}

.stagger-6 {
  animation-delay: 0.3s;
}

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.modal-header button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.modal-header button:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.modal-body {
  padding: 24px 28px 28px;
}

/* ===== FORM CONTROLS (for modals & sections) ===== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-secondary);
  margin-bottom: 6px;
}

.form-field label .required {
  color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8.825a.7.7 0 0 1-.5-.2L2.075 5.2a.674.674 0 0 1-.2-.513.69.69 0 0 1 .213-.512.726.726 0 0 1 .5-.2c.192 0 .358.067.5.2L6 7.1l2.913-2.925a.674.674 0 0 1 .512-.2.69.69 0 0 1 .513.212.726.726 0 0 1 .2.5.676.676 0 0 1-.2.5L6.5 8.625a.7.7 0 0 1-.5.2Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.form-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: var(--transition-fast);
}

.form-checkbox-group label:has(input:checked) {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.form-checkbox-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-submit.danger {
  background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
}

.btn-submit.danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

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

.search-input {
  padding: 10px 14px 10px 38px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center;
  min-width: 220px;
  transition: var(--transition);
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  outline: none;
}

.filter-select {
  padding: 10px 36px 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: var(--white);
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8.825a.7.7 0 0 1-.5-.2L2.075 5.2a.674.674 0 0 1-.2-.513.69.69 0 0 1 .213-.512.726.726 0 0 1 .5-.2c.192 0 .358.067.5.2L6 7.1l2.913-2.925a.674.674 0 0 1 .512-.2.69.69 0 0 1 .513.212.726.726 0 0 1 .2.5.676.676 0 0 1-.2.5L6.5 8.625a.7.7 0 0 1-.5.2Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary);
  outline: none;
}

.btn-action {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-action.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.btn-action.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-action.secondary {
  background: var(--off-white);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-action.secondary:hover {
  background: var(--primary-bg);
  border-color: var(--primary-lighter);
  color: var(--primary-dark);
}

/* ===== DATA TABLE ===== */
.data-table-container {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.data-table thead {
  background: var(--off-white);
  border-bottom: 2px solid var(--border);
}

.data-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--primary-bg-alt);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-name {
  font-weight: 600;
  color: var(--dark);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.table-btn.edit {
  background: var(--primary-bg);
  color: var(--primary);
}

.table-btn.edit:hover {
  background: var(--primary);
  color: var(--white);
}

.table-btn.delete {
  background: var(--danger-bg);
  color: var(--danger);
}

.table-btn.delete:hover {
  background: var(--danger);
  color: var(--white);
}

.table-btn.view {
  background: var(--success-bg);
  color: var(--success);
}

.table-btn.view:hover {
  background: var(--success);
  color: var(--white);
}

/* ===== STATUS BADGES ===== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-status.paid {
  background: var(--success-bg);
  color: var(--success);
}

.badge-status.partial {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-status.unpaid {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-status.present {
  background: var(--success-bg);
  color: var(--success);
}

.badge-status.absent {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-status.late {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-priority {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-priority.urgent {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-priority.info {
  background: var(--primary-bg);
  color: var(--primary);
}

.badge-priority.general {
  background: var(--success-bg);
  color: var(--success);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  max-width: 360px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.toast.error {
  background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
}

.toast.info {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ===== LOADING STATE ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 14px;
  gap: 10px;
}

.loading-spinner i {
  font-size: 20px;
  animation: spin 0.8s linear infinite;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
}

/* ===== TIMETABLE GRID ===== */
.timetable-grid {
  display: grid;
  grid-template-columns: 90px repeat(8, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.timetable-cell {
  background: var(--white);
  padding: 10px 8px;
  font-size: 12px;
  text-align: center;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timetable-cell.header {
  background: var(--off-white);
  font-weight: 700;
  color: var(--dark);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: auto;
  padding: 12px 8px;
}

.timetable-cell.day-label {
  background: var(--primary-bg);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 12px;
}

.timetable-cell select {
  width: 100%;
  padding: 4px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 2px;
  font-family: inherit;
}

.timetable-cell .subject-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 12px;
}

.timetable-cell .teacher-name {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ===== ATTENDANCE GRID ===== */
.attendance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.attendance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.attendance-row:hover {
  border-color: var(--primary-lighter);
  background: var(--primary-bg);
}

.attendance-row .student-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attendance-row .student-info .roll {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.attendance-row .student-info .name {
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.attendance-row .status-btns {
  display: flex;
  gap: 6px;
}

.attendance-row .status-btns button {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
}

.attendance-row .status-btns button.active-present {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.attendance-row .status-btns button.active-absent {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.attendance-row .status-btns button.active-late {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning);
}

/* ===== NOTICE CARDS (full page view) ===== */
.notice-card-full {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.notice-card-full:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.notice-card-full .notice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.notice-card-full .notice-card-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.notice-card-full .notice-card-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.notice-card-full .notice-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
}

/* ===== STATS INFO CARD (for student view) ===== */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.info-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h4 i {
  color: var(--primary);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  color: var(--text-secondary);
}

.info-row .value {
  font-weight: 600;
  color: var(--dark);
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border-light);
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--dark);
}

.tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ===== RESULTS TABLE GRADE COLORS ===== */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.grade-badge.grade-a {
  background: #ECFDF5;
  color: #059669;
}

.grade-badge.grade-b {
  background: #EFF6FF;
  color: #2563EB;
}

.grade-badge.grade-c {
  background: #FFFBEB;
  color: #D97706;
}

.grade-badge.grade-d {
  background: #FFF7ED;
  color: #EA580C;
}

.grade-badge.grade-f {
  background: #FEF2F2;
  color: #DC2626;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-actions {
    width: 100%;
  }

  .search-input {
    min-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-card {
    max-width: 100%;
    margin: 10px;
  }

  .timetable-grid {
    font-size: 10px;
  }

  .tabs {
    overflow-x: auto;
  }

  .info-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .modal-body {
    padding: 20px;
  }

  .data-table {
    min-width: 500px;
  }

  .attendance-row {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}