:root {
  /* ThriveAllianz brand palette, sampled from the company logo */
  --brand-teal: #2f9da3;
  --brand-orange: #f97c3c;
  --brand-amber: #fbb43f;
  --brand-green: #6dbe45;
  --brand-gray: #6d6e70;

  --brand-1: var(--brand-teal);
  --brand-2: var(--brand-orange);
  --brand-1-rgb: 47, 157, 163;
  --brand-soft: #e7f5f5;
  --ink: #333438;
  --muted: #6d6e70;
  --page-bg: #f6f8f8;
  --surface: #ffffff;
  --surface-border: #e7f0f0;
  --table-border: #e3ecec;
  --card-radius: 14px;
  color-scheme: light;
}

/* Dark mode - toggled by setting data-bs-theme="dark" on <html>.
   Bootstrap 5.3 already re-themes its own components (forms, modals,
   dropdowns, tables) from this attribute; these variables re-theme our
   custom classes (metric tiles, candidate cards, login page, etc). */
[data-bs-theme="dark"] {
  --brand-soft: rgba(47, 157, 163, 0.16);
  --ink: #e9edee;
  --muted: #9fb0b1;
  --page-bg: #10161a;
  --surface: #1b2327;
  --surface-border: #2a3438;
  --table-border: #2a3438;
  color-scheme: dark;
}

* {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  background: var(--page-bg);
  color: var(--ink);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Theme toggle button */
.theme-toggle-btn {
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-icon {
  transition: transform 0.35s ease;
}
.theme-toggle-btn:hover .theme-toggle-icon {
  transform: rotate(20deg) scale(1.1);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 600;
}

/* Navbar */
.navbar.app-navbar {
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 2px 12px rgba(var(--brand-1-rgb), 0.3);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.app-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
}
.app-navbar .brand-logo {
  height: 34px;
  margin-right: 8px;
  border-radius: 6px;
  background: #fff;
  padding: 2px 6px;
}
.app-navbar .badge.role-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 500;
  border-radius: 999px;
}

/* Cards */
.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 1px 3px rgba(30, 27, 58, 0.06), 0 8px 24px rgba(30, 27, 58, 0.04);
}
.card .card-body {
  padding: 1.25rem 1.4rem;
}

/* Metric tiles */
.metric-tile {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 1rem 1.2rem;
  box-shadow: 0 1px 3px rgba(30, 27, 58, 0.06);
  border-left: 4px solid var(--brand-1);
  transition: background-color 0.25s ease;
}
.metric-tile .metric-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}
.metric-tile .metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}

/* Goal banner */
.goal-banner {
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-radius: var(--card-radius);
  padding: 1.1rem 1.3rem;
}
.goal-banner .goal-progress-track {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.goal-banner .goal-progress-fill {
  background: #fff;
  height: 100%;
  border-radius: 999px;
}
.goal-progress-track.plain {
  background: var(--surface-border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.goal-progress-track.plain .goal-progress-fill {
  background: var(--brand-green);
  height: 100%;
  border-radius: 999px;
}

/* Tabs */
.nav-tabs {
  border-bottom: 2px solid var(--table-border);
  gap: 4px;
}
.nav-tabs .nav-link {
  border: none;
  color: var(--muted);
  font-weight: 500;
  border-radius: 10px 10px 0 0;
  padding: 0.6rem 1.1rem;
  white-space: nowrap;
}
.nav-tabs .nav-link.active {
  background: var(--surface);
  color: var(--brand-1);
  box-shadow: 0 -2px 0 var(--brand-1) inset;
}
.nav-tabs .nav-link:hover:not(.active) {
  background: rgba(var(--brand-1-rgb), 0.08);
  color: var(--brand-1);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2));
  border: none;
  font-weight: 500;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(100deg, #268185, #e2661f);
}
.btn-outline-primary {
  color: var(--brand-1);
  border-color: var(--brand-1);
  font-weight: 500;
}
.btn-outline-primary:hover {
  background: var(--brand-1);
  border-color: var(--brand-1);
}
.btn {
  border-radius: 10px;
}

/* Tables */
.table {
  --bs-table-bg: transparent;
}
.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  border-bottom: 2px solid var(--table-border);
  font-weight: 600;
}
.table td {
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background: var(--brand-soft);
}

/* Badges */
.status-badge {
  font-size: 0.72rem;
  padding: 0.4em 0.75em;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Candidate cards (recruiter dashboard) */
.candidate-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.25s ease;
  border-radius: var(--card-radius);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}
.candidate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(var(--brand-1-rgb), 0.18);
  border-color: var(--brand-1);
}
.candidate-card .card-title {
  color: var(--ink);
}

/* ==========================================================================
   Premium Login Page
   ========================================================================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  background: linear-gradient(120deg, #0d3b3d, #123f45, #7a3a15, #123f45);
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
}

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

/* Soft floating decorative blobs behind the login card */
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  animation: floatBlob 12s ease-in-out infinite;
}
.login-blob.blob-1 {
  width: 340px; height: 340px;
  top: -80px; left: -80px;
  background: var(--brand-1);
  animation-delay: 0s;
}
.login-blob.blob-2 {
  width: 300px; height: 300px;
  bottom: -100px; right: -60px;
  background: var(--brand-2);
  animation-delay: 3s;
}
.login-blob.blob-3 {
  width: 220px; height: 220px;
  bottom: 20%; left: 8%;
  background: var(--brand-amber);
  animation-delay: 6s;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.08); }
}

/* Glassmorphism card */
.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: cardRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cardRise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card .brand-header {
  background: linear-gradient(120deg, rgba(47,157,163,0.9), rgba(249,124,60,0.9));
  color: #fff;
  padding: 2rem 1.5rem 1.6rem;
  text-align: center;
}
.login-card .brand-header .brand-logo-img {
  height: 60px;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 0.75rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.login-card .brand-header h4 {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.login-card .card-body {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
}
[data-bs-theme="dark"] .login-card .card-body {
  background: rgba(20, 27, 30, 0.82);
}

.login-card .form-control {
  background: rgba(255, 255, 255, 0.9);
}
[data-bs-theme="dark"] .login-card .form-control {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.15);
}

.login-card .input-icon-wrap {
  position: relative;
}
.login-card .input-icon-wrap .bi {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.login-card .input-icon-wrap .form-control {
  padding-left: 2.4rem;
}
.login-card .password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--muted);
  padding: 4px 8px;
  cursor: pointer;
}
.login-card .password-toggle-btn:hover {
  color: var(--brand-1);
}

.login-card .btn-primary {
  padding: 0.65rem 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.login-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(var(--brand-1-rgb), 0.35);
}

.login-theme-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
}

.login-footer-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  margin-top: 1.25rem;
  position: relative;
  z-index: 2;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.empty-state i {
  font-size: 2rem;
  color: #bfe0e0;
  margin-bottom: 0.5rem;
  display: block;
}

/* Toasts */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
}
#toast-container .alert {
  border-radius: 12px;
  border: none;
}

/* Form controls */
.form-control, .form-select {
  border-radius: 10px;
  border-color: #d9e6e6;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-1-rgb), 0.15);
}

/* Client dashboard */
.client-card {
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(30, 27, 58, 0.06);
}
.designation-row {
  border-top: 1px solid var(--surface-border);
  padding: 0.75rem 0;
}
.designation-row:first-child {
  border-top: none;
}
.contribution-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-soft);
  color: #1f6d71;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 2px 4px 2px 0;
}

@media (max-width: 576px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .metric-tile .metric-value {
    font-size: 1.3rem;
  }
}
