:root {
  --cdr-navy-950: #041822;
  --cdr-navy-900: #08364B;
  --cdr-navy-800: #0b4560;
  --cdr-navy-700: #0d5270;
  --cdr-navy-600: #15607f;
  --cdr-blue-200: #D7E6F8;
  --cdr-blue-100: #E8F0F7;
  --cdr-blue-50: #F3F7FB;
  --cdr-steel: #95AEBC;
  --gray-50: #F4F7FA;
  --white: #FFFFFF;
  --gray-200: #E2E8F0;
  --gray-500: #64748B;
  --gray-900: #0F172A;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #0284C7;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(8, 54, 75, 0.04);
  --shadow-md: 0 1px 2px rgba(8, 54, 75, 0.04), 0 10px 28px rgba(8, 54, 75, 0.06);
  --ring: 0 0 0 4px rgba(8, 54, 75, 0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 12% -10%, rgba(215, 230, 248, 0.55), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(8, 54, 75, 0.05), transparent 46%),
    var(--gray-50);
  color: var(--gray-900);
  letter-spacing: -0.011em;
}
.tabular-nums { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

[x-cloak] { display: none !important; }

@media (max-width: 1023px) {
  main .overflow-hidden { overflow-x: auto; }
  canvas { max-width: 100%; height: auto; }
}

/* ——— Chrome ——— */
.topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.sidebar {
  background:
    linear-gradient(180deg, #08364B 0%, #062C3E 48%, #041822 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}
.sidebar-link,
.sidebar nav a {
  position: relative;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.sidebar nav a {
  border-radius: 12px;
}
.sidebar-link.active,
.sidebar nav a.sidebar-link.active {
  background: linear-gradient(90deg, rgba(215, 230, 248, 0.18), rgba(255, 255, 255, 0.08));
  color: #fff;
  box-shadow: none;
  font-weight: 600;
}
.sidebar-link.active::before,
.sidebar nav a.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: #D7E6F8;
}
.sidebar nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 230, 248, 0.28) transparent;
  padding-right: 0.35rem;
}
.sidebar nav::-webkit-scrollbar { width: 3px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(215, 230, 248, 0.22);
  border-radius: 999px;
}
.sidebar nav:hover::-webkit-scrollbar-thumb { background: rgba(215, 230, 248, 0.45); }
.sidebar nav p {
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.85;
}

/* ——— Cards used across every module ——— */
main .bg-white.rounded-lg,
main .bg-white.rounded-md {
  border-color: #E2E8F0 !important;
  box-shadow: var(--shadow-md);
  border-radius: 16px;
}
main .bg-white.border.overflow-hidden {
  overflow: hidden;
}

/* ——— Page titles ——— */
main h1 {
  letter-spacing: -0.035em;
  font-weight: 700;
}

/* ——— Tables ——— */
main table.min-w-full thead {
  background: #F8FAFC;
}
main table.min-w-full thead th {
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #64748B;
}
main table.min-w-full tbody tr {
  transition: background 0.12s ease;
}
main table.min-w-full tbody tr:hover {
  background: #F3F7FB;
}
main .divide-y > :not([hidden]) ~ :not([hidden]),
main table.divide-y > :not([hidden]) ~ :not([hidden]) {
  border-color: #EEF2F6;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #08364B;
  background: #F3F7FB;
  border: 1px solid #E2E8F0;
  transition: background 0.12s ease, transform 0.12s ease;
}
.table-action:hover { background: #D7E6F8; transform: translateY(-1px); }
.table-action-danger { color: #DC2626; }
.table-action-danger:hover { background: #FEF2F2; }
button.table-action { cursor: pointer; padding: 0; }
.table-actions form { display: inline-flex; margin: 0; }

/* ——— Controls ——— */
main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="color"]):not([type="range"]),
main select,
main textarea,
.topbar select,
.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  border-radius: 12px;
  border-color: #D5DEE7;
  background-color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
main select,
.topbar select,
.auth-card select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2308364B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 14px;
  padding-right: 2.35rem;
}
main select[multiple],
.topbar select[multiple] {
  appearance: auto;
  background-image: none;
  padding-right: 0.75rem;
}
main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="color"]):focus,
main select:focus,
main textarea:focus,
.topbar select:focus,
.auth-card input:focus {
  outline: none;
  border-color: #08364B;
  box-shadow: var(--ring);
}

main button.bg-navy-900,
main a.bg-navy-900,
.auth-card button.bg-navy-900 {
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 18px rgba(8, 54, 75, 0.18);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
main button.bg-navy-900:hover,
main a.bg-navy-900:hover,
.auth-card button.bg-navy-900:hover {
  transform: translateY(-1px);
}
main a.bg-white.border,
main button.border,
main a.border.rounded-md {
  border-radius: 12px;
  border-color: #D5DEE7;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
main a.bg-white.border:hover,
main button.border:hover {
  background: #F8FAFC;
  transform: translateY(-1px);
}

/* ——— Badges / pills already using rounded-full ——— */
main .rounded-full.px-2\.5,
main span.inline-flex.items-center.rounded-full {
  letter-spacing: 0.01em;
}

/* ——— Auth ——— */
.auth-shell {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 15% 10%, rgba(215, 230, 248, 0.22), transparent 50%),
    radial-gradient(700px 380px at 90% 90%, rgba(13, 82, 112, 0.45), transparent 48%),
    linear-gradient(165deg, #08364B 0%, #041822 100%);
}
.auth-card {
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ——— Search overlay ——— */
.search-overlay-panel {
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(8, 54, 75, 0.18);
}

/* ——— Flash ——— */
[role="status"],
[role="alert"] {
  border-radius: 14px;
}

/* ——— Clickable cards ——— */
main a.bg-white.rounded-lg {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
main a.bg-white.rounded-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(8, 54, 75, 0.10);
}

/* ——— Tabs ——— */
.ui-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}
.ui-tabs button {
  border: 0;
  background: transparent;
  color: #64748B;
}
.ui-tabs button:hover {
  background: #F3F7FB;
  color: #08364B;
}
.ui-tabs button.is-active,
.ui-tabs button.is-active:hover {
  background: #08364B;
  color: #fff;
  box-shadow: 0 1px 2px rgba(8, 54, 75, 0.16);
}

/* ——— Checkboxes / radios ——— */
main input[type="checkbox"],
main input[type="radio"] {
  accent-color: #08364B;
  width: 1rem;
  height: 1rem;
}

/* ——— FullCalendar ——— */
#leave-calendar.fc,
.fc {
  font-family: inherit;
}
.fc .fc-toolbar-title {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #08364B;
}
.fc .fc-button-primary {
  background: #08364B;
  border-color: #08364B;
  border-radius: 10px !important;
  text-transform: none;
  font-weight: 600;
  box-shadow: none;
}
.fc .fc-button-primary:not(:disabled):hover,
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #0b4560;
  border-color: #0b4560;
}
.fc .fc-daygrid-day.fc-day-today {
  background: #F3F7FB;
}
.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
  border-color: #E8EEF4;
}

kbd {
  font-family: inherit;
  border-radius: 6px;
  background: #F8FAFC;
}

.org-card {
  border-radius: 14px !important;
  box-shadow: var(--shadow-md) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.org-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(8, 54, 75, 0.10) !important;
}

.dash-chart {
  position: relative;
  height: 260px;
}
.dash-chart canvas {
  width: 100% !important;
  height: 100% !important;
}
.dash-chart-empty.hidden,
canvas.hidden {
  display: none !important;
}
