/* ==========================================================================
   CV VAULT — PREMIUM SAAS DESIGN SYSTEM
   Futuristic Productivity SaaS · Dark & Light Themes · 3D Depth & Motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & VARIABLES
   -------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --theme: dark;
  --bg: #1A1A1A;
  --bg-subtle: #222222;
  --bg-surface: #282828;
  --bg-elevated: #333333;
  --bg-card: #282828;
  --bg-glass: rgba(26, 26, 26, 0.95);
  --bg-input: #202020;
  --bg-input-focus: #262626;

  --border: #3A3A3A;
  --border-subtle: #2A2A2A;
  --border-strong: #484848;
  --border-accent: rgba(255, 161, 22, 0.5);
  --border-glow: transparent;

  --text-primary: #FFFFFF;
  --text-secondary: #A3A3A3;
  --text-muted: #737373;
  --text-faint: #525252;

  --primary: #FFA116;
  --primary-hover: #FF9200;
  --primary-active: #E58300;
  --primary-soft: rgba(255, 161, 22, 0.14);
  --primary-glow: transparent;
  --primary-gradient: #FFA116;
  --primary-gradient-hover: #FF9200;

  --accent-cyan: #38bdf8;
  --accent-cyan-soft: rgba(56, 189, 248, 0.12);

  --success: #00B8A3;
  --success-soft: rgba(0, 184, 163, 0.14);
  --warning: #FFC01E;
  --warning-soft: rgba(255, 192, 30, 0.14);
  --danger: #EF4743;
  --danger-hover: #DC3834;
  --danger-soft: rgba(239, 71, 67, 0.14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.14);

  /* Status Colors */
  --status-applied-bg: rgba(56, 189, 248, 0.12);
  --status-applied-text: #38bdf8;
  --status-applied-dot: #38bdf8;

  --status-screening-bg: rgba(255, 192, 30, 0.14);
  --status-screening-text: #FFC01E;
  --status-screening-dot: #FFC01E;

  --status-interview-bg: rgba(255, 192, 30, 0.14);
  --status-interview-text: #FFC01E;
  --status-interview-dot: #FFC01E;

  --status-offer-bg: rgba(0, 184, 163, 0.14);
  --status-offer-text: #00B8A3;
  --status-offer-dot: #00B8A3;

  --status-rejected-bg: rgba(239, 71, 67, 0.14);
  --status-rejected-text: #EF4743;
  --status-rejected-dot: #EF4743;

  --status-withdrawn-bg: rgba(163, 163, 163, 0.12);
  --status-withdrawn-text: #A3A3A3;
  --status-withdrawn-dot: #737373;

  /* Layered Shadows - Subtle & Clean */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-3d: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-glow: none;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --transition-fast: 120ms ease;
  --transition-normal: 180ms ease;
  --transition-bounce: 220ms ease;

  --topbar-height: 54px;
  --sidebar-width: 240px;
}

/* Light Theme */
[data-theme="light"] {
  --theme: light;
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;

  --border: rgba(15, 23, 42, 0.09);
  --border-subtle: rgba(15, 23, 42, 0.05);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-accent: rgba(79, 70, 229, 0.4);
  --border-glow: rgba(79, 70, 229, 0.22);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-active: #3730a3;
  --primary-soft: rgba(79, 70, 229, 0.1);
  --primary-glow: rgba(79, 70, 229, 0.25);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  --primary-gradient-hover: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6d28d9 100%);

  --accent-cyan: #0891b2;
  --accent-cyan-soft: rgba(8, 145, 178, 0.1);

  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.1);

  /* Status Colors */
  --status-applied-bg: rgba(2, 132, 199, 0.1);
  --status-applied-text: #0284c7;
  --status-applied-dot: #0284c7;

  --status-screening-bg: rgba(217, 119, 6, 0.1);
  --status-screening-text: #b45309;
  --status-screening-dot: #d97706;

  --status-interview-bg: rgba(124, 58, 237, 0.1);
  --status-interview-text: #6d28d9;
  --status-interview-dot: #7c3aed;

  --status-offer-bg: rgba(5, 150, 105, 0.1);
  --status-offer-text: #047857;
  --status-offer-dot: #059669;

  --status-rejected-bg: rgba(220, 38, 38, 0.1);
  --status-rejected-text: #be123c;
  --status-rejected-dot: #e11d48;

  --status-withdrawn-bg: rgba(100, 116, 139, 0.12);
  --status-withdrawn-text: #475569;
  --status-withdrawn-dot: #64748b;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 50px -10px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
  --shadow-3d: 0 14px 34px -8px rgba(15, 23, 42, 0.09), 0 2px 8px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-glow: 0 0 28px -4px rgba(79, 70, 229, 0.18);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESETS & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.modal-open {
  overflow: hidden !important;
}

/* Clean neutral background */
body::before,
body::after {
  display: none;
}

#app-root {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   4. BUTTONS & INTERACTIVE ELEMENTS
   -------------------------------------------------------------------------- */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast),
              background var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast),
              box-shadow var(--transition-fast);
}

/* Primary Button */
.primary-button {
  height: 34px;
  padding: 0 1rem;
  color: #1a1a1a !important;
  font-weight: 600;
  font-size: 0.8125rem;
  background: var(--primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.primary-button::after {
  display: none;
}

.primary-button:hover:not(:disabled) {
  background: var(--primary-hover);
  color: #1a1a1a !important;
}

.primary-button:active:not(:disabled) {
  background: var(--primary-active);
}

/* Secondary Button */
.secondary-button {
  height: 34px;
  padding: 0 0.95rem;
  font-size: 0.8125rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.secondary-button:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.secondary-button:active:not(:disabled) {
  background: #383838;
}

/* Danger Button */
.danger-button {
  height: 34px;
  padding: 0 1rem;
  font-size: 0.8125rem;
  background: var(--danger);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.danger-button:hover:not(:disabled) {
  background: var(--danger-hover);
}

.danger-button:active:not(:disabled) {
  background: #B91C1C;
}

/* Text Button */
.text-button {
  padding: 0.35rem 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.text-button:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.text-button.danger {
  color: var(--danger);
}

.text-button.danger:hover:not(:disabled) {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Icon Button */
.icon-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.icon-button:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border);
}

/* Compact modifier */
.compact {
  height: 30px !important;
  padding: 0 0.75rem !important;
  font-size: 0.775rem !important;
  border-radius: var(--radius-xs) !important;
}

.w-full {
  width: 100%;
}

/* Disabled & Focus States */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   5. FORM CONTROLS & INPUTS
   -------------------------------------------------------------------------- */
.field-group {
  margin-bottom: 0.85rem;
  position: relative;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  height: 36px;
  padding: 0 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8125rem;
  transition: border-color var(--transition-fast),
              background var(--transition-fast);
}

textarea {
  height: auto;
  min-height: 80px;
  padding: 0.65rem 0.75rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: var(--bg-input-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Select styling */
select {
  appearance: none;
  padding-right: 2.2rem;
  cursor: pointer;
}

/* Field Errors */
.field-error {
  min-height: 1.1rem;
  margin-top: 0.35rem;
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  animation: fieldShake 200ms ease;
}

.field-error:empty {
  display: none;
}

@keyframes fieldShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Password Field Wrapper */
.auth-password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-field input {
  padding-right: 4rem;
}

.auth-password-field .password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.auth-password-field .password-toggle:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

/* File Upload Dropzone - Compact */
.file-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.file-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-box:hover,
.file-upload-box.dragover {
  border-color: var(--primary);
  background: var(--bg-elevated);
}

.upload-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.file-upload-box strong {
  font-size: 0.8125rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.file-upload-box strong span {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.file-upload-meta {
  margin-top: 0.4rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.remove-file-button {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--danger) !important;
}

/* Form Two-Column Grid */
.form-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

#company-field-wrapper {
  display: flex;
  gap: 0.5rem;
}

#new-company-wrapper {
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   6. APP LOADING STATE
   -------------------------------------------------------------------------- */
.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 1000;
  gap: 1.25rem;
}

.app-loading .brand-mark {
  width: 58px;
  height: 58px;
  font-size: 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
  animation: pulseLogo 2s infinite ease-in-out;
}

.loading-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.loading-track {
  width: 140px;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.loading-track span {
  position: absolute;
  height: 100%;
  width: 40%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  animation: shimmerTrack 1.2s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px var(--primary-glow); }
  50% { transform: scale(1.06); box-shadow: 0 0 36px var(--primary-glow); }
}

@keyframes shimmerTrack {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* Brand Mark Component */
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
  flex-shrink: 0;
}

/* Theme Switcher Toggle */
.theme-toggle-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--primary);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* --------------------------------------------------------------------------
   7. LANDING PAGE
   -------------------------------------------------------------------------- */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem max(1.5rem, calc((100vw - 1200px) / 2));
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  width: 100%;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3.5rem;
  padding: 3rem 0 5rem;
  perspective: 1200px;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--primary-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.landing-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.landing-copy h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.landing-copy h1 em {
  font-style: normal;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.landing-primary {
  height: 38px;
  padding: 0 1.25rem;
  font-size: 0.85rem;
}

.landing-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* 3D Landing Visual Mockup */
.landing-visual {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(20px);
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform 400ms var(--transition-normal);
}

.landing-visual:hover {
  border-color: var(--border-strong);
}

.visual-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.visual-mark {
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-xs);
}

.visual-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.visual-window-dots {
  display: flex;
  gap: 0.35rem;
}

.visual-window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.visual-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.visual-record {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.visual-record-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-gradient);
}

.visual-record-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.visual-record-lines i {
  height: 6px;
  border-radius: 3px;
  background: var(--border-strong);
}

.visual-record-lines i:first-child { width: 60%; }
.visual-record-lines i:last-child { width: 40%; }

.visual-record-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--status-interview-bg);
  color: var(--status-interview-text);
}

.visual-document {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.visual-document-icon {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan);
  border-radius: var(--radius-xs);
}

.visual-document-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.visual-document-lines i {
  height: 6px;
  border-radius: 3px;
  background: var(--border-strong);
}

.visual-document-lines i:first-child { width: 50%; }
.visual-document-lines i:last-child { width: 30%; }

.visual-document-check {
  color: var(--success);
  font-weight: 700;
}

.visual-bottomline {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Feature Grid */
.landing-features-heading {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.landing-feature {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.landing-feature:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.feature-index {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.landing-feature h2 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.landing-feature p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  padding: 2rem max(1.5rem, calc((100vw - 1200px) / 2));
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   8. AUTHENTICATION SCREENS (MODAL / SPLIT SCREEN)
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 13, 0.72);
  backdrop-filter: blur(12px);
  z-index: 100;
  padding: 1.25rem;
  overflow-y: auto;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.modal.hidden {
  display: none !important;
  opacity: 0;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  padding: 1.75rem;
  animation: modalScaleUp 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  0% { opacity: 0; transform: scale(0.95) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Auth Modal (Split Screen Layout) */
.auth-modal {
  max-width: 900px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  overflow: hidden;
}

.auth-story {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-story::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-lockup h1 {
  font-size: 1.25rem;
}

.auth-story-copy {
  margin: 3rem 0;
}

.auth-story-copy h2 {
  font-size: 1.85rem;
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}

.auth-story-copy p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.6;
}

.auth-story-footer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.auth-panel {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: inline-grid;
  place-items: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.close-button:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.auth-header {
  margin-bottom: 1.5rem;
}

.auth-header h2 {
  font-size: 1.5rem;
  margin: 0.25rem 0 0.5rem;
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Auth Segmented Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  height: 36px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.auth-tab:hover:not(.active) {
  color: var(--text-primary);
}

.auth-tab:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.auth-tab:disabled:hover {
  color: var(--text-muted);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.25rem 0 1.25rem;
}

/* --------------------------------------------------------------------------
   9. DASHBOARD LAYOUT & NAVIGATION
   -------------------------------------------------------------------------- */
.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--topbar-height);
  padding: 1.2rem max(1.5rem, calc((100vw - 1200px) / 2));
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-block .eyebrow {
  margin-bottom: 0;
  font-size: 0.65rem;
}

.header-search-wrap {
  flex: 1;
  max-width: 460px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.search-field input {
  padding-left: 2.25rem;
  padding-right: 3rem;
  height: 36px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
}

.search-kbd {
  position: absolute;
  right: 0.75rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.user-menu summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  list-style: none;
  transition: all var(--transition-fast);
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu summary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-accent);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

#user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  padding: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 50;
  animation: modalScaleUp 140ms ease;
}

.user-menu-panel button {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   10. MAIN CONTENT & OVERVIEW
   -------------------------------------------------------------------------- */
.page-content {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

/* Dashboard Greeting */
.dashboard-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dashboard-intro h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.dashboard-intro p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* Compact LeetCode Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 80px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-icon-wrapper {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.stat-card strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 0.15rem;
}

.stat-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Card Specific Accents - subtle and cohesive */
.stat-card:nth-child(1) .stat-icon-wrapper {
  color: var(--primary);
}

.stat-card:nth-child(2) .stat-icon-wrapper {
  color: var(--accent-cyan);
}

.stat-card:nth-child(3) .stat-icon-wrapper {
  color: var(--success);
}

.stat-card:nth-child(4) .stat-icon-wrapper {
  color: var(--warning);
}

/* --------------------------------------------------------------------------
   11. LEETCODE-STYLE APPLICATIONS & FILTERS SECTION
   -------------------------------------------------------------------------- */
.leetcode-container {
  background: #1A1A1A;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.65rem 0.85rem;
  box-shadow: none;
  margin-bottom: 2rem;
  position: relative;
  overflow: visible;
}

[data-theme="light"] .leetcode-container {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

/* LeetCode Toolbar */
.leetcode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.35rem 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.35rem;
  position: relative;
}

[data-theme="light"] .leetcode-toolbar {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.leetcode-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.leetcode-toolbar-right {
  display: flex;
  align-items: center;
}

/* LeetCode Search Input (Pill Capsule) */
.leetcode-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.leetcode-search-icon {
  position: absolute;
  left: 0.75rem;
  color: #737373;
  pointer-events: none;
}

#table-search {
  background: #282828;
  border: 1px solid var(--border);
  border-radius: 9999px;
  height: 32px;
  padding: 0 0.85rem 0 2rem;
  color: #FFFFFF;
  font-size: 0.8125rem;
  width: 200px;
  transition: all var(--transition-fast);
  outline: none;
  font-family: inherit;
}

[data-theme="light"] #table-search {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

#table-search:focus {
  border-color: var(--primary);
  width: 240px;
  box-shadow: 0 0 0 1px var(--primary);
}

/* LeetCode Icon Buttons (Sort & Filter) */
.leetcode-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #282828;
  border: 1px solid var(--border);
  color: #A3A3A3;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

[data-theme="light"] .leetcode-icon-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

.leetcode-icon-btn:hover {
  background: #333333;
  color: #ffffff;
}

[data-theme="light"] .leetcode-icon-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.leetcode-icon-btn.has-active-filters {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 0.25rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #1a1a1a;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  top: -3px;
  right: -3px;
}

/* Sort Popover Menu */
.leetcode-popover {
  position: relative;
  display: inline-block;
}

.leetcode-popover[open] {
  z-index: 1050;
}

.leetcode-popover summary {
  list-style: none;
}

.leetcode-popover summary::-webkit-details-marker {
  display: none;
}

.leetcode-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1050;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 185px;
  box-shadow: var(--shadow-xl), 0 12px 28px -4px rgba(0, 0, 0, 0.4);
  animation: modalScaleUp 140ms ease;
}

.leetcode-dropdown-header {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
}

.leetcode-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.leetcode-dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.leetcode-dropdown-item input[type="radio"] {
  accent-color: var(--primary);
  margin: 0;
}

/* LeetCode Clear Button */
.leetcode-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.leetcode-clear-btn:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* LeetCode Solved / Counter Ring */
.leetcode-progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .leetcode-progress-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.leetcode-ring-icon {
  flex-shrink: 0;
}

.leetcode-counter-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
}

[data-theme="light"] .leetcode-counter-text {
  color: #334155;
}

/* Active Filter Chips / Indicators */
.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 0.5rem;
  animation: filterModalSlideUp 180ms ease;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem 0.2rem 0.7rem;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

[data-theme="light"] .filter-chip {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: #ffffff;
}

.filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all var(--transition-fast);
}

.filter-chip-remove:hover {
  background: rgba(239, 71, 67, 0.2);
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   12. LEETCODE ROWS (PROBLEM LIST STYLE)
   -------------------------------------------------------------------------- */
.leetcode-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.leetcode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  transition: background var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.leetcode-row:nth-child(even) {
  background: #222222;
}

.leetcode-row:nth-child(odd) {
  background: transparent;
}

[data-theme="light"] .leetcode-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

.leetcode-row:hover {
  background: #333333 !important;
}

[data-theme="light"] .leetcode-row:hover {
  background: #e2e8f0 !important;
}

.leetcode-row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.leetcode-status-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.leetcode-status-icon-wrap .icon-offer {
  color: #10b981;
}

.leetcode-status-icon-wrap .icon-interview {
  color: #38bdf8;
}

.leetcode-status-icon-wrap .icon-screening {
  color: #fbbf24;
}

.leetcode-status-icon-wrap .icon-rejected {
  color: #ef4444;
}

.leetcode-status-icon-wrap .icon-withdrawn {
  color: #64748b;
}

.leetcode-status-icon-wrap .icon-applied {
  color: #38bdf8;
}

.leetcode-row-number {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 18px;
}

.leetcode-row-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leetcode-row-role {
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leetcode-job-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.leetcode-row-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.leetcode-row-date {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* LeetCode Difficulty Style Tags */
.leetcode-tag {
  font-size: 0.775rem;
  font-weight: 600;
  min-width: 55px;
  text-align: right;
}

.leetcode-tag-easy {
  color: #00B8A3;
}

.leetcode-tag-med {
  color: #FFC01E;
}

.leetcode-tag-hard {
  color: #EF4743;
}

.leetcode-tag-applied {
  color: #38bdf8;
}

.leetcode-tag-withdrawn {
  color: #A3A3A3;
}

.leetcode-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.leetcode-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.leetcode-action-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary);
}

.leetcode-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

/* Draggable Floating Filter Panel */
.filter-floating-panel {
  position: fixed;
  z-index: 1060;
  width: min(580px, calc(100vw - 2rem));
  max-height: min(88vh, 720px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border);
  padding: 1.25rem 1.35rem 1.15rem;
}

.filter-floating-panel.hidden {
  display: none !important;
}

[data-theme="light"] .filter-floating-panel {
  background: #ffffff;
  box-shadow: 0 18px 42px -10px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.filter-floating-panel.is-dragging {
  user-select: none;
  opacity: 0.96;
  box-shadow: 0 28px 58px -10px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--primary);
}

.filter-floating-panel .close-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  cursor: pointer;
  z-index: 2;
}

.filter-modal-header {
  cursor: grab;
  user-select: none;
  touch-action: none;
  margin-bottom: 0.35rem;
  padding-right: 2rem;
}

.filter-modal-header:active {
  cursor: grabbing;
}

.filter-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.filter-modal-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid var(--border-accent);
  color: var(--primary-light);
  flex-shrink: 0;
}

.filter-modal-body {
  padding: 1.25rem 0 0.5rem;
}

.filter-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.filter-modal-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* 8 Filter Grid Matrix */
.filter-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  margin-bottom: 0.35rem;
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.filter-group select,
.filter-group input {
  width: 100%;
  height: 34px;
  font-size: 0.8125rem;
  font-family: inherit;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0 0.75rem;
  color: var(--text-primary);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.filter-group select:hover,
.filter-group input:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  background: var(--bg-surface);
}

/* --------------------------------------------------------------------------
   12. APPLICATION LIST & CARDS
   -------------------------------------------------------------------------- */

.application-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

/* Elevated Card */
.application-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.application-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.application-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.company-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: #ffffff;
  background: hsl(var(--avatar-hue, 220), 70%, 50%);
  box-shadow: 0 4px 12px hsla(var(--avatar-hue, 220), 70%, 50%, 0.3);
  flex-shrink: 0;
}

.card-heading {
  flex: 1;
  min-width: 0;
}

.card-company {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-role {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

/* Card 3-dot Menu */
.card-menu {
  position: relative;
}

.card-menu summary {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  transition: all var(--transition-fast);
}

.card-menu summary::-webkit-details-marker {
  display: none;
}

.card-menu summary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.card-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 140px;
  padding: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 25;
  animation: modalScaleUp 140ms ease;
}

.card-menu-panel button {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.card-menu-panel button:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.card-menu-panel button.danger {
  color: var(--danger);
}

.card-menu-panel button.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Meta Chips */
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.job-id {
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-weight: 600;
}

/* Status Selector Pill */
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  width: fit-content;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-status select {
  height: auto;
  padding: 0.1rem 1.25rem 0.1rem 0;
  border: none;
  background: transparent;
  font-size: 0.775rem;
  font-weight: 700;
  cursor: pointer;
  background-position: right 0 center;
}

.card-status.status-applied { background: var(--status-applied-bg); color: var(--status-applied-text); }
.card-status.status-applied .status-dot { background: var(--status-applied-dot); box-shadow: 0 0 6px var(--status-applied-dot); }

.card-status.status-screening { background: var(--status-screening-bg); color: var(--status-screening-text); }
.card-status.status-screening .status-dot { background: var(--status-screening-dot); box-shadow: 0 0 6px var(--status-screening-dot); }

.card-status.status-interview { background: var(--status-interview-bg); color: var(--status-interview-text); }
.card-status.status-interview .status-dot { background: var(--status-interview-dot); box-shadow: 0 0 6px var(--status-interview-dot); }

.card-status.status-offer { background: var(--status-offer-bg); color: var(--status-offer-text); }
.card-status.status-offer .status-dot { background: var(--status-offer-dot); box-shadow: 0 0 6px var(--status-offer-dot); }

.card-status.status-rejected { background: var(--status-rejected-bg); color: var(--status-rejected-text); }
.card-status.status-rejected .status-dot { background: var(--status-rejected-dot); box-shadow: 0 0 6px var(--status-rejected-dot); }

.card-status.status-withdrawn { background: var(--status-withdrawn-bg); color: var(--status-withdrawn-text); }
.card-status.status-withdrawn .status-dot { background: var(--status-withdrawn-dot); }

.card-description {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.card-cv {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.cv-file-icon {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  letter-spacing: 0.05em;
}

.cv-file-name {
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legacy-cv-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   13. EMPTY STATE
   -------------------------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  margin-top: 1rem;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.empty-state h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 44ch;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   14. FORM MODAL & APPLICATION DETAILS
   -------------------------------------------------------------------------- */
.form-modal {
  max-width: 580px;
  width: 100%;
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
  overflow-y: hidden; /* Do not make the entire modal scrollable */
  box-sizing: border-box;
}

.form-modal form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.form-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-modal-body .field-group {
  margin-bottom: 0;
}

.form-modal-body::-webkit-scrollbar {
  width: 5px;
}

.form-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.form-modal-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.form-modal textarea {
  min-height: 52px;
  height: 56px;
  max-height: 110px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.label-optional {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.25rem;
}

/* Compact Horizontal File Upload Dropzone */
.form-modal .file-upload-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  text-align: left;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  margin: 0;
}

.form-modal .file-upload-box:hover,
.form-modal .file-upload-box.is-dragging {
  background: var(--bg-hover);
  border-color: var(--primary);
}

.form-modal .upload-icon {
  margin-bottom: 0;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}

.form-modal .file-upload-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.form-modal .file-upload-info strong {
  margin-bottom: 0;
  font-size: 0.775rem;
  color: var(--text-primary);
}

.form-modal .file-upload-info strong span {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-modal .file-upload-info .upload-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.form-modal .file-upload-meta {
  margin-top: 0;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  max-width: 175px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.cv-upload-group {
  margin-bottom: 0.15rem;
}

.cv-upload-group .form-section-label {
  margin-bottom: 0.35rem;
}

.modal-header {
  margin-bottom: 0.75rem;
  padding-right: 2rem;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.775rem;
  margin-top: 0.15rem;
}

.form-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.form-modal .form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Details Modal - Compact & Clean */
.details-modal {
  max-width: 600px;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
}

.details-content {
  margin: 0.75rem 0 1rem;
}

.details-view {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Details Hero Card */
.details-hero {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  position: relative;
  overflow: hidden;
}

.details-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.details-hero-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.details-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
}

.details-subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.details-company {
  font-weight: 600;
  color: var(--text-primary);
}

.details-jobid {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.details-hero-status {
  flex-shrink: 0;
}

/* Details Meta Bento Grid */
.details-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.details-meta-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}

.details-meta-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.details-meta-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* LeetCode Status Colors */
.stage-interview { color: #FFC01E; }
.stage-offer { color: #00B8A3; }
.stage-applied { color: #38bdf8; }
.stage-screening { color: #FFC01E; }
.stage-rejected { color: #EF4743; }
.stage-withdrawn { color: #A3A3A3; }

.details-cv-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.8125rem;
}

.details-cv-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.details-cv-size {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Job Description Section with Exact Text Formatting & Internal Scroll */
.details-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.details-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.details-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.details-section-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.details-description-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.details-description-box.is-empty {
  font-style: italic;
  color: var(--text-muted);
}

.details-description-pre {
  margin: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
  -moz-tab-size: 4;
}

.details-description-box::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.details-description-box::-webkit-scrollbar-track {
  background: transparent;
}
.details-description-box::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}
.details-description-box::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Textarea input exact text formatting (spaces, tabs, newlines) */
#job-description {
  white-space: pre-wrap;
  tab-size: 4;
  -moz-tab-size: 4;
  min-height: 90px;
  max-height: 200px;
  overflow-y: auto;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.details-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.details-action-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Narrow Modals (Delete & Logout) */
.narrow-modal {
  max-width: 400px;
  padding: 1.25rem;
}

.delete-message {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.55;
  margin: 0.5rem 0 1.5rem;
}

/* --------------------------------------------------------------------------
   15. TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 200;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  animation: toastSlideIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 240px;
  max-width: 380px;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
}

@keyframes toastSlideIn {
  0% { transform: translateY(16px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE DESIGN (BREAKPOINTS)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem 0;
  }

  .landing-visual {
    transform: none;
    max-width: 540px;
    margin: 0 auto;
  }

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

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

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

@media (max-width: 768px) {
  .auth-modal {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    padding: 2rem 1.5rem;
  }

  .topbar {
    height: auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .brand-block {
    flex: 1;
  }

  .header-search-wrap {
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  #user-name {
    display: none;
  }

  .page-content {
    padding: 1.25rem 1rem 3rem;
  }

  .records-section {
    padding: 1.15rem 1rem 1.25rem;
  }

  .records-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .records-actions {
    justify-content: flex-end;
  }

  .dashboard-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-intro .primary-button {
    width: 100%;
  }

  .application-grid {
    grid-template-columns: 100%;
    width: 100%;
  }

  .application-card {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .application-card-header {
    min-width: 0;
  }

  .card-heading {
    min-width: 0;
  }

  .details-meta-grid {
    grid-template-columns: 1fr;
  }

  .details-hero-top {
    flex-wrap: wrap;
  }

  .details-hero-status {
    width: 100%;
    margin-top: 0.35rem;
  }

  .details-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .details-action-group {
    justify-content: flex-end;
  }

  .form-grid-two {
    grid-template-columns: 1fr;
  }

  /* LeetCode responsive adjustments */
  .leetcode-container {
    padding: 0.5rem 0.5rem 0.75rem;
  }

  .leetcode-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .leetcode-toolbar-left {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .leetcode-search-wrap {
    flex: 1;
    min-width: 0;
  }

  #table-search {
    width: 100% !important;
  }

  .leetcode-toolbar-right {
    width: 100%;
    justify-content: flex-end;
  }

  .filter-floating-panel {
    width: calc(100vw - 1rem);
    max-height: 85vh;
    padding: 1rem;
  }

  .filter-matrix {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .leetcode-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.75rem 0.65rem;
  }

  .leetcode-row-left {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .leetcode-row-title {
    max-width: 180px;
  }

  .leetcode-row-role {
    max-width: 140px;
  }

  .leetcode-row-right {
    width: 100%;
    margin-left: 0;
    padding-left: 1.75rem;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .leetcode-tag {
    min-width: auto;
    text-align: left;
  }
}

@media (max-width: 580px) {
  .form-grid-two {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .form-modal {
    padding: 1rem 1.15rem;
  }

  .form-modal .file-upload-box {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .form-modal .file-upload-meta {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 0.75rem;
  }

  .modal-dialog {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-matrix {
    grid-template-columns: 1fr;
  }

  .records-actions {
    flex-direction: column-reverse;
    width: 100%;
    gap: 0.5rem;
  }

  .records-actions button {
    width: 100%;
    justify-content: center;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions button {
    width: 100%;
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   17. REDUCED MOTION SUPPORT
   -------------------------------------------------------------------------- */
@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;
  }
}
