:root {
  --ink: #263845; --muted: #71828e; --line: #e2e8ec; --wash: #f6f8fa;
  --blue: #079fc9; --teal: #18b99b; --shadow: 0 8px 30px #18364724;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font: 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 2px solid #087aa5; outline-offset: 3px; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip-link { position: fixed; left: 75px; top: -50px; z-index: 60; padding: 8px; background: white; }
.skip-link:focus { top: 8px; }
.rail { position: fixed; inset: 0 auto 0 0; width: 64px; z-index: 20; border-right: 1px solid var(--line); background: #fafcfd; display: flex; flex-direction: column; align-items: center; }
.logo { width: 36px; height: 36px; margin: 12px 0 24px; display: grid; place-items: center; background: var(--blue); color: white; border-radius: 5px; font-size: 22px; font-weight: 750; }
.tabs { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; width: 100%; padding-bottom: 16px; }
.tab { position: relative; width: 44px; height: 44px; border: 0; border-radius: 5px; background: transparent; color: #788c99; display: grid; place-items: center; }
.tab.active { color: #008eb9; background: #def3fa; }
.tab:hover { color: #008eb9; background: #eaf5f9; }
.tab[data-tab=settings] { margin-top: auto; }
.nav-label { display: none; position: absolute; left: 51px; padding: 7px 10px; border-radius: 4px; background: #253c4c; color: white; white-space: nowrap; font-size: 12px; box-shadow: var(--shadow); }
.tab:hover .nav-label,.tab:focus-visible .nav-label { display: block; }
.top { margin-left: 64px; height: 46px; padding: 0 20px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.brand { font-size: 12px; color: var(--muted); margin-right: auto; }
.profile { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.avatar,.miniav { border-radius: 50%; background: #e9f4f9; color: #49788d; display: grid; place-items: center; font-size: 11px; flex: none; }
.avatar { width: 28px; height: 28px; }
.miniav { width: 26px; height: 26px; }
.demo-tools { position: relative; font-size: 12px; }
.demo-tools summary { cursor: pointer; color: #6e8592; }
.demo-popover { position: absolute; right: 0; top: 28px; z-index: 22; display: grid; gap: 8px; width: 290px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: white; box-shadow: var(--shadow); }
.wrap { margin-left: 64px; padding: 14px 20px 24px; min-width: 0; }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.title h1 { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 6px 10px; color: white; background: var(--blue); border-radius: 3px; font-size: 15px; font-weight: 500; }
.title h1 svg { width: 17px; height: 17px; }
.subtitle { display: none; }
.toolbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.btn,.arrow { border: 1px solid #d6e0e6; border-radius: 4px; background: #fff; color: #415a69; padding: 7px 11px; font-weight: 500; font-size: 13px; min-height: 32px; }
.btn:hover,.arrow:hover { background: #f1f8fb; border-color: #b1cbd9; }
.btn.primary,.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover,.btn.blue:hover { background: #008bb4; }
.btn.small { padding: 4px 9px; min-height: 28px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; }
.text-link { padding: 0; border: 0; background: transparent; color: #078db8; text-align: left; }
.card { border: 1px solid var(--line); border-radius: 4px; background: white; min-width: 0; }
.overview { display: grid; grid-template-columns: 1.15fr .85fr .85fr 1.05fr 1.5fr; align-items: center; margin-bottom: 12px; padding: 12px 14px; min-height: 84px; gap: 16px; }
.today { display: flex; align-items: center; gap: 10px; }
.today b { font-weight: 500; }
.today small,.upcoming small { display: block; font-size: 11px; color: var(--muted); }
.datebox { width: 43px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #eef8fc; border-radius: 4px; color: #038db6; flex: none; }
.datebox strong { font-size: 22px; line-height: 1.1; }
.datebox span { font-size: 10px; text-transform: uppercase; }
.metric { border: 0; border-left: 1px solid var(--line); background: transparent; text-align: left; padding: 0 0 0 16px; }
.metric strong { display: block; font-size: 24px; font-weight: 500; line-height: 1.2; }
.metric span { font-size: 11px; color: var(--muted); }
.metric-link strong { color: var(--blue); }
.upcoming { border-left: 1px solid var(--line); padding-left: 16px; }
.upcoming .text-link { display: block; margin: 3px 0; font-size: 13px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px; margin-bottom: 10px; background: #fafcfd; }
.select,.search { border: 1px solid #dce4e9; border-radius: 4px; background: white; color: var(--ink); padding: 6px 8px; min-height: 32px; max-width: 100%; }
.search { min-width: 160px; }
.filters .select { max-width: 230px; }
.calendar-card { overflow: hidden; }
.calhead { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; gap: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.yearnav { display: flex; align-items: center; gap: 8px; }
.yearnav strong { min-width: 42px; text-align: center; }
.arrow { width: 28px; min-height: 28px; padding: 2px; font-size: 20px; line-height: 1; }
.views { display: inline-flex; border: 1px solid #dae3e9; border-radius: 4px; overflow: hidden; flex: none; }
.views button { border: 0; padding: 6px 12px; color: #6d8190; background: #fff; font-size: 12px; }
.views button+button { border-left: 1px solid #dae3e9; }
.views button.active { color: white; background: var(--blue); }
.calbody,.summary-scroll,.table-scroll { overflow: auto; }
.calendar { border-collapse: collapse; width: 100%; }
.calendar th { background: var(--wash); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 500; padding: 9px; text-align: left; }
.calendar td { border-bottom: 1px solid #edf1f4; padding: 5px 8px; height: 43px; }
.calendar .personcol { min-width: 205px; position: sticky; left: 0; z-index: 3; background: white; border-right: 1px solid var(--line); }
.calendar thead .personcol { background: var(--wash); }
.person { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.person .name { font-size: 12px; font-weight: 500; }
.person .dept { display: block; font-size: 10px; color: var(--muted); }
.calendar .timeline { width: 100%; min-width: 690px; position: relative; }
.month-labels { display: flex; }
.month-labels span { text-align: center; font-size: 11px; }
.track { height: 29px; position: relative; }
.gridline { position: absolute; height: 100%; top: 0; border-left: 1px solid #edf1f4; }
.bar { position: absolute; height: 23px; top: 3px; border: 0; border-left: 3px solid; border-radius: 3px; padding: 2px 4px; overflow: hidden; white-space: nowrap; font-size: 11px; text-align: left; color: #285a55; min-width: 4px; }
.bar:hover { outline: 1px solid currentColor; z-index: 2; }
.bar.pending { color: #896516; }
.holiday-marker { position: absolute; top: 0; height: 100%; border-left: 1px dashed #e6a994; }
.legend { display: flex; gap: 15px; flex-wrap: wrap; padding: 9px 12px; color: var(--muted); font-size: 11px; }
.dot,.color-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--teal); margin-right: 5px; }
.dot.pending { background: #e4b84b; }
.dot.sick { background: #ec8279; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: #6a7e8b; font-size: 12px; font-weight: 500; padding: 9px 10px; background: #f5f8fa; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 7px 10px; border-bottom: 1px solid #eaf0f3; font-size: 13px; vertical-align: middle; }
.table tbody tr:hover { background: #f8fcfd; }
.table tbody tr:last-child td { border-bottom: 0; }
.rowactions { white-space: nowrap; }
.rowactions .btn+.btn { margin-left: 4px; }
.badge { display: inline-flex; border-radius: 3px; padding: 3px 7px; font-size: 11px; white-space: nowrap; background: #e1f6ef; color: #138568; }
.badge.pending { background: #fff4d8; color: #926f19; }
.badge.rejected { background: #ffebeb; color: #b55353; }
.badge.cancelled { background: #edf1f4; color: #667d8c; }
.summary-table { min-width: 630px; }
.summary-table td:first-child { position: sticky; left: 0; background: white; }
.pagegrid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; }
.sidecard { padding: 14px; }
.sidecard h3 { margin: 0 0 12px; font-size: 14px; }
.settings-layout { display: grid; gap: 12px; min-width: 0; }
.settings-nav { display: flex; overflow-x: auto; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.settings-nav button { border: 0; border-bottom: 2px solid transparent; padding: 10px 13px; background: white; white-space: nowrap; color: #6c808d; font-size: 13px; }
.settings-nav button.active { color: #008eb9; border-bottom-color: var(--blue); }
.setting-content { padding: 14px; }
.setting-content h2 { font-size: 16px; margin: 0 0 6px; font-weight: 550; }
.setting-content h3 { font-size: 14px; }
.setting-content>p { margin: 0 0 15px; color: var(--muted); font-size: 12px; max-width: 900px; }
.settings-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
fieldset { border: 1px solid var(--line); border-radius: 4px; margin: 0; padding: 5px 12px 10px; min-width: 0; }
legend { padding: 0 7px; font-weight: 550; font-size: 13px; color: #3e6478; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 43px; padding: 9px 0; border-bottom: 1px solid #eef2f5; font-size: 13px; }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; font-weight: 450; }
.setting-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; overflow-wrap: anywhere; }
.setting-row>span { min-width: 0; }
.setting-row>.btn { flex: none; }
.setting-row>.select { max-width: 53%; font-size: 12px; }
.number-input { min-width: 70px; width: 85px; }
.toggle { appearance: none; width: 34px; height: 20px; margin: 0; border-radius: 20px; background: #cdd9e1; position: relative; cursor: pointer; flex: none; }
.toggle:checked { background: var(--blue); }
.toggle:before { content: ''; position: absolute; background: white; width: 14px; height: 14px; border-radius: 50%; top: 3px; left: 3px; transition: left .15s; }
.toggle:checked:before { left: 17px; }
.type-row { display: grid; grid-template-columns: minmax(180px,1.3fr) 44px auto auto auto minmax(120px,.7fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; }
.type-row .search { min-width: 0; width: 100%; }
.type-row label { font-size: 12px; white-space: nowrap; }
input[type=checkbox] { accent-color: var(--blue); }
input[type=color] { height: 32px; width: 40px; padding: 2px; border: 1px solid #dce4e9; border-radius: 4px; background: white; }
.field { margin: 10px 0; }
.field label { display: block; font-size: 12px; color: #647c8b; margin-bottom: 5px; }
.field input,.field select,.field textarea { width: 100%; min-height: 34px; border: 1px solid #dce4e9; border-radius: 4px; padding: 7px 9px; background: #fff; color: var(--ink); }
.field input[type=color] { width: 48px; padding: 2px; }
.field textarea { resize: vertical; min-height: 70px; }
.setting-content>.field { max-width: 720px; }
.setting-content>.formrow { max-width: 720px; }
.formrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-back { position: fixed; inset: 0; background: #17354855; z-index: 30; display: grid; place-items: center; padding: 16px; }
.modal { width: min(540px,100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: 6px; box-shadow: var(--shadow); padding: 18px; }
.modalhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal h2 { margin: 0; font-size: 18px; font-weight: 550; }
.close { border: 0; background: #f0f5f8; width: 30px; height: 30px; border-radius: 4px; font-size: 20px; color: #6b8393; flex: none; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.setting-content>.modal-actions { position: sticky; bottom: 0; background: #fff; padding: 12px 0 2px; border-top: 1px solid var(--line); z-index: 5; }
.modal .modal-actions { position: sticky; bottom: -18px; margin: 16px -18px -18px; padding: 12px 18px; background: white; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 18px; right: 18px; max-width: calc(100vw - 36px); z-index: 50; background: #234555; color: white; padding: 12px 16px; border-radius: 5px; box-shadow: var(--shadow); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.empty-state { border: 1px dashed #cddce4; padding: 24px; text-align: center; }
.syncinfo,.subtle { font-size: 11px; color: var(--muted); }
.syncinfo { margin-top: 9px; }
.muted { color: var(--muted); }
.danger { color: #b74848; }
.hide { display: none !important; }
@media (max-width: 1100px) {
  .settings-groups { grid-template-columns: 1fr; }
  .overview { grid-template-columns: 1fr 1fr 1fr 1.2fr; }
  .upcoming { grid-column: 1/-1; display: flex; gap: 8px; align-items: center; padding-top: 8px; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .upcoming .text-link { margin: 0; }
  .type-row { grid-template-columns: minmax(140px,1fr) 44px 1fr 1fr; }
  .type-row select { grid-column: 2/4; }
}
@media (max-width: 700px) {
  .rail { width: 52px; }
  .logo { width: 32px; height: 32px; }
  .tab { width: 40px; height: 40px; }
  .nav-label { left: 45px; }
  .top { margin-left: 52px; padding: 0 12px; gap: 10px; }
  .profile span,.brand { display: none; }
  #demoTools { margin-right: auto; }
  .wrap { margin-left: 52px; padding: 12px; }
  .titlebar { flex-wrap: wrap; }
  .title h1 { font-size: 13px; }
  .overview { grid-template-columns: 1fr 1fr; gap: 12px; }
  .metric:nth-child(3) { border-left: 0; padding-left: 0; }
  .upcoming { display: block; }
  .filters>* { flex: 1 1 140px; min-width: 0; }
  .filters .select { max-width: none; }
  .pagegrid { grid-template-columns: 1fr; }
  .setting-content { padding: 10px; }
  .settings-nav button { padding: 9px 10px; }
  .setting-row { gap: 10px; }
  .setting-row>.select { max-width: 50%; }
  .type-row { grid-template-columns: minmax(0,1fr) 42px; gap: 8px; padding: 12px 0; }
  .type-row label { grid-column: 1/-1; }
  .type-row select { grid-column: 1; }
  .type-row .btn { grid-column: 1/-1; }
  .formrow { grid-template-columns: 1fr; gap: 0; }
  .modal-back { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); }
  .rowactions { white-space: normal; }
  .demo-popover { right: auto; left: 0; width: min(280px,calc(100vw - 80px)); }
}
/* Calendar management: twelve months and a compact employee panel. */
.manage-toolbar { padding: 0 0 12px; margin-bottom: 14px; }
.management-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 24px; align-items: start; }
.year-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 22px; }
.mini-month { min-width: 0; }
.mini-month h2 { margin: 0 0 8px; font-size: 14px; font-weight: 550; color: #3e6276; }
.month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; }
.weekday { text-align: center; color: var(--muted); padding: 2px 0 5px; font-size: 11px; }
.month-day,.day-blank { min-height: 25px; }
.month-day { position: relative; border: 1px solid transparent; border-radius: 3px; padding: 3px 0; background: white; color: #425c6b; font-size: 12px; }
.weekend { background: #f2f5f7; }
.month-day.holiday { background: #fff0ec; color: #a76e64; }
.month-day.booked { background: color-mix(in srgb,var(--period-color) 22%,white); border-bottom: 2px solid var(--period-color); }
.month-day.pending { border-bottom-style: dashed; background: #fff4d9; }
.month-day.selected { color: white; background: var(--blue); border-color: #0086ad; }
.month-day.today-day { box-shadow: inset 0 0 0 1px #0894bf; }
.month-day:hover { border-color: #58a9ca; }
.multiple-dot { position: absolute; width: 3px; height: 3px; right: 2px; top: 2px; background: #47657a; border-radius: 50%; }
.management-side { position: sticky; top: 14px; padding: 14px; }
.management-side>label { display: block; margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.management-side>select { width: 100%; }
.management-side h3 { font-size: 13px; font-weight: 550; margin: 14px 0 8px; }
.management-side .legend { padding: 12px 0; border-bottom: 1px solid var(--line); gap: 7px 10px; }
.selection-panel { border-top: 1px solid var(--line); padding-top: 12px; }
.selection-panel strong { font-size: 13px; font-weight: 550; }
.selection-panel p { margin: 6px 0 12px; }
.employee-periods { max-height: 270px; overflow: auto; }
.period-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; text-align: left; background: white; border: 0; border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 12px; color: var(--ink); }
.period-card:hover { background: #f4fafc; }
.period-card small { color: var(--muted); font-size: 10px; }
.comment-cell { max-width: 280px; overflow-wrap: anywhere; }
.date-cell { white-space: nowrap; }
.calendar th.timeline { padding-left: 8px; padding-right: 8px; }
@media (min-width: 1500px) { .year-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1100px) { .management-layout { grid-template-columns: minmax(0,1fr) 245px; gap: 18px; } .year-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; } }
@media (max-width: 700px) {
  .management-layout { display: flex; flex-direction: column; gap: 18px; }
  .management-side { position: static; order: -1; width: 100%; }
  .employee-periods { max-height: 150px; }
  .year-grid { width: 100%; gap: 20px 12px; }
  .month-day { min-height: 30px; }
  .approvals-table { min-width: 740px; }
}
@media (max-width: 420px) { .year-grid { grid-template-columns: 1fr; } .month-day { min-height: 34px; } }
.modal-open { overflow: hidden; }
.mobile-selection { display: none; }
@media (max-width: 700px) {
  .selection-panel.has-selection { display: none; }
  .mobile-selection { display: grid; gap: 8px; position: fixed; bottom: 0; left: 52px; right: 0; padding: 10px 12px; background: white; border-top: 1px solid var(--line); box-shadow: 0 -3px 15px #18364712; z-index: 15; }
  .mobile-selection strong { font-size: 12px; font-weight: 500; }
  .year-grid { padding-bottom: 100px; }
}
.read-only-notice{padding:10px 14px;margin:0 0 12px;border:1px solid #c8dfed;border-radius:8px;background:#edf7fc;color:#28566e;font-size:13px}
