/* ITCyber Pvt Ltd - Employee Portal Styles */
/* ========================================= */

/* Cloud Sync Loading Overlay */
.cloud-sync-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.cloud-sync-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,0.7);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}
@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* CSS Variables - Design System */
:root {
  /* Primary Colors */
  --primary-dark: #0F172A;
  --primary-navy: #1E293B;
  --secondary-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  
  /* Status Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #06B6D4;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --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;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --gradient-success: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
  --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --gradient-dark: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  
  /* Glass Morphism */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
  --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-collapsed: 80px;
  --header-height: 70px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--primary-dark);
  color: var(--gray-100);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

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

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.grid {
  display: grid;
}

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

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

/* Color Utilities */
.text-white { color: var(--white); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-primary { color: var(--secondary-blue); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent-purple); }

/* Spacing Utilities */
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--info) 100%);
  color: var(--white);
  box-shadow: var(--shadow-glow-success);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

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

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
  background: var(--gray-700);
  color: var(--gray-100);
  border: 1px solid var(--gray-600);
}

.btn-secondary:hover {
  background: var(--gray-600);
  border-color: var(--gray-500);
}

.btn-outline {
  background: transparent;
  color: var(--secondary-blue);
  border: 1px solid var(--secondary-blue);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-300);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-lg);
  color: var(--white);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: var(--gray-500);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

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

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--secondary-blue);
  cursor: pointer;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(6, 182, 212, 0.2);
  color: var(--info);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.2);
  color: var(--secondary-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Status Dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

.status-dot.offline {
  background: var(--gray-500);
}

.status-dot.busy {
  background: var(--danger);
}

.status-dot.away {
  background: var(--warning);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: var(--space-4);
  text-align: left;
  font-size: var(--text-sm);
}

.data-table th {
  background: var(--gray-800);
  color: var(--gray-300);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--text-xs);
}

.data-table td {
  border-bottom: 1px solid var(--gray-700);
}

.data-table tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

/* Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--glass-border);
}

/* Stats Card */
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-blue);
  border-color: rgba(59, 130, 246, 0.3);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.2);
  color: var(--secondary-blue);
}

.stat-icon.green {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.stat-icon.purple {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
}

.stat-icon.orange {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--gray-400);
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-2);
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-700);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.progress-fill.blue {
  background: var(--gradient-primary);
}

.progress-fill.green {
  background: var(--gradient-success);
}

.progress-fill.orange {
  background: var(--gradient-warning);
}

/* Progress Ring */
.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--gray-700);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: url(#progressGradient);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-slow);
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--white);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-2xl);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--gray-700);
  color: var(--white);
}

.modal-body {
  padding: var(--space-6);
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--gray-700);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-icon {
  font-size: var(--text-xl);
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast.info .toast-icon {
  color: var(--info);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.toast-message {
  font-size: var(--text-xs);
  color: var(--gray-400);
}

.toast-close {
  color: var(--gray-500);
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--white);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-700);
  border-top-color: var(--secondary-blue);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* Timer Animation */
.timer-pulse {
  animation: timerPulse 1.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--gray-600);
  margin-bottom: var(--space-4);
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

/* Search Input */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper i {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.search-input-wrapper input {
  padding-left: 40px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--gray-700);
  margin-bottom: var(--space-6);
}

.tab {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tab:hover {
  color: var(--gray-200);
}

.tab.active {
  color: var(--secondary-blue);
  border-bottom-color: var(--secondary-blue);
}

.tab-content {
  display: none;
}

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

/* Page Layout */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gradient-dark);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: width var(--transition-slow);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  color: var(--white);
  flex-shrink: 0;
}

.logo-text {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--white);
}

.logo-text span {
  color: var(--secondary-blue);
}

.sidebar.collapsed .logo-text {
  display: none;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--space-6);
}

.nav-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  padding: 0 var(--space-4);
  margin-bottom: var(--space-2);
}

.sidebar.collapsed .nav-section-title {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--gray-400);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  margin-bottom: var(--space-1);
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--gray-200);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.2);
  color: var(--secondary-blue);
}

.nav-item i {
  font-size: var(--text-lg);
  width: 24px;
  text-align: center;
}

.sidebar.collapsed .nav-item span {
  display: none;
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--glass-border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}

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

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

.user-role {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.sidebar.collapsed .user-details {
  display: none;
}

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

.sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-collapsed);
}

/* Header */
.header {
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--gray-700);
  color: var(--white);
}

.page-title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  position: relative;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: var(--gray-700);
  color: var(--white);
}

.header-btn .badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content Area */
.content-area {
  flex: 1;
  padding: var(--space-6);
  overflow-y: auto;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.page-header-title {
  font-size: var(--text-2xl);
  font-weight: 700;
}

.page-header-actions {
  display: flex;
  gap: var(--space-3);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  gap: var(--space-6);
}

.dashboard-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.dashboard-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

/* =============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================= */

/* Mobile Sidebar Overlay Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* ---- 1200px: Large Tablets / Small Laptops ---- */
@media (max-width: 1200px) {
  .dashboard-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- 1024px: Tablets - Sidebar collapses to overlay ---- */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 280px;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  /* Regardless of collapsed class on mobile, full width when open */
  .sidebar.collapsed {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }
  .sidebar.collapsed.open {
    transform: translateX(0);
  }
  .sidebar.collapsed .logo-text,
  .sidebar.collapsed .nav-section-title,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .user-details {
    display: unset;
  }

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

  .sidebar.collapsed + .main-content {
    margin-left: 0;
  }

  /* Show sidebar toggle as hamburger */
  .sidebar-toggle {
    display: flex;
  }

  /* Header adjustments */
  .page-title {
    font-size: var(--text-lg);
  }
}

/* ---- 768px: Mobile Phones (Landscape) / Small Tablets ---- */
@media (max-width: 768px) {
  .dashboard-grid.cols-4,
  .dashboard-grid.cols-3,
  .dashboard-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .page-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .page-header-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .header {
    padding: 0 var(--space-3);
    height: 60px;
  }

  .header-left {
    gap: var(--space-2);
  }

  .header-right {
    gap: var(--space-2);
  }

  .page-title {
    font-size: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }

  .content-area {
    padding: var(--space-3);
  }

  /* Cards */
  .card-header {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .card-body {
    padding: var(--space-4);
  }

  /* Stat cards */
  .stat-card {
    padding: var(--space-4);
  }

  .stat-value {
    font-size: var(--text-2xl);
  }

  /* Tables - Horizontal scroll */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: var(--space-3);
    font-size: var(--text-xs);
    white-space: nowrap;
  }

  /* Modal full-screen on mobile */
  .modal {
    width: 95%;
    max-width: none;
    max-height: 85vh;
    margin: var(--space-3);
    border-radius: var(--radius-xl);
  }

  .modal-header {
    padding: var(--space-4);
  }

  .modal-body {
    padding: var(--space-4);
    max-height: 55vh;
  }

  .modal-footer {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1;
    min-width: 0;
  }

  /* Form grid responsive */
  .form-grid,
  .form-row {
    grid-template-columns: 1fr !important;
  }

  .form-group.full-width {
    grid-column: 1;
  }

  /* Buttons */
  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }

  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }

  /* Tabs - Scrollable */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    white-space: nowrap;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }

  /* Toast */
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: unset;
    width: 100%;
    padding: var(--space-3) var(--space-4);
  }

  /* Filters bar */
  .filters-bar {
    flex-direction: column;
    gap: var(--space-3);
  }

  .filter-group {
    width: 100%;
  }

  .filter-group select,
  .filter-group input {
    width: 100%;
    min-width: unset !important;
  }

  /* Search */
  .search-input-wrapper {
    width: 100% !important;
  }

  /* Sidebar footer */
  .sidebar-footer .user-info {
    padding: var(--space-2);
  }

  /* Content card (used in profile, etc.) */
  .content-card-header {
    padding: var(--space-3) var(--space-4);
  }

  .content-card-body {
    padding: var(--space-4);
  }
}

/* ---- 576px: Small Mobile Phones ---- */
@media (max-width: 576px) {
  .page-title {
    font-size: var(--text-sm);
    max-width: 120px;
  }

  .header {
    height: 56px;
    padding: 0 var(--space-2);
  }

  .header-btn {
    width: 36px;
    height: 36px;
  }

  .sidebar-toggle {
    width: 36px;
    height: 36px;
  }

  .content-area {
    padding: var(--space-2);
  }

  /* Stat cards even smaller */
  .stat-card {
    padding: var(--space-3);
  }

  .stat-value {
    font-size: var(--text-xl);
  }

  .stat-label {
    font-size: var(--text-xs);
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }

  /* Modal nearly full screen */
  .modal {
    width: 100%;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    position: fixed;
    bottom: 0;
  }

  /* Page header */
  .page-header-title {
    font-size: var(--text-lg);
  }

  /* Empty state */
  .empty-state {
    padding: var(--space-8) var(--space-3);
  }

  .empty-state-icon {
    font-size: 2.5rem;
  }

  /* Badge */
  .badge {
    font-size: 0.65rem;
    padding: 2px var(--space-2);
  }

  /* Progress ring */
  .progress-ring {
    width: 80px;
    height: 80px;
  }
}

/* ---- Touch & Hover Adjustments ---- */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .nav-item {
    padding: var(--space-3) var(--space-4);
    min-height: 44px;
  }

  .btn {
    min-height: 44px;
  }

  .header-btn,
  .sidebar-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* Disable hover effects on touch */
  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }

  .btn-primary:hover,
  .btn-success:hover,
  .btn-danger:hover {
    transform: none;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease;
}

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

.slide-up {
  animation: slideUp 0.3s ease;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-800);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-600);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Selection */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--white);
}
