:root { color-scheme: light; font-family: Inter, "Noto Sans Thai", sans-serif; color: #172033; background: #f5f7fb; }
* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 240px; padding: 24px 16px; background: #172a46; color: #dce7f7; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 8px 36px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #172a46; background: #8ee0c4; font-size: 12px; }
nav { display: grid; gap: 8px; }
.nav-item { border: 0; border-radius: 8px; padding: 12px 14px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.nav-item:hover, .nav-item.active { background: #2b466d; color: #fff; }
.main-content { flex: 1; min-width: 0; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 36px; background: #fff; border-bottom: 1px solid #e3e8f0; }
.eyebrow { display: block; color: #738198; font-size: 12px; margin-bottom: 4px; }
select { min-width: 260px; border: 1px solid #d5dce8; border-radius: 7px; padding: 9px 12px; color: #172033; background: #fff; }
.topbar-actions { color: #738198; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; background: #2fb37c; border-radius: 50%; }
.page { padding: 34px 36px; max-width: 1440px; }
.hidden { display: none; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
h1 { margin: 0; font-size: 26px; } h2 { margin: 0 0 8px; font-size: 19px; } p { color: #738198; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.card, .panel { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(31, 49, 79, .04); }
.metric-label { color: #738198; font-size: 13px; } .metric-value { display: block; margin-top: 8px; font-size: 26px; font-weight: 700; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.field { display: block; width: 100%; margin-top: 6px; border: 1px solid #d5dce8; border-radius: 7px; padding: 9px 12px; color: #172033; background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.journal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.journal-side-form { position: sticky; top: 18px; }
.record-count { color: #738198; font-size: 14px; font-weight: 500; }
.journal-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.journal-summary-card { display: grid; gap: 7px; padding: 15px 16px; border: 1px solid #e3e8f0; border-radius: 10px; background: #fff; color: #172033; text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(31, 49, 79, .04); }
.journal-summary-card:hover { border-color: #7c91b1; background: #f8fbff; }
.journal-summary-card span { color: #738198; font-size: 13px; }
.journal-summary-card strong { font-size: 22px; }
.journal-summary-card small { color: #738198; font-size: 12px; }
.coa-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.coa-summary-card { display: grid; gap: 7px; padding: 15px 16px; }
.coa-summary-card span, .coa-summary-card small { color: #738198; font-size: 12px; }
.coa-summary-card strong { font-size: 22px; }
.coa-side-panel { position: fixed; top: 0; right: 0; z-index: 11; width: min(520px, 100vw); height: 100vh; overflow-y: auto; padding: 24px; background: #fff; box-shadow: -12px 0 36px rgba(23, 32, 51, .18); }
.coa-side-panel.hidden { display: none; }
.coa-monitor { margin-bottom: 18px; }
.coa-monitor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; color: #738198; font-size: 13px; }
.coa-version-panel { margin-top: 16px; }
.coa-impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; color: #738198; font-size: 13px; }
.coa-impact-grid strong { display: block; margin-top: 4px; color: #172033; font-size: 18px; }
.coa-version-details { margin-top: 16px; }
.coa-version-details h3 { margin: 22px 0 8px; font-size: 15px; }
.coa-version-draft { background: #fff5d9; color: #8a6400; }
.coa-version-superseded, .coa-version-archived { background: #edf0f5; color: #738198; }
.coa-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.coa-tabs .active { border-color: #2b466d; color: #2b466d; }
.asset-summary { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.asset-summary .card { display: grid; gap: 8px; padding: 15px 16px; }
.asset-summary span { color: #738198; font-size: 12px; }
.asset-summary strong { font-size: 22px; }
.asset-side-panel { position: fixed; top: 0; right: 0; z-index: 11; width: min(520px, 100vw); height: 100vh; overflow-y: auto; padding: 24px; background: #fff; box-shadow: -12px 0 36px rgba(23, 32, 51, .18); }
.asset-side-panel.hidden { display: none; }
.asset-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; border-radius: 8px; background: #f5f7fb; color: #738198; font-size: 12px; }
.asset-preview span { display: grid; gap: 5px; }
.asset-preview strong { color: #172033; font-size: 15px; }
.asset-source-summary { display: grid; gap: 5px; margin-bottom: 16px; padding: 12px; border: 1px solid #e7c66b; border-radius: 8px; background: #fffdf4; color: #738198; font-size: 13px; }
.asset-source-summary strong { color: #172033; }
.asset-period { display: flex; align-items: center; gap: 6px; color: #738198; font-size: 13px; }
.asset-period .field { width: auto; min-width: 140px; }
.pending-assets { margin: 18px 0; border-color: #e7c66b; background: #fffdf4; }
.beginning-balance { margin-top: 18px; }
.beginning-balance table .field { min-width: 130px; margin: 0; text-align: right; }
.beginning-note { align-self: end; padding: 10px 0; }
.beginning-totals { display: flex; justify-content: flex-end; gap: 24px; align-items: center; margin-top: 16px; color: #738198; }
.beginning-totals strong { color: #172033; margin-left: 5px; }
.field-hint { margin: -6px 0 8px; padding: 0; border: 0; background: transparent; font-size: 12px; }
.journal-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.journal-toolbar .field { width: auto; margin: 0; }
.journal-search { flex: 1 1 220px; min-width: 180px; }
.journal-select { min-width: 180px; }
.table-scroll { overflow-x: auto; }
.table-link { padding: 0; border: 0; color: #2b466d; background: transparent; cursor: pointer; text-decoration: underline; }
.hidden-row { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: rgba(23, 32, 51, .45); }
.modal-backdrop.hidden { display: none; }
.journal-create-panel { position: fixed; top: 0; right: 0; z-index: 11; width: min(560px, 100vw); height: 100vh; overflow-y: auto; padding: 24px; background: #fff; box-shadow: -12px 0 36px rgba(23, 32, 51, .18); }
.journal-create-panel.hidden { display: none; }
.modal-card { width: min(860px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border-radius: 12px; background: #fff; box-shadow: 0 18px 60px rgba(23, 32, 51, .25); }
.modal-form { width: min(620px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.modal-header h2 { margin: 0; }
.icon-button { width: 32px; height: 32px; border: 1px solid #d5dce8; border-radius: 50%; background: #fff; color: #738198; font-size: 22px; line-height: 1; cursor: pointer; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; color: #738198; font-size: 13px; }
.journal-lines-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.journal-lines-header h3 { margin: 0; }
.journal-line-labels { display: grid; grid-template-columns: minmax(180px, 1fr) 100px 100px minmax(120px, 1fr) 34px; gap: 8px; margin-top: 12px; color: #738198; font-size: 12px; }
.journal-line { display: grid; grid-template-columns: minmax(180px, 1fr) 100px 100px minmax(120px, 1fr) 34px; gap: 8px; align-items: center; margin-top: 8px; }
.journal-line .field { margin: 0; }
.journal-totals { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 16px; color: #738198; font-size: 13px; }
.journal-totals strong { color: #172033; margin-left: 4px; }
.badge.balanced { background: #e7f7f0; color: #177b55; }
.inline-check { display: flex; gap: 8px; align-items: center; color: #738198; font-size: 13px; }
.attachment-placeholder { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: #738198; font-size: 13px; }
.side-panel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.single-column { grid-template-columns: 1fr; }
.full-width { width: 100%; margin-top: 16px; }
.form-message { margin-left: 12px; color: #b33b3b; font-size: 13px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.step { padding: 12px; border-radius: 7px; background: #f0f3f8; color: #738198; text-align: center; font-size: 13px; }
.step.active { color: #172a46; background: #dff5ed; font-weight: 600; }
.upload-box { min-height: 190px; display: grid; place-content: center; justify-items: center; gap: 12px; border: 1px dashed #aab8cb; border-radius: 10px; color: #738198; }
table { width: 100%; border-collapse: collapse; } th, td { padding: 13px 10px; border-bottom: 1px solid #edf0f5; text-align: left; font-size: 14px; } th { color: #738198; font-weight: 500; }
.nested-table { margin-top: 10px; min-width: 300px; background: #f8fafc; }
summary { cursor: pointer; color: #2b466d; font-size: 13px; }
.badge { display: inline-flex; border-radius: 99px; padding: 4px 9px; font-size: 12px; background: #e7f7f0; color: #177b55; }
.toolbar { display: flex; align-items: center; gap: 10px; } .button { border: 1px solid #cfd8e6; border-radius: 7px; padding: 9px 13px; background: #fff; cursor: pointer; } .button.primary { border-color: #2b466d; background: #2b466d; color: #fff; }
@media (max-width: 1000px) { .journal-layout { grid-template-columns: 1fr; } .journal-side-form { position: static; } .journal-summary, .coa-summary, .asset-summary { grid-template-columns: repeat(3, minmax(120px, 1fr)); } }
@media (max-width: 800px) { .sidebar { width: 72px; } .brand span:last-child, .nav-item { font-size: 0; } .nav-item::before { content: "•"; font-size: 22px; } .topbar, .page { padding-left: 18px; padding-right: 18px; } .cards, .form-grid, .journal-summary, .coa-summary, .asset-summary, .asset-preview { grid-template-columns: 1fr; } .journal-line-labels, .journal-line { grid-template-columns: 1fr 1fr 1fr 34px; } .journal-line-labels span:nth-child(4), .journal-line-description { grid-column: 1 / -1; } .journal-line-account { grid-column: 1 / -1; } select { min-width: 170px; } }
