/* OnSIP Floor Duty Manager Admin UI Styles — Cleaned & Merged */

/* ===========================
   1) Design Tokens & Scales
   =========================== */

:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  --background: #f8fafc;
  --surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);

  /* Color Scheme - 60-30-10 Rule */
  --neutral-50: #FAFBFC;
  --neutral-100: #F6F8FA;
  --neutral-200: #E1E7EC;
  --neutral-300: #D0D7DE;
  --neutral-400: #AFB8C1;
  --neutral-500: #8B949E;
  --neutral-600: #6E7681;
  --neutral-700: #57606A;
  --neutral-800: #424A53;
  --neutral-900: #24292F;

  --primary-50: #F0F9FF;
  --primary-100: #E0F2FE;
  --primary-200: #BAE6FD;
  --primary-300: #7DD3FC;
  --primary-400: #38BDF8;
  --primary-500: #0EA5E9;
  --primary-600: #0284C7;
  --primary-700: #0369A1;
  --primary-800: #075985;
  --primary-900: #0C4A6E;

  --success-green: #22C55E;
  --warning-amber: #F59E0B;
  --danger-red: #EF4444;
  --info-blue: #06B6D4;

  /* Semantic */
  --color-background: var(--neutral-50);
  --color-surface: #FFFFFF;
  --color-border: var(--neutral-200);
  --color-text-primary: var(--neutral-900);
  --color-text-secondary: var(--neutral-600);
  --color-text-muted: var(--neutral-500);

  /* Type scale (16px base) */
  --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;

  /* Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --space-0: 0;
  --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;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows (subtle) */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===========================
   2) Reset & Base
   =========================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-background);
}

p { margin-bottom: var(--space-4); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-6);
}

/* ===========================
   3) Typography
   =========================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: 1.2;
  color: var(--color-text-primary);
}
h1 { font-size: var(--text-2xl); font-weight: var(--font-bold); letter-spacing: -0.025em; }
h2 { font-size: var(--text-xl); letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); letter-spacing: -0.015em; }
h4 { font-size: var(--text-base); font-weight: var(--font-medium); }

/* ===========================
   4) Header
   =========================== */

header {
  /* keep last values */
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
  /* bring forward earlier layout/shadow so current look doesn't change */
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.header-brand { display: flex; align-items: center; gap: var(--space-4); }
.header-logo { height: 68px; width: auto; }
.header-brand h1 { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--color-text-primary); }

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

/* ===========================
   5) Connection Status
   =========================== */

.connection-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
}

.status-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neutral-400);
  /* earlier animation preserved */
  animation: pulse 2s infinite;
}
.status-indicator.connected {
  background: var(--success-green);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
  animation: pulse 2s infinite;
}
.status-indicator.error {
  background: var(--danger-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* ring-style pulse (last version) */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* ===========================
   6) Tabs
   =========================== */

.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
  padding: 0;
}

.tab-btn {
  padding: var(--space-3) var(--space-5);
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: color var(--transition-fast);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab-btn:hover:not(.active) {
  color: var(--color-text-primary);
  background: var(--neutral-50);
}

.tab-btn.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
  background: transparent;
}

.tab-content { display: none; animation: fadeIn var(--transition-base); }
.tab-content.active { display: block; }

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

/* ===========================
   7) Cards & Surfaces
   =========================== */

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  /* carry base shadow from earlier */
  box-shadow: var(--shadow);
}
.status-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform var(--transition-base);
  transform-origin: top;
}
.status-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-200); }
.status-card:hover::before { transform: scaleY(1); }

.status-card h3 {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.status-info {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}
.status-info p { margin: 5px 0; } /* preserved from earlier */
.status-info .label {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-normal);
  color: var(--color-text-secondary);
  letter-spacing: 0.025em;
}

/* Quick Actions */
.quick-actions {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  /* carry subtle base shadow */
  box-shadow: var(--shadow);
}
.quick-actions h3 { font-size: var(--text-lg); margin-bottom: var(--space-4); }

.action-buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ===========================
   8) Buttons
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.btn:active { transform: scale(0.98); }

/* general hover behavior preserved from earlier (variants may override) */
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Variants */
.btn-primary { background: var(--primary-600); color: #fff; border-color: var(--primary-600); }
.btn-primary:hover { background: var(--primary-700); border-color: var(--primary-700); box-shadow: var(--shadow-sm); }

.btn-secondary { background: var(--color-surface); color: var(--color-text-primary); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--neutral-50); border-color: var(--neutral-300); }

.btn-danger { background: var(--danger-red); color: #fff; border-color: var(--danger-red); }
.btn-danger:hover { background: #DC2626; border-color: #DC2626; box-shadow: var(--shadow-sm); }

.btn-warning { background: var(--warning-amber); color: #fff; border-color: var(--warning-amber); }
.btn-warning:hover { background: #D97706; border-color: #D97706; box-shadow: var(--shadow-sm); }

.btn-info { background: var(--info-blue); color: #fff; border-color: var(--info-blue); }
.btn-info:hover { background: #0891B2; border-color: #0891B2; box-shadow: var(--shadow-sm); }

/* preserved from earlier: success existed only there */
.btn-success { background: var(--success-color); color: #fff; }

.icon { font-size: 16px; }

/* Loading state (kept) */
.btn.loading { color: transparent; pointer-events: none; position: relative; }
.btn.loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; top: 50%; left: 50%;
  margin-left: -8px; margin-top: -8px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spinner 0.6s linear infinite;
}
@keyframes spinner { to { transform: rotate(360deg); } }

/* ===========================
   9) Forms & Inputs
   =========================== */

.config-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow);
}
.config-section h2 { 
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5); 
}
.config-section h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
}

.form-group { margin-bottom: var(--space-4); }
.form-group label {
  display: block; margin-bottom: var(--space-2);
  font-size: var(--text-sm); font-weight: var(--font-medium);
  color: var(--color-text-primary);
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: var(--neutral-300); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.form-group input::placeholder { color: var(--color-text-muted); }
.form-group small { display: block; margin-top: var(--space-1); font-size: var(--text-xs); color: var(--color-text-secondary); }

/* Enhanced checkboxes */
input[type="checkbox"] {
  appearance: none;
  width: 20px; height: 20px;
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer; transition: all var(--transition-fast);
  position: relative; margin-right: var(--space-2); flex-shrink: 0;
}
input[type="checkbox"]:hover { border-color: var(--primary-400); background: var(--primary-50); transform: scale(1.05); }
input[type="checkbox"]:checked {
  background: var(--primary-600); border-color: var(--primary-600);
  animation: checkboxCheck 0.2s ease-in-out;
}
input[type="checkbox"]:checked::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); color: #fff; font-size: 14px; font-weight: bold;
}
input[type="checkbox"]:focus-visible { outline: 2px solid var(--primary-400); outline-offset: 2px; }
@keyframes checkboxCheck { 0%{transform:scale(1)} 50%{transform:scale(0.9)} 100%{transform:scale(1)} }

.form-actions { 
  display: flex; 
  gap: var(--space-3); 
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* ===========================
   10) Time Windows
   =========================== */

/* Time windows container */
.time-windows {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.time-window {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.time-window::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform var(--transition-base);
  transform-origin: top;
}
.time-window:hover { box-shadow: var(--shadow-md); border-color: var(--primary-200); }
.time-window:hover::before { transform: scaleY(1); }

.time-window-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-5);
}
.time-window-header h4 { 
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--color-text-primary);
  margin: 0;
}
.time-window-header .btn-danger { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }

.time-window-controls { 
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.time-window-controls > .form-group {
  margin-bottom: 0;
}
.time-window-controls .form-group label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
}
.time-window-controls input[type="text"],
.time-window-controls input[type="time"] {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}
.time-window-controls input[type="text"]:hover,
.time-window-controls input[type="time"]:hover {
  border-color: var(--neutral-300);
}
.time-window-controls input[type="text"]:focus,
.time-window-controls input[type="time"]:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.time-window-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Days Selector */
.days-selector {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--space-2);
}
.day-checkbox {
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition-fast); user-select: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}
.day-checkbox:hover { background: var(--neutral-50); border-color: var(--neutral-300); }
.day-checkbox:has(input:checked) {
  background: var(--primary-600); border-color: var(--primary-600);
  color: #fff;
}
.day-checkbox input[type="checkbox"] { display: none; }

/* ===========================
   11) Agents
   =========================== */

#agentSlots { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5); 
}

.agent-slot {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.agent-slot::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform var(--transition-base);
  transform-origin: top;
}
.agent-slot:hover { box-shadow: var(--shadow-md); border-color: var(--primary-200); }
.agent-slot:hover::before { transform: scaleY(1); }
.agent-slot h3 { 
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.agent-list { 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-3); 
}
.agent-list:not(:empty) {
  margin-bottom: var(--space-4);
}
.agent-item { 
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-3); 
  align-items: center;
  padding: var(--space-3);
  background: var(--neutral-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.agent-item:hover { background: var(--neutral-100); border-color: var(--neutral-300); }
.agent-item input { 
  width: 100%;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}
.agent-item input:hover { border-color: var(--neutral-300); }
.agent-item input:focus {
  outline: none; 
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.agent-item input::placeholder { color: var(--color-text-muted); }
.agent-item button {
  padding: var(--space-2);
  background: transparent;
  color: var(--danger-red);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition-fast);
}
.agent-item button:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger-red); }

/* ===========================
   12) Operation Cards
   =========================== */

.operation-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  transition: all var(--transition-base);
}
.operation-card:hover { box-shadow: var(--shadow-sm); }
.operation-card h3 { margin-bottom: var(--space-3); color: var(--color-text-primary); }
.operation-card p { color: var(--color-text-secondary); margin-bottom: var(--space-4); font-size: var(--text-sm); }

/* ===========================
   13) Health Status
   =========================== */

.health-status {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--neutral-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: var(--text-xs);
  max-height: 300px; overflow-y: auto;
}

/* ===========================
   14) Modal
   =========================== */

.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
}
.modal.show {
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn var(--transition-base);
}
.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 90%; max-width: 500px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideUp var(--transition-slow);
}
@keyframes slideUp { from{opacity:0; transform:translateY(20px)} to{opacity:1; transform:translateY(0)} }
.modal-content h2 { margin-bottom: var(--space-5); }

.close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--neutral-100);
  border: none; border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition-fast);
  color: var(--color-text-secondary); font-size: 20px;
}
.close:hover { background: var(--neutral-200); color: var(--color-text-primary); }

.modal-actions { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-6); }

/* ===========================
   15) Notifications
   =========================== */

.notifications {
  position: fixed;
  top: var(--space-5); right: var(--space-5);
  z-index: var(--z-popover);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.notification {
  min-width: 320px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: #fff;
  animation: slideInRight var(--transition-base);
  display: flex; align-items: center; gap: var(--space-3);
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.notification.success { background: var(--success-green); }
.notification.error { background: var(--danger-red); }
.notification.warning { background: var(--warning-amber); }
.notification.info { background: var(--info-blue); }

/* ===========================
   16) User Management
   =========================== */

.user-management { margin-top: var(--space-5); }

.user-list-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-5); padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.user-list-header h4 { margin: 0; color: var(--color-text-primary); }

.users-list {
  max-height: 400px; overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--neutral-50);
}
.user-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}
.user-item:hover { background: var(--primary-50); }
.user-item:last-child { border-bottom: none; }

.user-info { flex: 1; }
.user-email { font-weight: var(--font-medium); color: var(--color-text-primary); margin-bottom: var(--space-1); }
.user-status { font-size: var(--text-sm); color: var(--color-text-secondary); }
.user-status.confirmed { color: var(--success-green); }

.user-actions { display: flex; gap: var(--space-2); }
.btn-delete {
  padding: var(--space-1) var(--space-3);
  background: transparent;
  color: var(--danger-red);
  border: 1px solid var(--danger-red);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: var(--text-sm);
  transition: all var(--transition-fast);
}
.btn-delete:hover { background: var(--danger-red); color: #fff; }

.users-list .loading,
.users-list .empty {
  padding: var(--space-10);
  text-align: center;
  color: var(--color-text-secondary);
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 2rem;
    background: var(--card-bg, var(--color-surface));
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color, var(--color-text-primary));
    margin: 1rem 0 0.25rem 0;
    text-align: center;
}

.login-container h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary, var(--color-text-secondary));
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.login-logo { 
    text-align: center; 
    margin-bottom: 20px; 
}

.login-logo-img { 
    height: 100px; 
    width: auto; 
    object-fit: contain; 
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form .form-group label {
    font-weight: 600;
    color: var(--text-color, var(--color-text-primary));
}

.login-form .form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color, var(--color-border));
    border-radius: 4px;
    font-size: 1rem;
}

.login-form .error-message {
    color: var(--danger-color, var(--danger-red));
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    display: none;
}

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

.login-button {
    padding: 0.75rem;
    background: var(--primary-color, var(--primary-600));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.login-button:hover:not(:disabled) {
    background: var(--primary-hover, var(--primary-700));
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Add User modal small note (from earlier) */
#addUserModal .modal-content small {
  display: block; margin-top: 5px; color: var(--color-text-secondary); font-size: 0.85em;
}

/* Override Modal Enhancements */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Style time inputs in override modal to match schedule tab */
#overrideModal input[type="time"] {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

#overrideModal input[type="time"]:hover {
  border-color: var(--neutral-300);
}

#overrideModal input[type="time"]:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.radio-label {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--neutral-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.radio-label:hover {
  background: var(--neutral-100);
  border-color: var(--color-primary);
}

.radio-label input[type="radio"] {
  margin-right: var(--space-2);
}

.radio-label input[type="radio"]:checked + span {
  font-weight: 500;
  color: var(--color-primary);
}

.mode-fields {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.day-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.day-checkbox {
  display: flex;
  align-items: center;
  padding: var(--space-2);
  background: var(--neutral-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.day-checkbox:hover {
  background: var(--neutral-100);
  border-color: var(--color-primary);
}

.day-checkbox input[type="checkbox"] {
  margin-right: var(--space-1);
}

.day-checkbox input[type="checkbox"]:checked + span {
  font-weight: 500;
  color: var(--color-primary);
}

.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row .form-group {
  flex: 1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-right: var(--space-2);
}

.form-hint {
  display: block;
  margin-top: var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* Agent Selector Modal Styles */
.agent-selector-list {
  max-height: 400px;
  overflow-y: auto;
  margin: var(--space-4) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}

.agent-selector-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.agent-selector-item {
  display: flex;
  align-items: center;
  padding: var(--space-3);
  background: var(--neutral-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
}

.agent-selector-item:hover {
  background: var(--neutral-100);
  border-color: var(--color-primary);
}

.agent-selector-item.selected {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.agent-selector-item input[type="checkbox"],
.agent-selector-item input[type="radio"] {
  margin-right: var(--space-3);
  flex-shrink: 0;
}

.agent-selector-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  gap: var(--space-3);
}

.agent-selector-item .agent-name {
  font-weight: 500;
  flex: 0 0 150px; /* Fixed width for names */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-selector-item .agent-phone {
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  flex: 0 0 120px; /* Fixed width for phone numbers */
  text-align: left;
}

.agent-selector-item .fas.fa-check-circle {
  margin-left: var(--space-2);
  flex-shrink: 0;
}

/* Search input styling in modal */
#agentSelectorModal #agentSearchInput {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-surface);
  transition: border-color var(--transition-base);
}

#agentSelectorModal #agentSearchInput:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#agentSelectorModal #agentSearchInput::placeholder {
  color: var(--color-text-muted);
}

#agentSelectorModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

#agentSelectorModal .modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* ===========================
   17) Help Icons & Tooltips
   =========================== */

.help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  cursor: help;
  margin-left: var(--space-2);
  transition: all var(--transition-fast);
}
.help-icon:hover { background: var(--primary-200); transform: scale(1.1); }

/* Tooltip styling preserved */
.help-icon[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px; padding: 8px 12px;
  background-color: #1e293b; color: #fff;
  font-size: 13px; font-weight: normal;
  white-space: nowrap; max-width: 300px;
  border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000; pointer-events: none;
}
.help-icon[title]:hover::before {
  content: ''; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid #1e293b;
  z-index: 1001; pointer-events: none;
}

/* Button tooltips preserved */
[title] { position: relative; }
.btn[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px; padding: 8px 12px;
  background-color: #1e293b; color: #fff;
  font-size: 13px; font-weight: normal;
  white-space: normal; width: max-content; max-width: 250px;
  border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000; pointer-events: none; text-align: center; line-height: 1.4;
  animation: fadeIn var(--transition-base);
}
.btn[title]:hover::before {
  content: ''; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid #1e293b;
  z-index: 1001; pointer-events: none;
}

/* Ensure tooltips aren’t clipped by button overflow on desktop */
@media (hover: hover) and (pointer: fine) {
  .btn { overflow: visible; }
}

/* ===========================
   18) Alerts
   =========================== */

/* JS Tooltips (smart positioned) */
.app-tooltip-bubble {
  background-color: #1e293b;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  font-weight: normal;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  max-width: 320px;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.app-tooltip-bubble .app-tooltip-content { white-space: normal; }
.app-tooltip-arrow {
  position: absolute;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.app-tooltip-bubble.place-top .app-tooltip-arrow {
  bottom: -6px;
  border-top: 6px solid #1e293b;
}
.app-tooltip-bubble.place-bottom .app-tooltip-arrow {
  top: -6px;
  border-bottom: 6px solid #1e293b;
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.5;
  border: 1px solid;
}
.alert-info {
  background: var(--primary-50);
  color: var(--primary-900);
  border-color: var(--primary-200);
}
.alert strong { font-weight: var(--font-semibold); }

/* ===========================
   19) Loading Skeletons
   =========================== */

.skeleton {
  background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===========================
   20) Scrollbars
   =========================== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--neutral-100); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb { background: var(--neutral-400); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-500); }

/* ===========================
   21) Utilities
   =========================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* ===========================
   22) Responsive
   =========================== */

@media (max-width: 767px) {
  /* Ensure all tabs are visible without horizontal scroll */
  .tabs {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .tab-btn {
    flex: 1 0 calc(50% - var(--space-2));
    text-align: center;
    white-space: normal; /* allow label wrapping if needed */
    padding: var(--space-2) var(--space-3);
  }
}

/* Mobile Base (320–767px) */
@media (max-width: 767px) {
  .container { padding: var(--space-3); max-width: 100%; }

  header { 
    flex-direction: column; 
    gap: var(--space-3); 
    padding: var(--space-4); 
    margin-bottom: var(--space-5); 
  }
  
  .header-brand { 
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: var(--space-3);
    width: 100%;
  }
  
  .header-logo { 
    height: 60px; 
  }
  
  .header-brand h1 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
  }
  
  .header-controls { 
    width: 100%; 
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
    align-items: center;
  }
  
  .connection-status {
    flex: 1 1 auto;
    min-width: 120px;
  }
  
  .header-divider {
    margin: 0 var(--space-2);
  }
  
  .user-dropdown {
    flex: 0 0 auto;
  }
  
  .user-dropdown-toggle {
    padding: var(--space-2);
  }
  
  .dropdown-menu {
    right: var(--space-3);
    left: var(--space-3);
    min-width: auto;
  }

  .tabs {
    display: flex;
    gap: var(--space-1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 var(--space-3);
    margin: 0 calc(-1 * var(--space-3));
    margin-bottom: var(--space-4);
  }
  
  .tabs::-webkit-scrollbar { display: none; }
  
  .tab-btn { 
    flex-shrink: 0; 
    padding: var(--space-2) var(--space-3); 
    font-size: var(--text-sm);
    white-space: nowrap;
  }

  .status-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .status-card { padding: var(--space-4); }

  .quick-actions { padding: var(--space-4); }
  .action-buttons { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }

  .btn { width: 100%; justify-content: center; padding: var(--space-3) var(--space-4); min-height: 44px; }

  .form-group { margin-bottom: var(--space-4); }
  .form-group label { font-size: var(--text-sm); margin-bottom: var(--space-2); }
  .form-group input[type="text"],
  .form-group input[type="number"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group input[type="time"],
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* iOS zoom prevention */
    padding: var(--space-3);
    min-height: 44px;
  }

  .time-windows { padding: var(--space-3); margin-bottom: var(--space-4); }
  .time-window { padding: var(--space-3); margin-bottom: var(--space-3); }
  .time-window-header { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .time-window-header h4 { font-size: var(--text-base); margin-bottom: var(--space-2); }
  .time-window-header .btn { width: 100%; }
  .time-window-controls { display: flex; flex-direction: column; gap: var(--space-3); }

  .days-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }

  #agentSlots { gap: var(--space-4); }
  .agent-slot { padding: var(--space-4); margin-bottom: var(--space-3); }
  .agent-slot h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
  .agent-list { gap: var(--space-3); }
  .agent-item { flex-direction: column; gap: var(--space-2); padding: var(--space-3); background: var(--neutral-50); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
  .agent-item input { width: 100%; margin-bottom: var(--space-2); }
  .agent-item button { width: 100%; padding: var(--space-2) var(--space-3); min-height: 40px; }

  .form-actions { flex-direction: column; gap: var(--space-2); }
  .form-actions .btn { width: 100%; }

  .config-section { padding: var(--space-4); margin-bottom: var(--space-4); }
  .config-section h2 { font-size: var(--text-lg); margin-bottom: var(--space-4); }

  .operation-card { padding: var(--space-4); margin-bottom: var(--space-3); }

  .user-list-header { flex-direction: column; gap: var(--space-3); align-items: stretch; }
  .user-item { flex-direction: column; padding: var(--space-3); gap: var(--space-2); }
  .user-info { margin-bottom: var(--space-2); }
  .user-actions { width: 100%; }
  .user-actions .btn-delete { width: 100%; padding: var(--space-2) var(--space-3); }

  .modal-content {
    width: 95%; max-width: 100%;
    padding: var(--space-4); margin: var(--space-3);
    max-height: 90vh; overflow-y: auto;
  }
  .modal-content h2 { font-size: var(--text-lg); margin-bottom: var(--space-4); }
  .close { width: 28px; height: 28px; top: var(--space-3); right: var(--space-3); }
  .modal-actions { flex-direction: column-reverse; gap: var(--space-2); }
  .modal-actions .btn { width: 100%; }

  .notifications { top: var(--space-3); right: var(--space-3); left: var(--space-3); }
  .notification { min-width: auto; width: 100%; padding: var(--space-3); font-size: var(--text-sm); }

  /* Disable hover tooltips on touch */
  .help-icon[title]:hover::after,
  .btn[title]:hover::after { display: none; }

  /* Touch targets */
  button, a, .clickable, input[type="checkbox"], input[type="radio"] {
    min-height: 44px; min-width: 44px;
  }

  @media (hover: none) {
    .status-card:hover, .operation-card:hover, .agent-slot:hover, .time-window:hover, .user-item:hover { transform: none; box-shadow: none; }
    .btn:hover { transform: none; }
  }
}

/* Small Mobile (<=480px) */
@media (max-width: 480px) {
  .container { padding: var(--space-2); }
  
  header { 
    padding: var(--space-3); 
    margin-bottom: var(--space-4);
  }
  
  .header-logo {
    height: 40px;
  }
  
  .header-brand h1 { 
    font-size: var(--text-lg); 
  }
  
  .header-controls {
    gap: var(--space-2);
  }
  
  .connection-status {
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-2);
  }
  
  .user-dropdown-toggle {
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-2);
  }
  
  .dropdown-menu {
    font-size: var(--text-sm);
  }
  
  .tabs {
    padding: 0 var(--space-2);
    margin: 0 calc(-1 * var(--space-2));
  }
  
  .status-card, .config-section, .operation-card { padding: var(--space-3); }
  .form-group { margin-bottom: var(--space-3); }
  .days-selector { font-size: var(--text-sm); }
  .modal-content { padding: var(--space-3); }
}

/* Tablet (768–1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container { padding: var(--space-5); }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .action-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .time-window-controls { grid-template-columns: repeat(2, 1fr); }
  .days-selector { grid-template-columns: repeat(4, 1fr); }
}

/* Large (>=1024px) */
@media (min-width: 1024px) {
  .agent-item { flex-direction: row; }
  .agent-item input { flex: 1; }
  .agent-item button { width: auto; }
}

/* Landscape fixes */
@media (max-height: 500px) and (orientation: landscape) {
  header { padding: var(--space-3); margin-bottom: var(--space-3); }
  .header-logo { height: 32px; }
  .tabs { margin-bottom: var(--space-3); }
  .modal-content { max-height: 80vh; overflow-y: auto; }
}

/* ===========================
   23) Print
   =========================== */

@media print {
  body { background: #fff; }
  .btn, .tab-btn, .header-controls, .help-icon, .close { display: none; }
  .status-card, .config-section, .operation-card {
    box-shadow: none; border: 1px solid #000; break-inside: avoid;
  }
  .tabs { border-bottom: 2px solid #000; }
}

/* ===========================
   24) Accessibility & Motion
   =========================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
*:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   25) Dark Mode Prep
   =========================== */

@media (prefers-color-scheme: dark) {
  /* Add overrides if/when needed */
}

/* ===========================
   26) Additional UI Elements
   =========================== */

/* User info in header */
.header-divider {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    margin: 0 var(--space-3);
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    /*padding: var(--space-2) var(--space-3);*/
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-dropdown-toggle:hover {
    background: var(--neutral-50);
}

.user-dropdown-toggle i {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

.user-dropdown.active .user-dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--neutral-50);
}

.dropdown-item i {
    width: 16px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-2) 0;
}

/* User management list improvements */
#usersList .user-item .user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#usersList .user-item .user-email {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

#usersList .user-item .user-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#usersList .user-item .user-status.confirmed {
    color: var(--success-green);
}


/* ===========================
   Notification Toast Animations
   =========================== */

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

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

.notification-toast {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
}
