:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; color: #172033; background: #f4f6fa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; overflow-x:hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { background: #14213d; color: #fff; padding: 28px 18px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 36px; }
.brand span { background: #2f80ed; padding: 9px 8px; border-radius: 9px; font-weight: 700; }
.brand strong { font-size: 18px; }
nav { display: grid; gap: 8px; }
.nav-item { border: 0; text-align: left; color: #d7deeb; background: transparent; padding: 12px 14px; border-radius: 9px; }
.nav-item.active, .nav-item:hover { background: #243556; color: #fff; }
.privacy { margin-top: auto; color: #aeb9ce; font-size: 12px; line-height: 1.5; }
main { min-width:0; padding: 28px 38px 60px; max-width: 1180px; width: 100%; }
header { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 28px; }
header p, .panel > p { color: #647087; }
#user-chip { padding: 10px 14px; border-radius: 999px; background: #e7effc; color: #174d9b; font-size: 14px; }
.user-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.user-actions button { white-space: nowrap; }
.account-actions { min-width: 100px; }
.account-actions button { display: block; white-space: nowrap; overflow-wrap: normal; margin: 0 0 8px; }
.exact-duplicate { margin-top: 18px; border-left: 4px solid #c08719; }
.exact-duplicate p { line-height: 1.6; overflow-wrap: anywhere; }
.history-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.history-summary > div { background: #f4f7fc; border: 1px solid #e1e7f1; border-radius: 14px; padding: 14px 16px; }
.history-summary span { display: block; color: #647087; font-size: 13px; margin-bottom: 4px; }
.history-summary strong { font-size: 24px; color: #15213c; }
.history-filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(160px, 1fr); gap: 12px; margin-bottom: 18px; }
.history-filters label { margin: 0; }
.status-pill { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.synced { color: #19723c; background: #e6f6ec; }
.status-pill.pending { color: #8a5a00; background: #fff2cf; }
.panel { background: #fff; border: 1px solid #e2e7f0; border-radius: 14px; padding: 24px; box-shadow: 0 8px 22px rgba(28, 43, 71, .05); }
.login-panel { max-width: 980px; margin: 46px auto; }
.login-content { display:grid; grid-template-columns:minmax(280px,.85fr) minmax(380px,1.15fr); gap:28px; }
.login-auth { padding:8px 4px; }
.current-version { display:inline-block; margin-bottom:14px; padding:6px 10px; border-radius:999px; background:#e7f0ff; color:#175ca8; font-size:12px; font-weight:800; }
.release-notes { padding:20px; border:1px solid #dbe5f3; border-radius:12px; background:#f8faff; }
.release-heading { margin-bottom:12px; }
.release-heading > div { display:flex; align-items:center; gap:9px; }
.release-heading h2 { margin:0; font-size:21px; }
.release-heading span { padding:4px 8px; border-radius:999px; background:#e5f6eb; color:#17683a; font-size:11px; font-weight:800; }
.release-heading p { margin:6px 0 0; color:#647087; font-size:13px; }
.release-notes details { border-top:1px solid #dfe6f1; }
.release-notes summary { display:flex; justify-content:space-between; gap:14px; padding:13px 2px; cursor:pointer; color:#173c6b; }
.release-notes summary time { color:#718096; font-size:12px; font-weight:500; }
.release-notes ul { margin:0 0 14px; padding-left:20px; color:#44536a; font-size:13px; line-height:1.55; }
.release-privacy { margin:12px 0 0 !important; padding:10px; border-radius:8px; background:#fff; color:#69758b !important; font-size:12px; line-height:1.45; }
form label { display: grid; gap: 7px; font-weight: 600; color: #354158; }
input, select { min-height: 44px; border: 1px solid #cfd7e5; border-radius: 9px; padding: 10px 12px; background: #fff; color: #172033; }
input:focus, select:focus { outline: 3px solid rgba(47,128,237,.18); border-color: #2f80ed; }
#login-form { display: grid; gap: 16px; }
button { border: 1px solid #cbd4e2; border-radius: 9px; padding: 10px 15px; background: #fff; color: #25324a; }
button.primary { border-color: #256fd1; background: #2f80ed; color: #fff; font-weight: 600; }
.promotion-button { border-color: #187444; background: #187444; color: #fff; font-weight: 700; }
button:disabled { cursor: not-allowed; opacity: .5; }
.hint { margin-top: 18px; font-size: 13px; color: #69758b; }
.trial-login-panel { display:grid; gap:10px; padding:12px; border:1px solid #dce5f1; border-radius:10px; background:#f7f9fc; }
.trial-login-panel > strong { color:#294664; }
.trial-login-panel > div { display:grid; gap:8px; }
.trial-account { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; text-align:left; }
.trial-account span { display:grid; gap:2px; }
.trial-account small { color:#69758b; }
.trial-account b { color:#246bc1; white-space:nowrap; }
.link-button { border: 0; padding: 0; color: #246bc1; background: transparent; }
.error { color: #b42318; margin: 14px 0 0; }
.steps { display: flex; gap: 24px; color: #8a94a6; margin: 0 0 15px; font-size: 14px; }
.drive-status { margin-bottom: 15px; padding: 10px 13px; border-radius: 9px; background: #eef3fb; color: #34445f; font-size: 13px; }
.drive-status.ready { background: #eef9f1; color: #17643a; }
.steps .active { color: #246bc1; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wide { grid-column: 1 / -1; }
.file-picker { border: 2px dashed #cbd5e4; padding: 24px; border-radius: 12px; text-align: center; cursor: pointer; }
.file-picker.dragging { border-color: #2f80ed; background: #f1f6fe; }
.file-picker input { position: absolute; opacity: 0; pointer-events: none; }
.file-picker span { font-weight: 400; color: #68758b; }
.file-picker strong { display: block; margin-top: 9px; color: #1e5fae; overflow-wrap: anywhere; }
.action-row { display: flex; justify-content: flex-end; gap: 12px; }
.correction-banner { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px; border-radius: 9px; background: #fff7e7; color: #754c0b; }
.correction-banner[hidden] { display: none; }
.correction-banner span { display: block; margin-top: 4px; font-size: 13px; }
.category-guidance { border: 1px solid #bad2f3; border-left: 5px solid #2f80ed; border-radius: 12px; padding: 18px; background: linear-gradient(135deg, #f7fbff, #eef5ff); color: #233957; }
.guidance-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 14px; }
.guidance-heading > div { display: flex; align-items: center; gap: 10px; }
.guidance-heading h2 { margin: 0; font-size: 18px; color: #173b6c; }
.guidance-heading span { display: inline-block; border-radius: 999px; padding: 5px 9px; background: #dcecff; color: #175aa8; font-size: 12px; font-weight: 800; }
.guidance-heading > p { margin: 2px 0 0; color: #526982; font-weight: 700; text-align: right; }
.guidance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guidance-grid > div { padding: 13px 14px; border-radius: 10px; background: rgba(255,255,255,.78); border: 1px solid #d9e6f6; }
.guidance-grid strong, .guidance-exclude strong, .guidance-example strong { display: block; margin-bottom: 5px; color: #183d6b; }
.guidance-grid p { margin: 0; color: #42566f; line-height: 1.5; }
.guidance-exclude { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #fff6ec; color: #85500c; line-height: 1.45; }
.guidance-exclude strong { display: inline; color: #994f00; }
.guidance-example { margin-top: 10px; color: #42566f; }
.guidance-example strong { display: inline; }
.guidance-example code { padding: 3px 7px; border-radius: 6px; background: #dfeafa; color: #154b89; font-weight: 700; overflow-wrap: anywhere; }
.preview, .success { margin-top: 18px; }
.preview dl { display: grid; gap: 12px; margin-bottom: 0; }
.preview dl div { padding: 12px 14px; background: #f5f7fb; border-radius: 9px; }
.preview dt { color: #67738a; font-size: 13px; }
.preview dd { margin: 5px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.duplicate-warning { margin-top: 14px; padding: 14px 16px; border: 1px solid #efb443; border-left: 5px solid #d88900; border-radius: 10px; background: #fff7df; color: #684600; }
.duplicate-warning p { margin: 7px 0 10px; }
.duplicate-warning label { display: flex; align-items: flex-start; gap: 9px; font-weight: 700; }
.duplicate-warning input { width: auto; margin-top: 3px; }
.receipt-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.receipt-grid > div { padding: 12px 14px; border: 1px solid #dce6f2; border-radius: 10px; background: #f7faff; }
.receipt-grid span { display:block; color:#66758d; font-size:.82rem; margin-bottom:4px; }
.receipt-grid strong { overflow-wrap:anywhere; }
.receipt-grid .wide { grid-column:1/-1; }
.danger-button { color:#a61b1b; border-color:#e9aaaa; background:#fff7f7; }
.classification-warning { display: grid; gap: 5px; margin: 16px 0 0; padding: 13px 14px; border: 1px solid #ef9a9a; border-left: 5px solid #c62828; border-radius: 9px; background: #fff1f1; color: #a31515; line-height: 1.45; }
.classification-warning code { color: #8f1010; background: #ffe1e1; border-radius: 5px; padding: 2px 5px; font-weight: 700; overflow-wrap: anywhere; }
.success { border-color: #a7d7ba; background: #f2fbf5; }
.success h2 { color: #187444; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.section-heading p { color: #68758b; }
.table-wrap { max-width:100%; overflow-x:auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid #e6eaf1; padding: 12px 10px; vertical-align: top; }
th { color: #69758b; font-size: 13px; }
td { overflow-wrap: anywhere; }
.empty { text-align: center; margin: 25px 0 5px; color: #7a8495; }
.file-detail { margin-top: 18px; }
.detail-list { display: grid; gap: 10px; }
.detail-list div { background: #f5f7fb; padding: 11px 13px; border-radius: 8px; }
.detail-list dt { color: #69758b; font-size: 13px; }
.detail-list dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.content-preview { margin: 16px 0; min-height: 80px; background: #f5f7fb; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.content-preview iframe { width: 100%; height: 420px; border: 0; }
.content-preview img { max-width: 100%; max-height: 480px; display: block; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid #cbd4e2; border-radius: 9px; padding: 10px 15px; color: #25324a; background: #fff; }
.primary-link { border-color:#256fd1; background:#2f80ed; color:#fff; font-weight:700; }
.user-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0 26px; padding: 18px; background: #f6f8fc; border-radius: 12px; }
.user-form fieldset { grid-column: 1 / -1; border: 1px solid #d8dfeb; border-radius: 10px; padding: 14px; }
.user-form legend { padding: 0 6px; font-weight: 700; color: #354158; }
.department-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.department-checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.department-checks input { min-height: auto; }
.user-form .action-row, .user-form .error { grid-column: 1 / -1; }
.drive-center-toolbar { display: flex; align-items: end; gap: 20px; margin: 20px 0; }
.drive-center-toolbar label { display: grid; gap: 7px; font-weight: 600; color: #354158; }
.drive-center-toolbar .missing-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.missing-toggle input { min-height: auto; }
.drive-center-tree { display: grid; gap: 18px; }
#drive-center-summary { grid-template-columns:repeat(4,minmax(0,1fr)); }
.drive-period-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border-left: 5px solid #2f7ee6; border-radius: 10px; background: #edf5ff; color: #173b6c; }
.drive-period-heading strong { font-size: 1.15rem; }
.drive-period-heading span { color: #53657d; }
.drive-department { border: 1px solid #dfe5ef; border-radius: 14px; overflow: hidden; }
.drive-department h3 { margin: 0; padding: 15px 18px; background: #eef3fb; color: #19345e; }
.drive-department h3 small { margin-left: 8px; color: #68758b; font-weight: 500; }
.drive-category { border-top: 1px solid #e5e9f0; }
.drive-category summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; cursor: pointer; font-weight: 700; }
.drive-file-list { display: grid; gap: 10px; padding: 0 18px 16px; }
.drive-folder { border: 1px solid #dce4ef; border-radius: 10px; background: #fff; }
.drive-folder > summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; font-weight: 700; color: #27466d; }
.drive-folder-children { display: grid; gap: 9px; padding: 0 12px 12px 24px; }
.drive-presence-issue { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px solid #efb4ad; border-left: 5px solid #c9362b; border-radius: 9px; background: #fff4f2; color: #98261e; }
.drive-presence-issue span { flex: 1; min-width: 220px; }
.drive-file { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px; border: 1px solid #e1e7f0; border-radius: 10px; background: #fafbfd; }
.drive-file > div:first-child { display: grid; gap: 4px; min-width: 0; }
.drive-file span, .drive-file small { color: #66738a; overflow-wrap: anywhere; }
.drive-file-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hub-record-list { display:grid; gap:9px; padding:0 18px 12px; }
.hub-record { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:13px; border:1px solid #cfe0f5; border-left:4px solid #2f7ee6; border-radius:10px; background:#f7fbff; }
.hub-record > div:first-child { display:grid; gap:4px; min-width:0; }
.hub-record span, .hub-record small { color:#5f6f86; overflow-wrap:anywhere; }
.drive-category-error { padding: 0 18px 14px; }
.workflow-strip { display:flex; align-items:center; gap:7px; margin:18px 0; padding:10px 12px; overflow-x:auto; border-radius:9px; background:#f5f8fc; color:#52647d; white-space:nowrap; }
.workflow-strip strong { color:#294664; font-size:.8rem; }
.workflow-strip span { display:inline-flex; align-items:center; gap:7px; font-size:.78rem; }
.workflow-strip span:not(:last-child)::after { content:'→'; color:#9aabc0; font-weight:700; }
.accounting-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:14px 0 18px; }
.accounting-summary article { padding:12px; border:1px solid #dce5f1; border-radius:10px; background:#f5f9ff; }
.accounting-summary small, .accounting-summary span { display:block; color:#64748b; }
.accounting-summary strong { display:block; margin:3px 0; font-size:1.45rem; color:#173f73; }
.accounting-list-tools { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:12px; margin:0 0 14px; padding:14px; border:1px solid #dce5f1; border-radius:10px; background:#f8fafc; }
.accounting-list-tools label { display:grid; grid-column:span 2; gap:5px; min-width:0; font-size:.78rem; color:#64748b; }
.accounting-list-tools label:first-child { grid-column:span 4; }
.accounting-list-tools input, .accounting-list-tools select { min-height:40px; }
.accounting-pagination { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px; color:#64748b; }
.accounting-pagination > div { display:flex; align-items:center; gap:9px; }
.accounting-form { margin:16px 0 24px; padding:18px; border:1px solid #dfe6ef; border-radius:12px; background:#f8fafc; }
.accounting-settings-panel { margin-top:18px; }
.accounting-form[hidden] { display:none; }
.success-notice { margin:12px 0; padding:11px 13px; border:1px solid #a7d7ba; border-radius:9px; background:#edf9f1; color:#17643a; font-weight:700; }
.accounting-next-step { margin:0 0 10px; padding:10px 12px; border-left:4px solid #2f80ed; border-radius:7px; background:#edf5ff; color:#24486f; font-size:.88rem; }
.accounting-next-step strong { color:#173f73; }
.request-list { display:grid; gap:12px; margin-top:18px; }
.request-table-head { display:grid; grid-template-columns:112px 88px minmax(150px,1.7fr) minmax(105px,1fr) minmax(90px,.9fr) 135px 120px 24px; gap:8px; padding:0 14px; color:#64748b; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.02em; }
.request-card { display:grid; grid-template-columns:minmax(0,1fr); gap:0; border:1px solid #dde4ee; border-radius:10px; background:#fff; overflow:hidden; }
.request-compact { display:grid; grid-template-columns:112px 88px minmax(150px,1.7fr) minmax(105px,1fr) minmax(90px,.9fr) 135px 120px 24px; gap:8px; align-items:center; width:100%; min-height:62px; padding:10px 14px; border:0; border-radius:0; text-align:left; background:#fff; }
.request-compact:hover { background:#f5f9ff; }
.request-compact-code { color:#204f86; font-weight:800; white-space:nowrap; }
.request-compact-date, .request-compact-person, .request-compact-department { min-width:0; color:#52647d; font-size:.84rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-compact-purpose { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.request-status { display:inline-flex; align-items:center; justify-content:center; width:100%; max-width:100%; min-height:30px; padding:5px 8px; border-radius:8px; font-size:.68rem; font-weight:800; line-height:1.2; text-align:center; }
.request-status.neutral { color:#4b5f7a; background:#edf2f7; }
.request-status.waiting { color:#8a5800; background:#fff0c7; }
.request-status.approved { color:#125a91; background:#e0f1ff; }
.request-status.warning { color:#a32920; background:#ffe7e3; }
.request-status.done { color:#17643a; background:#e3f6e9; }
.request-compact-amount { text-align:right; color:#173f73; font-weight:800; white-space:nowrap; }
.request-compact-arrow { display:grid; place-items:center; color:#52647d; font-size:1.15rem; font-weight:800; transition:transform .15s ease; }
.request-card > .request-main, .request-card > .request-actions { display:none; }
.request-card.expanded > .request-main { display:grid; padding:14px; border-top:1px solid #e3e9f1; }
.request-card.expanded > .request-actions { display:flex; margin:0 14px 14px; }
.request-card.expanded .request-compact-arrow { transform:rotate(180deg); }
.request-card > div:first-child { display:grid; gap:6px; }
.request-card small { color:#69758b; }
.request-code { color:#204f86; font-weight:800; }
.request-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-start; padding-top:12px; border-top:1px solid #e3e9f1; }
.accounting-history { margin-top:10px; font-size:.86rem; color:#69758b; }
.accounting-history summary { cursor:pointer; font-weight:700; color:#21334d; }
.accounting-history div { display:flex; justify-content:space-between; gap:14px; padding:5px 0; border-bottom:1px solid #e5eaf1; }
.accounting-history small { display:block; }
.payment-items-editor { padding:14px; border:1px solid #d9e2ee; border-radius:10px; background:#fff; }
.payment-items-editor .section-heading { margin-bottom:10px; }
.payment-items-editor small { display:block; color:#69758b; margin-top:3px; }
.payment-item-head, .payment-item-row { display:grid; grid-template-columns:minmax(180px,2fr) minmax(150px,1.2fr) 80px 120px 120px 38px; gap:8px; align-items:center; }
.payment-item-head { padding:0 4px 6px; color:#69758b; font-size:.78rem; font-weight:700; }
.payment-item-row { margin:7px 0; }
.payment-item-row input, .payment-item-row select { min-width:0; }
.payment-item-row .pi-amount { text-align:right; color:#173f73; }
.pi-remove { padding:7px 10px; color:#a61b1b; }
.payment-total { margin-top:12px; text-align:right; font-size:1.05rem; }
.expense-lines, .document-panel { margin-top:8px; border:1px solid #e0e7f0; border-radius:9px; background:#f8fafc; }
.expense-lines summary, .document-panel summary { cursor:pointer; padding:9px 11px; font-weight:700; }
.expense-lines > div, .document-list > div { display:flex; justify-content:space-between; gap:12px; padding:8px 11px; border-top:1px solid #e3e9f1; }
.expense-lines small, .document-list small { display:block; }
.missing-docs { color:#c62828; }
.document-upload { display:grid; grid-template-columns:minmax(180px,1fr) minmax(260px,1.5fr) auto; gap:8px; align-items:stretch; padding:10px; border-top:1px solid #e3e9f1; }
.accounting-file-picker { display:flex; align-items:center; gap:10px; min-width:0; padding:6px; border:1px solid #cbd7e6; border-radius:8px; background:#fff; }
.accounting-file-picker button { flex:0 0 auto; }
.accounting-file-picker-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#52647d; font-size:.86rem; }
.document-upload-hint { grid-column:1 / -1; color:#69758b; }
.request-main { min-width:0; width:100%; }
.role-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.role-cards article { padding:14px; border:1px solid #dce4ef; border-radius:10px; background:#f8fafc; }
.role-cards small { display:block; margin-top:5px; color:#58708d; }
.role-cards p { color:#69758b; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.role-heading { margin:22px 0 8px; }
.role-cards .recommended-role { grid-column:1 / -1; border:2px solid #2f80ed; background:#edf5ff; }
.role-card-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.role-card-title span { padding:5px 9px; border-radius:999px; color:#145da0; background:#d8ebff; font-size:.74rem; font-weight:800; }
.role-cards article p { margin:8px 0 0; color:#52647d; font-size:.88rem; line-height:1.5; }
.ledger-tools { display:grid; grid-template-columns:150px 170px 170px minmax(220px,1fr); gap:10px; margin:14px 0; }
.ledger-tools label { display:grid; gap:5px; color:#52647d; font-size:.8rem; }
.ledger-table { min-width:880px; table-layout:fixed; }
.ledger-table th, .ledger-table td { overflow-wrap:normal; word-break:normal; }
.ledger-table th:nth-child(1), .ledger-table td:nth-child(1) { width:88px; white-space:nowrap; }
.ledger-table th:nth-child(2), .ledger-table td:nth-child(2) { width:108px; }
.ledger-table th:nth-child(3), .ledger-table td:nth-child(3) { width:auto; }
.ledger-table th:nth-child(4), .ledger-table td:nth-child(4), .ledger-table th:nth-child(5), .ledger-table td:nth-child(5) { width:105px; text-align:right; white-space:nowrap; }
.ledger-table th:nth-child(6), .ledger-table td:nth-child(6) { width:125px; text-align:right; white-space:nowrap; }
.ledger-table th:nth-child(7), .ledger-table td:nth-child(7) { width:145px; }
.ledger-table .request-status { width:auto; min-width:96px; white-space:normal; }
.ledger-reference { color:#204f86; font-weight:800; white-space:nowrap; }
.ledger-table td:nth-child(2) small { display:block; margin-top:3px; color:#52647d; }
.ledger-description { min-width:0; }
.ledger-description strong, .ledger-description span, .ledger-description small { display:block; }
.ledger-description strong { margin-bottom:3px; color:#172f4f; }
.ledger-description span { color:#52647d; line-height:1.35; }
.ledger-description small { margin-top:4px; color:#69758b; }
.ledger-row-actions { display:grid; gap:7px; justify-items:start; }
.ledger-row-actions > div { display:flex; flex-wrap:nowrap; gap:5px; }
.ledger-row-actions button { padding:7px 8px; white-space:nowrap; font-size:.78rem; }
.ledger-warning { margin:8px 0; padding:10px 12px; border-radius:8px; color:#805200; background:#fff4d6; }
.ledger-warning:empty { display:none; }
.ledger-negative { color:#b42318; font-weight:800; }
.ledger-positive { color:#17643a; font-weight:800; }
.app-dialog { width:min(520px,calc(100vw - 32px)); padding:0; border:0; border-radius:14px; box-shadow:0 24px 70px rgba(15,35,65,.28); }
.app-dialog::backdrop { background:rgba(11,25,48,.55); }
.app-dialog form { display:grid; gap:14px; padding:22px; }
.app-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.app-dialog-heading h3 { margin:0; }
.app-dialog-heading button { padding:4px 10px; border:0; font-size:1.5rem; background:transparent; }
.app-dialog #app-dialog-description { margin:0; color:#52647d; white-space:pre-line; }
.app-dialog-fields { display:grid; gap:12px; }
.app-dialog-fields label { display:grid; gap:6px; color:#21334d; font-weight:700; }
.app-dialog-fields label small { color:#69758b; font-weight:400; }
.app-dialog-actions { display:flex; justify-content:flex-end; gap:10px; }
@media (max-width:1100px) {
  .login-content { grid-template-columns:1fr; }
  .shell { grid-template-columns:1fr; }
  .sidebar { padding:14px 20px; }
  .brand { margin-bottom:10px; }
  .privacy { display:none; }
  nav { display:flex; flex-wrap:wrap; gap:6px; }
  .nav-item { flex:1 1 150px; text-align:center; padding:9px 12px; }
  main { max-width:none; padding:22px 20px 46px; }
  .panel { min-width:0; }
}
@media (max-width: 760px) {
  .sidebar { padding: 16px; }
  .brand { margin-bottom: 12px; }
  .privacy { display: none; }
  nav { grid-template-columns: 1fr 1fr; }
  main { padding: 22px 16px 40px; }
  header { align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .action-row { flex-direction: column; }
  .history-summary, .history-filters, #drive-center-summary { grid-template-columns: 1fr; }
  .user-form, .department-checks, .role-cards { grid-template-columns: 1fr; }
  .accounting-summary { grid-template-columns:1fr 1fr; }
  .accounting-list-tools { grid-template-columns:1fr; }
  .ledger-tools { grid-template-columns:1fr; }
  .ledger-table { min-width:0; }
  .ledger-table thead { display:none; }
  .ledger-table, .ledger-table tbody { display:block; width:100%; }
  .ledger-table tr { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; margin-bottom:12px; padding:14px; border:1px solid #dfe6f0; border-radius:10px; background:#fff; }
  .ledger-table td, .ledger-table td:nth-child(n) { display:block; width:auto; padding:0; border:0; text-align:left; white-space:normal; }
  .ledger-table td::before { content:attr(data-label); display:block; margin-bottom:4px; color:#69758b; font-size:.72rem; font-weight:700; text-transform:uppercase; }
  .ledger-table td:nth-child(3), .ledger-table td:nth-child(7) { grid-column:1 / -1; }
  .ledger-row-actions { grid-template-columns:auto 1fr; align-items:center; justify-items:start; }
  .accounting-list-tools label, .accounting-list-tools label:first-child { grid-column:auto; }
  .accounting-pagination { align-items:stretch; flex-direction:column; }
  .request-table-head { display:none; }
  .request-compact { grid-template-columns:1fr auto 22px; gap:7px 10px; padding:13px; }
  .request-compact-code, .request-compact-amount { font-size:.94rem; }
  .request-compact-date { text-align:right; }
  .request-compact-purpose, .request-compact-person, .request-compact-department, .request-status, .request-compact-amount { grid-column:1 / -1; text-align:left; }
  .request-compact-arrow { grid-column:3; grid-row:1; }
  .drive-center-toolbar, .drive-file, .drive-period-heading, .request-card { align-items: stretch; flex-direction: column; }
  .payment-item-head { display:none; }
  .payment-item-row { grid-template-columns:1fr 1fr; padding:10px; border:1px solid #e3e9f1; border-radius:8px; }
  .document-upload { grid-template-columns:1fr; }
  .drive-file-actions { justify-content: stretch; flex-direction: column; }
}
