:root {
  --anc-ink: #102033;
  --anc-muted: #63778a;
  --anc-border: #dfe7ee;
  --anc-surface: #ffffff;
  --anc-surface-2: #f5f8fb;
  --anc-primary: #003b5c;
  --anc-primary-2: #006b7f;
  --anc-accent: #b9842b;
  --anc-success: #138a55;
  --anc-danger: #c2414b;
  --anc-ring: rgba(0, 107, 127, .16);
  --anc-shadow: 0 14px 38px rgba(16, 32, 51, .08);
  --anc-shadow-soft: 0 8px 22px rgba(16, 32, 51, .06);
}

html {
  background: var(--anc-surface-2);
}

body {
  color: var(--anc-ink) !important;
  background:
    linear-gradient(180deg, #fbfcfd 0%, #f4f8fb 42%, #ffffff 100%) !important;
}

a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(0, 107, 127, .16);
}

.container-main {
  max-width: 1180px !important;
}

.nav-pill,
header.bg-white\/95,
header .container-main {
  border-radius: 14px !important;
}

.nav-pill {
  border-color: rgba(16, 32, 51, .08) !important;
  box-shadow: 0 10px 30px rgba(16, 32, 51, .08) !important;
}

header.fixed .nav-pill,
header.sticky {
  backdrop-filter: blur(18px);
}

.btn-primary,
.btn-secondary,
button[type="submit"],
.fb,
.dm-btn,
.input-ui,
.textarea-ui,
.select-ui,
.fi,
.fa,
.fs,
.card-ui,
.panel,
.jcard,
.dept-card,
.scard,
.app-card,
.stat-card,
.rvi,
.meta-item,
.chip,
.fdrop {
  border-radius: 12px !important;
}

.btn-primary,
button[type="submit"],
.jcard button[style*="background:var(--brand)"],
a[style*="background:var(--brand)"] {
  background: linear-gradient(135deg, var(--anc-primary), var(--anc-primary-2)) !important;
  box-shadow: 0 10px 20px rgba(0, 59, 92, .18);
}

.btn-primary:hover,
button[type="submit"]:hover,
.jcard button[style*="background:var(--brand)"]:hover,
a[style*="background:var(--brand)"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 59, 92, .22);
}

.btn-secondary,
.fb,
.dm-btn {
  border-color: var(--anc-border) !important;
  background: rgba(255, 255, 255, .86) !important;
}

.fb.on,
.fb:hover {
  background: var(--anc-primary) !important;
  border-color: var(--anc-primary) !important;
  color: #fff !important;
}

.panel,
.card-ui,
.jcard,
.dept-card,
.scard,
.app-card,
.stat-card {
  border-color: rgba(16, 32, 51, .09) !important;
  box-shadow: var(--anc-shadow-soft) !important;
}

.jcard,
.app-card {
  min-height: 100%;
}

.jcard:hover,
.dept-card:hover,
.scard:hover,
.app-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--anc-shadow) !important;
}

.dept-card:hover {
  background: linear-gradient(135deg, var(--anc-primary), var(--anc-primary-2)) !important;
}

.input-ui,
.textarea-ui,
.select-ui,
.fi,
.fa,
.fs,
input,
select,
textarea {
  border-color: var(--anc-border) !important;
}

.input-ui:focus,
.textarea-ui:focus,
.select-ui:focus,
.fi:focus,
.fa:focus,
.fs:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--anc-primary-2) !important;
  box-shadow: 0 0 0 4px var(--anc-ring) !important;
}

.apply-page,
main.bg-slate-50,
section[style*="background:var(--bg2)"],
main[style*="background:var(--bg2)"] {
  background: #f5f8fb !important;
}

.apply-grid {
  align-items: start;
}

.side-card {
  position: sticky;
  top: 92px;
}

.meta-item,
.rvi,
.detail-box {
  background: #f8fafc !important;
}

.urgent-badge {
  background: #fff7ed !important;
  color: #b45309 !important;
  border-color: #fed7aa !important;
}

.po {
  background: rgba(12, 24, 38, .62) !important;
}

.pb,
.custom-modal-card {
  border-radius: 16px !important;
  box-shadow: 0 28px 70px rgba(16, 32, 51, .26) !important;
}

.logo-light,
.logo-dark,
.logo-l,
.logo-d,
header img {
  object-fit: contain;
}

.dark body {
  background: #0e141b !important;
}

.dark .panel,
.dark .card-ui,
.dark .jcard,
.dark .dept-card,
.dark .scard,
.dark .app-card,
.dark .stat-card,
.dark .nav-pill {
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.22) !important;
}

@media (max-width: 980px) {
  .side-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .container-main {
    padding-inline: 1rem !important;
  }

  .hero-title,
  h1 {
    font-size: 30px !important;
    line-height: 1.25 !important;
  }

  .panel-body,
  .hero-box {
    padding: 20px !important;
  }
}

/* Auth pages */
body > .min-h-screen.grid {
  background: #f5f8fb;
}

body > .min-h-screen.grid > div:first-child {
  background: rgba(255,255,255,.92) !important;
}

body > .min-h-screen.grid > div:last-child {
  background:
    linear-gradient(145deg, #003b5c 0%, #00596d 54%, #7b5b25 100%) !important;
}

body > .min-h-screen.grid > div:first-child > div {
  background: #fff;
  border: 1px solid rgba(16,32,51,.08);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--anc-shadow);
}

body > .min-h-screen.grid h1 {
  color: var(--anc-ink) !important;
}

body > .min-h-screen.grid .fi {
  height: 50px !important;
  background: #f9fbfd !important;
}

body > .min-h-screen.grid button[type="submit"] {
  height: 50px !important;
}

/* Public details and application cards */
.app-card,
.jcard {
  overflow: hidden;
}

.app-card::before,
.jcard::before {
  content: "";
  display: block;
  height: 3px;
  margin: -28px -28px 22px;
  background: linear-gradient(90deg, var(--anc-primary), var(--anc-primary-2), var(--anc-accent));
  opacity: .9;
}

.app-card {
  padding-top: 28px !important;
}

.stat-card {
  background: linear-gradient(180deg, #fff, #f9fbfd) !important;
}

.meta-tag,
.pill,
.badge,
.urgent-badge {
  border-radius: 999px !important;
}

/* Better mobile menus */
#mmenu,
#mobileMenu {
  box-shadow: 0 24px 60px rgba(16,32,51,.18) !important;
}

#mobileMenu {
  border-left: 1px solid var(--anc-border);
}

@media (max-width: 640px) {
  body > .min-h-screen.grid > div:first-child > div {
    padding: 22px;
    border-radius: 14px;
  }

  .app-card::before,
  .jcard::before {
    margin-left: -20px;
    margin-right: -20px;
  }
}
