:root {
    --bg: #f4f8fb;
    --card: #ffffff;
    --line: #dbe5ee;
    --text: #1c2733;
    --primary: #1189cf;
    --primary-deep: #0a679d;
    --danger: #c63030;
    --success: #128255;
    --muted: #6b7280;
    --sidebar: #ffffff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
    background: linear-gradient(180deg, #f6fafc 0%, #edf5fa 100%);
    color: var(--text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
.page-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--text); padding: 18px; border-right: 1px solid var(--line); }
.sidebar-menu-only { padding-top: 22px; }
.brand { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand-logo { width: 100%; max-width: 210px; display: block; }
.nav-menu { display: flex; flex-direction: column; gap: 10px; }
.nav-link { display: block; padding: 12px 14px; border-radius: 12px; color: #304254; font-weight: 700; line-height: 1.35; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover { background: #edf7fd; color: var(--primary-deep); transform: translateX(2px); }
.nav-link.active { background: linear-gradient(180deg, #e7f6ff 0%, #d8efff 100%); color: var(--primary-deep); box-shadow: inset 0 0 0 1px #b4daf1; }
.nav-link-top { font-weight: 800; }
.nav-link-sub { font-weight: 500; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.nav-group { border: 1px solid var(--line); border-radius: 16px; background: #fbfdff; overflow: hidden; }
.nav-group[open] { background: linear-gradient(180deg, #fbfdff 0%, #f4fbff 100%); }
.nav-group-title { list-style: none; cursor: pointer; padding: 13px 14px; font-weight: 800; color: #17344d; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-title::after { content: "▾"; color: #5c7184; font-size: 14px; transition: transform .18s ease; }
.nav-group:not([open]) .nav-group-title::after { transform: rotate(-90deg); }
.nav-group-label { font-size: 15px; }
.nav-submenu { display: grid; gap: 6px; padding: 0 10px 10px; }
.nav-submenu .nav-link { padding: 11px 12px 11px 18px; font-size: 14px; position: relative; }
.nav-submenu .nav-link::before { content: ""; position: absolute; left: 8px; top: 50%; width: 5px; height: 5px; border-radius: 999px; background: #86b8d8; transform: translateY(-50%); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 14px 24px; position: sticky; top: 0; z-index: 5; }
.topbar-company { display: flex; align-items: center; }
.topbar-logo { width: 180px; max-width: 45vw; display: block; }
.topbar-user { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.notification-wrap { position: relative; }
.notification-toggle { position: relative; min-width: 48px; padding: 10px 12px; }
.notification-bell { font-size: 16px; line-height: 1; }
.notification-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 999px; background: #d9534f; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.notification-panel { position: absolute; top: calc(100% + 10px); right: 0; width: min(420px, 92vw); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(15,23,42,.16); padding: 12px; z-index: 20; }
.notification-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.notification-markall { padding: 8px 10px; font-size: 12px; }
.notification-empty { padding: 18px 12px; color: var(--muted); text-align: center; }
.notification-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.notification-item { width: 100%; border: 1px solid #d7e5ef; border-radius: 14px; background: #fff; padding: 12px; text-align: left; display: grid; gap: 6px; cursor: pointer; }
.notification-item.unread { background: #f2f9ff; border-color: #b7d9ee; }
.notification-title { font-weight: 800; color: #15344b; }
.notification-message { color: #4a5d70; line-height: 1.45; }
.notification-time { color: #718396; font-size: 12px; }
.menu-toggle { width: 46px; height: 46px; border: 1px solid #b8d4e6; border-radius: 12px; background: #fff; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 4px; padding: 0; margin-right: 10px; box-shadow: 0 6px 16px rgba(17, 137, 207, 0.08); }
.menu-toggle span { display: block; width: 18px; height: 2px; background: #184663; border-radius: 999px; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.38); z-index: 7; }
.no-desktop { display: none; }
.content { padding: 24px; }
h1 { margin-top: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.card, .table-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 10px 28px rgba(17, 137, 207, 0.05); }
.table-card { overflow-x: auto; }
.form-shell { display: grid; gap: 18px; }
.form-section { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.form-section-title { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #17344d; }
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 6px; }
.summary-strip-item { padding: 12px 14px; border-radius: 14px; background: #f4fbff; border: 1px solid #d4e8f5; }
.summary-strip-item .label { display: block; margin-bottom: 6px; color: #688197; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.summary-strip-item strong { display: block; color: #17344d; line-height: 1.3; }
.narrow { max-width: 420px; }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.input, input, textarea, select { width: 100%; border: 1px solid #c6d3e1; border-radius: 12px; padding: 11px 13px; font: inherit; background: white; }
.input:focus, input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 143, 216, 0.12); }
.btn { border: none; background: linear-gradient(180deg, var(--primary) 0%, var(--primary-deep) 100%); color: white; border-radius: 12px; padding: 10px 16px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { opacity: .96; }
.btn-outline { background: #fff; color: var(--primary-deep); border: 1px solid #9cc9e4; }
.btn-danger { background: linear-gradient(180deg, #d9534f 0%, #b52b27 100%); }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.inline-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #eef7ff; color: #0b5d8d; border: 1px solid #bfdcf1; font-weight: 600; }
.tag-chip-remove { border: none; background: transparent; color: inherit; cursor: pointer; font: inherit; line-height: 1; padding: 0; }
.dashboard-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.summary { margin: 16px 0; color: var(--muted); }
.message { margin-top: 16px; padding: 12px 14px; border-radius: 12px; }
.success { background: #eafaf1; color: var(--success); }
.error { background: #fdecea; color: var(--danger); }
.hint { margin-top: 16px; color: var(--muted); line-height: 1.7; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { background: #f7fbff; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.pending { background: #fff3cd; color: #946200; }
.badge.approved { background: #d4edda; color: #155724; }
.badge.rejected, .badge.cancelled { background: #f8d7da; color: #721c24; }
.badge.inapproval { background: #d9ecff; color: #0e5d92; }
.stat-card .label { color: var(--muted); font-size: 14px; }
.stat-card .value { font-size: 20px; font-weight: 700; margin-top: 8px; }
.dashboard-approvals { display: grid; gap: 16px; }
.picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.picker-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.approver-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.step-no { font-weight: 700; color: var(--muted); }
.compact-table { padding: 12px; }
.section-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,0.46); z-index:99; }
.modal-card { position:fixed; top:50%; left:50%; transform:translate(-50%, -50%); width:min(1100px, 96vw); max-height:88vh; overflow:auto; background:#fff; border-radius:18px; border:1px solid var(--line); padding:20px; box-shadow:0 18px 50px rgba(15,23,42,0.22); z-index:100; }
.modal-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.modal-table { max-height:50vh; overflow:auto; }
.top-space { margin-top:16px; }
.users-grid { align-items:start; }
.row-selected { background:#eef7ff; }
.login-shell { min-height: calc(100vh - 48px); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); padding: 28px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 18px; text-align: center; }
.login-brand h1 { margin: 0; font-size: 28px; }
.login-logo { width: 220px; max-width: 72vw; display: block; }
.leave-editor { display: grid; gap: 16px; }
.leave-summary-card { padding: 16px 18px; }
.leave-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.leave-summary-item { padding: 14px 16px; border-radius: 16px; background: linear-gradient(180deg, #fbfdff 0%, #f1f8fd 100%); border: 1px solid #d9eaf4; }
.leave-summary-item .label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #688197; margin-bottom: 8px; }
.leave-summary-item strong { display: block; font-size: 18px; line-height: 1.25; color: #17344d; }
.leave-summary-item .meta { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.leave-title-box { text-align: center; border: 2px solid #1f2937; padding: 10px 12px; margin-bottom: 18px; }
.leave-title-box.compact { margin-bottom: 16px; border-color: #26435a; background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%); }
.leave-title-main { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.leave-title-sub { margin-top: 4px; color: var(--muted); }
.leave-form-grid { align-items: start; }
.leave-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.leave-type-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.leave-type-grid-readonly { margin: 14px 0; }
.leave-type-grid-readonly .leave-type-item { justify-content: center; min-height: 54px; text-align: center; }
.leave-type-grid-readonly .leave-type-item.selected { border-color: var(--primary); background: #edf7fd; color: var(--primary-deep); font-weight: 700; }
.leave-sheet .leave-meta-table th { width: 140px; }
.leave-meta-table textarea,
.leave-meta-table .leave-cell-block { min-height: 92px; }
.leave-textarea { min-height: 120px; }
.leave-textarea-sm { min-height: 96px; }
.approver-stack { display: grid; gap: 10px; }
.approver-card { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid #dbe8f1; border-radius: 14px; background: linear-gradient(180deg, #fcfeff 0%, #f5fbff 100%); }
.approver-card-step { font-weight: 800; color: #5f7386; }
.leave-detail-layout { display: grid; gap: 14px; }
.leave-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.leave-detail-block { padding: 12px 14px; border-radius: 14px; background: #f9fbfd; border: 1px solid #e2ebf2; }
.leave-detail-block .label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #688197; }
.mobile-sticky-actions { position: sticky; bottom: 12px; z-index: 4; padding: 12px; border: 1px solid #cfe2f0; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12); backdrop-filter: blur(8px); }
.mobile-form-feedback { width: 100%; }
.mobile-form-feedback .validation-message,
.mobile-form-feedback .validation-errors,
.mobile-form-feedback ul { margin: 0; padding-left: 20px; }
.mobile-form-feedback .message { margin-bottom: 12px; }

.modal-doc-card { padding:16px; }
.doc-sheet { border:1px solid #1f2937; background:#fff; padding:14px; border-radius: 14px; }
.doc-brand-bar { display:flex; justify-content:space-between; align-items:center; gap:16px; padding: 8px 0 14px; border-bottom: 3px solid #cfe5f1; margin-bottom: 14px; }
.doc-brand-logo { width: 240px; max-width: 58vw; display:block; }
.doc-brand-meta { text-align:right; color:#4b5563; }
.doc-brand-kicker { font-size:14px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:#0f8fd8; }
.doc-brand-code { font-size:14px; font-weight:700; margin-top:6px; }
.doc-title { text-align:center; font-size:28px; font-weight:800; letter-spacing:1px; margin:8px 0 18px; color:#0d2236; }
.doc-top-grid { display:grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap:16px; align-items:start; }
.doc-mini-table, .doc-main-table, .doc-employee-table { width:100%; border-collapse:collapse; }
.doc-mini-table th, .doc-mini-table td, .doc-main-table th, .doc-main-table td, .doc-employee-table th, .doc-employee-table td { border:1px solid #222; padding:8px 10px; vertical-align:top; }
.doc-mini-table th, .doc-main-table th, .doc-employee-table th { background:#f3f8fc; white-space:nowrap; }
.doc-mini-table td, .doc-main-table td, .doc-employee-table td, .leave-meta-table td { overflow-wrap:anywhere; word-break:break-word; }
.doc-main-table { margin-top:14px; }
.doc-main-table th { width:140px; }
.doc-content-box { border:1px solid #222; padding:14px; margin-top:14px; line-height:1.65; }
.doc-approval-boxes { border:1px solid #222; border-radius: 10px; overflow: hidden; }
.doc-approval-title { padding:10px 12px; font-weight:700; border-bottom:1px solid #222; background:#edf7fd; color:#0e5d92; }
.doc-approval-grid { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); }
.doc-approval-item { border-right:1px solid #222; min-height:148px; display:grid; grid-template-rows:52px 92px minmax(58px, auto) auto; background:#fff; }
.doc-approval-item:last-child { border-right:none; }
.doc-approval-role, .doc-approval-name, .doc-approval-date, .doc-approval-sign { padding:8px 8px; text-align:center; border-bottom:1px solid #222; display:flex; align-items:center; justify-content:center; }
.doc-approval-role { font-weight:700; background:#f8fafc; line-height:1.2; }
.doc-approval-sign { padding: 14px 10px; }
.approval-pill { display:inline-flex; align-items:center; justify-content:center; min-width:128px; min-height:48px; padding: 10px 18px; border-radius:999px; font-style:normal; font-weight:900; letter-spacing:1.6px; font-size:15px; border:3px solid currentColor; background:#fff; transform: rotate(-6deg); text-transform: uppercase; }
.doc-approval-name { font-weight:700; line-height:1.2; word-break:break-word; }
.doc-approval-date { border-bottom:none; color:#475467; font-size:13px; }
.doc-approval-date:empty { display:none; }
.approval-approved { color:#0f8b56; background:linear-gradient(180deg, #f4fff9 0%, #e4fff0 100%); }
.approval-rejected { color:#c63030; background:linear-gradient(180deg, #fff7f7 0%, #ffe7e7 100%); }
.approval-pending { color:#7a8797; background:linear-gradient(180deg, #f9fafb 0%, #eef2f6 100%); }
.doc-meta-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px 20px; margin:14px 0; }
.doc-history { margin-top:14px; }
.doc-history-title { font-weight:700; margin-bottom:8px; }
.doc-history ul { margin:0; padding-left:20px; }
.doc-history li { margin-bottom:6px; }

@media (max-width: 980px) {
  html, body { overflow-x: hidden; }
  .page-shell { grid-template-columns: 1fr; width: 100%; min-width: 0; }
  .page-shell > main { min-width: 0; width: 100%; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); padding: 74px 14px 14px; border-right: 1px solid var(--line); border-bottom: none; overflow-y: auto; overflow-x: hidden; transform: translateX(-100%); transition: transform .22s ease; z-index: 8; box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16); }
  .sidebar.mobile-open { transform: translateX(0); }
  .nav-menu { gap: 12px; }
  .topbar { padding: 10px 14px; }
  .menu-toggle.no-desktop { display: inline-flex; }
  .topbar-logo { width: 150px; }
  .topbar-user { gap: 8px; }
  .notification-panel { right: -8px; }
  .content { width: 100%; min-width: 0; padding: 12px; }
  .card, .table-card { width: 100%; min-width: 0; }
  .grid-2, .grid-3, .picker-grid, .approver-row, .doc-top-grid, .doc-meta-grid, .leave-summary-grid, .leave-detail-grid, .summary-strip { grid-template-columns: 1fr; }
  .leave-type-grid { grid-template-columns: 1fr; }
  .approver-card { grid-template-columns: 1fr; }
  .modal-card { width: auto; max-height: none; top: 8px; left: 8px; right: 8px; bottom: 8px; transform: none; padding: 14px; border-radius: 16px; }
  .modal-head { flex-direction: column; align-items: stretch; }
  .modal-head .action-row { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .modal-head .action-row .btn { width: 100%; min-height: 44px; padding: 10px 8px; font-size: 14px; }
  .doc-brand-bar { flex-direction: column; align-items: flex-start; }
  .doc-brand-logo { width: 200px; max-width: 72vw; }
  .doc-brand-meta { text-align:left; }
  .doc-approval-grid { grid-template-columns: 1fr; }
  .doc-approval-item { border-right:none; border-bottom:1px solid #222; min-height: auto; }
  .doc-approval-item:last-child { border-bottom:none; }
  .login-shell { min-height: auto; padding: 8px 0 16px; }
  .form-section { padding: 16px; }
  .section-header { flex-direction: column; align-items: stretch; }
  .section-header .btn { width: 100%; }
  .approver-row { gap: 8px; }
  .approver-row .btn { width: 100%; }
  .inline-picker { grid-template-columns: 1fr; }
  .doc-sheet { padding: 12px; }
  .doc-title { font-size: 24px; line-height: 1.15; }
  .doc-main-table th, .doc-main-table td, .doc-mini-table th, .doc-mini-table td, .doc-employee-table th, .doc-employee-table td { padding: 8px; font-size: 14px; }
  .doc-main-table th { width: 120px; }
  .doc-content-box { padding: 12px; font-size: 14px; }
  .doc-approval-role, .doc-approval-name, .doc-approval-date, .doc-approval-sign { padding: 8px 6px; }
  .approval-pill { min-width: 118px; min-height: 44px; font-size: 13px; letter-spacing: 1.2px; }
}

@media (max-width: 640px) {
  .card, .table-card, .doc-sheet { padding: 12px; border-radius: 12px; }
  th, td { padding: 10px 8px; }
  .btn { width: 100%; }
  .action-row { flex-direction: column; }
  .dashboard-actions { flex-direction: column; }
  .doc-title { font-size: 22px; }
  .approval-pill { min-width: 100px; font-size: 14px; transform: none; }
  .content { padding: 8px; }
  .topbar { padding: 8px 10px; gap: 8px; }
  .topbar-company { width: 100%; justify-content: flex-start; }
  .topbar-user { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) 56px 64px 92px; align-items: start; }
  .topbar-user .notification-wrap { grid-column: 2 / 3; }
  .topbar-user > div:first-child { font-size: 14px; line-height: 1.35; min-width: 0; padding-top: 4px; }
  .topbar-user > div:first-child strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .form-shell { gap: 12px; }
  .form-section { padding: 12px; border-radius: 14px; }
  .form-section-title { font-size: 16px; margin-bottom: 12px; }
  .summary-strip-item { padding: 10px 11px; }
  .mobile-sticky-actions { left: -12px; right: -12px; bottom: 0; margin-top: 10px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; border-left: none; border-right: none; border-bottom: none; }
  .responsive-stack-table thead { display: none; }
  .responsive-stack-table tbody,
  .responsive-stack-table tr,
  .responsive-stack-table td { display: block; width: 100%; }
  .responsive-stack-table tr { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  .responsive-stack-table td { border: none; border-bottom: 1px dashed #e3edf4; padding: 8px 0; }
  .responsive-stack-table td:last-child { border-bottom: none; padding-bottom: 0; }
  .responsive-stack-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #688197; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; }
  .responsive-stack-table td.mobile-checkbox-cell { display: flex; align-items: center; justify-content: flex-start; padding: 2px 0 10px; }
  .responsive-stack-table td.mobile-checkbox-cell::before { content: none; display: none; }
  .responsive-stack-table td.mobile-checkbox-cell input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--primary); }
  .compact-table { padding: 10px; }
  .modal-card { top: 4px; left: 4px; right: 4px; bottom: 4px; width: auto; max-height: none; padding: 10px; border-radius: 14px; }
  .modal-head { align-items: flex-start; }
  .modal-head h3 { margin: 0; font-size: 18px; }
  .modal-head .action-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-head .action-row .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .mobile-form-feedback { order: -1; margin-bottom: 10px; }
  .leave-title-box, .leave-title-box.compact { margin-bottom: 12px; padding: 8px 10px; }
  .leave-title-box h2 { margin: 0; font-size: 18px; line-height: 1.2; }
  .leave-title-box span { display: block; margin-top: 4px; font-size: 13px; }
  .doc-sheet { padding: 10px; border-radius: 10px; }
  .doc-title { font-size: 18px; margin: 6px 0 12px; }
  .doc-brand-logo { width: 150px; }
  .doc-brand-kicker, .doc-brand-code { font-size: 12px; }
  .doc-main-table th, .doc-main-table td, .doc-mini-table th, .doc-mini-table td, .doc-employee-table th, .doc-employee-table td { padding: 6px; font-size: 12px; }
  .doc-main-table th { width: 94px; }
  .doc-content-box { padding: 10px; font-size: 12px; line-height: 1.55; }
  .doc-approval-role, .doc-approval-name, .doc-approval-date, .doc-approval-sign { font-size: 12px; }
  .doc-approval-item { grid-template-rows: 42px 72px minmax(46px, auto) auto; }
  .approval-pill { min-width: 92px; min-height: 38px; font-size: 12px; letter-spacing: 1px; }
  .doc-top-grid, .leave-detail-layout, .leave-detail-grid, .leave-summary-grid, .doc-meta-grid { min-width: 0; width: 100%; }
  .doc-main-table, .doc-mini-table, .leave-meta-table, .doc-employee-table { table-layout: fixed; width: 100%; }
  .doc-main-table th, .doc-main-table td, .doc-mini-table th, .doc-mini-table td, .leave-meta-table th, .leave-meta-table td, .doc-employee-table th, .doc-employee-table td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .leave-meta-table, .leave-meta-table tbody, .leave-meta-table tr,
  .doc-main-table, .doc-main-table tbody, .doc-main-table tr,
  .doc-mini-table, .doc-mini-table tbody, .doc-mini-table tr { display: block; width: 100%; }
  .leave-meta-table tr, .doc-main-table tr, .doc-mini-table tr { border: 1px solid #222; border-bottom: none; }
  .leave-meta-table tr:last-child, .doc-main-table tr:last-child, .doc-mini-table tr:last-child { border-bottom: 1px solid #222; }
  .leave-meta-table th, .leave-meta-table td,
  .doc-main-table th, .doc-main-table td,
  .doc-mini-table th, .doc-mini-table td { display: block; width: 100%; border: none; border-bottom: 1px solid #222; }
  .leave-meta-table td:last-child,
  .doc-main-table td:last-child,
  .doc-mini-table td:last-child { border-bottom: none; }
  .leave-meta-table th, .doc-main-table th, .doc-mini-table th { background: #f3f8fc; font-weight: 800; }
  .doc-employee-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .doc-employee-table thead, .doc-employee-table tbody { display: table; width: 100%; min-width: 520px; table-layout: fixed; }
}

.no-print { }
.print-page-break { margin-bottom: 24px; }
.print-container { min-width: 980px; }
.print-container .doc-top-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) !important; gap: 14px; align-items: start !important; }
.print-container .doc-brand-bar { flex-direction: row !important; align-items: center !important; }
.print-container .doc-brand-meta { text-align: right !important; }
.print-container .doc-approval-grid {
  grid-template-columns: none !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(0, 1fr) !important;
}
.print-container .doc-approval-item {
  border-right: 1px solid #222 !important;
  border-bottom: none !important;
  min-height: 148px !important;
}
.print-container .doc-approval-item:last-child { border-right: none !important; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-page-break { break-after: page; page-break-after: always; }
  .print-page-break:last-child { break-after: auto; page-break-after: auto; }
  .doc-sheet { border-radius: 0; box-shadow: none; }
  .doc-top-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) !important; gap: 14px; }
  .doc-brand-bar { flex-direction: row; align-items: center; }
  .doc-brand-meta { text-align: right; }
  .doc-approval-grid { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .doc-mini-table, .doc-approval-boxes { height: 100%; }
  .approval-pill, .approval-approved, .approval-rejected, .approval-pending {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
