/* ==========================================================================
   APEXMEDICS HOSPITAL — SECURE ADMIN PORTAL STYLESHEET
   Mobile & Desktop Billion-Dollar Clinical UI
   ========================================================================== */

:root {
  --navy-deep: #062246;
  --navy-darker: #041832;
  --navy-surface: #0a2952;
  --logo-blue: #0264B2;
  --logo-blue-light: #EBF4FC;
  --logo-blue-hover: #014E8C;
  --logo-green: #08A35B;
  --logo-green-dark: #067D46;
  --logo-green-light: #EBF8F1;
  --accent-gold: #D9822B;
  --accent-gold-light: #FEF7ED;
  --danger-red: #D9383A;
  --danger-light: #FDF2F2;
  --bg-page: #F6F9FC;
  --bg-white: #FFFFFF;
  --border-light: #E2EBF5;
  --border-focus: #0264B2;
  --slate-text: #2D3E50;
  --slate-muted: #607289;
  --slate-subtle: #8FA2B7;
  --shadow-sm: 0 2px 6px rgba(6, 34, 70, 0.04);
  --shadow-md: 0 6px 18px rgba(6, 34, 70, 0.08);
  --shadow-lg: 0 14px 34px rgba(6, 34, 70, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --sidebar-w: 270px;
  --topbar-h: 68px;
}

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

body.admin-body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--slate-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ==========================================================================
   AUTHENTICATION GATE SCREEN
   ========================================================================== */
.auth-gate-wrapper {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, #09346B 0%, #062246 60%, #03142B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: authSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-logo-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy-deep);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-logo-text span {
  font-size: 0.78rem;
  color: var(--logo-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 0.88rem;
  color: var(--slate-muted);
  margin-bottom: 24px;
  line-height: 1.45;
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-hint {
  font-size: 0.76rem;
  color: var(--logo-blue);
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--slate-subtle);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--navy-deep);
  background: #FAFCFE;
  transition: all 0.2s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 100, 178, 0.12);
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--slate-subtle);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.btn-toggle-pw:hover {
  color: var(--navy-deep);
}

.auth-error-msg {
  background: var(--danger-light);
  color: var(--danger-red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(217, 56, 58, 0.2);
}

.btn-admin-submit {
  width: 100%;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--logo-blue) 0%, #014E8C 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 100, 178, 0.28);
  transition: all 0.2s ease;
}

.btn-admin-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 100, 178, 0.38);
}

.auth-footer-note {
  margin-top: 24px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--slate-subtle);
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

/* ==========================================================================
   APP HEADER / TOP BAR
   ========================================================================== */
.admin-app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: var(--topbar-h);
  background: var(--navy-deep);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--logo-green);
  box-shadow: 0 4px 18px rgba(6, 34, 70, 0.16);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-menu-mobile {
  display: none;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.btn-menu-mobile:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFFFFF;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: block;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  color: #8CC4F0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-sync-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #D6E8FA;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--logo-green);
  box-shadow: 0 0 8px var(--logo-green);
}

.status-dot.offline {
  background: var(--danger-red);
  box-shadow: 0 0 8px var(--danger-red);
}

.btn-preview-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 100, 178, 0.35);
  color: #FFFFFF;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid rgba(2, 100, 178, 0.5);
  transition: all 0.2s ease;
}

.btn-preview-site:hover {
  background: var(--logo-blue);
}

.btn-admin-logout {
  background: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-admin-logout:hover {
  background: rgba(217, 56, 58, 0.2);
  border-color: rgba(217, 56, 58, 0.6);
  color: #FFA5A6;
}

/* ==========================================================================
   LAYOUT: SIDEBAR & MAIN CONTAINER
   ========================================================================== */
.admin-main-container {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  min-height: calc(100vh - var(--topbar-h));
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-page);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--logo-blue) 0%, var(--navy-deep) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.84rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.user-info strong {
  display: block;
  font-size: 0.82rem;
  color: var(--navy-deep);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.user-info span {
  display: block;
  font-size: 0.72rem;
  color: var(--slate-muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-subtle);
  margin: 0 12px 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-tab {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.90rem;
  font-weight: 600;
  color: var(--slate-text);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  position: relative;
}

.side-tab:hover {
  background: #F2F7FD;
  color: var(--logo-blue);
}

.side-tab.active {
  background: var(--logo-blue-light);
  color: var(--logo-blue);
  font-weight: 700;
}

.side-tab.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: var(--logo-blue);
  border-radius: 0 4px 4px 0;
}

.count-badge {
  margin-left: auto;
  background: #FFFFFF;
  color: var(--logo-blue);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(2, 100, 178, 0.2);
}

.sidebar-system-info {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sys-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
}

.sys-k {
  color: var(--slate-muted);
}

.sys-v {
  font-weight: 700;
  color: var(--navy-deep);
}

.badge-prod {
  background: var(--logo-green-light);
  color: var(--logo-green-dark);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.70rem;
  font-weight: 700;
}

/* ==========================================================================
   CONTENT STAGE & TAB PANES
   ========================================================================== */
.admin-content-stage {
  flex: 1;
  padding: 32px 36px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeInPane 0.25s ease;
}

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

.page-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 20px;
  flex-wrap: wrap;
}

.page-title-bar h1 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy-deep);
  margin-bottom: 4px;
}

.page-title-bar p {
  font-size: 0.90rem;
  color: var(--slate-muted);
  max-width: 640px;
}

.btn-primary-action {
  background: linear-gradient(135deg, var(--logo-blue) 0%, #014E8C 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 100, 178, 0.22);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 100, 178, 0.32);
}

.secondary-btn {
  background: var(--bg-white);
  color: var(--navy-deep);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.90rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background: #F4F8FC;
  border-color: #C8DDF2;
}

/* ==========================================================================
   METRICS SUMMARY BAR
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.metric-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon.blue {
  background: var(--logo-blue-light);
  color: var(--logo-blue);
}

.metric-icon.green {
  background: var(--logo-green-light);
  color: var(--logo-green);
}

.metric-icon.gold {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.metric-val {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1.1;
}

.metric-lbl {
  font-size: 0.78rem;
  color: var(--slate-muted);
  font-weight: 600;
}

/* ==========================================================================
   CONTROLS & SEARCH BAR
   ========================================================================== */
.table-controls-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FAFCFE;
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  flex: 1;
  min-width: 240px;
  color: var(--slate-subtle);
}

.search-input-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 0.90rem;
  color: var(--navy-deep);
}

.search-input-box input:focus {
  outline: none;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.styled-select {
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #FAFCFE;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--navy-deep);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.styled-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.btn-refresh-data {
  background: #FAFCFE;
  border: 1px solid var(--border-light);
  color: var(--slate-muted);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-refresh-data:hover {
  color: var(--logo-blue);
  border-color: #C8DDF2;
  background: #FFFFFF;
}

/* ==========================================================================
   SERVICES & DEPARTMENTS CARDS GRID
   ========================================================================== */
.services-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.admin-loading-indicator {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--slate-muted);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(2, 100, 178, 0.15);
  border-top-color: var(--logo-blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.admin-dept-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.admin-dept-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #C8DDF2;
}

.card-top-media {
  height: 180px;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 20px 0;
  border-bottom: 1px solid #EEF4FA;
  position: relative;
}

.card-top-media img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.card-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(6, 34, 70, 0.75);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.card-status-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-status-pill.published {
  color: var(--logo-green-dark);
}

.card-status-pill.draft {
  color: var(--slate-muted);
}

.card-status-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.card-title-row h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.25;
}

.card-slug {
  font-size: 0.76rem;
  color: var(--logo-blue);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
  word-break: break-all;
}

.card-desc,
.card-dept-desc {
  font-size: 0.88rem;
  color: var(--slate-muted);
  line-height: 1.55;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
}

.card-dept-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1.3;
  margin: 0 0 8px 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #F7FAFC;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-text);
  min-width: 0;
}

.meta-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  min-width: 0;
}

.meta-ico {
  width: 16px;
  height: 16px;
  color: var(--logo-blue);
  flex-shrink: 0;
}

/* Specific non-overlapping Job Card Header Components */
.job-card-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-light);
  background: #FAFBFD;
  position: relative;
}

.job-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.job-dept-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-deep);
  background: #E8F0FA;
  padding: 4px 10px;
  border-radius: 999px;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.job-status-pill.published {
  color: var(--logo-green-dark);
  background: #EBF8F1;
  border-color: #A7F3D0;
}

.job-status-pill.draft {
  color: var(--slate-muted);
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.job-status-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.job-type-chip {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--logo-blue);
  background: #EBF4FC;
  padding: 3px 9px;
  border-radius: 6px;
  margin-top: 6px;
}

.card-meta-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: #F7FAFC;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.80rem;
}

.meta-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-text);
}

.meta-chip-row svg {
  color: var(--logo-blue);
  flex-shrink: 0;
}

.meta-chip-row strong {
  color: var(--navy-deep);
}

.card-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.btn-card-edit {
  flex: 1;
  background: var(--logo-blue-light);
  color: var(--logo-blue);
  border: 1px solid rgba(2, 100, 178, 0.2);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.btn-card-edit:hover {
  background: var(--logo-blue);
  color: #FFFFFF;
}

.btn-card-delete {
  background: #FFF5F5;
  color: var(--danger-red);
  border: 1px solid rgba(217, 56, 58, 0.2);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.btn-card-delete:hover {
  background: var(--danger-red);
  color: #FFFFFF;
}

.btn-card-view {
  background: #FAFCFE;
  color: var(--navy-deep);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.btn-card-view:hover {
  background: #EEF4FA;
}

/* ==========================================================================
   CONFIG CARD & SETTINGS STYLES
   ========================================================================== */
.config-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.config-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.config-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--logo-blue-light);
  color: var(--logo-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.config-icon-badge.green {
  background: var(--logo-green-light);
  color: var(--logo-green);
}

.config-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 4px;
}

.config-header p {
  font-size: 0.88rem;
  color: var(--slate-muted);
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.config-form .form-group {
  margin-bottom: 18px;
}

.config-form input,
.config-form textarea,
.modal-form input,
.modal-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--navy-deep);
  background: #FAFCFE;
  transition: all 0.2s ease;
}

.config-form input:focus,
.config-form textarea:focus,
.modal-form input:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 100, 178, 0.12);
}

.styled-textarea {
  font-family: 'Consolas', monospace !important;
  font-size: 0.84rem !important;
  line-height: 1.45;
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--slate-muted);
  margin-top: 5px;
}

.config-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.backup-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-outline-action {
  background: var(--bg-white);
  color: var(--navy-deep);
  border: 1.5px solid var(--border-light);
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-outline-action:hover {
  background: #F4F8FC;
  border-color: #C8DDF2;
  color: var(--logo-blue);
}

.file-upload-btn {
  cursor: pointer;
}

/* ==========================================================================
   MODAL DIALOG: EDIT / CREATE DEPARTMENT
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 34, 70, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  margin: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-height: min(92vh, 840px);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  flex-shrink: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #FFFFFF;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1.25;
  margin: 0;
  word-break: break-word;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--slate-muted);
  display: block;
  margin-top: 4px;
}

.btn-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--slate-subtle);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.btn-modal-close:hover {
  color: var(--navy-deep);
}

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

.modal-body-scroll {
  padding: 22px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(min(92vh, 840px) - 150px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

.modal-body-scroll::-webkit-scrollbar {
  width: 8px;
}

.modal-body-scroll::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.slug-input-wrapper {
  display: flex;
  align-items: center;
  background: #FAFCFE;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.slug-prefix {
  padding: 11px 12px;
  background: #EDF3FA;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--slate-muted);
  border-right: 1px solid var(--border-light);
}

.slug-input-wrapper input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* IMAGE UPLOAD & SOURCE SWITCHER CONTROLS */
.image-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  background: #EEF4FA;
  padding: 4px;
  border-radius: var(--radius-md);
}

.img-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.img-mode-btn:hover {
  color: var(--navy-deep);
}

.img-mode-btn.active {
  background: #FFFFFF;
  color: var(--logo-blue);
  box-shadow: 0 2px 6px rgba(6, 34, 70, 0.08);
}

.image-mode-panel {
  margin-bottom: 14px;
}

.image-dropzone {
  background: #F8FAFD;
  border: 2px dashed #C0D6EC;
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.image-dropzone:hover,
.image-dropzone.drag-over {
  background: #EDF5FD;
  border-color: var(--logo-blue);
  transform: translateY(-1px);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--logo-blue-light);
  color: var(--logo-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.dropzone-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.dropzone-sub {
  font-size: 0.76rem;
  color: var(--slate-muted);
}

.image-preview-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.preview-media-wrapper {
  background: radial-gradient(circle, #FAFCFE 0%, #EEF4FA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  min-height: 140px;
}

.preview-media-wrapper img {
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(6, 34, 70, 0.08));
}

.preview-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #FAFCFE;
  border-top: 1px solid var(--border-light);
  gap: 10px;
  flex-wrap: wrap;
}

.preview-meta-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy-deep);
  background: #EAF2FB;
  padding: 4px 10px;
  border-radius: 999px;
  word-break: break-all;
}

.preview-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-tool-action {
  background: var(--logo-green-light);
  color: var(--logo-green-dark);
  border: 1px solid rgba(8, 163, 91, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.btn-tool-action:hover {
  background: var(--logo-green);
  color: #FFFFFF;
}

.btn-tool-action.secondary {
  background: #F4F8FC;
  color: var(--slate-muted);
  border-color: var(--border-light);
}

.btn-tool-action.secondary:hover {
  background: #E2EBF5;
  color: var(--navy-deep);
}

/* TOGGLE SWITCH */
.toggle-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  width: 44px;
  height: 24px;
  background: #D2DFEE;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch-label input:checked + .toggle-switch-slider {
  background: var(--logo-green);
}

.toggle-switch-label input:checked + .toggle-switch-slider::before {
  transform: translateX(20px);
}

.toggle-switch-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.modal-footer {
  flex-shrink: 0;
  padding: 18px 28px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #FAFCFE;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy-deep);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(6, 34, 70, 0.35);
  border-left: 4px solid var(--logo-green);
  z-index: 11000;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-toast.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--logo-green);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.toast-message {
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS (100% Mobile Fantastic)
   ========================================================================== */
@media (max-width: 960px) {
  :root {
    --sidebar-w: 280px;
  }

  .btn-menu-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .admin-sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-content-stage {
    padding: 20px 16px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .form-row {
    flex-direction: column;
    gap: 14px;
  }

  .table-controls-card {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls-group {
    flex-direction: row;
    width: 100%;
  }

  .styled-select {
    flex: 1;
  }

  .btn-refresh-data {
    justify-content: center;
  }

  .logout-label {
    display: none;
  }

  .live-sync-indicator .status-label {
    display: none;
  }

  .modal-dialog {
    max-height: 96vh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 18px 20px;
  }

  .modal-body-scroll {
    padding: 18px 20px;
  }

  .modal-footer {
    padding: 14px 20px;
  }
}

/* ==========================================================================
   PAGE CONTENT EDITOR STYLING (BILLION-DOLLAR RESPONSIVE CMS)
   ========================================================================== */
.page-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-selector-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.selector-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.selector-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy-deep);
  white-space: nowrap;
}

.selector-label svg {
  color: var(--logo-blue);
}

.page-dropdown {
  flex: 1;
  max-width: 440px;
  font-weight: 600;
  color: var(--navy-deep);
  border: 1.5px solid #CFDCEB;
  background-color: #F8FBFE;
}

.selector-meta-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #EDF3F9;
  color: var(--slate-text);
}

.page-meta-pill.online {
  background: var(--logo-green-light);
  color: var(--logo-green-dark);
}

.status-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
  display: inline-block;
}

.status-dot-sm.online {
  background: var(--logo-green);
  box-shadow: 0 0 6px rgba(8, 163, 91, 0.6);
}

/* Editor Section Cards */
.editor-section-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-section-card:hover {
  border-color: #CCDCEF;
  box-shadow: var(--shadow-md);
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: #FAFBFD;
  border-bottom: 1px solid var(--border-light);
}

.section-badge-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--logo-blue);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.section-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 2px;
}

.section-card-header p {
  font-size: 0.82rem;
  color: var(--slate-muted);
}

.editor-section-body {
  padding: 24px;
}

/* Image Picker Grid */
.image-picker-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.page-preview-box {
  width: 100%;
  height: 180px;
  background: #F1F6FB;
  border: 1.5px dashed #CCDCEF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}

.page-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.page-preview-tools {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.page-img-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  cursor: pointer;
}

/* Page Editor Bottom Actions Bar */
.page-editor-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Supabase SQL Box */
.sql-box-wrapper {
  background: #0B1C33;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sql-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #071527;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sql-lang-badge {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7997B8;
}

.btn-copy-sql {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-sql:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #5CE6A1;
}

.sql-code-block {
  padding: 18px 20px;
  margin: 0;
  color: #E2ECF8;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: auto;
  white-space: pre;
}

.font-mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
  font-size: 0.84rem;
}

.db-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #EDF3F9;
  color: var(--slate-text);
}

.db-status-pill.online {
  background: var(--logo-green-light);
  color: var(--logo-green-dark);
}

.db-status-pill.error {
  background: var(--danger-light);
  color: var(--danger-red);
}

/* Mobile Responsiveness for Page Editor */
@media (max-width: 960px) {
  .page-selector-card {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .selector-left {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
  }

  .page-dropdown {
    max-width: 100%;
  }

  .image-picker-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .page-preview-box {
    height: 160px;
  }

  .page-editor-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .actions-right button,
  .actions-right a {
    width: 100%;
    justify-content: center;
  }

  .page-top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .page-top-actions button,
  .page-top-actions a {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   ADMIN CAREERS & CANDIDATE DOSSIERS PORTAL STYLES
   ========================================================================== */
.careers-subnav-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.careers-sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.careers-sub-pill:hover {
  background: #F1F6FB;
  color: var(--navy-deep);
}

.careers-sub-pill.active {
  background: var(--navy-deep);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(6, 34, 70, 0.18);
}

.pill-count {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.careers-sub-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.2);
}

.pill-count.green {
  background: var(--logo-green);
  color: #FFFFFF;
}

/* Candidate Dossiers List */
.candidate-apps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-candidate-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.app-candidate-card:hover {
  border-color: #BDD6F2;
  box-shadow: var(--shadow-md);
}

.candidate-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.candidate-info-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.candidate-ref-pill {
  display: inline-block;
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--logo-blue);
  background: #EBF4FC;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.candidate-person-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-deep);
}

.candidate-role-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--logo-green-dark);
}

.candidate-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px 16px;
  background: #F8FAFD;
  border-radius: 12px;
  margin-bottom: 14px;
}

.candidate-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.candidate-meta-cell .cm-k {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-muted);
}

.candidate-meta-cell .cm-v {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--slate-text);
  word-break: break-word;
}

.candidate-notes-quote {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--slate-text);
  background: #FAFBFD;
  border-left: 3px solid var(--logo-blue);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
}

.candidate-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.candidate-actions-row > div:first-child {
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.candidate-status-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.candidate-status-select {
  font-weight: 700;
  font-size: 0.84rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #CCDCEF;
  background: #FFFFFF;
}

.candidate-contact-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-contact-applicant {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.btn-contact-applicant.phone {
  background: #EBF4FC;
  color: var(--logo-blue);
}

.btn-contact-applicant.email {
  background: #EDF7F1;
  color: var(--logo-green-dark);
}

.btn-contact-applicant.wa {
  background: #EAF7ED;
  color: #128C7E;
}

.btn-contact-applicant.cv-btn {
  background: #F1F5F9;
  color: var(--navy-deep);
  border: 1px solid #CBD5E1;
  cursor: pointer;
}

.btn-contact-applicant.fwd {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.btn-contact-applicant:hover {
  transform: translateY(-1px);
}





/* ==========================================================================
   EXECUTIVE DASHBOARD & METRICS (BILLION-DOLLAR CLINICAL UI)
   ========================================================================== */
.dash-hero {
  background: radial-gradient(circle at top right, #09346B 0%, #062246 60%, #03142B 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 38px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  box-shadow: 0 16px 40px rgba(6, 34, 70, 0.16);
  position: relative;
  overflow: hidden;
}

.dash-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 100, 178, 0.3) 0%, rgba(2, 100, 178, 0) 70%);
  pointer-events: none;
}

.dash-hero-copy {
  max-width: 600px;
  z-index: 1;
}

.dash-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #79D9A5;
  background: rgba(8, 163, 91, 0.16);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.dash-hero h1 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}

.dash-hero p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #C8D8E9;
  margin: 0;
}

.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 1;
}

.dash-light {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px);
}

.dash-light:hover {
  background: rgba(255, 255, 255, 0.22) !important;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  font-family: inherit;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--logo-blue);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.kpi-icon.blue { background: #EBF4FC; color: var(--logo-blue); }
.kpi-icon.purple { background: #F3E8FF; color: #7C4DFF; }
.kpi-icon.green { background: #EBF8F1; color: var(--logo-green); }
.kpi-icon.gold { background: #FEF7ED; color: var(--accent-gold); }

.kpi-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-lbl {
  font-size: 0.82rem;
  color: var(--slate-muted);
  font-weight: 600;
}

.kpi-chip {
  display: inline-block;
  align-self: flex-start;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 7px;
  border-radius: 5px;
}

/* Dashboard Two-Column Grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dash-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.dash-wide {
  grid-column: 1 / -1;
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dash-card-head h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-deep);
  margin: 0;
}

.dash-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-muted);
}

.dash-sub.pill-ok {
  background: #EBF8F1;
  color: var(--logo-green);
  padding: 3px 9px;
  border-radius: 999px;
}

.dash-sub.pill-warn {
  background: #FEF3C7;
  color: #B45309;
  padding: 3px 9px;
  border-radius: 999px;
}

/* Pipeline Bars */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pipe-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.pipe-label {
  width: 130px;
  font-weight: 600;
  color: var(--slate-text);
  white-space: nowrap;
}

.pipe-track {
  flex: 1;
  height: 8px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}

.pipe-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.pipe-count {
  width: 28px;
  text-align: right;
  font-weight: 700;
  color: var(--navy-deep);
}

/* Health List */
.health-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #F8FAFC;
  font-size: 0.84rem;
}

.h-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94A3B8;
  flex-shrink: 0;
}

.health-list li.ok .h-dot { background: var(--logo-green); box-shadow: 0 0 0 3px rgba(8, 163, 91, 0.2); }
.health-list li.warn .h-dot { background: #D9822B; box-shadow: 0 0 0 3px rgba(217, 130, 43, 0.2); }

.h-name {
  font-weight: 700;
  color: var(--navy-deep);
  width: 140px;
  flex-shrink: 0;
}

.h-val {
  color: var(--slate-muted);
  font-size: 0.8rem;
  margin-left: auto;
  text-align: right;
}

/* Recent Candidate Applications List */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  width: 100%;
}

.recent-row:hover {
  background: #F8FBFE;
  border-color: var(--logo-blue);
  transform: translateY(-1px);
}

.recent-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #EBF4FC;
  color: var(--logo-blue);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recent-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-main strong {
  font-size: 0.9rem;
  color: var(--navy-deep);
}

.recent-main small {
  font-size: 0.78rem;
  color: var(--slate-muted);
}

.recent-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.stage-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--logo-blue);
  background: #EBF4FC;
  padding: 2px 7px;
  border-radius: 5px;
}

.recent-meta small {
  font-size: 0.74rem;
  color: var(--slate-subtle);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.qa-btn {
  padding: 12px 16px;
  background: #F8FAFD;
  border: 1px dashed #CCDCEF;
  border-radius: 12px;
  color: var(--navy-deep);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.qa-btn:hover {
  background: #EBF4FC;
  border-color: var(--logo-blue);
  color: var(--logo-blue);
  border-style: solid;
}

.link-btn {
  background: none;
  border: none;
  color: var(--logo-blue);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}

.link-btn:hover {
  text-decoration: underline;
}

.empty-note {
  padding: 24px;
  text-align: center;
  color: var(--slate-muted);
  font-size: 0.88rem;
  background: #F8FAFC;
  border-radius: 10px;
}

/* Setup Guide Checklist */
.setup-guide {
  background: #F9FBFE;
  border-left: 4px solid var(--logo-blue);
  margin-bottom: 24px;
}

.setup-steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--slate-text);
  line-height: 1.5;
}

.setup-steps li {
  position: relative;
}

.setup-steps li.done {
  color: var(--logo-green);
  text-decoration: line-through;
}

.setup-steps li.done::marker {
  color: var(--logo-green);
}

.setup-steps code {
  background: rgba(6, 34, 70, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.82rem;
}

/* Application Delete Button */
.btn-contact-applicant.del-btn {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
  cursor: pointer;
}

.btn-contact-applicant.del-btn:hover {
  background: #FCA5A5;
}

/* Alert Badge in Sidebar */
.count-badge.alert {
  background: #D9822B;
  color: #FFFFFF;
}

/* Error Toast Style */
.admin-toast.error {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #B91C1C;
}

.admin-toast.error .toast-icon {
  background: #FFFFFF;
  color: #DC2626;
}

/* Responsive Dashboard Breakpoints */
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 22px;
  }
  .dash-hero-actions {
    width: 100%;
    flex-direction: column;
  }
  .dash-hero-actions button,
  .dash-hero-actions a {
    width: 100%;
    justify-content: center;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .quick-actions {
    grid-template-columns: 1fr;
  }
}
