/* ========================================
   DARK THEME WITH GLASSMORPHISM + TAILWIND
   Modern, Professional Design
   ======================================== */

/* Remove spinner arrows from number inputs */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spinner[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* CSS Variables */
:root {
  /* ---------- Material-like Dark Surfaces ---------- */
  /* Use dark gray, not pure black; aligns with Material dark guidance */
  --bg-0: #121212; /* page/background */
  --bg-1: #1a1a1a; /* base surfaces */
  --bg-2: #202225; /* raised surfaces */
  --bg-3: #262a2f; /* highest surfaces / popovers */

  /* ---------- Text Emphasis (Material) ---------- */
  --text-high: rgba(255,255,255,0.87);  /* high emphasis */
  --text-medium: rgba(255,255,255,0.60);/* medium emphasis */
  --text-disabled: rgba(255,255,255,0.38); /* disabled/hint */

  /* Map to your existing names for drop-in compatibility */
  --text-0: var(--text-high);      /* primary on dark */
  --text-1: var(--text-medium);    /* secondary */
  --text-2: var(--text-disabled);  /* tertiary */
  --text-muted: rgba(255,255,255,0.55);
  --text-primary: var(--text-0);
  --text-secondary: var(--text-1);
  --text-tertiary: var(--text-2);
  --text-white: #ffffff;

  /* ---------- Google-style Blue Accent ---------- */
  /* Google UI commonly uses #1A73E8 and #4285F4; we center palette on 1A73E8 */
  --blue-50:  #e8f1fd;
  --blue-100: #d6e6fb;
  --blue-200: #a9c9f8;
  --blue-300: #7cadf5;
  --blue-400: #4285f4; /* Google logo blue */
  --blue-500: #1a73e8; /* Google UI blue */
  --blue-600: #1767d0;
  --blue-700: #145cb9;
  --blue-800: #114fa0;
  --blue-900: #0d3f81;

  /* Status accents (kept restrained) */
  --green-500: #29c781;
  --yellow-500: #e6c04b;
  --red-500:   #e25b5b;

  /* ---------- Gradients (subtle) ---------- */
  --primary-gradient: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-700) 100%);
  --secondary-gradient: linear-gradient(135deg, #ffffff12 0%, #ffffff08 100%);
  --success-gradient: linear-gradient(135deg, #2ad38d 0%, #1ea86e 100%);
  --warning-gradient: linear-gradient(135deg, #f0d370 0%, #c8a74a 100%);

  /* ---------- Elevation via Light Overlays (preferred on dark) ---------- */
  --overlay-low:  rgba(255,255,255,0.05);
  --overlay-mid:  rgba(255,255,255,0.08);
  --overlay-high: rgba(255,255,255,0.12);

  /* ---------- Glass / Frosted ---------- */
  --glass-bg: color-mix(in srgb, var(--bg-2) 72%, transparent);
  --glass-border: rgba(255,255,255,0.12);
  --glass-shadow: 0 8px 24px rgba(0,0,0,0.45);
  --glass-blur: 12px;

  /* ---------- Borders ---------- */
  --border-subtle: rgba(255,255,255,0.10);
  --border-soft:   rgba(255,255,255,0.14);
  --border-strong: rgba(255,255,255,0.20);

  /* ---------- Shadows / Elevation ---------- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.50);
  --shadow-md: 0 6px 12px rgba(0,0,0,0.40);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.35), 0 3px 6px rgba(0,0,0,0.25);
  --shadow-xl: 0 24px 36px rgba(0,0,0,0.40), 0 8px 16px rgba(0,0,0,0.30);

  /* ---------- Focus Ring ---------- */
  --ring: 0 0 0 3px rgba(26,115,232,0.5);

  /* ---------- Radii ---------- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;

  /* ---------- Spacing (8pt base) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ---------- Typography (Google-like) ---------- */
  /* Google Sans / Google Sans Text are proprietary; fall back to Roboto */
  --font-sans: "Google Sans Text","Google Sans","Roboto","Noto Sans",
               system-ui,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Fluid type scale */
  --text-xs: clamp(12px, 0.66vw + 8px, 13px);
  --text-sm: clamp(13px, 0.72vw + 9px, 15px);
  --text-md: clamp(15px, 0.8vw + 10px, 17px);
  --text-lg: clamp(17px, 1vw + 10px, 19px);
  --text-xl: clamp(20px, 1.2vw + 10px, 24px);
  --text-2xl: clamp(24px, 1.6vw + 12px, 30px);
  --text-3xl: clamp(28px, 2vw + 14px, 36px);

  /* ---------- Legacy Aliases (kept) ---------- */
  --accent-blue: var(--blue-400);
  --accent-purple: var(--blue-300);
  --accent-green: var(--green-500);
  --accent-orange: var(--yellow-500);
  --accent-red: var(--red-500);

  --primary-color: var(--blue-500);
  --secondary-color: var(--blue-300);
  --success-color: var(--green-500);
  --warning-color: var(--yellow-500);
  --error-color: var(--red-500);
}

/* Font utility */
.font-inter { font-family: var(--font-sans); }

/* Font family override */
.font-inter {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Body styles - no padding needed since header is not fixed */
body {
    padding-top: 0;
}

body.dark {
    padding-top: 0;
}

/* Ensure main content doesn't overlap with fixed header */
body.dark main {
    margin-top: 0;
    padding-top: 0;
}

/* Compact navigation styles */
.nav-link {
    transition: all 0.2s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* Glassmorphism Components */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}.glass-input {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.glass-button {
  background: rgba(33, 150, 243, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(33, 150, 243, 0.3);
  transition: all 0.3s ease;
}

.glass-button:hover {
  background: rgba(33, 150, 243, 1);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(33, 150, 243, 0.3);
}

.glass-button-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.glass-button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Dropdown Glassmorphism */
.glass-dropdown {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* Timeline Glassmorphism */
.glass-timeline-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid #2196f3;
  transition: all 0.3s ease;
}

.glass-timeline-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Stats Card Glassmorphism */
.glass-stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.glass-stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Modal Glassmorphism */
.glass-modal {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Animated Background */
.animated-bg {
  background: #000000;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(33, 150, 243, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(33, 150, 243, 0.8);
}

/* Smooth transitions */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease,
    transform 0.3s ease;
}

/* Focus states */
.glass-input:focus,
.glass-button:focus {
  outline: 2px solid #2196f3;
  outline-offset: 2px;
}

/* Password toggle styling */
.password-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .glass-card {
    margin: 0.5rem;
  }
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #000000;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Dark subtle background pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse at top left,
      rgba(55, 65, 81, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom right,
      rgba(31, 41, 55, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at center,
      rgba(17, 24, 39, 0.05) 0%,
      transparent 50%
    );
  animation: backgroundShift 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes backgroundShift {
  0%,
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
  25% {
    opacity: 0.8;
    transform: translateX(20px) translateY(-20px);
  }
  50% {
    opacity: 1;
    transform: translateX(-10px) translateY(20px);
  }
  75% {
    opacity: 0.9;
    transform: translateX(15px) translateY(-10px);
  }
}

/* Container Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header Styles */
.header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 2rem;
  position: sticky;
  top: 1rem;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link.active {
  background: var(--primary-gradient);
  color: var(--text-white);
}

/* Theme Toggle */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Modern Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.875rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Modern Card Styles with Glassmorphism */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.card-body {
  padding: 2rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition-fast);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

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

/* Date and Time Input Styles */
.date-input {
  width: fit-content;
  min-width: 160px;
  cursor: pointer;
}

.time-input {
  width: fit-content;
  min-width: 130px;
  cursor: pointer;
}

/* 12-hour time input styles */
.time-12h-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
}

.time-select {
  width: auto;
  min-width: 70px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.time-12h-input span {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0 0.25rem;
}

/* Input icon styles */
.date-input::-webkit-calendar-picker-indicator,
.time-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  background: transparent;
  opacity: 0.7;
  transition: var(--transition-fast);
  filter: brightness(0.6);
}

.date-input::-webkit-calendar-picker-indicator:hover,
.time-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}

[data-theme="dark"] .date-input::-webkit-calendar-picker-indicator,
[data-theme="dark"] .time-input::-webkit-calendar-picker-indicator {
  filter: brightness(1.2);
}

/* Modern Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn::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: var(--transition-smooth);
}

.btn:hover::before {
  left: 100%;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success-gradient);
  color: var(--text-white);
}

.btn-danger {
  background: var(--secondary-gradient);
  color: var(--text-white);
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.flex {
  display: flex;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.p-4 {
  padding: 1rem;
}

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

.hidden {
  display: none;
}

/* Modern Dropdown Styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light) !important;
  position: relative;
}

.dropdown-toggle::after {
  content: "▼";
  position: absolute;
  right: 1rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: var(--transition-fast);
}

.dropdown-toggle:hover::after {
  transform: translateY(-2px);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  width: max-content;
  min-width: 100%;
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  max-height: 320px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.dropdown-content.show {
  display: block;
  animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.dropdown-item {
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  text-decoration: none;
  display: block;
  cursor: pointer;
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-blue);
  transform: translateX(5px);
}

/* Alert Styles */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border-left: 4px solid;
  backdrop-filter: blur(10px);
  animation: alertSlide 0.3s ease-out;
}

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

.alert-success {
  background: rgba(135, 206, 235, 0.1);
  border-left-color: #87ceeb;
  color: var(--text-primary);
}

.alert-error,
.alert-danger {
  background: rgba(255, 107, 107, 0.1);
  border-left-color: #ff6b6b;
  color: var(--text-primary);
}

.alert-info {
  background: rgba(135, 206, 235, 0.1);
  border-left-color: #87ceeb;
  color: var(--text-primary);
}

/* Timeline Styles */
.timeline-item {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 60%;
  background: var(--primary-gradient);
  border-radius: 3px;
  opacity: 0;
  transition: var(--transition-smooth);
}

.timeline-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-lg);
}

.timeline-item:hover::before {
  opacity: 1;
}

.timeline-date {
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.timeline-project {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.timeline-duration {
  display: inline-block;
  background: var(--success-gradient);
  color: var(--text-white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Welcome Section */
.welcome-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.welcome-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(103, 126, 234, 0.1),
    transparent,
    rgba(118, 75, 162, 0.1),
    transparent
  );
  animation: rotate 20s linear infinite;
  z-index: -1;
}

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

.welcome-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Password Field Styles */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.password-toggle:hover {
  color: var(--text-primary);
  transform: translateY(-50%) scale(1.1);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Loading Animation */
.loading {
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .card-header,
  .card-body {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .time-12h-input {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .grid {
    gap: 1rem;
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* Smooth page transitions */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal .card {
  max-width: 500px;
  width: 100%;
  margin: 0;
  animation: modalSlide 0.3s ease-out;
}

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

/* Enhanced Focus States */
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body::before {
    animation: none;
  }
}

/* Print Styles */
@media print {
  body::before {
    display: none;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .btn {
    display: none;
  }
}
