﻿/* ============================================================
   MAIN.CSS — AI EdTech Platform | Ocean Cybernetic Theme
   Global Design System | v1.0
   ============================================================ */

/* === GOOGLE FONTS IMPORT === */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* === CSS CUSTOM PROPERTIES (DESIGN TOKENS) === */
:root {
  /* Background Palette */
  --bg-deep:             #000b18;
  --bg-dark:             #001a30;
  --bg-mid:              #00314f;
  --bg-light:            #00597a;

  /* Card / Glass Surfaces */
  --card-bg:             rgba(255, 255, 255, 0.05);
  --card-bg-hover:       rgba(255, 255, 255, 0.08);
  --card-border:         rgba(255, 255, 255, 0.12);
  --card-highlight:      rgba(180, 240, 255, 0.25);

  /* Brand Colors */
  --cyan:                #00d4ff;
  --cyan-soft:           #7ae8ff;
  --aqua:                #4dd0e1;
  --teal:                #2dd4bf;
  --seafoam:             #a0f0e8;
  --neon-green:          #39ff14;
  --neon-purple:         #bf00ff;

  /* Typography */
  --text-primary:        #E8F6FB;
  --text-secondary:      #B8D8E8;
  --text-muted:          #6a9ab0;

  /* Semantic Colors */
  --danger:              #ff4757;
  --warning:             #ffa502;
  --success:             #2ed573;

  /* Layout */
  --sidebar-width:       280px;
  --sidebar-collapsed:   70px;
  --header-height:       65px;
  --border-radius:       16px;
  --border-radius-lg:    24px;

  /* Motion */
  --transition:          all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Effects */
  --glass-blur:          blur(22px) saturate(160%);
  --shadow-glow:         0 0 30px rgba(0, 212, 255, 0.2);
  --shadow-card:         0 24px 56px rgba(0, 30, 60, 0.55);

  /* Font Families */
  --font-main:           'Nunito', sans-serif;
  --font-display:        'Playfair Display', serif;
  --font-mono:           'JetBrains Mono', monospace;
}

/* === KEYFRAME ANIMATIONS === */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(0,212,255,0.4), 0 0 20px rgba(0,212,255,0.2);
  }
  50% {
    opacity: 0.85;
    box-shadow: 0 0 25px rgba(0,212,255,0.9), 0 0 50px rgba(0,212,255,0.5), 0 0 80px rgba(0,212,255,0.2);
  }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes wave-drift {
  0%   { transform: translateX(0) scaleY(1); }
  25%  { transform: translateX(-15px) scaleY(1.04); }
  50%  { transform: translateX(0) scaleY(0.96); }
  75%  { transform: translateX(15px) scaleY(1.04); }
  100% { transform: translateX(0) scaleY(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  33%       { transform: translateY(-4px) scale(1.05); }
  66%       { transform: translateY(-2px) scale(1.02); }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 4px var(--cyan), 0 0 12px var(--cyan), 0 0 24px var(--cyan), 0 0 48px rgba(0,212,255,0.6);
    opacity: 1;
  }
  20%, 24%, 55% { text-shadow: none; opacity: 0.85; }
}

@keyframes ripple {
  from { transform: scale(0); opacity: 0.6; }
  to   { transform: scale(3); opacity: 0; }
}

@keyframes scanline {
  0%   { top: -5%; }
  100% { top: 105%; }
}

@keyframes typing-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes progress-glow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(0,212,255,0.5), 0 0 12px rgba(0,212,255,0.3);
  }
  50% {
    box-shadow: 0 0 14px rgba(0,212,255,0.9), 0 0 28px rgba(0,212,255,0.6), 0 0 42px rgba(0,212,255,0.3);
  }
}

/* === GLOBAL RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,89,122,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(0,49,79,0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(0,26,48,0.8) 0%, transparent 70%),
    linear-gradient(160deg, #000b18 0%, #001a30 40%, #00314f 75%, #000b18 100%);
  pointer-events: none;
}

a { color: var(--cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--cyan-soft); }
img, video, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-main); }
input, textarea, select { outline: none; font-family: var(--font-main); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--text-primary); line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.7; }

/* === BG CANVAS OVERLAY === */
.bg-canvas {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -2; pointer-events: none; opacity: 0.6;
}

/* === HILLS / WAVES LAYER === */
.hills-layer {
  position: fixed; bottom: 0; left: 0; width: 100%; height: 280px;
  z-index: -1; pointer-events: none; overflow: hidden;
}
.hills-layer svg { width: 100%; height: 100%; animation: wave-drift 8s ease-in-out infinite; }

/* === SCANLINE === */
.scanline-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 8px;
  background: linear-gradient(transparent, rgba(0,212,255,0.04), transparent);
  z-index: 9999; pointer-events: none;
  animation: scanline 6s linear infinite;
}

/* === APP SHELL === */
.app-shell { display: flex; min-height: 100vh; position: relative; }

/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow-x: hidden;
}
.main-content.sidebar-collapsed { margin-left: var(--sidebar-collapsed); }

/* === PAGE WRAPPER === */
.page-wrapper {
  padding: 28px 32px;
  min-height: calc(100vh - var(--header-height));
  animation: fadeInUp 0.5s ease both;
}

/* === GRIDS === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* === FLEX UTILITIES === */
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-gap-sm  { gap: 8px; }
.flex-gap-md  { gap: 16px; }
.flex-gap-lg  { gap: 24px; }

/* === GLASS CARD === */
.glass-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
  overflow: hidden;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease both;
}

.glass-card::before {
  content: '';
  position: absolute; top: -30px; left: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(0,212,255,0.15) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; transition: var(--transition);
}

.glass-card::after {
  content: '';
  position: absolute; bottom: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(45,212,191,0.1) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-6px);
  background: var(--card-bg-hover);
  border-color: rgba(0,212,255,0.3);
  box-shadow: var(--shadow-card), var(--shadow-glow), inset 0 1px 0 rgba(180,240,255,0.15);
}

.glass-card:hover::before { width: 160px; height: 160px; }
.glass-card:hover::after  { width: 200px; height: 200px; }

.glass-card.highlight-top { border-top: 2px solid var(--cyan); }

/* === STAT CARD === */
.stat-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 22px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--teal), transparent);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  border-color: rgba(0,212,255,0.25);
}

.stat-card .stat-value {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  color: var(--cyan); line-height: 1.1; animation: pulse-glow 3s ease-in-out infinite;
}

.stat-card .stat-label {
  font-size: 0.8rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; font-weight: 600;
}

.stat-card .stat-icon { font-size: 2rem; opacity: 0.7; float: right; margin-top: -4px; }

/* === BUTTONS === */
.btn-primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #006699 100%);
  color: #000b18; border: none;
  box-shadow: 0 4px 20px rgba(0,212,255,0.4), 0 2px 8px rgba(0,0,0,0.3);
  padding: 11px 24px; border-radius: 12px;
  font-size: 0.9rem; font-weight: 700; font-family: var(--font-main);
  letter-spacing: 0.03em; transition: var(--transition);
  position: relative; overflow: hidden; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}

.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0; transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,212,255,0.6), 0 4px 12px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #33ddff 0%, #00b8e6 50%, #007ab8 100%);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-primary .ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0); animation: ripple 0.6s linear; pointer-events: none;
}

.btn-secondary {
  background: transparent; color: var(--cyan); border: 1.5px solid var(--cyan);
  padding: 10px 24px; border-radius: 12px;
  font-size: 0.9rem; font-weight: 700; font-family: var(--font-main);
  letter-spacing: 0.03em; transition: var(--transition);
  position: relative; overflow: hidden; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}

.btn-secondary:hover {
  transform: translateY(-2px); border-color: var(--cyan-soft); color: var(--cyan-soft);
  box-shadow: 0 4px 20px rgba(0,212,255,0.25), inset 0 0 20px rgba(0,212,255,0.05);
}
.btn-secondary:active { transform: translateY(0); }

.btn-danger {
  background: linear-gradient(135deg, #ff4757 0%, #cc1a2a 100%);
  color: #fff; border: none;
  box-shadow: 0 4px 20px rgba(255,71,87,0.35);
  padding: 11px 24px; border-radius: 12px;
  font-size: 0.9rem; font-weight: 700; font-family: var(--font-main);
  transition: var(--transition); position: relative; overflow: hidden;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}

.btn-danger:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,71,87,0.55);
  background: linear-gradient(135deg, #ff6b7a 0%, #e62035 100%);
}
.btn-danger:active { transform: translateY(0); }

.btn-danger .ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0); animation: ripple 0.6s linear; pointer-events: none;
}

.btn-sm { padding: 7px 16px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 14px; }

/* === BADGES === */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; animation: badgeFloat 3s ease-in-out infinite;
  white-space: nowrap;
}

.badge-cyan    { background: rgba(0,212,255,0.18);  color: var(--cyan);    border: 1px solid rgba(0,212,255,0.35); }
.badge-teal    { background: rgba(45,212,191,0.18); color: var(--teal);    border: 1px solid rgba(45,212,191,0.35); }
.badge-success { background: rgba(46,213,115,0.18); color: var(--success); border: 1px solid rgba(46,213,115,0.35); }
.badge-danger  { background: rgba(255,71,87,0.18);  color: var(--danger);  border: 1px solid rgba(255,71,87,0.35); }
.badge-warning { background: rgba(255,165,2,0.18);  color: var(--warning); border: 1px solid rgba(255,165,2,0.35); }

.badge-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; background: var(--danger); color: #fff;
  border-radius: 50%; font-size: 0.65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 2px solid var(--bg-deep); animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255,71,87,0.5);
}

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
  background: rgba(0,212,255,0.1); color: var(--cyan-soft);
  border: 1px solid rgba(0,212,255,0.2); transition: var(--transition); white-space: nowrap;
}
.tag:hover { background: rgba(0,212,255,0.18); border-color: rgba(0,212,255,0.4); transform: translateY(-1px); }

/* === PROGRESS BARS === */
.progress-bar-container {
  width: 100%; height: 8px;
  background: rgba(255,255,255,0.08); border-radius: 100px;
  overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,0.05);
}
.progress-bar-container.thick { height: 14px; }

.progress-bar-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--teal) 50%, var(--seafoam) 100%);
  position: relative; transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
  animation: progress-glow 2.5s ease-in-out infinite;
}

.progress-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  background-size: 200% 100%; animation: shimmer 2s linear infinite; border-radius: 100px;
}

.progress-bar-fill.danger  { background: linear-gradient(90deg, var(--danger), #ff6b7a); animation: none; box-shadow: 0 0 10px rgba(255,71,87,0.5); }
.progress-bar-fill.warning { background: linear-gradient(90deg, var(--warning), #ffc107); animation: none; box-shadow: 0 0 10px rgba(255,165,2,0.5); }
.progress-bar-fill.success { background: linear-gradient(90deg, var(--success), #7bed9f); animation: none; box-shadow: 0 0 10px rgba(46,213,115,0.5); }

/* === NEON TEXT === */
.neon-text {
  color: var(--cyan);
  text-shadow: 0 0 4px var(--cyan), 0 0 12px var(--cyan), 0 0 24px rgba(0,212,255,0.6);
  animation: neon-flicker 8s ease-in-out infinite;
}

.neon-text-teal {
  color: var(--teal);
  text-shadow: 0 0 4px var(--teal), 0 0 12px var(--teal), 0 0 24px rgba(45,212,191,0.6);
}

.neon-text-green {
  color: var(--neon-green);
  text-shadow: 0 0 4px var(--neon-green), 0 0 12px var(--neon-green), 0 0 24px rgba(57,255,20,0.5);
}

.shimmer-text {
  background: linear-gradient(90deg, var(--cyan), var(--teal), var(--seafoam), var(--cyan));
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: shimmer 3s linear infinite;
}

/* === FORM ELEMENTS === */
.input-glass {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--card-border); border-radius: 12px;
  padding: 12px 18px; color: var(--text-primary);
  font-family: var(--font-main); font-size: 0.92rem; transition: var(--transition);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.input-glass::placeholder { color: var(--text-muted); }
.input-glass:focus {
  border-color: var(--cyan); background: rgba(0,212,255,0.05);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.15), 0 0 20px rgba(0,212,255,0.1);
}
.input-glass:hover:not(:focus) { border-color: rgba(0,212,255,0.3); }
.input-glass.error   { border-color: var(--danger);  box-shadow: 0 0 0 3px rgba(255,71,87,0.15); }
.input-glass.success { border-color: var(--success); box-shadow: 0 0 0 3px rgba(46,213,115,0.15); }
textarea.input-glass { resize: vertical; min-height: 100px; line-height: 1.6; }

.label-glass {
  display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; transition: var(--transition);
}
.form-group:focus-within .label-glass { color: var(--cyan); }

.select-glass {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--card-border); border-radius: 12px;
  padding: 12px 18px; color: var(--text-primary);
  font-family: var(--font-main); font-size: 0.92rem;
  transition: var(--transition); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d4ff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
.select-glass:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.15); outline: none; }
.select-glass option { background: var(--bg-dark); color: var(--text-primary); }

.form-group { display: flex; flex-direction: column; margin-bottom: 20px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .input-glass { padding-left: 44px; }
.input-icon-wrap .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; transition: var(--transition); pointer-events: none;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 10000;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 360px; width: 100%; pointer-events: none;
}

.toast {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px; border-radius: var(--border-radius);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border); background: rgba(0,26,48,0.9);
  box-shadow: var(--shadow-card), 0 0 20px rgba(0,212,255,0.1);
  pointer-events: all; animation: slideInRight 0.4s cubic-bezier(0.4,0,0.2,1) both;
  position: relative; overflow: hidden;
}

.toast::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: 4px 0 0 4px;
}

.toast.success::before { background: var(--success); box-shadow: 0 0 8px var(--success); }
.toast.error::before   { background: var(--danger);  box-shadow: 0 0 8px var(--danger); }
.toast.info::before    { background: var(--cyan);    box-shadow: 0 0 8px var(--cyan); }
.toast.warning::before { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

.toast-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title   { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.toast-message { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.45; }
.toast-close {
  background: none; border: none; color: var(--text-muted); font-size: 1rem;
  cursor: pointer; transition: var(--transition); padding: 0; flex-shrink: 0; line-height: 1;
}
.toast-close:hover { color: var(--text-primary); transform: scale(1.2); }
.toast.toast-exit { animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1) reverse both; }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,11,24,0.85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeInUp 0.25s ease both;
}
.modal-overlay.hidden { display: none; }

.modal-glass {
  background: rgba(0,26,48,0.92);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: var(--border-radius-lg); padding: 36px; max-width: 560px; width: 100%;
  box-shadow: var(--shadow-card), 0 0 40px rgba(0,212,255,0.12), inset 0 1px 0 rgba(180,240,255,0.1);
  animation: fadeInUp 0.35s cubic-bezier(0.4,0,0.2,1) both;
  position: relative; overflow: hidden;
}

.modal-glass::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--card-border);
}
.modal-title { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }

.modal-close-btn {
  background: rgba(255,255,255,0.06); border: 1px solid var(--card-border);
  color: var(--text-muted); width: 34px; height: 34px; border-radius: 50%;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.modal-close-btn:hover {
  background: rgba(255,71,87,0.15); border-color: var(--danger); color: var(--danger);
  transform: scale(1.1) rotate(90deg);
}

.modal-body   { color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--card-border);
}

.modal-glass.modal-sm { max-width: 380px; }
.modal-glass.modal-lg { max-width: 760px; }
.modal-glass.modal-xl { max-width: 960px; }

/* === LOADER === */
.loader-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(0,212,255,0.15); border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite; box-shadow: 0 0 12px rgba(0,212,255,0.3);
}
.loader-spinner.sm { width: 28px; height: 28px; border-width: 2px; }
.loader-spinner.lg { width: 72px; height: 72px; border-width: 4px; }
.loader-spinner.teal { border-color: rgba(45,212,191,0.15); border-top-color: var(--teal); box-shadow: 0 0 12px rgba(45,212,191,0.3); }

.loader-overlay {
  position: fixed; inset: 0; background: rgba(0,11,24,0.75);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px; z-index: 9999;
}
.loader-overlay .loader-text { color: var(--cyan-soft); font-size: 0.9rem; animation: pulse-glow 1.5s ease-in-out infinite; letter-spacing: 0.1em; }

/* === AVATAR === */
.avatar-circle {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--cyan);
  object-fit: cover; box-shadow: 0 0 10px rgba(0,212,255,0.35);
  transition: var(--transition); flex-shrink: 0;
}
.avatar-circle:hover { border-color: var(--cyan-soft); box-shadow: 0 0 18px rgba(0,212,255,0.6); transform: scale(1.06); }
.avatar-circle.lg { width: 64px; height: 64px; border-width: 3px; }
.avatar-circle.sm { width: 32px; height: 32px; border-width: 1.5px; }

.avatar-wrap { position: relative; display: inline-block; }
.avatar-status {
  position: absolute; bottom: 2px; right: 2px;
  width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg-deep);
}
.avatar-status.online  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.avatar-status.offline { background: var(--text-muted); }
.avatar-status.busy    { background: var(--danger); }

/* === DIVIDERS === */
.divider-neon {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--teal), transparent);
  margin: 24px 0; position: relative; box-shadow: 0 0 6px rgba(0,212,255,0.4);
}

.divider-neon::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 3px; background: var(--cyan); border-radius: 2px; box-shadow: 0 0 10px var(--cyan);
}

.divider-simple { width: 100%; height: 1px; background: var(--card-border); margin: 20px 0; }

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0,11,24,0.8); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--cyan), var(--teal)); border-radius: 3px; box-shadow: 0 0 6px rgba(0,212,255,0.3); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--cyan-soft), var(--aqua)); box-shadow: 0 0 10px rgba(0,212,255,0.5); }
::-webkit-scrollbar-corner { background: var(--bg-deep); }

.scrollbar-custom { scrollbar-width: thin; scrollbar-color: var(--cyan) rgba(0,11,24,0.8); }
.scrollbar-custom::-webkit-scrollbar { width: 6px; }
.scrollbar-custom::-webkit-scrollbar-track { background: rgba(0,11,24,0.6); border-radius: 3px; }
.scrollbar-custom::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--cyan), var(--teal)); border-radius: 3px; }

/* === UTILITY CLASSES === */
.mt-sm { margin-top: 8px; } .mt-md { margin-top: 16px; } .mt-lg { margin-top: 24px; } .mt-xl { margin-top: 36px; }
.mb-sm { margin-bottom: 8px; } .mb-md { margin-bottom: 16px; } .mb-lg { margin-bottom: 24px; } .mb-xl { margin-bottom: 36px; }
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-cyan      { color: var(--cyan) !important; }
.text-teal      { color: var(--teal) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.font-mono    { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.font-bold    { font-weight: 700; }
.hidden       { display: none !important; }
.w-full       { width: 100%; }
.rounded      { border-radius: var(--border-radius); }
.rounded-full { border-radius: 9999px; }
.glow-cyan    { box-shadow: 0 0 20px rgba(0,212,255,0.4); }
.glow-teal    { box-shadow: 0 0 20px rgba(45,212,191,0.4); }
.glow-danger  { box-shadow: 0 0 20px rgba(255,71,87,0.4); }

.anim-float      { animation: float 4s ease-in-out infinite; }
.anim-pulse      { animation: pulse-glow 2s ease-in-out infinite; }
.anim-fadeInUp   { animation: fadeInUp 0.5s ease both; }
.anim-slideLeft  { animation: slideInLeft 0.4s ease both; }
.anim-slideRight { animation: slideInRight 0.4s ease both; }
.anim-spin       { animation: spin 1s linear infinite; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* === RESPONSIVE === */
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .page-wrapper { padding: 20px; }
}

@media (max-width: 768px) {
  .main-content { margin-left: 0 !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-wrapper { padding: 16px; }
  .glass-card { padding: 20px; }
  .modal-glass { padding: 24px; border-radius: var(--border-radius); }
  .toast-container { top: 12px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn-primary, .modal-footer .btn-secondary { width: 100%; justify-content: center; }
}
