/* ============================================
   JOINGAME.DEV — Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=Russo+One&family=Golos+Text:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --accent-purple: #7c3aed;
  --accent-purple-light: #9d5df5;
  --accent-purple-dim: rgba(124, 58, 237, 0.2);
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-cyan-dim: rgba(6, 182, 212, 0.2);
  --accent-gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b5;
  --text-muted: #606078;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.2);
  --success: #10b981;
  --success-dim: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-body: 'Space Grotesk', 'Golos Text', system-ui, sans-serif;
  --font-heading: 'Orbitron', 'Russo One', monospace;

  /* Shadows */
  --shadow-glow-purple: 0 0 20px rgba(124, 58, 237, 0.4), 0 0 40px rgba(124, 58, 237, 0.15);
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.4), 0 0 40px rgba(6, 182, 212, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 48px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ============================================
   Russian/Cyrillic font support
   Orbitron and Space Grotesk don't have Cyrillic
   glyphs, so Russo One and Golos Text are listed
   as fallbacks in the font stacks above. The
   browser automatically uses the fallback only
   for characters not covered by the primary font,
   so Latin text stays in Orbitron/Space Grotesk.
   ============================================ */

/* ============================================
   Light Theme
   ============================================ */
[data-theme="light"] {
  --bg-primary: #f0f0f8;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.04);
  --bg-card-hover: rgba(0, 0, 0, 0.07);
  --text-primary: #0f0f1a;
  --text-secondary: #44446a;
  --text-muted: #8888aa;
  --border-color: rgba(0, 0, 0, 0.09);
  --border-color-hover: rgba(0, 0, 0, 0.18);
  --accent-purple-dim: rgba(124, 58, 237, 0.10);
  --accent-cyan-dim: rgba(6, 182, 212, 0.10);
  --danger-dim: rgba(239, 68, 68, 0.10);
  --success-dim: rgba(16, 185, 129, 0.10);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.10);
  --shadow-elevated: 0 8px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="light"] .nav {
  background: rgba(240, 240, 248, 0.75);
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(240, 240, 248, 0.96);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .glass-card.hoverable:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent-purple);
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #f0f0f8 0%, #ece8ff 50%, #e8f7fd 100%);
}

[data-theme="light"] .hero-grid {
  opacity: 0.3;
}

[data-theme="light"] .hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
}

[data-theme="light"] .footer {
  background: rgba(0, 0, 0, 0.04);
  border-top-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .filter-panel {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .form-control {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.22);
  color: var(--text-primary);
}

[data-theme="light"] .form-control:focus {
  background: #ffffff;
  border-color: var(--accent-purple);
}

[data-theme="light"] .auth-tabs {
  background: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .alert-error {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

[data-theme="light"] .alert-success {
  background: rgba(16, 185, 129, 0.09);
  border-color: rgba(16, 185, 129, 0.35);
  color: #047857;
}

[data-theme="light"] .form-error {
  color: #b91c1c;
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.10);
  color: var(--text-primary);
}

[data-theme="light"] .btn-secondary:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

[data-theme="light"] .btn-ghost {
  color: var(--text-secondary);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

[data-theme="light"] .admin-table th {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .admin-table tr:hover td {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .nav-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .nav-dropdown a,
[data-theme="light"] .nav-dropdown button {
  color: var(--text-primary);
}

[data-theme="light"] .nav-dropdown a:hover,
[data-theme="light"] .nav-dropdown button:hover {
  background: rgba(0, 0, 0, 0.05);
}

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

[data-theme="light"] .search-input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

[data-theme="light"] .search-input::placeholder {
  color: var(--text-muted);
}

[data-theme="light"] .hero-sm {
  background: linear-gradient(135deg, #f0f0f8, #ece8ff);
}

[data-theme="light"] .section-label {
  color: var(--accent-purple);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
}

/* Subtle dot pattern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

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

img {
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-cyan { color: var(--accent-cyan); }
.text-purple { color: var(--accent-purple-light); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-3xl) 0;
}

/* ============================================
   Navigation
   ============================================ */
#nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition-base), backdrop-filter var(--transition-base),
              border-color var(--transition-base);
}

.nav {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 var(--space-xl);
  gap: var(--space-xl);
  border-bottom: 1px solid transparent;
  transition: inherit;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-color);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo .cyan { color: var(--accent-cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

/* ---- Theme toggle & lang switcher ---- */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 8px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
  padding: 3px 7px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
}

.nav-user-menu {
  position: relative;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow-purple);
}

.nav-avatar { position: relative; }

.nav-notif-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--surface);
  pointer-events: none;
}

.nav-notif-dot.hidden { display: none; }

.nav-inbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-purple);
  flex-shrink: 0;
}

.nav-inbox-dot.hidden { display: none; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  box-shadow: var(--shadow-elevated);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown.open {
  display: flex;
}

.nav-dropdown a,
.nav-dropdown button {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown a:hover,
.nav-dropdown button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

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

/* Mobile nav toggle */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 1.2rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background var(--transition-fast), opacity var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-purple);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color-hover);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-cyan {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-weight: 700;
}

.btn-cyan:hover:not(:disabled) {
  background: var(--accent-cyan-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-cyan);
}

.btn-cyan:disabled {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  opacity: 1;
  cursor: default;
}

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

.btn-danger:hover:not(:disabled) {
  background: var(--danger-dim);
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* CSS tooltip via data-tooltip attribute */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after {
  opacity: 1;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-md);
}

/* ============================================
   Glass Cards
   ============================================ */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base), transform var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
}

.glass-card.hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

/* ============================================
   Badges & Tags
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-purple {
  background: var(--accent-purple-dim);
  color: var(--accent-purple-light);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

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

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

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

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

.badge-neutral {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-coming-soon {
  background: var(--accent-gradient);
  color: white;
  font-size: 0.65rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag.remote { color: var(--success); border-color: rgba(16, 185, 129, 0.3); background: var(--success-dim); }
.tag.relocation { color: var(--accent-cyan); border-color: rgba(6, 182, 212, 0.3); background: var(--accent-cyan-dim); }

/* ============================================
   Forms
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), background var(--transition-fast),
              box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-dim);
}

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

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  background-color: rgba(255, 255, 255, 0.05);
}

select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-purple);
  cursor: pointer;
  flex-shrink: 0;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  display: none;
}

.form-error.visible {
  display: block;
}

.form-success {
  font-size: 0.8rem;
  color: var(--success);
  display: none;
}

.form-success.visible {
  display: block;
}

/* Alert messages */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  text-align: center;
  display: none;
}

.alert.visible {
  display: block;
}

.alert-error {
  background: var(--danger-dim);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

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

/* Password strength indicator */
.password-rules {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.password-rules.visible {
  display: flex;
}

.pw-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: color 150ms ease;
}

.pw-rule.ok {
  color: var(--success);
}

.pw-rule.fail {
  color: var(--danger);
}

.pw-rule-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--border-color);
  color: transparent;
}

.pw-rule.ok .pw-rule-icon {
  background: var(--success);
  color: white;
}

.pw-rule.fail .pw-rule-icon {
  background: var(--danger);
  color: white;
}

[data-theme="light"] .password-rules {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Inline profile edit rows */
.profile-setting-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.profile-setting-edit-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.profile-setting-edit-row .form-control {
  padding: 7px 12px;
  font-size: 0.875rem;
  max-width: 260px;
  width: 100%;
}

/* ============================================
   Search Bar
   ============================================ */
.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Animated grid lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 14px;
  background: var(--accent-purple-dim);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-purple-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

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

.animated-gradient {
  background: linear-gradient(135deg, #7c3aed, #06b6d4, #9d5df5, #22d3ee, #7c3aed);
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Hero sub-pages (non-homepage) */
.hero-sm {
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================
   Stats
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.stat-card {
  text-align: center;
  padding: var(--space-xl);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

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

/* ============================================
   Category Grid
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.category-card {
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-lg);
}

.category-card:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 1px var(--accent-purple-dim);
  transform: translateY(-2px);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg { width: 28px; height: 28px; }

.category-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============================================
   Vacancy Cards
   ============================================ */
.vacancy-card {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  cursor: pointer;
}

.vacancy-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.2), var(--shadow-card);
  transform: translateY(-2px);
}

.vacancy-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vacancy-title-area {
  flex: 1;
  min-width: 0;
}

.vacancy-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vacancy-company {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.company-page-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.company-page-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.vacancy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.vacancy-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vacancy-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vacancy-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: var(--space-md);
}

.vacancy-save-btn {
  border: 1px solid var(--border-color-hover) !important;
  min-width: 34px;
  padding: 5px 8px;
  transition: border-color var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
  opacity: 0.7;
}

.vacancy-save-btn:hover {
  border-color: rgba(124, 58, 237, 0.5) !important;
  transform: scale(1.1);
  opacity: 1;
}

.vacancy-save-btn.saved {
  border-color: rgba(124, 58, 237, 0.4) !important;
  opacity: 1;
}

.heart-icon {
  display: block;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  pointer-events: none;
}

.saved-jobs-scroll {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color-hover) transparent;
}

.saved-jobs-scroll::-webkit-scrollbar {
  width: 4px;
}

.saved-jobs-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color-hover);
  border-radius: 2px;
}

.vacancy-salary {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
}

/* ============================================
   Career Club Layout
   ============================================ */
.career-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
  padding: var(--space-xl);
  max-height: calc(100vh - var(--nav-height) - var(--space-2xl));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.filter-panel::-webkit-scrollbar {
  width: 4px;
}

.filter-panel::-webkit-scrollbar-track {
  background: transparent;
}

.filter-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.filter-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.filter-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.filter-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.filter-checkbox-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-purple);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-checkbox-item label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.filter-checkbox-item:hover label {
  color: var(--text-primary);
}

.filter-checkbox-item input:checked + label {
  color: var(--text-primary);
}

.vacancies-main {
  min-width: 0;
}

.vacancies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
}

.vacancies-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vacancies-grid {
  display: grid;
  gap: var(--space-md);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
}

.empty-state p {
  font-size: 0.875rem;
}

/* ============================================
   Loading Spinner
   ============================================ */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
}

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

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   Vacancy Detail
   ============================================ */
.vacancy-detail-header {
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.vacancy-detail-company {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.company-logo-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.vacancy-detail-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

.vacancy-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.vacancy-section {
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.vacancy-section h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  font-family: var(--font-heading);
}

.vacancy-section p,
.vacancy-section li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.vacancy-section ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vacancy-section ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vacancy-section ul li::before {
  content: '→';
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================
   Auth (Login/Register)
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-lg) var(--space-xl);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-2xl);
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-xl);
}

.auth-tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.auth-tab.active {
  background: var(--accent-purple);
  color: white;
}

.auth-forms-container {
  position: relative;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  visibility: hidden;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

.auth-form.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
  visibility: visible;
}

/* ============================================
   Profile Page
   ============================================ */
.profile-page {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-4xl);
  min-height: 100vh;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.profile-role {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-role.admin { color: var(--accent-cyan); }
.profile-role.user { color: var(--text-muted); }

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-xl);
}

.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.profile-tab:hover { color: var(--text-primary); }

.profile-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-purple);
}

.profile-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent-purple);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.profile-tab-panel {
  display: none;
}
.profile-tab-panel.active {
  display: block;
}

/* Profile Settings */
.profile-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  font-family: var(--font-heading);
}

.profile-settings-list {
  display: flex;
  flex-direction: column;
}

.profile-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.profile-setting-label {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.profile-setting-value {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Saved Jobs Grid */
.saved-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.saved-job-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: border-color 0.15s, transform 0.15s;
}

.saved-job-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.saved-job-card-body { flex: 1; }

.saved-job-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.saved-job-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.saved-job-dot { opacity: 0.4; }

.saved-job-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Inbox */
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: border-color 0.15s;
}

.inbox-item:hover { border-color: rgba(124, 58, 237, 0.3); }

.inbox-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple-light);
  flex-shrink: 0;
}

.inbox-body { flex: 1; min-width: 0; }

.inbox-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.inbox-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.inbox-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inbox-unread {
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.04);
}

/* Save button on vacancy detail — filled state */
.vacancy-save-btn-detail.saved {
  border-color: rgba(124, 58, 237, 0.5);
  color: var(--accent-purple-light);
}

/* ============================================
   Admin Panel
   ============================================ */
.admin-page {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-4xl);
  min-height: 100vh;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.admin-stat {
  padding: var(--space-lg);
  text-align: center;
}

.admin-stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.admin-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Admin Table */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table td.title-cell {
  color: var(--text-primary);
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.modal {
  width: 100%;
  max-width: 720px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-base);
  margin: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

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

/* ============================================
   Info Cards (About, Why Join, etc.)
   ============================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.info-card {
  padding: var(--space-2xl);
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-purple-dim);
  border: 1px solid rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-lg);
}

.info-card-icon svg { width: 24px; height: 24px; }

.info-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Course Cards
   ============================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: center;
  gap: var(--space-xl);
}

.course-card {
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.course-card-img {
  height: 160px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.course-card-coming-soon {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-card-body {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-footer {
  margin-top: auto;
}

.course-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.course-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: var(--space-4xl) var(--space-2xl);
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(124, 58, 237, 0.1), transparent 60%),
    radial-gradient(circle at 70% 50%, rgba(6, 182, 212, 0.08), transparent 60%);
  pointer-events: none;
}

.cta-section h2 {
  margin-bottom: var(--space-md);
  position: relative;
}

.cta-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  position: relative;
}

.cta-section .hero-cta {
  justify-content: center;
  position: relative;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-4xl);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-logo .cyan { color: var(--accent-cyan); }

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-2xl) 0 var(--space-sm);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-elevated);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.pagination-btn:hover:not(:disabled):not(.active) {
  border-color: var(--accent-purple);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.08);
}

.pagination-btn.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-arrow {
  font-size: 1rem;
}

.pagination-ellipsis {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0 4px;
  user-select: none;
}

/* ============================================
   Section Titles
   ============================================ */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple-light);
  margin-bottom: var(--space-sm);
  display: block;
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

/* ============================================
   Page header (for interior pages)
   ============================================ */
.page-content {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-4xl);
  min-height: 100vh;
}

/* ============================================
   Toast / Notification
   ============================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  transform: translateX(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 320px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ============================================
   Confirm Dialog
   ============================================ */
.confirm-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.confirm-dialog.open {
  opacity: 1;
  visibility: visible;
}

.confirm-dialog-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.confirm-dialog-box h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.confirm-dialog-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.confirm-dialog-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* ============================================
   Filter Mobile Toggle
   ============================================ */
.filter-mobile-toggle {
  display: none;
}

.filter-panel-mobile-close {
  display: none;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .career-layout {
    grid-template-columns: 240px 1fr;
  }

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

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav {
    padding: 0 var(--space-md);
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: var(--space-sm);
  }

  .nav-controls {
    display: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: var(--radius-md);
  }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .career-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 280px;
    z-index: 1500;
    border-radius: 0;
    max-height: 100vh;
    transition: left var(--transition-base);
    background: var(--bg-secondary);
    border: none;
    border-right: 1px solid var(--border-color);
  }

  .filter-panel.mobile-open {
    left: 0;
  }

  .filter-mobile-toggle {
    display: flex;
  }

  .filter-panel-mobile-close {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
  }

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

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

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .vacancy-detail-header {
    padding: var(--space-lg);
  }

  .vacancy-detail-company {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

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

  .cta-section {
    padding: var(--space-2xl) var(--space-lg);
  }

  .modal {
    max-width: 100%;
  }

  .modal-body {
    max-height: calc(90vh - 80px);
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .auth-card {
    padding: var(--space-lg);
  }

  .profile-setting-edit-row {
    flex-wrap: wrap;
  }

  .profile-setting-edit-row .form-control {
    max-width: 100%;
  }
}

/* ============================================
   Utility
   ============================================ */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.w-full { width: 100%; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ============================================
   Light Theme — Nav active link
   ============================================ */
[data-theme="light"] .nav-links a {
  color: var(--text-secondary);
}

[data-theme="light"] .nav-links a:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

[data-theme="light"] .nav-links a.active {
  background: rgba(124, 58, 237, 0.10);
  color: var(--accent-purple);
  outline: 1.5px solid rgba(124, 58, 237, 0.30);
}

/* Vacancy user-facing status badge */
.badge-archived {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.vacancy-archived-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--warning);
  font-weight: 500;
  margin-bottom: var(--space-lg);
}
