/* ===== YayLeave landing-page palette (mirrored from wwwroot/index.html) ===== */
:root {
  --green:        #16a34a;
  --green-dark:   #15803d;
  --green-light:  #dcfce7;
  --green-xlight: #f0fdf4;
  --teal:         #0d9488;
  --navy:         #0f172a;
  --slate:        #334155;
  --muted:        #64748b;
  --border:       #e2e8f0;
  --bg:           #ffffff;
  --bg2:          #f8fafc;
  --gold:         #f59e0b;
  --shadow:       0 4px 24px rgba(0,0,0,.06);
  --shadow-lg:    0 12px 40px rgba(15,23,42,.08);

  /* Bootstrap variable overrides — re-skin the framework with the landing palette */
  --bs-primary: var(--green);
  --bs-primary-rgb: 22, 163, 74;
  --bs-link-color: var(--green-dark);
  --bs-link-hover-color: var(--green);
  --bs-body-color: var(--navy);
  --bs-body-bg: var(--bg2);
  --bs-border-color: var(--border);
  --bs-border-radius: 8px;
  --bs-border-radius-sm: 6px;
  --bs-border-radius-lg: 12px;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-heading-color: var(--navy);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(22,163,74,.45);
}

html {
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin-bottom: 60px;
  background: var(--bg2);
  color: var(--navy);
  font-family: var(--bs-body-font-family);
  letter-spacing: -0.005em;
}

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

p { color: var(--slate); }

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); text-decoration: underline; }

/* ===== Buttons re-skinned to landing page friendly green ===== */
.btn-primary {
  background-color: var(--green);
  border-color: var(--green);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--green-dark) !important;
  border-color: var(--green-dark) !important;
}

/* btn-dark is the existing CTA across the portal — re-skin to friendly green */
.btn-dark {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active {
  background-color: var(--green-dark) !important;
  border-color: var(--green-dark) !important;
  color: #fff !important;
}

.btn-outline-dark {
  border-color: var(--border);
  color: var(--navy);
}
.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-outline-dark:active {
  background-color: var(--green-xlight) !important;
  border-color: var(--green) !important;
  color: var(--green-dark) !important;
}

.btn-outline-primary {
  border-color: var(--green);
  color: var(--green-dark);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
}

/* Form inputs pick up the green focus ring naturally */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 0.2rem rgba(22,163,74,.18);
}
.form-check-input:checked {
  background-color: var(--green);
  border-color: var(--green);
}

/* Navbar adopts a soft green underline so it feels related to the landing site */
.navbar.bg-white {
  background: rgba(255,255,255,.97) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow);
}
.navbar .nav-link {
  color: var(--slate) !important;
  font-weight: 500;
}
.navbar .nav-link:hover {
  color: var(--green-dark) !important;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border) !important;
  background: var(--bg);
}
.footer a { color: var(--green-dark); }


body.panel-open {
  overflow: hidden;
}

.app-pill-wrap {
  flex-shrink: 0;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  font-family: inherit;
  line-height: 1.4;
  transition: background-color 0.15s ease;
}
a.app-pill:hover, button.app-pill:hover { background: #bbf7d0; color: #166534; text-decoration: none; }
button.app-pill.dropdown-toggle::after { margin-left: 0.4rem; }

.app-pill-muted {
  background: #e2e8f0;
  color: #334155;
}

.dashboard-shell {
  display: grid;
  gap: 1.5rem;
}

.hero-card,
.content-card,
.metric-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.hero-card {
  padding: 2.25rem 2rem;
  background: linear-gradient(135deg, var(--green-xlight) 0%, #fff 60%);
  border-color: var(--green-light);
}

.hero-eyebrow {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-copy {
  max-width: 60rem;
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1.25rem;
}

.metric-card {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.metric-card:hover {
  border-color: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 16px 44px rgba(22,163,74,.08);
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.metric-help {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.content-card {
  padding: 1.5rem;
}

#leave-requests-status {
  scroll-margin-top: 1rem;
}

#leave-requests-status:focus {
  outline: 3px solid rgba(22, 163, 74, 0.22);
  outline-offset: 4px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.template-table {
  width: 100%;
  border-collapse: collapse;
}

.template-table th,
.template-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.template-table th {
  color: #475569;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.template-list {
  display: grid;
  gap: 0.85rem;
}

.template-list-item {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

a.template-list-item {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}

a.template-list-item:hover,
a.template-list-item:focus-visible {
  border-color: #cbd5e1;
  background: #f1f5f9;
  text-decoration: none;
  color: inherit;
}

.template-list-item h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.template-list-item p {
  margin: 0;
  color: #64748b;
}

.leave-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.65rem 0.22rem 0.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--leave-type-color, #64748b) 14%, #ffffff);
  color: color-mix(in srgb, var(--leave-type-color, #64748b) 80%, #0f172a);
  border: 1px solid color-mix(in srgb, var(--leave-type-color, #64748b) 36%, #e2e8f0);
}

.leave-type-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--leave-type-color, #64748b);
  flex: 0 0 auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-chip.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-chip.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-chip.status-planned {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-chip.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.team-leave-calendar {
  display: grid;
  gap: 0.75rem;
  overflow-x: auto;
}

.team-leave-calendar-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) repeat(14, minmax(54px, 1fr));
  gap: 0.35rem;
  min-width: 980px;
}

.team-leave-calendar-label,
.team-leave-calendar-day {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  min-height: 56px;
  padding: 0.6rem;
}

.team-leave-calendar-header .team-leave-calendar-label,
.team-leave-calendar-header .team-leave-calendar-day {
  background: #eff6ff;
}

.team-leave-calendar-day.is-weekend {
  background: #f1f5f9;
}

.team-leave-calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.78rem;
  text-align: center;
}

.team-leave-cell-approved {
  background: #dcfce7;
  color: #166534;
}

.team-leave-cell-submitted,
.team-leave-cell-pending {
  background: #fef3c7;
  color: #92400e;
}

.team-leave-cell-declined {
  background: #fee2e2;
  color: #b91c1c;
}

.task-title-link {
  color: inherit;
}

.task-title-link:hover {
  text-decoration: underline !important;
}

.table td,
.table th {
  vertical-align: middle;
}

.task-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

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

.task-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: #fff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .24s ease;
  box-shadow: -10px 0 32px rgba(15, 23, 42, 0.14);
}

.task-panel.open {
  transform: translateX(0);
}

.task-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.task-panel-num {
  font-size: .75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.task-panel-close {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 1.1rem;
  cursor: pointer;
}

.task-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.task-panel-title-input {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 0 0 14px;
  background: transparent;
}

.task-props {
  margin-top: 18px;
}

.task-prop-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.task-prop-label {
  flex: 0 0 90px;
  font-size: .85rem;
  color: #64748b;
  font-weight: 600;
}

.task-prop-row .form-select,
.task-prop-row .form-control {
  flex: 1;
}

.task-panel-section {
  margin-top: 24px;
}

.task-section-label {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: .85rem;
  font-weight: 600;
}

.task-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
}

.login-shell {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.login-card {
  width: min(100%, 520px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  padding: 2rem;
}

.login-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.login-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.login-copy {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.login-form .form-control {
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.login-footer-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.95rem;
}

@media (max-width: 991.98px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}


.employee-panel {
  width: min(700px, 100vw);
}

.employee-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-value-compact {
  font-size: 1.25rem;
}

.leave-balance-table th,
.leave-balance-table td {
  padding-block: 1rem;
}

.leave-balance-input-wrap {
  position: relative;
  width: min(180px, 100%);
}

.leave-balance-input-wrap .form-control {
  padding-right: 3.25rem;
}

.leave-balance-unit {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .hero-card,
  .content-card,
  .metric-card {
    padding: 1.1rem;
  }

  .template-table th,
  .template-table td {
    padding-inline: 0.45rem;
  }

  .employee-name-grid {
    grid-template-columns: 1fr;
  }

  .leave-balance-input-wrap {
    width: 100%;
  }
}

/* Row action menu (···) */
.row-menu-btn {
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  color: #64748b;
  border-color: transparent;
  background: transparent;
}
.row-menu-btn:hover,
.row-menu-btn.active {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}
.dropdown {
  position: relative;
  display: inline-block;
}
.row-menu-dropdown {
  display: none;
  position: fixed;
  z-index: 1050;
  min-width: 130px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.10);
  padding: 0.3rem 0;
  white-space: nowrap;
}
.row-menu-dropdown.open {
  display: block;
}
.row-menu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  color: #1e293b;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
}
.row-menu-item:hover {
  background: #f8fafc;
}
.row-menu-item-danger {
  color: #dc2626;
}
.row-menu-item-danger:hover {
  background: #fef2f2;
}
.row-menu-item-armed {
  background: #dc2626;
  color: #ffffff;
  font-weight: 600;
}
.row-menu-item-armed:hover {
  background: #b91c1c;
  color: #ffffff;
}
.row-menu-form {
  display: contents;
}

/* Custom select component */
.cs-wrap { position: relative; }
.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cs-trigger:hover { border-color: #94a3b8; }
.cs-trigger.active {
  border-color: #334155;
  box-shadow: 0 0 0 3px rgba(51,65,85,0.08);
  outline: none;
}
.cs-chevron {
  flex-shrink: 0;
  opacity: 0.45;
  transition: transform 0.15s;
}
.cs-trigger.active .cs-chevron { transform: rotate(180deg); }
.cs-placeholder { color: #94a3b8; }
.cs-list {
  display: none;
  position: fixed;
  z-index: 1060;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.13);
  padding: 0.3rem 0;
  min-width: 180px;
  max-height: 240px;
  overflow-y: auto;
}
.cs-list.open { display: block; }
.cs-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #1e293b;
  transition: background 0.1s;
}
.cs-item:hover { background: #f8fafc; }
.cs-item.selected {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

/* === Org Chart === */
.org-chart-scroll {
  overflow-x: auto;
  padding: 1.5rem 1rem;
}

.org-chart-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.org-chart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.org-chart-children > .org-chart-item {
  padding: 28px 8px 0;
}

/* Left-arm: border-top + border-right creates the T-junction left half */
.org-chart-children > .org-chart-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 50%;
  height: 28px;
  border-top: 2px solid #cbd5e1;
  border-right: 2px solid #cbd5e1;
  /* #359: the rounded corner here used to back onto its mirror-image partner
     in ::after at the same X (the child's centre), producing a visually
     wobbly "V" notch on middle children instead of a clean vertical drop.
     Square corners read cleanly at any sibling count. */
  border-radius: 0;
}

/* Right-arm: border-top + border-left creates the T-junction right half */
.org-chart-children > .org-chart-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  height: 28px;
  border-top: 2px solid #cbd5e1;
  border-left: 2px solid #cbd5e1;
  border-radius: 0;
}

.org-chart-children > .org-chart-item:first-child::before { border: none; }
.org-chart-children > .org-chart-item:last-child::after  { border: none; }
.org-chart-children > .org-chart-item:only-child::before { border: none; }
.org-chart-children > .org-chart-item:only-child::after  { border: none; }

/* Only-child gets a straight vertical stub via ::before background */
.org-chart-children > .org-chart-item:only-child::before {
  left: calc(50% - 1px);
  right: auto;
  width: 2px;
  height: 28px;
  background: #cbd5e1;
}

/* Node wrapper — carries the downward stub when it has children */
.org-chart-node-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-chart-node-wrap.has-children::after {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: #cbd5e1;
}

/* Node card */
.org-chart-node {
  position: relative;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  padding: 0.85rem 1.1rem;
  min-width: 120px;
  max-width: 175px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.org-chart-node:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.12);
  transform: translateY(-1px);
}

.org-node-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 0.9rem;
}

.org-node-name {
  font-weight: 600;
  font-size: 0.8rem;
  color: #0f172a;
  word-break: break-word;
  line-height: 1.3;
}

.org-chart-empty {
  text-align: center;
  padding: 3rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

/* #247: actions button on each chart node — top-right corner of the card,
   reveals on hover/focus so the chart stays clean by default. */
.org-node-menu-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
  font-size: 1rem;
  line-height: 1;
}

.org-chart-node:hover .org-node-menu-btn,
.org-chart-node:focus-within .org-node-menu-btn,
.org-node-menu-btn:focus,
.org-node-menu-btn.active {
  opacity: 1;
}

.org-node-menu-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.org-chart-node-company .org-node-menu-btn {
  display: none;
}

.org-chart-section + .org-chart-section {
  margin-top: 2rem;
}

.org-chart-company-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.org-chart-node-company {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  cursor: default;
  pointer-events: none;
}

.org-node-icon-company {
  background: #dbeafe;
  color: #1d4ed8;
}

.yayleave-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #22c55e;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.yayleave-logo span {
  color: #1e3a5f;
}

.yayleave-logo:hover {
  color: #16a34a;
  text-decoration: none;
}

/* Navbar dropdown — hover to open on wider screens */
@media (min-width: 576px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.leave-flow-card {
  overflow: hidden;
}

.leave-request-flow {
  display: grid;
  gap: 1.25rem;
}

.leave-flow-total {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  color: #1e3a8a;
}

.leave-flow-total-label {
  color: #475569;
  font-weight: 700;
  margin-right: auto;
}

.leave-flow-total strong {
  font-size: clamp(2.3rem, 8vw, 4.5rem);
  line-height: 1;
}

.leave-flow-total span:last-child {
  font-weight: 700;
}

.leave-flow-steps {
  display: grid;
  gap: 1rem;
}

.leave-flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
}

.leave-flow-step-marker {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
}

.leave-flow-step-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.leave-flow-step-body p {
  margin: 0 0 0.9rem;
  color: #64748b;
}

.leave-type-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.leave-type-card {
  display: grid;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.leave-type-card:hover:not(:disabled),
.leave-type-card:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.leave-type-card.is-selected {
  border-color: #1d4ed8;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #1d4ed8;
}

.leave-type-card span {
  font-weight: 800;
}

.leave-type-card small {
  color: #64748b;
}

.optional-note summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 800;
}

@media (max-width: 640px) {
  .leave-flow-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .leave-flow-step {
    grid-template-columns: 1fr;
  }

  .leave-type-card-grid {
    grid-template-columns: 1fr;
  }
}

.date-range-picker {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1rem;
    background: #fbfbfa;
}

.date-range-picker-summary,
.date-range-picker-nav {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.date-range-picker-summary span {
    color: #4b5563;
}

.date-range-calendar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.date-range-month h4 {
    font-size: .95rem;
    margin-bottom: .75rem;
}

.date-range-weekdays,
.date-range-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .25rem;
}

.date-range-weekdays span {
    font-size: .72rem;
    color: #6b7280;
    text-align: center;
}

.date-range-day {
    border: 0;
    border-radius: 999px;
    background: #fff;
    min-height: 2.25rem;
    color: #111827;
}

.date-range-day:hover:not(:disabled) {
    background: #111827;
    color: #fff;
}

.date-range-day.is-muted {
    background: #f3f4f6;
    color: #9ca3af;
}

.date-range-day.is-in-range {
    background: #e8f0ff;
    color: #1d4ed8;
}

.date-range-day.is-selected {
    background: #111827;
    color: #fff;
}

@media (max-width: 640px) {
    .date-range-calendar-grid {
        grid-template-columns: 1fr;
    }
}

.leave-type-card {
    border-left: 5px solid var(--leave-type-color, #64748b);
}

.leave-type-card::before {
    background: var(--leave-type-color, #64748b);
}

.leave-type-card.is-selected {
    border-color: var(--leave-type-color, #111827);
    box-shadow: 0 14px 35px color-mix(in srgb, var(--leave-type-color, #111827) 24%, transparent);
}

.leave-type-card.is-selected span {
    color: var(--leave-type-color, #111827);
}

.leave-request-mobile-cards {
    display: none;
}

.leave-request-mobile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.leave-request-mobile-card > div:first-child {
    display: grid;
    gap: .35rem;
}

.leave-request-mobile-card strong {
    color: #0f172a;
}

.leave-request-mobile-card small {
    color: #64748b;
}

.leave-request-mobile-card-status {
    display: grid;
    justify-items: end;
    gap: .35rem;
    color: #64748b;
    font-size: 1.5rem;
}

@media (max-width: 640px) {
    .leave-request-mobile-cards {
        display: grid;
        gap: .75rem;
    }

    .leave-request-table-wrap {
        display: none;
    }
}

.employee-calendar-booking-day {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.employee-calendar-booking-day:hover,
.employee-calendar-booking-day:focus-visible {
    background: #eff6ff;
    box-shadow: inset 0 0 0 2px #2563eb;
    transform: translateY(-1px);
    outline: none;
}

.leave-balance-card {
    border-left: 6px solid var(--leave-type-color, #16a34a);
}

.leave-balance-card:hover {
    border-color: var(--border);
    border-left-color: var(--leave-type-color, #16a34a);
    box-shadow: 0 16px 44px color-mix(in srgb, var(--leave-type-color, #16a34a) 16%, transparent);
}

.leave-balance-card .metric-label {
    color: var(--leave-type-color, #166534);
}

.pending-approval-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #fde68a;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 78%);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.10);
}

.pending-approval-banner h2 {
    margin: .25rem 0;
    color: #92400e;
    font-size: 1.15rem;
}

.pending-approval-banner p {
    margin: 0;
    color: #78350f;
}

@media (max-width: 640px) {
    .pending-approval-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}

.upcoming-leave-spotlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 76%);
    box-shadow: 0 16px 40px rgba(22, 163, 74, 0.11);
}

.upcoming-leave-spotlight h2 {
    margin: .25rem 0;
    color: #14532d;
    font-size: 1.25rem;
}

.upcoming-leave-spotlight p {
    margin: 0;
    color: #166534;
}

@media (max-width: 640px) {
    .upcoming-leave-spotlight {
        align-items: flex-start;
        flex-direction: column;
    }
}

.optional-note {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: .85rem 1rem;
    background: #f8fafc;
}

.optional-note summary {
    cursor: pointer;
    color: #334155;
    font-weight: 700;
}

.optional-note[open] summary {
    color: #0f172a;
}

.leave-history-empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 80%);
}

.leave-history-empty-icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: #dcfce7;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.leave-history-empty-state h3 {
    margin: 0 0 .35rem;
    color: #14532d;
}

.leave-history-empty-state p {
    color: #475569;
    margin-bottom: .85rem;
}

/* Neutral variant for empty states that signal "action required" rather
   than a positive/empty-by-design state. Used by Departments where having
   none is an unconfigured state, not a success state. */
.leave-history-empty-state.is-neutral {
    border-color: #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 80%);
}

.leave-history-empty-state.is-neutral .leave-history-empty-icon {
    background: #e2e8f0;
}

.leave-history-empty-state.is-neutral h3 {
    color: #0f172a;
}

@media (max-width: 640px) {
    .leave-history-empty-state {
        align-items: flex-start;
        flex-direction: column;
    }
}

.clickable-leave-row {
    cursor: pointer;
}

.clickable-leave-row:hover,
.clickable-leave-row:focus-visible {
    background: #f8fafc;
    outline: 2px solid #bfdbfe;
    outline-offset: -2px;
}

/* Leave-wizard step indicator. Rendered above each wizard page's hero
   card via Views/LeaveWizard/_WizardSteps.cshtml. */
.wizard-steps {
    margin-bottom: 1rem;
}

.wizard-steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wizard-step {
    flex: 1 1 0;
    min-width: 9rem;
    position: relative;
}

.wizard-step + .wizard-step::before {
    content: "";
    position: absolute;
    left: -0.5rem;
    top: 50%;
    width: 0.5rem;
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
}

.wizard-step-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.wizard-step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.8rem;
    flex: 0 0 auto;
}

.wizard-step-label {
    font-weight: 600;
    white-space: nowrap;
}

/* Completed step — clickable link back to that wizard action. */
.wizard-step.is-done .wizard-step-link {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
    cursor: pointer;
}
.wizard-step.is-done .wizard-step-link:hover,
.wizard-step.is-done .wizard-step-link:focus-visible {
    border-color: #16a34a;
    background: #dcfce7;
    color: #166534;
}
.wizard-step.is-done .wizard-step-marker {
    background: #16a34a;
    color: #ffffff;
}

/* Current step — highlighted, non-clickable. */
.wizard-step.is-current .wizard-step-link {
    border-color: #0f172a;
    background: #0f172a;
    color: #ffffff;
}
.wizard-step.is-current .wizard-step-marker {
    background: #ffffff;
    color: #0f172a;
}

/* Upcoming step — muted, non-clickable. */
.wizard-step.is-upcoming .wizard-step-link {
    cursor: default;
}

/* #312: shared "Help" pill button + modal styling used by the
   onboarding-wizard pages (EmployeeWizard/Start, /Details, etc.).
   The pill sits in the top-right of a hero-card and opens a Bootstrap
   modal-xl that renders an infographic image full-width. */
.onboarding-help-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(22,163,74,0.18);
    cursor: pointer;
    transition: transform .12s ease, background-color .12s ease, color .12s ease;
}
.onboarding-help-btn:hover {
    background: #f0fdf4;
    color: #166534;
    transform: translateY(-1px);
}
.onboarding-help-btn:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}
.onboarding-help-modal .modal-content {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 40px 80px rgba(15,23,42,0.25);
}
.onboarding-help-modal .modal-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 70%);
    border-bottom: 1px solid #dcfce7;
}
.onboarding-help-img {
    display: block;
    width: 100%;
    height: auto;
    background: #f8fafc;
}
.onboarding-help-modal .modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
@media (max-width: 576px) {
    .onboarding-help-btn span { display: none; }
    .onboarding-help-btn { padding: 0.45rem; }
}
