/*
 * CHN IT Support System
 * Full-Screen Professional CSS
 * Version: 4.0.0 - Modern Loading & Full Layout
 */

/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-glow: rgba(99, 102, 241, 0.5);
  
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;
  
  --white: #ffffff;
  --black: #000000;
  
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
  
  --header-height: 70px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-100);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.hidden { display: none !important; }

/* ========================================
   🚀 MODERN LOADING SCREEN - NO SHAKE
   ======================================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: var(--gray-950);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  overflow: hidden;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Animated Background */
.loading-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  animation: bgPulse 4s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Floating Particles */
.loading-screen::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.2), transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-200px); }
}

.loading-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--white);
}

/* Main Logo Container */
.loading-icon {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 40px;
}

/* Rotating Outer Ring */
.loading-icon::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--primary-light);
  animation: spinRing 2s linear infinite;
}

/* Secondary Ring */
.loading-icon::after {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: rgba(139, 92, 246, 0.5);
  border-left-color: rgba(236, 72, 153, 0.3);
  animation: spinRing 3s linear infinite reverse;
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Icon Circle */
.loading-icon-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #ec4899 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 60px rgba(99, 102, 241, 0.5),
    0 0 100px rgba(139, 92, 246, 0.3),
    inset 0 0 30px rgba(255, 255, 255, 0.1);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 
      0 0 60px rgba(99, 102, 241, 0.5),
      0 0 100px rgba(139, 92, 246, 0.3),
      inset 0 0 30px rgba(255, 255, 255, 0.1);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
      0 0 80px rgba(99, 102, 241, 0.6),
      0 0 120px rgba(139, 92, 246, 0.4),
      inset 0 0 30px rgba(255, 255, 255, 0.2);
  }
}

.loading-icon i {
  font-size: 50px;
  color: var(--white);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Brand Text */
.loading-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.loading-content .loading-subtitle {
  font-size: 16px;
  color: var(--gray-400);
  margin-bottom: 50px;
  font-weight: 400;
}

/* Progress Container */
.loading-progress-container {
  width: 320px;
  margin: 0 auto 25px;
}

/* Modern Progress Bar */
.loading-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6, #ec4899, var(--primary));
  background-size: 300% 100%;
  border-radius: 10px;
  animation: progressGradient 2s linear infinite, progressWidth 2.5s ease-out forwards;
  position: relative;
}

.loading-progress::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
  filter: blur(3px);
}

@keyframes progressGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes progressWidth {
  0% { width: 0%; }
  20% { width: 20%; }
  40% { width: 40%; }
  60% { width: 65%; }
  80% { width: 85%; }
  100% { width: 100%; }
}

/* Loading Steps */
.loading-steps {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
}

.loading-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.3;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.loading-step.active {
  opacity: 1;
}

.loading-step.done {
  opacity: 0.6;
}

.loading-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gray-400);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.loading-step.active .loading-step-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  animation: stepPulse 1s ease-in-out infinite;
}

.loading-step.done .loading-step-icon {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
}

.loading-step-text {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.loading-step.active .loading-step-text {
  color: var(--white);
}

/* Status Message */
.loading-content > p {
  color: var(--gray-500);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-content > p i {
  animation: spinIcon 1s linear infinite;
}

@keyframes spinIcon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   MAIN APP - FULL SCREEN
   ======================================== */
.app {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

.app.visible {
  opacity: 1;
}

/* ========================================
   LOGIN SECTION - FULL SCREEN
   ======================================== */
.login-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #4c1d95 50%, #581c87 75%, #701a75 100%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  padding: 20px;
  overflow: auto;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Decorative Elements */
.login-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 40%);
  pointer-events: none;
}

.login-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 45px 40px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSlideUp {
  from { 
    opacity: 0; 
    transform: translateY(40px) scale(0.98); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 35px;
}

.auth-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  box-shadow: 
    0 10px 30px rgba(99, 102, 241, 0.4),
    0 0 0 8px rgba(99, 102, 241, 0.1);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-icon.green {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  box-shadow: 
    0 10px 30px rgba(34, 197, 94, 0.4),
    0 0 0 8px rgba(34, 197, 94, 0.1);
}

.auth-icon.orange {
  background: linear-gradient(135deg, var(--warning) 0%, #ea580c 100%);
  box-shadow: 
    0 10px 30px rgba(245, 158, 11, 0.4),
    0 0 0 8px rgba(245, 158, 11, 0.1);
}

.auth-icon i {
  font-size: 40px;
  color: var(--white);
}

.auth-header h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--gray-500);
  font-size: 15px;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 30px;
}

.auth-tab {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.auth-tab:hover {
  color: var(--gray-700);
}

.auth-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-group label i {
  color: var(--gray-400);
  font-size: 13px;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 15px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--gray-800);
  transition: all 0.25s ease;
  background: var(--white);
}

.input-group input:hover,
.input-group select:hover,
.input-group textarea:hover {
  border-color: var(--gray-300);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: var(--gray-400);
}

.input-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 45px;
}

.input-group small {
  font-size: 12px;
  color: var(--gray-400);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 500px) {
  .input-row { grid-template-columns: 1fr; }
}

/* Buttons */
.btn-submit {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-submit:active {
  transform: translateY(-1px);
}

.btn-submit.green {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-submit.green:hover {
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5);
}

.btn-secondary {
  width: 100%;
  padding: 15px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.btn-link {
  width: 100%;
  padding: 14px;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.btn-link:hover {
  color: var(--primary);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 8px 0;
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Pending Card Styles */
.pending-content {
  text-align: center;
  padding: 20px 0;
}

.pending-email {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--primary);
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 35px;
  font-size: 15px;
  border: 2px solid rgba(99, 102, 241, 0.2);
}

.pending-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 30px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--gray-50);
  border-radius: var(--radius);
  color: var(--gray-400);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.timeline-item i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.timeline-item.done {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.timeline-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 600;
}

.pending-note {
  background: var(--gray-50);
  color: var(--gray-600);
  padding: 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 25px;
  line-height: 1.6;
}

.pending-note i {
  color: var(--info);
  margin-right: 10px;
}

.pulse-animation {
  animation: iconPulse 2s infinite;
}

/* ========================================
   DASHBOARD SECTION - FULL SCREEN
   ======================================== */
.dashboard-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-100);
  overflow: hidden;
}

/* Header - Full Width */
.main-header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: relative;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.header-brand i {
  font-size: 30px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  gap: 6px;
  background: var(--gray-50);
  padding: 6px;
  border-radius: var(--radius);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s ease;
}

.nav-item:hover {
  background: var(--white);
  color: var(--gray-700);
}

.nav-item.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.nav-item i {
  font-size: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

.sync-indicator.syncing {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.sync-indicator.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--gray-500);
  transition: all 0.25s ease;
}

.icon-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.icon-btn i {
  font-size: 18px;
}

/* User Dropdown */
.user-dropdown-container {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  background: var(--gray-50);
  border: 2px solid var(--gray-100);
  border-radius: var(--radius);
  transition: all 0.25s ease;
}

.user-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}

.user-avatar.large {
  width: 52px;
  height: 52px;
  font-size: 16px;
  border-radius: var(--radius);
}

.user-details {
  text-align: left;
}

.user-name {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-800);
}

.user-role {
  display: block;
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.user-btn .fa-chevron-down {
  font-size: 11px;
  color: var(--gray-400);
  transition: transform 0.2s ease;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  z-index: 1000;
  animation: dropdownIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.dropdown-user-info strong {
  display: block;
  font-size: 15px;
  color: var(--gray-800);
}

.dropdown-user-info small {
  color: var(--gray-500);
  font-size: 13px;
}

.user-dropdown hr {
  border: none;
  height: 1px;
  background: var(--gray-100);
  margin: 0;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  color: var(--gray-600);
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.dropdown-link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* Main Content - Full Screen */
.main-content {
  flex: 1;
  padding: 30px;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Remove max-width for full-screen layout */
@media (min-width: 1400px) {
  .main-content {
    padding: 35px 50px;
  }
}

/* Page Structure */
.page {
  display: none;
  animation: pageIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
}

.page.active {
  display: flex;
  flex-direction: column;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  margin-bottom: 28px;
  flex-shrink: 0;
}

.page-title h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: -0.5px;
}

.page-title h1 i {
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-title p {
  color: var(--gray-500);
  margin-top: 6px;
  font-size: 16px;
}

.page-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Stats Row - Full Width */
.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  flex-shrink: 0;
}

@media (max-width: 1600px) {
  .stats-row { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid var(--gray-100);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 62px;
  height: 62px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.stat-card.blue .stat-icon { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.stat-card.orange .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-card.red .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.stat-card.purple .stat-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-card.green .stat-icon { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.stat-card.teal .stat-icon { background: rgba(14, 165, 233, 0.1); color: var(--info); }

.stat-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-number {
  font-size: 34px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Dashboard Grid - Full Width */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  flex: 1;
  min-height: 0;
}

.dashboard-grid .full-width {
  grid-column: 1 / -1;
}

@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.card-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title h3 i {
  color: var(--primary);
}

.card-content {
  padding: 22px 26px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Ticket List Items */
.ticket-list-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.25s ease;
  border-left: 4px solid var(--gray-300);
}

.ticket-list-item:hover {
  background: var(--gray-100);
  transform: translateX(6px);
}

.ticket-list-item:last-child {
  margin-bottom: 0;
}

.ticket-list-item.low { border-left-color: var(--success); }
.ticket-list-item.medium { border-left-color: var(--warning); }
.ticket-list-item.high { border-left-color: #f97316; }
.ticket-list-item.critical { 
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.ticket-info {
  flex: 1;
  min-width: 0;
}

.ticket-id {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.ticket-title {
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  font-size: 15px;
}

.ticket-meta {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.ticket-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ticket-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.open { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.status-badge.in-progress { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-badge.pending { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.status-badge.resolved { background: rgba(14, 165, 233, 0.1); color: var(--info); }
.status-badge.closed { background: var(--gray-100); color: var(--gray-500); }

.priority-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.priority-badge.low { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.priority-badge.medium { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.priority-badge.high { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.priority-badge.critical { background: var(--danger); color: var(--white); }

/* Activity List */
.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.activity-icon.created { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.activity-icon.updated { background: rgba(14, 165, 233, 0.1); color: var(--info); }
.activity-icon.resolved { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.activity-icon.login { background: var(--gray-100); color: var(--gray-500); }

.activity-text {
  flex: 1;
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

.activity-time {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  flex-shrink: 0;
}

/* Empty & Loading States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 50px 25px;
  color: var(--gray-400);
}

.loading-state i,
.empty-state i {
  font-size: 42px;
  margin-bottom: 18px;
  display: block;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 17px;
  color: var(--gray-500);
  margin-bottom: 10px;
  font-weight: 600;
}

.empty-state p {
  color: var(--gray-400);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-primary::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.4s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.btn-primary.large {
  padding: 18px 36px;
  font-size: 16px;
}

.btn-primary.full-width {
  width: 100%;
  justify-content: center;
}

.btn-small {
  padding: 10px 18px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

/* ========================================
   CREATE TICKET PAGE - FULL WIDTH
   ======================================== */
.form-container {
  max-width: 900px;
}

.ticket-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}

.form-section {
  margin-bottom: 35px;
}

.form-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-section h3 i {
  color: var(--primary);
  font-size: 18px;
}

.form-section.highlight {
  background: linear-gradient(135deg, var(--gray-50) 0%, rgba(99, 102, 241, 0.03) 100%);
  padding: 25px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}

/* Category Options */
.category-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .category-options { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 500px) {
  .category-options { grid-template-columns: repeat(2, 1fr); }
}

.category-item {
  cursor: pointer;
}

.category-item input { display: none; }

.category-box {
  padding: 24px 16px;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.25s ease;
}

.category-box:hover {
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.03);
  transform: translateY(-2px);
}

.category-item input:checked + .category-box {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.category-box i {
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 12px;
}

.category-box span {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-700);
}

.form-select {
  width: 100%;
  padding: 15px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.user-info-grid div {
  display: flex;
  flex-direction: column;
}

.user-info-grid label {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-info-grid span {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 15px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-top: 25px;
  border-top: 1px solid var(--gray-100);
  margin-top: 10px;
}

/* ========================================
   TICKETS PAGES - FULL WIDTH
   ======================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-btn {
  padding: 12px 22px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-500);
  transition: all 0.25s ease;
}

.filter-btn:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tickets-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  min-height: 400px;
  border: 1px solid var(--gray-100);
}

.filters-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  border: 1px solid var(--gray-100);
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-item.grow {
  flex: 1;
  min-width: 220px;
}

.filter-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-item select,
.filter-item input {
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  min-width: 150px;
  transition: all 0.25s ease;
}

.filter-item select:focus,
.filter-item input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Data Table */
.table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  border: 1px solid var(--gray-100);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 18px 22px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.data-table th {
  background: var(--gray-50);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

.data-table .ticket-id-col {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-weight: 700;
  color: var(--primary);
}

.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 28px;
}

#page-info {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 600;
}

/* ========================================
   ADMIN PAGE - FULL WIDTH
   ======================================== */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-500);
  transition: all 0.25s ease;
}

.admin-tab:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.admin-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.admin-tab .badge {
  background: var(--danger);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.admin-tab.active .badge {
  background: var(--white);
  color: var(--primary);
}

.admin-tab-content {
  display: none;
  animation: pageIn 0.4s ease;
}

.admin-tab-content.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header h2 i {
  color: var(--primary);
}

/* Pending User Card */
.pending-user-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  border-left: 6px solid var(--warning);
  box-shadow: var(--shadow);
}

.pending-user-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.pending-user-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-800);
}

.pending-user-email {
  color: var(--gray-600);
  font-size: 14px;
  margin-top: 4px;
}

.pending-user-time {
  font-size: 12px;
  color: #92400e;
  text-align: right;
  font-weight: 500;
}

.pending-user-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.pending-user-details div {
  font-size: 15px;
  color: var(--gray-700);
}

.pending-user-details label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.pending-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid rgba(146, 64, 14, 0.15);
}

.otp-input-field {
  padding: 14px 18px;
  border: 3px solid #d97706;
  border-radius: var(--radius);
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 20px;
  letter-spacing: 6px;
  width: 180px;
  text-align: center;
  background: var(--white);
  font-weight: 700;
  transition: all 0.25s ease;
}

.otp-input-field:focus {
  outline: none;
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.btn-approve {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.35);
}

.btn-approve:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-reject {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-reject:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 28px;
}

.settings-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}

.settings-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-card h3 i {
  color: var(--primary);
  font-size: 20px;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 18px;
  font-weight: 500;
  color: var(--gray-700);
}

.checkbox-item input {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.large {
  max-width: 750px;
}

@keyframes modalIn {
  from { 
    opacity: 0; 
    transform: scale(0.92) translateY(-30px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header h2 i {
  color: var(--primary);
}

.modal-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 26px;
  color: var(--gray-400);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-600);
}

.modal-body {
  padding: 28px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 22px 28px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* Ticket Detail Sections */
.ticket-detail-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.ticket-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ticket-detail-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticket-detail-section h4 i {
  color: var(--primary);
  font-size: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item.full-width {
  grid-column: 1 / -1;
}

.detail-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
}

.detail-description {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius);
  white-space: pre-wrap;
}

.feedback-display {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}

.feedback-display .stars {
  font-size: 28px;
  color: var(--warning);
  margin-bottom: 10px;
}

.feedback-display p {
  color: var(--gray-600);
  font-style: italic;
}

.admin-controls {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  padding: 22px;
  border-radius: var(--radius);
  border: 2px dashed rgba(99, 102, 241, 0.2);
}

/* Star Rating */
.star-rating-container {
  text-align: center;
  margin-bottom: 28px;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.star-rating .star {
  font-size: 40px;
  color: var(--gray-300);
  cursor: pointer;
  transition: all 0.2s ease;
}

.star-rating .star:hover,
.star-rating .star.active {
  color: var(--warning);
  transform: scale(1.2) rotate(5deg);
}

#rating-text {
  color: var(--gray-500);
  font-size: 15px;
  font-weight: 600;
}

/* ========================================
   TOASTS
   ======================================== */
#toast-container {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--gray-100);
}

.toast.show {
  transform: translateX(0);
}

.toast i {
  font-size: 22px;
  flex-shrink: 0;
}

.toast span {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.toast-close {
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: var(--gray-600);
}

.toast.success { border-left: 5px solid var(--success); }
.toast.success i { color: var(--success); }

.toast.error { border-left: 5px solid var(--danger); }
.toast.error i { color: var(--danger); }

.toast.warning { border-left: 5px solid var(--warning); }
.toast.warning i { color: var(--warning); }

.toast.info { border-left: 5px solid var(--info); }
.toast.info i { color: var(--info); }

/* ========================================
   ROLE BADGES
   ======================================== */
.role-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.role-badge.admin {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: var(--white);
}

.role-badge.engineer {
  background: linear-gradient(135deg, var(--info) 0%, #0284c7 100%);
  color: var(--white);
}

.role-badge.manager {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: var(--white);
}

/* ========================================
   RESPONSIVE - FULL SCREEN
   ======================================== */
@media (max-width: 1024px) {
  .main-header {
    padding: 0 20px;
  }
  
  .header-nav {
    display: none;
  }
  
  .main-content {
    padding: 24px;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auth-card {
    padding: 35px 28px;
    border-radius: var(--radius-lg);
  }
  
  .main-header {
    padding: 0 16px;
    height: 60px;
  }
  
  .header-brand span {
    display: none;
  }
  
  .user-details {
    display: none;
  }
  
  .main-content {
    padding: 18px;
  }
  
  .page-title h1 {
    font-size: 24px;
  }
  
  .stat-card {
    padding: 22px;
  }
  
  .stat-number {
    font-size: 28px;
  }
  
  .modal-box {
    max-width: 100%;
    max-height: 100vh;
    border-radius: var(--radius-lg);
    margin: 10px;
  }
  
  .modal-body {
    max-height: 65vh;
  }
}

@media (max-width: 480px) {
  .login-section {
    padding: 15px;
  }
  
  .auth-card {
    padding: 28px 22px;
  }
  
  .auth-header h1 {
    font-size: 26px;
  }
  
  .auth-icon {
    width: 75px;
    height: 75px;
  }
  
  .auth-icon i {
    font-size: 34px;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .stat-icon {
    margin-bottom: 10px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
  }
  
  .filters-panel {
    flex-direction: column;
    gap: 15px;
  }
  
  .filter-item {
    width: 100%;
  }
  
  .filter-item select,
  .filter-item input {
    width: 100%;
  }
  
  .pending-user-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .otp-input-field {
    width: 100%;
  }
  
  #toast-container {
    left: 16px;
    right: 16px;
    max-width: none;
  }
  
  .loading-content h1 {
    font-size: 28px;
  }
  
  .loading-steps {
    gap: 20px;
  }
  
  .loading-step-text {
    display: none;
  }
}

/* ========================================
   SCROLLBAR - MODERN
   ======================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 5px;
  border: 2px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) var(--gray-100);
}

/* ========================================
   PRINT
   ======================================== */
@media print {
  .main-header,
  .page-toolbar,
  .filter-bar,
  .filters-panel,
  .pagination-bar,
  .modal,
  #toast-container,
  .loading-screen {
    display: none !important;
  }
  
  .main-content {
    padding: 0;
  }
  
  .dashboard-section {
    position: static;
    height: auto;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ===== CHN Ticket System | Theme-Matched Footer ===== */
.chn-footer {
  position: relative;
  padding: 16px 14px;
  text-align: center;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: #334155;
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.9),
    rgba(255, 255, 255, 0.95)
  );
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* Accent line */
.accent-line {
  display: block;
  width: 60px;
  height: 3px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}

/* Main text */
.footer-text {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

/* Brand */
.brand {
  font-weight: 700;
  color: #0f172a;
}

/* Author */
.author {
  font-weight: 600;
  color: #2563eb;
  position: relative;
}

/* Soft underline hover */
.author::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.author:hover::after {
  transform: scaleX(1);
}

/* Tags */
.footer-sub {
  margin: 8px 0;
}

.tag {
  display: inline-block;
  margin: 4px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  color: #0369a1;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Link */
.footer-link {
  font-size: 12px;
  color: #475569;
}

.footer-link a {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
}

.footer-link a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .footer-text {
    font-size: 13px;
  }
}
