:root {
  --navy: #142b4a;
  --navy-deep: #0d1d35;
  --blue: #0875b5;
  --blue-soft: #eaf5fb;
  --orange: #f15a24;
  --orange-soft: #fff0e9;
  --yellow: #fdbd18;
  --ink: #1b2a3d;
  --muted: #6e7c8b;
  --line: #e5ebf0;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --success: #15835c;
  --shadow: 0 18px 45px rgba(20, 43, 74, .08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); letter-spacing: -.025em; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 43px); line-height: 1.08; }
h2 { margin-bottom: 9px; font-size: clamp(23px, 3vw, 31px); line-height: 1.15; }
h3 { margin-bottom: 3px; font-size: 16px; }
.heading-dot { color: var(--orange); }
.eyebrow { margin-bottom: 10px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .15em; line-height: 1.4; text-transform: uppercase; }
.eyebrow.blue { color: var(--blue); }
.eyebrow.light { color: #ffd36e; }
.muted { color: var(--muted); font-size: 13px; }

.app-layout { display: grid; min-height: 100vh; grid-template-columns: 266px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 30px 20px 22px; color: #fff; background: var(--navy); box-shadow: 12px 0 35px rgba(20, 43, 74, .08); z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; min-height: 42px; color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.sidebar-brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.55); font-size: 9px; font-weight: 500; letter-spacing: .02em; }
.brand-mark { display: inline-grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; color: var(--navy); background: var(--yellow); border-radius: 11px 11px 11px 3px; font-size: 11px; font-weight: 900; letter-spacing: -.08em; box-shadow: 5px 5px 0 rgba(241, 90, 36, .8); }
.brand-mark.brand-logo { padding: 4px; background: #fff; }
.brand-mark.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; margin: 42px 0 25px; padding: 14px 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.sidebar-profile strong, .sidebar-profile span { display: block; }
.sidebar-profile strong { color: #fff; font-size: 12px; }
.sidebar-profile div span { margin-top: 3px; color: rgba(255,255,255,.52); font-size: 11px; }
.profile-avatar { display: grid; width: 33px; height: 33px; place-items: center; color: var(--blue); background: #dff2fc; border-radius: 50%; font-size: 10px; font-weight: 900; }
.profile-avatar.hr-avatar { color: #9c3f1b; background: #ffe0ce; }
.side-nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 0 12px; color: rgba(255,255,255,.62); border: 1px solid transparent; border-radius: 12px; font-size: 13px; font-weight: 650; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.1); box-shadow: inset 3px 0 0 var(--orange); }
.nav-index { width: 22px; color: rgba(255,255,255,.35); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.nav-link.active .nav-index { color: #ffd36e; }
.nav-badge { display: inline-grid; min-width: 21px; height: 21px; margin-left: auto; padding: 0 5px; place-items: center; color: var(--navy); background: var(--yellow); border-radius: 999px; font-size: 10px; font-weight: 850; }
.sidebar-note { display: flex; gap: 10px; margin-top: auto; padding: 13px 12px; color: rgba(255,255,255,.65); background: rgba(255,255,255,.06); border-radius: 13px; }
.note-icon { display: grid; width: 20px; height: 20px; place-items: center; flex: 0 0 auto; color: var(--navy); background: var(--yellow); border-radius: 50%; font-size: 12px; font-weight: 900; }
.sidebar-note p { margin: 1px 0 0; font-size: 10px; line-height: 1.5; }
.sidebar-bottom { display: grid; gap: 13px; margin-top: 24px; }
.system-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.sidebar .system-status { color: rgba(255,255,255,.5); }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; background: #38bd80; border-radius: 50%; box-shadow: 0 0 0 4px rgba(56,189,128,.12); }
.sidebar-logout { width: 100%; padding: 9px 10px; color: rgba(255,255,255,.62); background: transparent; border: 0; border-top: 1px solid rgba(255,255,255,.1); text-align: left; font-size: 12px; font-weight: 650; transition: color .18s ease; }
.sidebar-logout:hover { color: #fff; }
.main-content { min-width: 0; }
.content-inner { width: min(1240px, 100%); margin: 0 auto; padding: 39px clamp(24px, 4vw, 62px) 70px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 34px; }
.breadcrumb { margin-bottom: 15px; color: var(--muted); font-size: 11px; font-weight: 700; }
.breadcrumb span { margin: 0 6px; color: #b7c2cc; }
.page-intro { max-width: 560px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.header-meta { display: flex; align-items: center; gap: 17px; padding-bottom: 8px; }
.date-chip { padding: 8px 11px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.dashboard-panel { display: none; animation: panel-in .24s ease both; }
.dashboard-panel.active-panel { display: block; }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.welcome-banner { position: relative; display: flex; min-height: 176px; align-items: center; justify-content: space-between; gap: 25px; overflow: hidden; padding: 28px 32px; color: #fff; background: var(--navy); border-radius: 14px; box-shadow: 0 12px 28px rgba(20,43,74,.13); }
.welcome-banner h2 { max-width: 430px; margin-bottom: 8px; color: #fff; font-size: clamp(24px, 3vw, 30px); }
.welcome-banner p:not(.eyebrow) { max-width: 470px; margin-bottom: 18px; color: rgba(255,255,255,.7); font-size: 13px; line-height: 1.45; }
.employee-banner { background: linear-gradient(119deg, #fff 0%, #fdfefe 72%, #fff6e8 100%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.employee-banner h2 { color: var(--navy); }
.employee-banner p:not(.eyebrow) { color: var(--muted); }
.banner-actions { display: flex; align-items: center; gap: 19px; }
.banner-decoration { display: none; }
.banner-decoration span { position: absolute; display: block; border: 2px solid rgba(255,255,255,.28); border-radius: 50%; }
.banner-decoration span:nth-child(1) { top: 1px; left: 35px; width: 148px; height: 148px; }
.banner-decoration span:nth-child(2) { top: 26px; left: 8px; width: 113px; height: 113px; border-color: rgba(253,189,24,.8); }
.banner-decoration span:nth-child(3) { top: 52px; left: 89px; width: 68px; height: 68px; background: rgba(241,90,36,.85); border: 0; }
.employee-banner .banner-decoration span { border-color: rgba(8,117,181,.2); }
.employee-banner .banner-decoration span:nth-child(2) { border-color: rgba(241,90,36,.55); }
.employee-banner .banner-decoration span:nth-child(3) { background: rgba(253,189,24,.85); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 12px; padding: 0 17px; border: 0; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 1; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,43,74,.13); }
.button-primary { color: #fff; background: var(--orange); box-shadow: 0 7px 14px rgba(241,90,36,.2); }
.button-primary:hover { background: #d94d1b; }
.button-secondary { color: var(--navy); background: #eaf0f4; }
.button-light { color: var(--navy); background: #fff; }
.text-link { font-size: 12px; font-weight: 800; }
.light-link { color: rgba(255,255,255,.78); }
.light-link:hover { color: #fff; }

.metrics { display: grid; gap: 15px; margin: 18px 0 22px; }
.metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { position: relative; display: flex; min-height: 118px; flex-direction: column; justify-content: center; overflow: hidden; padding: 18px 21px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 18px rgba(20,43,74,.03); }
.metric::after { position: absolute; right: -28px; bottom: -39px; width: 100px; height: 100px; border: 15px solid rgba(8,117,181,.06); border-radius: 50%; content: ""; }
.metric-orange { border-top: 3px solid var(--orange); }
.metric-blue { border-top: 3px solid var(--blue); }
.metric-neutral { border-top: 3px solid #c2ccd6; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 750; }
.metric strong { position: relative; z-index: 1; margin: 6px 0 2px; color: var(--navy); font-size: 32px; letter-spacing: -.04em; line-height: 1; }
.metric-orange strong { color: var(--orange); }
.metric-caption { color: #a4afb9; font-size: 10px; font-weight: 600; }
.metric-symbol { color: var(--success) !important; }
.subpanel, .dashboard-panel > .elevated-table, .dashboard-panel > .section-heading + .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 10px 26px rgba(20,43,74,.045); }
.subpanel { padding: 25px 27px 27px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.compact-heading { margin-bottom: 9px; }
.section-heading h2 { margin-bottom: 7px; }
.section-description { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.section-number { display: inline-grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; color: var(--blue); background: var(--blue-soft); border-radius: 10px; font-size: 11px; font-weight: 850; }
.heading-actions { display: flex; align-items: center; gap: 14px; }
.heading-actions .button { white-space: nowrap; }
.dashboard-panel > .section-heading { margin-top: 7px; }
.dashboard-panel > .elevated-table, .dashboard-panel > .section-heading + .table-wrap { padding: 7px 22px 20px; }
.request-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 17px; }
.request-form label { display: grid; gap: 7px; margin: 10px 0; color: var(--navy); font-size: 12px; font-weight: 750; }
.request-form .wide { grid-column: 1 / -1; }
.request-form input, .request-form select, .request-form textarea, .auth-card input { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #fbfcfd; border: 1px solid #dbe4ea; border-radius: 9px; outline: none; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.request-form textarea { min-height: 86px; resize: vertical; }
.request-form input:focus, .request-form select:focus, .request-form textarea:focus, .auth-card input:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,117,181,.12); }
.request-form small { color: var(--muted); font-size: 10px; font-weight: 500; }
.label-optional { color: #a1acb6; font-size: 10px; font-weight: 600; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.form-helper { color: var(--muted); font-size: 11px; }
.form-message { min-height: 21px; margin: 6px 0 8px; font-size: 12px; line-height: 1.45; }
.notice { color: var(--success); }
.error { color: #b64237; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td { padding: 15px 10px; border-bottom: 1px solid #edf1f4; text-align: left; vertical-align: top; }
th { color: #8b98a5; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
td { color: var(--ink); font-size: 12px; line-height: 1.45; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdfe; }
.badge, .status { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge { color: var(--blue); background: var(--blue-soft); }
.badge.none { color: #936817; background: #fff5d7; }
.status.pending { color: #99630d; background: #fff4d8; }
.status.approved { color: #18734e; background: #def5e8; }
.status.rejected, .status.cancelled { color: #a33d36; background: #ffe8e5; }
.history { margin-top: 8px; }
.history summary { color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.action { min-width: 245px; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.action-row select, .action-row input, .decision-form input { min-width: 145px; min-height: 35px; padding: 7px 9px; color: var(--ink); background: #fbfcfd; border: 1px solid #dbe4ea; border-radius: 7px; font-size: 11px; }
.action-row button { min-height: 35px; padding: 0 11px; font-size: 10px; }
.decision-form { display: grid; gap: 7px; }
.danger { color: #a33d36; background: #ffe8e5; }
.danger:hover { background: #ffd9d5; }
.mobile-topbar { display: none; }

/* Login */
.auth-page { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; background: #f4f8fc; }
.auth-page::before, .auth-page::after { position: absolute; display: block; content: ''; border-radius: 50%; pointer-events: none; }
.auth-page::before { top: -205px; right: -100px; width: 420px; height: 420px; background: rgba(216,229,242,.6); }
.auth-page::after { bottom: -215px; left: -115px; width: 465px; height: 465px; background: rgba(253,244,218,.72); }
.auth-panel { position: relative; z-index: 1; display: grid; width: 100%; min-height: 100vh; place-items: center; padding: 30px 20px; background: transparent; }
.auth-panel-inner { width: min(430px, 100%); text-align: center; }
.auth-logo { display: block; width: 132px; height: 132px; margin: 0 auto 10px; object-fit: contain; filter: drop-shadow(0 13px 18px rgba(20,43,74,.14)); }
.auth-title { margin: 0 0 25px; color: var(--navy); font-size: 19px; font-weight: 850; letter-spacing: -.025em; }
.auth-card { position: relative; padding: 29px 31px 25px; text-align: left; background: #fff; border: 1px solid #d8e2ec; border-radius: 15px; box-shadow: 0 17px 38px rgba(20,43,74,.1); }
.auth-card::after { position: absolute; top: -1px; right: 34px; width: 68px; height: 5px; content: ''; background: var(--yellow); }
.auth-card-primary { border-top: 4px solid var(--orange); }
.auth-card-single { padding-top: 25px; }
.auth-card label { display: grid; gap: 7px; margin-bottom: 14px; color: var(--navy); font-size: 11px; font-weight: 750; }
.auth-card input { min-height: 50px; padding: 12px 14px; color: var(--ink); background: #f5f8fc; border: 1px solid #cbd8e5; border-radius: 10px; outline: none; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.auth-card input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,90,36,.13); }
.auth-card .button { width: 100%; min-height: 46px; margin-top: 5px; }

@media (max-width: 1120px) {
  .sidebar { padding-right: 14px; padding-left: 14px; }
  .content-inner { padding-right: 32px; padding-left: 32px; }
  .welcome-banner { padding-right: 30px; padding-left: 30px; }
  .auth-brand-panel { padding-right: 50px; padding-left: 50px; }
  .auth-panel { padding-right: 40px; padding-left: 40px; }
}

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar-profile { margin-top: 30px; }
  .banner-decoration { width: 150px; transform: scale(.8) rotate(-11deg); margin-right: -20px; }
  .auth-page { grid-template-columns: minmax(290px, .78fr) minmax(430px, 1.22fr); }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-brand-panel { padding-right: 35px; padding-left: 35px; }
  .auth-panel { padding-right: 25px; padding-left: 25px; }
  .brand-logo-card { width: 150px; height: 150px; margin-bottom: 34px; }
}

@media (max-width: 760px) {
  .app-layout { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 266px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 12px 0 35px rgba(20,43,74,.25); }
  .app-layout.nav-open .sidebar { transform: translateX(0); }
  .mobile-topbar { display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 20px; background: var(--navy); }
  .mobile-topbar .sidebar-brand { font-size: 14px; }
  .mobile-topbar .brand-mark { width: 31px; height: 31px; box-shadow: 3px 3px 0 rgba(241,90,36,.8); }
  .mobile-menu { width: 36px; height: 36px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 9px; font-size: 17px; }
  .content-inner { padding: 28px 19px 45px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 24px; }
  .header-meta { padding-bottom: 0; }
  .welcome-banner { min-height: 165px; align-items: flex-start; padding: 24px 21px; }
  .banner-decoration { position: absolute; right: -30px; bottom: -26px; opacity: .65; }
  .metrics-three { grid-template-columns: 1fr; gap: 10px; }
  .metric { min-height: 105px; }
  .subpanel { padding: 23px 18px; }
  .section-heading { gap: 13px; margin-bottom: 18px; }
  .section-description { font-size: 12px; }
  .request-form { grid-template-columns: 1fr; gap: 0; }
  .request-form .wide { grid-column: auto; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .dashboard-panel > .elevated-table, .dashboard-panel > .section-heading + .table-wrap { padding-right: 9px; padding-left: 9px; }
  .heading-actions { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .heading-actions .button { min-height: 36px; padding: 0 11px; }
  .auth-page { display: block; }
  .auth-panel { min-height: 100vh; padding: 24px 18px 35px; place-items: start center; }
  .auth-panel-inner { padding-top: 8px; }
  .security-pill { margin-bottom: 23px; }
  .auth-card { padding: 25px 21px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
