:root {
  --dsv: #192862;
  --dsv-dark: #111c47;
  --dsv-soft: #eef1fb;
  --ink: #172033;
  --muted: #667085;
  --line: #e6e8ef;
  --surface: #ffffff;
  --bg: #f5f7fb;
  --planned: #f1a735;
  --planned-soft: #fff4dd;
  --confirmed: #192862;
  --confirmed-soft: #e9edfb;
  --success: #17895b;
  --danger: #c53939;
  --danger-soft: #fff0f0;
  --shadow: 0 10px 30px rgba(25, 40, 98, .08);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
a { color: var(--dsv); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 245px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: var(--dsv); color: #fff; z-index: 20; }
.brand { height: 92px; padding: 22px 24px; display: flex; align-items: center; gap: 14px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand img { width: 92px; height: 31px; object-fit: contain; filter: brightness(0) invert(1); }
.brand span { font-size: 16px; font-weight: 600; white-space: nowrap; }
.nav-links { padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; }
.nav-links a { color: rgba(255,255,255,.78); display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 13px; border-radius: 10px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-icon { width: 22px; text-align: center; font-size: 17px; }
.sidebar-footer { margin-top: auto; padding: 18px 20px 22px; border-top: 1px solid rgba(255,255,255,.12); }
.demo-note { font-size: 12px; opacity: .62; margin-bottom: 8px; }
.logout-link { color: #fff; font-weight: 600; }

.main-area { flex: 1; min-width: 0; margin-left: 245px; }
.topbar { min-height: 92px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 16px 30px; position: sticky; top: 0; z-index: 15; }
.topbar-eyebrow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.topbar-title { font-size: 21px; font-weight: 700; margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; color: var(--dsv); cursor: pointer; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-chip strong { display: block; font-size: 13px; }
.user-chip small { display: block; color: var(--muted); margin-top: 2px; }
.content { padding: 30px; max-width: 1600px; margin: 0 auto; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 9px; border: 1px solid transparent; font-weight: 600; cursor: pointer; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--dsv); color: #fff; }
.button.primary:hover { background: var(--dsv-dark); }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.button.light { background: #fff; color: var(--dsv); }
.button.compact { min-height: 38px; padding: 8px 13px; }
.button.full { width: 100%; }

.hero-card { background: linear-gradient(120deg, var(--dsv), #293b82); color: #fff; border-radius: 18px; padding: 30px 32px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; overflow: hidden; position: relative; }
.hero-card::after { content: ""; position: absolute; width: 270px; height: 270px; border: 42px solid rgba(255,255,255,.07); border-radius: 50%; right: -75px; top: -95px; }
.hero-card > * { position: relative; z-index: 1; }
.hero-label, .eyebrow { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--dsv); }
.hero-label { color: rgba(255,255,255,.68); }
.hero-card h2 { margin: 8px 0 8px; font-size: 26px; line-height: 1.2; max-width: 650px; }
.hero-card p { margin: 0; color: rgba(255,255,255,.75); max-width: 700px; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.button.hero-export { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.32); }
.button.hero-export:hover { background: rgba(255,255,255,.2); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; gap: 14px; align-items: flex-start; box-shadow: 0 4px 18px rgba(25,40,98,.035); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.stat-icon.blue { background: #eef1fb; color: var(--dsv); }
.stat-icon.teal { background: #e9f8f4; color: #18856d; }
.stat-icon.amber { background: #fff5df; color: #b87511; }
.stat-icon.violet { background: #f2edff; color: #714cc4; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; font-size: 28px; color: var(--ink); margin: 4px 0 2px; }
.stat-card small { color: #98a0b1; font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; margin-bottom: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 20px rgba(25,40,98,.035); }
.panel-header { padding: 20px 22px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-header.stacked { align-items: flex-start; }
.panel-header h3 { margin: 4px 0 0; font-size: 17px; }
.panel-header p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.panel-header a { font-size: 12px; font-weight: 600; }
.muted { color: var(--muted); font-weight: 400; }
.donut-area { height: 220px; display: grid; place-items: center; padding: 20px 28px 6px; }
.css-donut { width: 165px; height: 165px; border-radius: 50%; display: grid; place-items: center; }
.donut-hole { width: 112px; height: 112px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.donut-hole strong { font-size: 26px; color: var(--ink); }
.donut-hole span { color: var(--muted); font-size: 11px; margin-top: 2px; }
.chart-legend-custom { display: flex; justify-content: center; gap: 24px; padding: 0 20px 22px; color: var(--muted); }
.chart-legend-custom span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend-custom b { color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.planned { background: var(--planned); }
.dot.confirmed { background: var(--confirmed); }

.upcoming-list { padding: 5px 20px 12px; }
.upcoming-item { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.upcoming-item:last-child { border-bottom: 0; }
.upcoming-main { flex: 1; min-width: 0; }
.upcoming-main strong { display: block; font-size: 13px; }
.upcoming-main span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.avatar, .avatar-img { flex: 0 0 38px; width: 38px !important; height: 38px !important; min-width: 38px; max-width: 38px; min-height: 38px; max-height: 38px; border-radius: 50%; overflow: hidden; }
.avatar { display: grid; place-items: center; background: var(--dsv-soft); color: var(--dsv); font-size: 11px; font-weight: 700; }
.avatar.small, .user-chip .avatar-img, .user-chip > img { flex-basis: 34px; width: 34px !important; height: 34px !important; min-width: 34px; max-width: 34px; min-height: 34px; max-height: 34px; }
.avatar-img, .user-chip > img { display: block; object-fit: cover; object-position: center; border-radius: 50%; }
.person-cell img, .upcoming-item img { width: 38px !important; height: 38px !important; max-width: 38px !important; max-height: 38px !important; object-fit: cover; object-position: center; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.planned { background: var(--planned-soft); color: #9a6511; }
.badge.confirmed { background: var(--confirmed-soft); color: var(--dsv); }
.leave-type-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; background: #f1f3f7; color: #4d5668; font-size: 11px; font-weight: 700; white-space: nowrap; }

.info-banner { display: flex; gap: 16px; align-items: flex-start; background: #f0f3fc; border: 1px solid #dce2f7; color: #465276; border-radius: 12px; padding: 15px 18px; line-height: 1.55; }
.info-banner strong { color: var(--dsv); white-space: nowrap; }

.page-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-toolbar h2 { margin: 5px 0 5px; font-size: 25px; }
.page-toolbar p { margin: 0; color: var(--muted); }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.segmented { background: #eef0f5; border-radius: 9px; padding: 3px; display: inline-flex; gap: 2px; }
.segmented a, .segmented button { border: 0; background: transparent; color: var(--muted); min-height: 34px; padding: 7px 12px; border-radius: 7px; font-weight: 600; cursor: pointer; }
.segmented a.active, .segmented button.active { background: #fff; color: var(--dsv); box-shadow: 0 2px 8px rgba(25,40,98,.08); }

.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 13px 18px; background: #fafbfc; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; color: #3f4655; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
td strong { color: var(--ink); }
td small { display: block; color: var(--muted); margin-top: 3px; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.note-cell { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { white-space: nowrap; }
.row-actions a, .row-actions form { display: inline-block; margin-right: 8px; }
.text-button { border: 0; background: transparent; padding: 0; cursor: pointer; font-weight: 500; }
.danger-text { color: var(--danger); }
.role-chip { background: #f2f4f8; color: #505a70; border-radius: 7px; padding: 5px 8px; font-size: 11px; font-weight: 600; }
.status-dot-text { display: inline-flex; align-items: center; gap: 7px; }
.status-dot-text::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a7afbf; }
.status-dot-text.active::before { background: #1e9c6a; }

.form-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 20px; align-items: start; }
.form-panel { overflow: hidden; }
.narrow-panel { max-width: 850px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding: 22px; }
.field { min-width: 0; }
.field.full-span, .full-span { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 12px; color: #394155; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d8dce6; border-radius: 9px; padding: 11px 12px; background: #fff; color: var(--ink); outline: none; transition: .15s ease; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8290c8; box-shadow: 0 0 0 3px rgba(25,40,98,.08); }
.field small { color: var(--muted); display: block; margin-top: 6px; }
.status-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.status-radio { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex !important; gap: 10px; align-items: flex-start; cursor: pointer; margin: 0 !important; }
.status-radio input { width: auto; margin-top: 3px; }
.status-radio span { display: block; }
.status-radio b, .status-radio small { display: block; }
.status-radio small { font-weight: 400; margin-top: 3px; line-height: 1.45; }
.status-radio:has(input:checked) { border-color: #9aa7d8; background: #f8f9fe; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 3px; }
.side-note-card { background: var(--dsv); color: #fff; padding: 25px; border-radius: 14px; box-shadow: var(--shadow); }
.side-note-card .eyebrow { color: #aeb9e6; }
.side-note-card h3 { font-size: 21px; margin: 7px 0 10px; }
.side-note-card p { color: rgba(255,255,255,.74); line-height: 1.65; }
.side-note-example { background: rgba(255,255,255,.1); border-radius: 10px; padding: 13px; display: flex; gap: 10px; margin: 18px 0; }
.side-note-example b, .side-note-example small { display: block; }
.side-note-example small { color: rgba(255,255,255,.7); margin-top: 3px; line-height: 1.5; }
.warning-dot, .conflict-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ffd681; color: #7b4c00; font-weight: 800; flex: 0 0 auto; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; }
.check-list li { padding: 9px 0 9px 22px; position: relative; color: rgba(255,255,255,.78); border-bottom: 1px solid rgba(255,255,255,.08); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: #d8e0ff; }

.conflict-box { grid-column: 1 / -1; border: 1px solid #efc877; background: #fff8e8; color: #6c520d; border-radius: 11px; padding: 15px; display: flex; gap: 12px; }
.conflict-box strong { color: #664a00; }
.conflict-box p { margin: 3px 0 9px; }
.conflict-list > div, .conflict-inline { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 6px 0; border-top: 1px solid rgba(130,93,0,.13); }
.conflict-list span, .conflict-inline span { color: #7c672b; }
.hidden { display: none !important; }

.calendar-panel { padding: 20px; }
.calendar-key { margin-top: 12px; display: flex; gap: 18px; color: var(--muted); justify-content: flex-end; }
.calendar-key span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 16px; }
.calendar-controls h3 { margin: 0; font-size: 19px; text-align: center; }
.calendar-buttons { display: flex; align-items: center; gap: 6px; }
.calendar-nav, .calendar-today { border: 1px solid var(--line); background: #fff; color: var(--dsv); border-radius: 8px; min-height: 34px; padding: 6px 11px; font-weight: 600; cursor: pointer; }
.calendar-nav { width: 36px; font-size: 20px; padding: 2px; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { background: #fafbfc; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; }
.weekday-row div { padding: 9px 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; text-align: center; font-weight: 700; }
.calendar-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-cell { min-height: 116px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px; background: #fff; overflow: hidden; }
.calendar-cell.outside { background: #fafbfc; color: #a9afbb; }
.calendar-cell.today { box-shadow: inset 0 0 0 2px rgba(25,40,98,.25); }
.calendar-day-number { font-size: 12px; color: #5a6271; text-align: right; margin-bottom: 5px; }
.calendar-cell.today .calendar-day-number { display: inline-grid; place-items: center; float: right; width: 25px; height: 25px; border-radius: 50%; background: var(--dsv); color: #fff; margin-top: -2px; }
.calendar-event { display: block; width: 100%; border: 0; border-radius: 5px; padding: 4px 5px; margin: 3px 0; font-size: 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.calendar-event.confirmed { background: var(--confirmed); color: #fff; }
.calendar-event.planned { background: var(--planned-soft); color: #7c5515; border-left: 3px solid var(--planned); }
.calendar-more { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,18,45,.45); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal-card { width: min(460px,100%); background: #fff; border-radius: 14px; padding: 24px; position: relative; box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.modal-card h3 { margin: 6px 0 13px; font-size: 22px; }
.modal-card p { color: var(--muted); line-height: 1.6; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 25px; color: var(--muted); cursor: pointer; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.flash.success { background: #ecfbf5; border-color: #b7ead6; color: #176743; }
.flash.error { background: var(--danger-soft); border-color: #f1c2c2; color: #8f2e2e; }
.empty-state { text-align: center; padding: 38px 20px; color: var(--muted); }
.compact-empty { padding: 30px 10px; }
.switch-row { display: inline-flex !important; align-items: center; gap: 9px; }
.switch-row input { width: auto; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 46%) 1fr; background: #fff; }
.login-panel { padding: 54px clamp(36px,6vw,90px); display: flex; flex-direction: column; justify-content: center; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 42px; }
.login-brand img { width: 118px; height: 38px; object-fit: contain; }
.pill { background: var(--dsv-soft); color: var(--dsv); padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.login-panel h1 { font-size: clamp(34px,4vw,48px); margin: 0 0 14px; color: var(--dsv); }
.login-intro { color: var(--muted); line-height: 1.7; max-width: 620px; margin: 0 0 28px; }
.login-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.login-form select { width: 100%; min-height: 46px; border: 1px solid #d8dce6; border-radius: 9px; padding: 0 12px; margin-bottom: 12px; background: #fff; }
.demo-roles { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 28px; }
.demo-roles div { background: #f7f8fb; border-radius: 10px; padding: 12px; }
.demo-roles strong, .demo-roles span { display: block; }
.demo-roles strong { font-size: 11px; color: var(--dsv); }
.demo-roles span { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.login-visual { min-height: 100vh; background: radial-gradient(circle at 80% 20%, #31478d 0, #192862 42%, #111b45 100%); display: grid; place-items: center; padding: 40px; position: relative; overflow: hidden; }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 60px solid rgba(255,255,255,.05); border-radius: 50%; width: 420px; height: 420px; }
.login-visual::before { right: -130px; top: -130px; }
.login-visual::after { left: -220px; bottom: -270px; width: 520px; height: 520px; }
.visual-card { position: relative; z-index: 1; width: min(540px,100%); color: #fff; }
.visual-kicker { color: #bcc7ef; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; }
.visual-card > strong { display: block; font-size: clamp(34px,5vw,60px); line-height: 1.08; margin: 13px 0 35px; max-width: 520px; }
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.mini-stats span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 15px; color: rgba(255,255,255,.7); }
.mini-stats b { display: block; color: #fff; font-size: 26px; margin-bottom: 3px; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .side-note-card { order: -1; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-button { display: block; }
  .content { padding: 20px 16px; }
  .topbar { padding: 13px 16px; min-height: 76px; }
  .topbar-actions .button { display: none; }
  .user-chip { border-left: 0; padding-left: 0; }
  .user-chip div { display: none; }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .form-grid { grid-template-columns: 1fr; }
  .field, .field.full-span, .full-span { grid-column: 1; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 24px; align-items: flex-start; flex-direction: column; }
  .hero-card h2 { font-size: 22px; }
  .status-options { grid-template-columns: 1fr; }
  .demo-roles { grid-template-columns: 1fr; }
  .login-panel { padding: 34px 22px; }
  .login-brand { margin-bottom: 30px; }
  .info-banner { flex-direction: column; gap: 5px; }
  .calendar-panel { padding: 10px; }
  .calendar-toolbar .segmented { width: 100%; }
  .calendar-toolbar .segmented button { flex: 1; }
}

/* Version 2: regions, quick leave modal and calendar selection */
body.modal-open { overflow: hidden; }

.region-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.region-chip.mena { background: #e8edff; color: #233b8f; }
.region-chip.ssaf { background: #e7f7f2; color: #13715d; }
.leave-item-tags { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }

.region-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 20px; }
.region-summary-card { border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.region-summary-card.mena { background: linear-gradient(145deg,#f8faff,#edf1ff); }
.region-summary-card.ssaf { background: linear-gradient(145deg,#f7fcfa,#eaf8f3); }
.region-summary-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.region-summary-title strong { font-size: 30px; color: var(--ink); }
.region-record-label { display: block; color: var(--muted); font-size: 11px; margin: 6px 0 17px; }
.region-mini-stats { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid rgba(25,40,98,.09); padding-top: 14px; }
.region-mini-stats div + div { border-left: 1px solid rgba(25,40,98,.09); padding-left: 16px; }
.region-mini-stats b, .region-mini-stats span { display: block; }
.region-mini-stats b { font-size: 20px; }
.region-mini-stats span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.dashboard-leave-lists { grid-template-columns: 1fr 1fr; }

.quick-leave-backdrop { z-index: 200; }
.leave-modal-card { width: min(650px,100%); max-height: calc(100vh - 36px); overflow-y: auto; }
.leave-modal-card h3 { margin-bottom: 5px; }
.modal-intro { margin: 0 0 16px; }
.modal-form { padding: 4px 0 0; }
.modal-actions { margin-top: 2px; }
.compact-status-options .status-radio { padding: 12px; }
.conflict-content { min-width: 0; flex: 1; }

.calendar-hint { color: var(--muted); font-size: 11px; text-align: right; }
.simple-calendar { overflow-x: auto; }
.weekday-row, .calendar-grid { min-width: 760px; }
.calendar-grid { user-select: none; }
.calendar-cell { cursor: crosshair; position: relative; transition: background .12s ease, box-shadow .12s ease; }
.calendar-cell:hover { background: #fbfcff; }
.calendar-cell.selecting { background: #edf1ff !important; box-shadow: inset 0 0 0 2px rgba(25,40,98,.22); }
.calendar-cell.same-region-conflict-day { background: #fff7f7; }
.calendar-cell.cross-region-overlap-day { background: #fbf8ff; }
.calendar-cell.same-region-conflict-day .calendar-day-number { color: #a53a3a; font-weight: 700; }
.calendar-cell.cross-region-overlap-day .calendar-day-number { color: #7046a8; font-weight: 700; }
.calendar-event.same-region-conflict { background: #c63e48; color: #fff; border-left: 3px solid #8e222b; }
.calendar-event.cross-region-overlap { background: #7650aa; color: #fff; border-left: 3px solid #56357f; }
.dot.conflict-same { background: #c63e48; }
.dot.conflict-cross { background: #7650aa; }
.calendar-key-wrap { flex-wrap: wrap; }

@media (max-width: 700px) {
  .region-summary-grid { grid-template-columns: 1fr; }
  .dashboard-leave-lists { grid-template-columns: 1fr; }
  .leave-item-tags { align-items: flex-end; flex-direction: column; }
  .leave-modal-card { padding: 20px; }
  .calendar-hint { display: none; }
}

.locked-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d7ddeb;
  border-radius: 12px;
  background: #f6f8fc;
  color: #3b455c;
  font-weight: 600;
}
