@import url('https://fonts.googleapis.com/css?family=Raleway:400,700');

/* ============================================
   CSS VARIABLES - LIGHT MODE (DEFAULT)
   ============================================ */
:root {
  /* Text Colors */
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --text-white: #fff;
  
  /* Background Colors */
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-gradient: linear-gradient(135deg, #C7C5F4 0%, #776BCC 60%, #5D54A4 100%);
  --bg-body: linear-gradient(135deg, #C7C5F4 0%, #776BCC 60%, #5D54A4 100%);
  
  /* Card Colors */
  --card-bg: #fff;
  --card-shadow: rgba(0, 0, 0, 0.08);
  
  /* Border Colors */
  --border-light: #e0e0e0;
  --border-dark: #ccc;
  
  /* Accent Colors */
  --accent-primary: #5D54A4;
  --accent-secondary: #776BCC;
  --accent-danger: #e74c3c;
  --accent-success: #27ae60;
  
  /* Warning & Error Colors */
  --warning-bg: #fff3e0;
  --warning-border: #FFA502;
  --warning-text: #FFA502;
  --error-bg: #fff2f3;
  --error-border: #ffcdd1;
  --error-text: #c62828;
  
  /* Input Colors */
  --input-bg: #fff;
  --input-border: #ccc;
  --input-focus: #5D54A4;
  
  /* Hover Colors */
  --hover-bg: #fff5f5;
  --hover-border: #FF4757;
  
  /* Status Colors */
  --status-waiting: #F39C12;
}

/* ============================================
   CSS VARIABLES - DARK MODE
   ============================================ */
[data-theme="dark"],
.dark-mode {
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-light: #808080;
  --text-white: #fff;
  
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-gradient: linear-gradient(135deg, #1a1840 0%, #2d2872 50%, #1a1840 100%);
  --bg-body: linear-gradient(135deg, #1a1840 0%, #2d2872 50%, #1a1840 100%);
  
  --card-bg: #252525;
  --card-shadow: rgba(0, 0, 0, 0.5);
  
  --border-light: #404040;
  --border-dark: #505050;
  
  --accent-primary: #8a7fcf;
  --accent-secondary: #a59ddb;
  --accent-danger: #ff6b6b;
  --accent-success: #51cf66;
  
  --warning-bg: #3d3026;
  --warning-border: #ff9800;
  --warning-text: #ffb74d;
  --error-bg: #3d2326;
  --error-border: #6d3c41;
  --error-text: #ff7a7a;

  --input-bg: #2d2d2d;
  --input-border: #404040;
  --input-focus: #8a7fcf;

  --hover-bg: #3d2d35;
  --hover-border: #ff6b81;
  
  --status-waiting: #ffb347;
}

/* ============================================
   GLOBAL BODY STYLING
   ============================================ */
body {
  font-family: Raleway, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  transition: background 0.3s ease, color 0.3s ease;
  height: 100vh;
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
  height: 100vh;
  overflow: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  opacity: 0.15;
  animation: bgFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #fff 0%, #a89de8 100%);
  top: -220px;
  left: -220px;
  animation-delay: 0s;
}

body::after {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #fff 0%, #6C63AC 100%);
  bottom: -160px;
  right: -160px;
  animation-delay: -10s;
}

@keyframes bgFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(40px) scale(1.07); }
}

@keyframes bgFloat2 {
  0%, 100% { transform: translateX(0px) scale(1); }
  50%       { transform: translateX(30px) scale(1.08); }
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  animation: bgFloat 22s ease-in-out infinite;
}

.bg-blob--1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #fff 0%, #776BCC 100%);
  top: 35%;
  left: -140px;
  animation-duration: 16s;
  animation-delay: -4s;
}

.bg-blob--2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #fff 0%, #5D54A4 100%);
  top: 8%;
  right: 4%;
  animation: bgFloat2 20s ease-in-out infinite;
  animation-delay: -8s;
}

.bg-blob--3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, #e8e4ff 0%, #7C78B8 100%);
  bottom: 10%;
  left: 38%;
  animation-duration: 28s;
  animation-delay: -14s;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.screen {   
  background: linear-gradient(90deg, #5D54A4, #7C78B8); /* #5D54A4, #7C78B8 */
  position: relative; 
  height: 600px;
  width: 360px; 
  box-shadow: 0px 0px 24px #5C5696; /* 5C5696 */
}

.screen__content {
  z-index: 1;
  position: relative; 
  height: 100%;
}

.screen__background {   
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  -webkit-clip-path: inset(0 0 0 0);
  clip-path: inset(0 0 0 0);  
}

.screen__background__shape {
  transform: rotate(45deg);
  position: absolute;
}

.screen__background__shape1 {
  height: 520px;
  width: 520px;
  background: #FFF; /* #FFF */
  top: -50px;
  right: 120px; 
  border-radius: 0 72px 0 0;
}

.screen__background__shape2 {
  height: 220px;
  width: 220px;
  background: #6C63AC;  /* 6C63AC */
  top: -172px;
  right: 0; 
  border-radius: 32px;
}

.screen__background__shape3 {
  height: 540px;
  width: 190px;
  background: linear-gradient(270deg, #5D54A4, #6A679E); /* #5D54A4, #6A679E */
  top: -24px;
  right: 0; 
  border-radius: 32px;
}

.screen__background__shape4 {
  height: 400px;
  width: 200px;
  background: #7E7BB9;  /* 7E7BB9 */
  top: 420px;
  right: 50px;  
  border-radius: 60px;
}

.login {
  width: 320px;
  padding: 30px;
  padding-top: 156px;
}

.login__field {
  padding: 20px 0px;  
  position: relative; 
}

.login__icon {
  position: absolute;
  top: 30px;
  color: #7875B5; /* 7875B5 */
}

.login__input {
  border: none;
  border-bottom: 2px solid #D1D1D4; /* #D1D1D4 */
  background: none;
  padding: 10px;
  padding-left: 24px;
  font-weight: 700;
  width: 75%;
  transition: .2s;
}

.login__input:active,
.login__input:focus,
.login__input:hover {
  outline: none;
  border-bottom-color: #6A679E; /*#6A679E */
}



.login__label {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  color: #D1D1D4;
  min-height: 14px;
}

.login__field.error .login__input {
  border-bottom-color: #FF4757;
}

.login__field.error .login__label {
  display: block;
  color: #FF4757;
  font-weight: 700;
}

.login__submit {
  background: #fff;
  font-size: 14px;
  margin-top: 30px;
  padding: 16px 20px;
  border-radius: 26px;
  border: 1px solid #D4D3E8; /* #D4D3E8 */
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  width: 100%;
  color: #4C489D;
  box-shadow: 0px 2px 2px #5C5696; /* #5C5696 */
  cursor: pointer;
  transition: .2s;
}

.login__submit:active,
.login__submit:focus,
.login__submit:hover {
  border-color: #6A679E; /* 6A679E */
  outline: none;
}

.button__icon {
  font-size: 24px;
  margin-left: auto;
  color: #7875B5; /* #7875B5 */
}

.social-login { 
  position: absolute;
  height: 140px;
  width: 160px;
  text-align: center;
  bottom: 0px;
  right: 0px;
  color: #fff; /* #fff */
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-login__icon {
  padding: 20px 10px;
  color: #fff;
  text-decoration: none;  
  text-shadow: 0px 0px 8px #7875B5;
}

.social-login__icon:hover {
  transform: scale(1.5);  
}

.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10;
  align-items: center;
  justify-content: center;
}

.loading-spinner.active {
  display: flex;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   HOMEPAGE STYLES - SmartPorta Main Interface
   ============================================ */

.container-main {
  height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  box-sizing: border-box;
}

#admin-view {
  max-width: 1200px;
}

.view.hidden {
  display: none !important;
}

.header {
  background: linear-gradient(90deg, #5D54A4, #7C78B8);
  padding: 30px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  color: white;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
}

.logout-btn {
  background: linear-gradient(135deg, #FF4757, #FF6348);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s all;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #ff3838, #FF4757);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 71, 87, 0.3);
}

.logout-btn i {
  font-size: 16px;
}

/* Version Counter */
.version-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  font-weight: 700;
  z-index: 999;
  letter-spacing: 1px;
  transition: 0.3s all;
  text-decoration: none;
  cursor: pointer;
}

.version-counter:hover {
  color: rgba(255, 255, 255, 0.9);
}

.content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 35px;
  margin-top: 30px;
  padding: 0 20px;
}

.section-card {
  background: white;
  padding: 35px;
  border-radius: 10px;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 5px solid #5D54A4;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.section-card h2 {
  color: #5D54A4;
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 700;
  font-size: 14px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--input-border);
  border-radius: 5px;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  transition: 0.3s;
  color: var(--text-primary);
  background: var(--input-bg);
  box-sizing: border-box;
}

.form-group select[multiple] {
  padding: 5px;
  min-height: 120px;
  overflow-y: auto;
  background: var(--input-bg);
  color: var(--text-primary);
}

.form-group select[multiple] option {
  padding: 8px 5px;
  margin: 2px 0;
  background: var(--input-bg);
  color: var(--text-primary);
}

.form-group select[multiple] option:checked {
  background: var(--accent-primary);
  background-color: var(--accent-primary) !important;
  color: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(93, 84, 164, 0.2);
}

.form-group input:disabled,
.form-group select:disabled {
  background-color: var(--bg-secondary);
  cursor: not-allowed;
}

.form-error {
  display: none;
  color: #FF4757;
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
  display: block;
  min-height: 16px;
}

.form-group.error input,
.form-group.error select {
  border-color: #FF4757;
}

.form-group.error .form-error {
  display: block;
}

.class-selection-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.preset-btn {
  flex: 1;
  padding: 10px 12px;
  background: #5D54A4;
  color: white;
  border: 2px solid #5D54A4;
  border-radius: 5px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}

.preset-btn:hover {
  background: #6A679E;
  border-color: #6A679E;
}

.preset-btn:active {
  transform: scale(0.98);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  padding: 10px 0;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #E0E0E0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.send-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #5D54A4, #7C78B8);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 20px rgba(93, 84, 164, 0.3);
}

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

.notification-log {
  max-height: 400px;
  overflow-y: auto;
}

.log-entry {
  background: var(--card-bg);
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 5px;
  border-left: 4px solid var(--accent-primary);
  font-size: 13px;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.log-entry-time {
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 5px;
}

.log-entry-details {
  font-size: 12px;
  color: var(--text-secondary);
}

.empty-log {
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* ============================================
   CLASS VIEW SPECIFIC STYLES
   ============================================ */

#active-notification-container {
  margin-bottom: 20px;
}

.notification-banner {
  background: linear-gradient(135deg, #FF4757, #FF6348);
  color: white;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0px 6px 25px rgba(255, 71, 87, 0.3);
  text-align: center;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-banner h2 {
  font-size: 32px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.notification-banner .reason {
  font-size: 18px;
  margin-bottom: 15px;
}

.notification-banner .time {
  font-size: 12px;
  opacity: 0.9;
}

.acknowledge-btn {
  background: white;
  color: #FF4757;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  margin-top: 15px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.acknowledge-btn:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

.acknowledge-btn:active {
  transform: scale(0.98);
}

.notification-item {
  background: white;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  border-left: 4px solid #FF4757;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-item .student-info {
  flex: 1;
}

.notification-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ack-btn {
  background: #2ED573;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.ack-btn:hover {
  background: #26de81;
  transform: scale(1.1);
}

.ack-btn:active {
  transform: scale(0.95);
}

.notification-item .student-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

.notification-item .student-reason {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.notification-item .time-badge {
  background: #FF4757;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  white-space: nowrap;
}

.notifications-list {
  max-height: 500px;
  overflow-y: auto;
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

.admin-card {
  grid-column: 1 / -1;
}

.admin-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 25px;
  font-style: italic;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.admin-action-group {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.admin-action-group h3 {
  color: var(--accent-primary);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 700;
}

.admin-action-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.reset-btn {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  margin-top: auto;
}

.reset-notifications-btn {
  background: linear-gradient(135deg, #FFA502, #FFB733);
}

.reset-notifications-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 20px rgba(255, 165, 2, 0.3);
}

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

.reset-all-btn {
  background: linear-gradient(135deg, #FF4757, #FF6348);
}

.reset-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 20px rgba(255, 71, 87, 0.3);
}

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

.admin-log {
  max-height: 400px;
  overflow-y: auto;
}

.admin-log-entry {
  background: var(--card-bg);
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 5px;
  border-left: 4px solid #2ED573;
  font-size: 13px;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.admin-log-time {
  font-weight: 700;
  color: #2ED573;
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.admin-log-action {
  color: var(--text-secondary);
}

.admin-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #e0e0e0;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.admin-success-message {
  background: #e8f5e9;
  border-left: 4px solid #2ED573;
  color: #2ED573;
}

.admin-warning-message {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning-border);
  color: var(--warning-text);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

/* WebKit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #5D54A4;
  border-radius: 10px;
  border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
  background: #776BCC;
}

/* Firefox */
* {
  scrollbar-color: #5D54A4 transparent;
  scrollbar-width: thin;
}

/* ============================================
   ADMIN CLASS EDITOR STYLES
   ============================================ */

.admin-class-management {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--card-shadow);
  margin-bottom: 30px;
  border: 1px solid var(--border-light);
}

.admin-class-management h3 {
  color: var(--accent-primary);
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 700;
}

.admin-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.class-management-form {
  margin-bottom: 35px;
}

.input-group {
  display: flex;
  gap: 15px;
  margin-top: 12px;
}

.input-group input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: 5px;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  transition: 0.3s;
  color: var(--text-primary);
  background: var(--card-bg);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(93, 84, 164, 0.3);
  background: var(--card-bg);
}

.btn-add-class {
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  outline: none;
  font-weight: 700;
  font-family: Raleway, sans-serif;
  font-size: 14px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-add-class:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93, 84, 164, 0.3);
}

.btn-add-class i {
  font-size: 14px;
}

.class-list-container {
  margin-bottom: 30px;
}

.class-list-container h4 {
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
}

.class-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 5px;
  border: 1px solid var(--border-light);
}

.class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  transition: 0.3s;
  min-height: 50px;
}

.class-item:hover {
  border-color: var(--hover-border);
  background: var(--hover-bg);
}

.class-name {
  font-weight: 700;
  color: #5D54A4;
  flex: 1;
}

.btn-remove-class {
  padding: 8px 12px;
  background: linear-gradient(135deg, #FF4757 0%, #FF6348 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-family: Raleway, sans-serif;
  font-size: 12px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 4px;
}
  background: #FF4757;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 5px 8px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.btn-remove-class:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}
  background: #FF1744;
  transform: scale(1.1);
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-reset-classes {
  padding: 10px 16px;
  background: #FFA502;
  color: white;
  border: none;
  border-radius: 5px;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset-classes:hover {
  background: #FF8C00;
  transform: translateY(-2px);
}

.btn-reset-classes i {
  font-size: 14px;
}

.admin-success-message {
  animation: slideInRight 0.3s ease !important;
}

/* ============================================
   STUDENT MANAGEMENT STYLES
   ============================================ */

.admin-student-management {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px var(--card-shadow);
}

.admin-student-management h3 {
  color: var(--text-primary);
  margin-bottom: 30px;
  font-size: 22px;
  font-weight: 700;
}

.student-tools {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 20px;
  margin-bottom: 35px;
  align-items: end;
}

.student-tools > div {
  display: flex;
  flex-direction: column;
}

.student-tools label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.student-tools input,
.student-tools select {
  padding: 12px 14px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  font-family: Raleway, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: 0.2s ease;
}

.student-tools input:focus,
.student-tools select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 6px rgba(93, 84, 164, 0.3);
  background: var(--card-bg);
}

.student-form-container {
  background: var(--bg-secondary);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  margin-bottom: 30px;
  display: none;
}

.student-form-container h4 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 700;
}

.student-form-container label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.student-form-container input,
.student-form-container select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  font-family: Raleway, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 20px;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: 0.2s ease;
}

.student-form-container input:focus,
.student-form-container select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 6px rgba(93, 84, 164, 0.3);
}

.form-error {
  display: none;
  background: var(--error-bg);
  color: var(--error-text);
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--error-border);
}

.form-error.show {
  display: block;
}

#student-form-error {
  margin-bottom: 15px;
}

.student-form-container button {
  padding: 8px 16px;
  margin-right: 10px;
  border: none;
  border-radius: 4px;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: 0.3s;
}

.btn-success {
  background: #4CAF50;
  color: white;
}

.btn-success:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #5D54A4;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: 0.3s;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5D54A4 0%, #776BCC 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93, 84, 164, 0.3);
}

.students-list {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.students-list table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.students-list thead {
  background: linear-gradient(135deg, #5D54A4 0%, #776BCC 100%);
  color: white;
}

.students-list thead th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  border: none;
  font-size: 13px;
}

.students-list tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}

.students-list tbody tr:hover {
  background: var(--bg-secondary);
}

.students-list tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.students-list tbody td {
  padding: 12px;
  font-size: 13px;
  color: var(--text-primary);
}

.students-list tbody td:nth-child(3) {
  font-weight: 700;
  color: #5D54A4;
}

.btn-small {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s;
  margin-right: 8px;
}

.btn-edit {
  background-color: #FF9800;
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 8px;
  transition: 0.2s ease;
}

.btn-edit:hover {
  background-color: #F57C00;
  transform: translateY(-1px);
}

.btn-delete {
  background-color: #f44336;
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s ease;
}

.btn-delete:hover {
  background-color: #da190b;
  transform: translateY(-1px);
}

.student-count-info {
  margin-top: 15px;
  padding: 10px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent-primary);
}

.btn-primary {
  background-color: #5D54A4;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: 0.3s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5D54A4 0%, #776BCC 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93, 84, 164, 0.3);
}

.students-list > p {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.students-list > div {
  margin-top: 15px;
  padding: 10px;
  background-color: #e3f2fd;
  border-left: 4px solid #2196F3;
  border-radius: 4px;
  font-size: 12px;
  color: #1565c0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .header h1 {
    font-size: 22px;
  }

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

  .notification-banner h2 {
    font-size: 24px;
  }

  .notification-banner .reason {
    font-size: 16px;
  }
}

/* ============================================
   REDESIGNED PORTA PAGE
   ============================================ */

.porta-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  padding: 30px 20px;
}

.porta-main {
  display: flex;
  flex-direction: column;
}

.porta-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.porta-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--card-shadow);
  padding: 35px;
  transition: 0.3s all;
  border: 1px solid var(--border-light);
}

.porta-card:hover {
  box-shadow: 0 8px 25px var(--card-shadow);
}

.porta-card.compact {
  padding: 25px;
}

.porta-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.porta-card-header i {
  font-size: 28px;
  color: var(--accent-primary);
}

.porta-card h2 {
  color: var(--accent-primary);
  font-size: 24px;
  margin: 0;
}

.porta-card h3 {
  color: var(--accent-primary);
  font-size: 18px;
  margin: 0;
}

.porta-card-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 25px;
}

.porta-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.porta-form .form-group {
  margin-bottom: 0;
}

.porta-btn {
  padding: 15px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s all;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: Raleway, sans-serif;
}

.porta-btn.primary {
  background: linear-gradient(135deg, #5D54A4, #776BCC);
  color: white;
}

.porta-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(93, 84, 164, 0.3);
}

.porta-btn.secondary {
  background: linear-gradient(135deg, #776BCC, #5D54A4);
  color: white;
  font-size: 13px;
}

.porta-btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(93, 84, 164, 0.25);
}

.quick-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 15px;
}

.quick-btn {
  padding: 10px 12px;
  background: #5D54A4;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.quick-btn:hover {
  background: #776BCC;
  transform: translateY(-1px);
}

.notification-log.compact {
  max-height: 250px;
  font-size: 12px;
}

.notification-log.compact .log-entry {
  padding: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

/* ============================================
   REDESIGNED CLASS PAGE
   ============================================ */

.class-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.class-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.class-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--card-shadow);
  padding: 35px;
  transition: 0.3s all;
  border: 1px solid var(--border-light);
}

.class-card:hover {
  box-shadow: 0 8px 25px var(--card-shadow);
}

.class-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-light);
}

.class-card-header i {
  font-size: 28px;
  color: var(--accent-primary);
}

.class-card-header h2 {
  color: var(--accent-primary);
  font-size: 22px;
  margin: 0;
}

.class-notifications {
  max-height: 600px;
}

.class-history {
  max-height: 600px;
}

.status-card {
  grid-column: 1 / -1;
  margin-bottom: 10px;
  background: var(--card-bg);
  border-top: 3px solid var(--accent-primary);
  border: 1px solid var(--border-light);
}

#active-notification-container {
  margin-bottom: 30px;
}

@media (max-width: 1024px) {
  .porta-container {
    grid-template-columns: 1fr;
  }

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

/* ============================================
   NEW ADMIN UI - TABBED INTERFACE
   ============================================ */

.admin-container {
  max-width: 1300px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--card-shadow);
  overflow: hidden;
}

.admin-tabs-nav {
  display: flex;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  padding: 0;
  gap: 0;
  border-bottom: 3px solid var(--accent-primary);
}

.admin-tab-btn {
  flex: 1;
  padding: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s all;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 4px solid transparent;
  position: relative;
}

.admin-tab-btn i {
  font-size: 18px;
}

.admin-tab-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: white;
}

.admin-tab-btn:focus {
  outline: none;
}

.admin-tab-btn.active {
  background: rgba(0, 0, 0, 0.2);
  color: white;
  border-bottom-color: #FFD700;
}

.admin-tabs-content {
  padding: 40px;
}

.admin-tab {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.admin-tab.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* System Tab Specific Styles */
.admin-system-section h2 {
  color: var(--accent-primary);
  font-size: 28px;
  margin-bottom: 10px;
  margin-top: 0;
}

.admin-section-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 40px;
}

.system-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.system-action-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  border: 2px solid var(--border-light);
  transition: 0.3s all;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.system-action-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 8px 20px var(--card-shadow);
  transform: translateY(-2px);
}

.action-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #5D54A4, #776BCC);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  margin-bottom: 20px;
}

.action-icon.danger {
  background: linear-gradient(135deg, #FF4757, #FF6348);
}

.system-action-card h3 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 12px;
  margin-top: 0;
}

.system-action-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 25px;
  line-height: 1.5;
  flex-grow: 1;
}

.action-btn {
  padding: 14px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s all;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.danger-btn {
  background: linear-gradient(135deg, #FF4757, #FF6348);
  color: white;
}

.danger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.danger-btn.large {
  padding: 16px 28px;
  font-size: 15px;
}

.admin-log-section {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  border: 2px solid var(--border-light);
}

.admin-log-section h2 {
  color: var(--accent-primary);
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 25px;
}

.admin-log {
  max-height: 400px;
  overflow-y: auto;
}

.admin-log-entry {
  background: var(--card-bg);
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  border-left: 4px solid #2ED573;
  font-size: 13px;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.admin-log-time {
  font-weight: 700;
  color: #2ED573;
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.admin-log-action {
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #e0e0e0;
}

/* ============================================
   SUPER ADMIN VIEW
   ============================================ */

.super-admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.super-admin-header {
  text-align: center;
  margin-bottom: 50px;
}

.super-admin-header h2 {
  font-size: 28px;
  color: #333;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.super-admin-header p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.schools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.school-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.school-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.school-card-header {
  background: linear-gradient(135deg, #5D54A4, #776BCC);
  color: white;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.school-card-header i {
  font-size: 32px;
  opacity: 0.9;
}

.school-card-content {
  padding: 25px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.school-name {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 5px 0;
}

.school-code {
  font-size: 13px;
  color: #999;
  margin: 0 0 15px 0;
  font-family: 'Courier New', monospace;
}

.school-stats {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
}

.school-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.school-stat-label {
  color: #999;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.school-stat-value {
  color: #333;
  font-size: 16px;
  font-weight: 700;
}

.school-card-footer {
  padding: 0 20px 20px 20px;
  margin-top: auto;
}

.btn-enter-school {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #5D54A4, #776BCC);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-enter-school:hover {
  background: linear-gradient(135deg, #4a4385, #6a5ba8);
  transform: scale(1.02);
}

.btn-enter-school:active {
  transform: scale(0.98);
}

.schools-grid .loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  padding: 40px;
  font-size: 16px;
}

.schools-grid .empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.schools-grid .empty i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 15px;
  display: block;
}

.schools-grid .empty p {
  color: #999;
  font-size: 16px;
  margin: 0;
}

/* ============================================
   COMPREHENSIVE ANIMATIONS & TRANSITIONS
   ============================================ */

/* Global smooth transitions */
button, input, select, a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:focus, select:focus, input:focus {
  outline: none;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide down animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide up animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide left animation */
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide right animation */
@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale pop animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Rotate animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Glow animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px transparent;
  }
  50% {
    box-shadow: 0 0 20px rgba(93, 84, 164, 0.5);
  }
}

/* Shimmer animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Page transitions */
.view {
  animation: fadeIn 0.4s ease-in;
}

/* Header animations */
.header {
  animation: slideDown 0.5s ease-out;
}

/* Card animations */
.section-card, .porta-card, .class-card, .school-card {
  animation: slideUp 0.4s ease-out;
  animation-fill-mode: both;
}

.section-card:nth-child(2) { animation-delay: 0.1s; }
.section-card:nth-child(3) { animation-delay: 0.2s; }
.section-card:nth-child(4) { animation-delay: 0.3s; }

/* Form group animations */
.form-group {
  animation: slideUp 0.3s ease-out;
  animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }

/* Input focus animation */
.form-group input:focus,
.form-group select:focus,
.login__input:focus {
  transform: scale(1.02);
  animation: glow 0.5s ease infinite;
}

/* Button hover animation */
.login__submit:hover,
.send-btn:hover,
.btn-primary:hover,
.porta-btn:hover,
.reset-btn:hover,
.action-btn:hover {
  transform: translateY(-3px);
  animation: glow 0.5s ease infinite;
}

/* Button active animation */
.login__submit:active,
.send-btn:active,
.btn-primary:active {
  transform: translateY(-1px);
  animation: none;
}

/* Notification animations */
.notification-banner {
  animation: slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification-item {
  animation: slideLeft 0.3s ease-out;
}

.admin-success-message,
.admin-warning-message {
  animation: slideLeft 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Tab animations */
.admin-tab {
  animation: fadeIn 0.3s ease-in;
}

.admin-tab-btn.active {
  animation: pulse 1.5s ease infinite;
}

/* Error message animations */
#errorMessage {
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Loading spinner animation */
.spinner {
  animation: rotate 1s linear infinite;
}

.loading-spinner.active {
  animation: fadeIn 0.2s ease-in;
}

/* Logo/Icon animations */
.button__icon,
.action-icon,
.porta-card-header i,
.school-card-header i {
  transition: transform 0.3s ease;
}

.login__submit:hover .button__icon,
.porta-btn:hover i,
.action-btn:hover i {
  transform: translateX(3px);
}

/* Scroll animations */
.notification-log, .admin-log, .students-list {
  animation: slideUp 0.4s ease-out;
}

/* Modal/Popup animations */
.modal {
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* List item stagger animations */
.log-entry {
  animation: slideLeft 0.3s ease-out;
  animation-fill-mode: both;
}

.log-entry:nth-child(1) { animation-delay: 0.05s; }
.log-entry:nth-child(2) { animation-delay: 0.1s; }
.log-entry:nth-child(3) { animation-delay: 0.15s; }
.log-entry:nth-child(4) { animation-delay: 0.2s; }
.log-entry:nth-child(5) { animation-delay: 0.25s; }

/* Table row hover animations */
.students-list tbody tr {
  animation: fadeIn 0.2s ease-out;
}

.students-list tbody tr:hover {
  animation: pulse 0.5s ease infinite;
}

/* Class item animations */
.class-item {
  animation: slideUp 0.3s ease-out;
  animation-fill-mode: both;
}

.class-item:nth-child(1) { animation-delay: 0.05s; }
.class-item:nth-child(2) { animation-delay: 0.1s; }
.class-item:nth-child(3) { animation-delay: 0.15s; }
.class-item:nth-child(4) { animation-delay: 0.2s; }

/* Hover scale animations */
.social-login__icon:hover {
  animation: bounce 0.5s ease;
}

.quick-btn:hover,
.preset-btn:hover,
.ack-btn:hover {
  transform: scale(1.1);
}

/* Input label animations */
.login__label {
  animation: slideDown 0.2s ease-out;
}

/* Color transition animations */
.logout-btn {
  background-image: linear-gradient(135deg, #FF4757 0%, #FF6348 100%);
  background-size: 200% 200%;
  background-position: left center;
  transition: background-position 0.5s ease;
}

.logout-btn:hover {
  background-position: right center;
}

/* Smooth page transitions */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Responsive animation adjustments */
@media (max-width: 768px) {
  .section-card {
    animation-delay: 0s !important;
  }
  
  .form-group {
    animation-delay: 0s !important;
  }
  
  .log-entry {
    animation-delay: 0s !important;
  }
}

/* ============================================
   OTHER STUDENT (EGYÉBB) FEATURE STYLES
   ============================================ */

.porta-btn.secondary.small {
  padding: 10px 16px;
  font-size: 12px;
  flex: 1;
}

.student-other-container {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.other-student-form {
  display: none;
  background: rgba(93, 84, 164, 0.08);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(93, 84, 164, 0.2);
  animation: slideDown 0.3s ease-out;
}

.other-student-form.active {
  display: block;
}

.other-student-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid rgba(93, 84, 164, 0.3);
  border-radius: 6px;
  font-size: 14px;
  font-family: Raleway, sans-serif;
  transition: all 0.3s ease;
}

.other-student-form input:focus {
  outline: none;
  border-color: #5D54A4;
  box-shadow: 0 0 0 3px rgba(93, 84, 164, 0.1);
  transform: scale(1.02);
}

.other-student-form input::placeholder {
  color: #aaa;
}

.other-student-form .form-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #e74c3c;
}

/* ============================================
   SETTINGS & AUDIT PANEL STYLES
   ============================================ */

.admin-settings-section,
.admin-audit-section {
  padding: 20px 0;
}

.admin-settings-section h2,
.admin-audit-section h2 {
  color: var(--accent-primary);
  margin-bottom: 10px;
  font-size: 26px;
}

.admin-section-desc {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 14px;
}

/* Settings Cards */
.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.settings-card:hover {
  box-shadow: 0 4px 12px var(--card-shadow);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.settings-card-header i {
  font-size: 20px;
  color: var(--accent-primary);
}

.settings-card-header h3 {
  color: var(--text-primary);
  font-size: 16px;
  margin: 0;
}

.settings-content {
  padding-left: 32px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 8px;
  transition: opacity 0.2s ease;
}

.settings-toggle:disabled,
.settings-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.settings-toggle input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

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

.settings-toggle span {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.settings-desc {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 8px 0 0 0;
}

/* Audit Controls */
.audit-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.audit-btn {
  padding: 12px 18px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93, 84, 164, 0.3);
}

.audit-btn.danger {
  background: var(--accent-danger);
  color: white;
}

.audit-btn.danger:hover {
  background: #c0392b;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

/* Audit Stats */
.audit-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Audit Logs Container */
.audit-logs-container {
  margin-top: 30px;
}

.audit-logs-container h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 16px;
}

.audit-logs {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  max-height: 600px;
  overflow-y: auto;
}

.audit-log-entry {
  padding: 15px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: background 0.2s ease;
}

.audit-log-entry:hover {
  background: var(--bg-secondary);
}

.audit-log-entry:last-child {
  border-bottom: none;
}

.audit-log-info {
  flex: 1;
}

.audit-log-action {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 5px;
}

.audit-log-details {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 5px 0 0 0;
}

.audit-log-time {
  color: var(--text-light);
  font-size: 11px;
  white-space: nowrap;
  margin-left: 15px;
}

/* ============================================
   CLASS ATTENDANCE TRACKING STYLES
   ============================================ */

.attendance-card {
  grid-column: span 1;
}

.attendance-overview {
  display: flex;
  justify-content: space-around;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 15px;
}

.attendance-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.attendance-stat .stat-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attendance-stat .stat-count {
  color: var(--accent-primary);
  font-size: 24px;
  font-weight: 700;
}

.attendance-stat .stat-count.responded {
  color: var(--accent-success);
}

.attendance-stat .stat-count.waiting {
  color: var(--status-waiting);
}

.called-students-list {
  max-height: 300px;
  overflow-y: auto;
}

.student-call-item {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid var(--accent-primary);
  transition: all 0.2s ease;
}

.student-call-item:hover {
  background: var(--border-light);
}

.student-call-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
}

.student-call-time {
  color: var(--text-secondary);
  font-size: 11px;
}

.student-call-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.student-call-status.active {
  background: #FFE5B4;
  color: #B8860B;
  border-left-color: #FFD700;
}

.student-call-status.acknowledged {
  background: #D4EDDA;
  color: #155724;
  border-left-color: var(--accent-success);
}

.student-call-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.confirm-left-btn {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  background: #D4EDDA;
  color: #155724;
  transition: background 0.2s;
}

.confirm-left-btn:hover {
  background: #b8dfc4;
}

.cancel-call-btn {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  background: #F8D7DA;
  color: #721C24;
  transition: background 0.2s;
}

.cancel-call-btn:hover {
  background: #f1b8bd;
}

/* ============================================
   BULK OPERATIONS STYLES
   ============================================ */

.bulk-selection-toolbar {
  display: none;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--accent-primary);
  color: white;
  border-radius: 8px;
  margin-bottom: 15px;
  animation: slideDown 0.3s ease;
}

.bulk-selection-toolbar.active {
  display: flex;
}

.bulk-selection-info {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.bulk-selection-info span {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 4px;
  margin: 0 5px;
}

.bulk-action-btn {
  padding: 8px 14px;
  background: white;
  color: var(--accent-primary);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bulk-action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bulk-action-btn.danger {
  color: var(--accent-danger);
}

.bulk-action-btn.clear {
  color: #666;
  background: rgba(255,255,255,0.7);
}

.notification-checkbox {
  cursor: pointer;
  margin-right: 10px;
  accent-color: var(--accent-primary);
}

.bulk-select-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.bulk-select-all-btn {
  padding: 8px 12px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bulk-select-all-btn:hover {
  transform: translateY(-2px);
}
}