:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #352f1f;
  background: #f9f7f1;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f9f7f1; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.brand { display: flex; align-items: center; gap: 10px; color: white; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { font-size: 24px; }
.brand span { color: #e7dabc; font-size: 14px; }
.eyebrow { color: #85620f; font-weight: 700; text-transform: uppercase; }

.login-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.login-header, .app-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(18px, 4vw, 54px);
  background: #383120;
  border-bottom: 3px solid #85620f;
}
.environment { padding: 7px 10px; border: 1px solid #8dcc00; color: white; font-size: 13px; font-weight: 600; }
.login-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .7fr); gap: clamp(30px, 7vw, 100px); align-items: center; width: min(1120px, 100%); margin: auto; padding: 50px 24px; }
.login-copy h1 { margin: 10px 0 20px; max-width: 700px; font-size: clamp(42px, 6vw, 72px); line-height: 1.02; letter-spacing: 0; }
.login-copy > p:not(.eyebrow) { max-width: 680px; color: #7c6c48; font-size: 19px; line-height: 1.55; }
.feature-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.feature-line span { padding: 8px 10px; border: 1px solid #dfd5bd; background: white; font-size: 13px; font-weight: 600; }
.login-box { padding: 34px; border: 1px solid #e2dac8; border-top: 4px solid #85620f; border-radius: 8px; background: white; box-shadow: 0 22px 60px rgba(56, 49, 32, .12); }
.login-mark { width: 60px; height: 60px; object-fit: contain; }
.login-box h2 { margin: 18px 0 8px; font-size: 25px; }
.login-box p { color: #81765b; line-height: 1.5; }
.login-box label { display: grid; gap: 6px; margin-top: 14px; color: #6c5a31; font-size: 12px; font-weight: 700; }
.login-box input { width: 100%; min-height: 43px; padding: 8px 10px; border: 1px solid #d3c8af; border-radius: 4px; color: #473e29; background: white; }
.login-box input:focus { outline: 2px solid #e1cc9b; border-color: #85620f; }
.certificate-file-control { position: relative; min-height: 43px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px; border: 1px solid #d3c8af; border-radius: 4px; background: white; overflow: hidden; }
.certificate-file-input { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none; }
.certificate-file-button { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #c7b68d; border-radius: 3px; color: #4c422c; background: #faf8f2; font-size: 12px; font-weight: 700; }
.certificate-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #83775a; font-size: 12px; font-weight: 500; }
.certificate-file-control:focus-within { outline: 2px solid #e1cc9b; border-color: #85620f; }
.login-box small { display: block; margin-top: 14px; color: #938870; }
.installed-certificate-flow { margin-top: 18px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px; border: 1px solid #e5dcc8; border-radius: 5px; background: #fcfaf5; }
.installed-certificate-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 5px; color: #85620f; background: #f7f1e2; font-family: "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif; font-size: 23px; }
.installed-certificate-flow div { min-width: 0; display: grid; gap: 4px; }
.installed-certificate-flow strong { color: #664e17; font-size: 14px; }
.installed-certificate-flow small { margin: 0; color: #8c826a; line-height: 1.35; }
.login-error { padding: 10px; border-left: 3px solid #d83b32; background: #fff1f0; color: #a32620 !important; }
.login-progress { margin: 14px 0 0; padding: 10px 11px; border-left: 3px solid #85620f; color: #705d31 !important; background: #faf6ed; font-size: 12px; }
.login-progress.error { border-left-color: #d83b32; color: #a32620 !important; background: #fff1f0; }
.primary-command { width: 100%; min-height: 44px; margin-top: 14px; border: 0; border-radius: 4px; color: white; background: #85620f; font-weight: 700; }
.primary-command:disabled { cursor: wait; opacity: .68; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 15px; }
.loading-screen img { width: 72px; height: 72px; }

.legal-access-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: #f9f7f1; }
.legal-access-main { width: min(1120px, calc(100vw - 40px)); margin: auto; padding: 42px 0; display: grid; grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); gap: clamp(30px, 6vw, 76px); align-items: center; }
.legal-access-copy h1 { margin: 8px 0 18px; max-width: 560px; color: #383120; font-size: clamp(38px, 5vw, 60px); line-height: 1.06; letter-spacing: 0; }
.legal-access-copy > p:not(.eyebrow) { max-width: 590px; color: #807250; font-size: 17px; line-height: 1.6; }
.legal-access-company { margin-top: 24px; padding: 16px 18px; display: grid; gap: 4px; border-left: 4px solid #85620f; background: #fff; box-shadow: 0 10px 28px rgba(56, 49, 32, .08); }
.legal-access-company strong { color: #473e29; }
.legal-access-company span { color: #8e8369; font-size: 13px; }
.legal-access-card { padding: 28px; display: grid; gap: 13px; border: 1px solid #e2dac7; border-top: 4px solid #85620f; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(56, 49, 32, .13); }
.legal-access-card h2 { margin: 4px 0 9px; color: #463d28; font-size: 25px; }
.legal-access-card p { margin: 0; }
.legal-access-card label { min-height: 50px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid #e9e4d7; border-radius: 5px; color: #716240; background: #fcfbf9; line-height: 1.45; }
.legal-access-card input { width: 17px; height: 17px; margin-top: 2px; accent-color: #85620f; }
.legal-access-card a { color: #85620f; font-weight: 700; }
.legal-access-card .form-message { margin: 0; }
.legal-access-exit { min-height: 40px; border: 1px solid #d7ceb8; border-radius: 4px; color: #6c5a31; background: #fff; font-weight: 700; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); }
.app-topbar { grid-column: 1 / -1; padding-inline: 16px 24px; }
.top-status { display: flex; align-items: center; gap: 8px; }
.top-status span { padding: 7px 9px; border: 1px solid #7a5d1a; color: white; font-size: 12px; font-weight: 600; }
.top-status span:first-child { border-color: #83c900; }
.top-status button { min-height: 34px; padding: 0 12px; border: 1px solid #e6d8b6; color: white; background: transparent; }
.sidebar { display: flex; flex-direction: column; gap: 5px; padding: 14px 8px; background: #383120; }
.nav-button { min-height: 42px; padding: 6px; border: 1px solid transparent; color: #f2e9d4; background: transparent; font-size: 12px; }
.nav-button:hover, .nav-button.active { border-color: #7d5e17; color: white; background: #85620f; }
.workspace { min-width: 0; padding: 26px clamp(18px, 3vw, 42px) 48px; overflow: auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 3px 0 5px; font-size: 34px; letter-spacing: 0; }
.page-heading p { margin: 0; color: #83775a; }
.breadcrumb { color: #846110 !important; font-size: 13px; }
.heading-status { display: flex; gap: 8px; }
.heading-status span, .record-count { padding: 8px 10px; border: 1px solid #e4d7b9; background: #f9f5ea; font-size: 12px; font-weight: 700; }
.heading-status span:last-child { border-color: #cce5a6; background: #f1f9e7; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; }
.summary-card { min-height: 140px; padding: 18px; display: grid; align-content: space-between; text-align: left; border: 1px solid #e5ddcb; border-radius: 6px; color: #473e29; background: white; }
.summary-card:hover { border-color: #85620f; box-shadow: 0 9px 24px rgba(56, 49, 32, .08); }
.summary-card span { font-weight: 650; }
.summary-card strong { color: #85620f; font-size: 32px; }
.summary-card small { color: #928566; }
.module-band { margin-top: 18px; padding: 26px; display: flex; justify-content: space-between; align-items: center; gap: 30px; border: 1px solid #e5dcc8; border-left: 4px solid #85620f; background: white; }
.module-band h2 { margin: 4px 0 8px; }
.module-band p { margin: 0; color: #83785d; }
.module-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.module-actions button { min-height: 38px; padding: 0 13px; border: 1px solid #d8caa9; color: #6f510c; background: #fcfbf8; font-weight: 650; }
.sync-status { margin-top: 14px; padding: 14px 18px; display: flex; justify-content: space-between; border: 1px solid #e8e0cf; background: #faf7ee; color: #7b6c49; font-size: 13px; }
.sync-status div { display: flex; gap: 14px; }
.conflict-panel { margin-top: 14px; border: 1px solid #e4b9b4; border-left: 4px solid #c84238; background: white; }
.conflict-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #eed8d5; background: #fff8f7; }
.conflict-panel h2 { margin: 3px 0 0; font-size: 19px; }
.conflict-panel header p { margin: 0; color: #b2352d; font-size: 10px; }
.conflict-panel header > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: white; background: #c84238; font-weight: 700; }
.conflict-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; border-bottom: 1px solid #f3f1ed; }
.conflict-row:last-child { border-bottom: 0; }
.conflict-row div { display: grid; gap: 3px; }
.conflict-row small { color: #8b8068; }
.conflict-row button { min-height: 34px; padding: 0 11px; border: 1px solid #e1dac9; color: #6e551b; background: white; }
.data-panel { border: 1px solid #e2dac8; border-radius: 6px; background: white; overflow: hidden; }
.data-toolbar { padding: 14px 16px; display: flex; justify-content: space-between; align-items: end; gap: 20px; border-bottom: 1px solid #eae5d8; background: #fcfbf8; }
.data-toolbar label { display: grid; gap: 5px; min-width: min(460px, 65vw); font-size: 12px; font-weight: 650; }
.data-toolbar input { min-height: 38px; padding: 0 11px; border: 1px solid #d3c8af; border-radius: 3px; background: white; }
.data-toolbar span { color: #90856c; font-size: 12px; }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.primary-small { min-height: 38px; padding: 0 14px; border: 0; border-radius: 4px; color: white; background: #85620f; font-weight: 700; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th { position: sticky; top: 0; padding: 12px 14px; text-align: left; color: #6b5c38; background: #f6f2ea; border-bottom: 1px solid #e2dac7; }
td { padding: 13px 14px; border-bottom: 1px solid #eeeae2; color: #635430; }
.actions-column { width: 150px; }
.row-actions { display: flex; gap: 7px; white-space: nowrap; }
.row-actions button { min-height: 30px; padding: 0 10px; border: 1px solid #d8caa9; border-radius: 3px; color: #75560d; background: white; }
.row-actions .danger-link { border-color: #efc5c2; color: #b3322b; }
.muted-cell { color: #a09680; font-size: 12px; }
tbody tr:nth-child(even) { background: #fcfbf9; }
tbody tr:hover { background: #faf5ea; }
.status-chip { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 13px; color: #12763b; background: #e4f6e9; font-weight: 650; }
.empty-state, .data-loading { min-height: 260px; display: grid; place-content: center; text-align: center; padding: 40px; color: #877c62; }
.editor-dialog { width: min(860px, calc(100vw - 28px)); max-height: calc(100vh - 34px); padding: 0; border: 1px solid #d9cfb9; border-radius: 7px; color: #473e29; background: white; box-shadow: 0 24px 70px rgba(56, 49, 32, .25); }
.editor-dialog::backdrop { background: rgba(37, 33, 22, .55); }
.contract-progress-dialog { width: min(980px, calc(100vw - 28px)); }
.contract-progress-shell { display: flex; max-height: calc(100vh - 38px); flex-direction: column; overflow: hidden; }
.contract-progress-shell > header { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 16px; border-bottom: 1px solid #e9e4d7; background: #fcfbf7; }
.contract-progress-shell > header h2 { margin: 2px 0 4px; color: #473e29; font-size: 20px; letter-spacing: 0; }
.contract-progress-shell > header p { margin: 0; color: #897d62; font-size: 12px; }
.contract-progress-shell .icon-close { width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 1px solid #d9d1bf; border-radius: 4px; color: #705d31; background: white; font-size: 21px; }
.contract-progress-overall { flex: 0 0 auto; padding: 15px 22px 10px; }
.contract-progress-overall > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; color: #6d5b31; font-size: 12px; }
.contract-progress-overall progress { width: 100%; height: 10px; overflow: hidden; border: 0; border-radius: 3px; background: #ede8dc; accent-color: #85620f; }
.contract-progress-overall progress::-webkit-progress-bar { background: #ede8dc; }
.contract-progress-overall progress::-webkit-progress-value { background: #85620f; transition: width .22s ease; }
.contract-progress-steps { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px 22px 14px; }
.contract-progress-step { min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px; border: 1px solid #e4dcca; border-radius: 5px; background: white; }
.contract-progress-step.done { border-color: #a7d7b3; background: #f3fbf5; }
.contract-progress-step.danger { border-color: #e6bbb8; background: #fff8f7; }
.contract-progress-step-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; color: #85620f; background: #f6f2e8; }
.contract-progress-step.done .contract-progress-step-icon { color: #19782e; background: #dff2e4; }
.contract-progress-step.danger .contract-progress-step-icon { color: #b72d29; background: #fde5e3; }
.contract-progress-step div { min-width: 0; }
.contract-progress-step strong, .contract-progress-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-progress-step strong { color: #655224; font-size: 12px; }
.contract-progress-step small { margin-top: 3px; color: #948a71; font-size: 10px; }
.contract-progress-step > b { color: #705d31; font-size: 11px; white-space: nowrap; }
.contract-progress-list { min-height: 150px; flex: 1 1 auto; overflow: auto; border-top: 1px solid #eae5d9; border-bottom: 1px solid #eae5d9; }
.contract-progress-row { display: grid; grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(130px, 1fr)); align-items: center; gap: 12px; min-height: 58px; padding: 8px 22px; border-bottom: 1px solid #efece4; background: white; }
.contract-progress-row:nth-child(even) { background: #fdfcf9; }
.contract-progress-row > div, .contract-progress-row > span { min-width: 0; }
.contract-progress-row strong, .contract-progress-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-progress-row strong { color: #655224; font-size: 12px; }
.contract-progress-row small { margin-top: 3px; color: #958b73; font-size: 10px; }
.contract-progress-row .status-chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.contract-progress-shell > footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 22px; background: #fcfbf7; }
.contract-progress-shell > footer > span { color: #8a7f64; font-size: 11px; }
.contract-progress-shell > footer > div { display: flex; gap: 8px; }
.contract-progress-shell > footer button { min-height: 36px; padding: 0 13px; border: 1px solid #d8ceb8; border-radius: 3px; color: #695119; background: white; font-weight: 650; }
.contract-progress-shell > footer button.primary-action { color: white; border-color: #85620f; background: #85620f; }
.pdf-preview-dialog { width: min(1120px, calc(100vw - 24px)); height: min(900px, calc(100dvh - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow: hidden; }
.pdf-preview-dialog[open] { display: grid; grid-template-rows: minmax(0, 1fr); }
.pdf-preview-shell { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; overflow: hidden; }
.pdf-preview-shell > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid #eae5d8; background: #fcfbf7; }
.pdf-preview-shell > header p { margin: 0 0 3px; color: #918568; font-size: 11px; }
.pdf-preview-shell > header h2 { max-width: min(720px, 66vw); margin: 0; color: #473e29; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-preview-actions { display: flex; align-items: center; gap: 8px; }
.pdf-preview-actions [data-pdf-download] { min-height: 36px; padding: 0 13px; border: 1px solid #85620f; border-radius: 4px; color: white; background: #85620f; font-weight: 700; }
.pdf-preview-shell iframe { width: 100%; height: 100%; min-height: 0; display: block; border: 0; background: #e9e5db; }
.editor-form header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid #eae5d8; background: #fcfbf7; }
.editor-form header h2 { margin: 3px 0 0; }
.editor-form header p { margin: 0; font-size: 11px; }
.dialog-close { width: 34px; height: 34px; border: 1px solid #d9d1bd; border-radius: 3px; color: #776844; background: white; font-size: 22px; line-height: 1; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; max-height: calc(100vh - 250px); padding: 22px 24px; overflow: auto; }
.editor-grid label { display: grid; align-content: start; gap: 6px; color: #6e5f3c; font-size: 12px; font-weight: 650; }
.editor-grid input, .editor-grid select, .editor-grid textarea { width: 100%; min-height: 39px; padding: 7px 10px; border: 1px solid #d3c8af; border-radius: 3px; color: #473e29; background: white; }
.editor-grid textarea { min-height: 108px; resize: vertical; }
.editor-grid input:focus, .editor-grid select:focus, .editor-grid textarea:focus { outline: 2px solid #dfca99; border-color: #85620f; }
.field-with-action .field-control-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.field-with-action .field-control-row select { min-width: 0; }
.field-action { min-height: 39px; padding: 0 14px; border: 1px solid #846110; border-radius: 3px; background: #fbf7ef; color: #4c422b; font-weight: 700; white-space: nowrap; }
.field-action:hover { background: #f7f0e0; }
.field-hint { min-height: 16px; color: #846d38; font-size: 11px; font-weight: 550; }
.quick-client-dialog { width: min(920px, calc(100vw - 28px)); }
.wide-field { grid-column: 1 / -1; }
.editor-form footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 24px; border-top: 1px solid #eae5d8; background: #fcfbf8; }
.secondary-command, .compact-command { width: auto; min-width: 130px; min-height: 40px; padding: 0 15px; border-radius: 4px; }
#fiscal-form .fiscal-submit-actions { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 220px)); align-items: stretch; }
#fiscal-submit-progress { grid-column: 1; align-self: center; color: #746647; font-size: 13px; }
.fiscal-address-warning { margin: 0; padding: 9px 24px; color: #7a520b; background: #fff6dc; font-size: 12px; line-height: 1.4; }
#fiscal-form .fiscal-submit-actions button { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 16px; line-height: 1.35; white-space: normal; }
#cancel-fiscal { grid-column: 2; }
#submit-fiscal { grid-column: 3; }
#fiscal-form .fiscal-submit-actions button:disabled { cursor: wait; opacity: .7; }
@media (max-width: 560px) {
  #fiscal-form .fiscal-submit-actions { padding: 12px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fiscal-submit-progress { grid-column: 1 / -1; }
  #cancel-fiscal { grid-column: 1; }
  #submit-fiscal { grid-column: 2; }
}
.secondary-command { border: 1px solid #d3c8af; color: #655224; background: white; }
.danger-command { width: auto; min-width: 190px; min-height: 40px; padding: 0 15px; border: 0; border-radius: 4px; color: white; background: #bd342d; font-weight: 700; }
.form-message { margin: 0 24px 14px; padding: 10px 12px; border-left: 3px solid #d83b32; color: #9e2923; background: #fff0ef; }
.report-actions { display: flex; gap: 8px; }
.report-actions button { min-height: 40px; padding: 0 14px; border: 1px solid #d8caa9; border-radius: 4px; color: #6f510c; background: white; font-weight: 650; }
.report-actions .primary-small { border: 0; color: white; background: #85620f; }
.report-panel .data-toolbar { align-items: end; justify-content: flex-start; }
.report-panel .data-toolbar label:first-child { min-width: 240px; }
.report-panel select { min-height: 38px; padding: 0 10px; border: 1px solid #d3c8af; border-radius: 3px; background: white; }
.report-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; border-bottom: 1px solid #eae5d8; color: #8b7f63; font-size: 12px; }
.report-meta strong { color: #473e29; }

.fiscal-heading-actions { display: flex; gap: 8px; }
.fiscal-heading-actions button { min-height: 40px; padding: 0 14px; border: 1px solid #d8caa9; border-radius: 4px; color: #6f510c; background: white; font-weight: 650; }
.fiscal-heading-actions .primary-small { border: 0; color: white; background: #85620f; }
.fiscal-summary { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fiscal-summary-card { min-height: 86px; padding: 14px 16px; display: grid; align-content: space-between; border: 1px solid #e5ddcb; border-left: 4px solid #96855d; border-radius: 5px; background: white; }
.fiscal-summary-card span { color: #84785c; font-size: 12px; font-weight: 650; }
.fiscal-summary-card strong { color: #463d29; font-size: 26px; }
.fiscal-summary-card.processing { border-left-color: #85620f; }
.fiscal-summary-card.succeeded { border-left-color: #169b22; }
.fiscal-summary-card.rejected { border-left-color: #d83b32; }
.fiscal-return { max-width: 360px; color: #83785d; overflow-wrap: anywhere; word-break: break-word; }
.fiscal-status { white-space: nowrap; }
.fiscal-status.pending, .fiscal-status.retry_wait { color: #9a5b00; background: #fff1d5; }
.fiscal-status.leased, .fiscal-status.processing { color: #85620f; background: #f8f2e3; }
.fiscal-status.rejected, .fiscal-status.failed { color: #b12e28; background: #fde7e5; }
.fiscal-dialog { width: min(1040px, calc(100vw - 28px)); }
.fiscal-editor-body { max-height: calc(100vh - 230px); padding: 18px 22px; overflow: auto; background: #fcfbf7; }
.fiscal-editor-body fieldset { margin: 0 0 14px; padding: 0; border: 1px solid #e5ddcb; border-radius: 5px; background: white; }
.fiscal-editor-body fieldset:last-child { margin-bottom: 0; }
.fiscal-editor-body legend { margin-left: 14px; padding: 0 7px; color: #78580d; font-size: 13px; font-weight: 700; }
.fiscal-grid { max-height: none; padding: 16px; }
.fiscal-grid textarea { min-height: 82px; resize: vertical; }
.fiscal-grid input, .fiscal-grid select, .fiscal-grid textarea { width: 100%; padding: 8px 10px; border: 1px solid #d3c8af; border-radius: 3px; color: #473e29; background: white; }
.fiscal-grid input, .fiscal-grid select { min-height: 39px; }
.fiscal-grid input:focus, .fiscal-grid select:focus, .fiscal-grid textarea:focus { outline: 2px solid #dfca99; border-color: #85620f; }
.municipal-retention-status { min-height: 42px; display:flex; align-items:center; padding:10px 12px; border:1px solid #e4dcc9; border-left-width:4px; border-radius:5px; color:#6a5a36; background:#fcfaf6; font-size:12px; line-height:1.45; }
.municipal-retention-status.checking { border-left-color:#7c5e18; color:#816013; background:#fbf8f2; }
.municipal-retention-status.ready { border-left-color:#58a91e; color:#286d20; background:#f2faed; }
.municipal-retention-status.warning { border-left-color:#e49a18; color:#855b0d; background:#fff8e9; }
.municipal-retention-status.error { border-left-color:#d83b32; color:#92251f; background:#fff1f0; }
.timeline-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid #e9e4d7; background: #fcfbf7; }
.timeline-dialog header h2 { margin: 3px 0 9px; }
.timeline-dialog header p { margin: 0; font-size: 10px; }
.timeline-list { max-height: min(560px, calc(100vh - 190px)); padding: 20px 24px; overflow: auto; }
.timeline-list article { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; min-height: 82px; }
.timeline-list article::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: -4px; width: 1px; background: #ddd3bd; }
.timeline-list article:last-child::before { display: none; }
.timeline-list article > span { z-index: 1; width: 15px; height: 15px; margin-top: 2px; border: 3px solid white; border-radius: 50%; background: #85620f; box-shadow: 0 0 0 1px #bba572; }
.timeline-list strong { display: block; color: #473e29; }
.timeline-list p { margin: 4px 0; color: #83775c; }
.timeline-list time { color: #9b917a; font-size: 11px; }

.vault-state { align-self: center; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid #e4c78b; border-radius: 17px; color: #8a5700; background: #fff5df; font-size: 12px; font-weight: 700; }
.vault-state.ready { border-color: #9ed2a7; color: #176d2e; background: #e9f7eb; }
.vault-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 16px; }
.vault-status-card, .vault-import-card { padding: 22px; border: 1px solid #e2dac8; border-radius: 6px; background: white; }
.vault-status-card h2, .vault-import-card h2 { margin: 4px 0 16px; color: #453c27; }
.vault-status-card > p:not(.eyebrow) { max-width: 680px; color: #84785d; line-height: 1.55; }
.vault-status-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.vault-status-card dl div { min-width: 0; padding: 13px; border: 1px solid #eae5d8; background: #fcfbf8; }
.vault-status-card dt { color: #90856b; font-size: 11px; }
.vault-status-card dd { margin: 5px 0 0; color: #473e29; font-weight: 700; overflow-wrap: anywhere; }
.vault-security { display: grid; gap: 5px; margin-top: 20px; padding: 14px; border-left: 4px solid #85620f; color: #807252; background: #f9f6ee; }
.vault-security strong { color: #49402a; }
.vault-import-card { display: grid; align-content: start; gap: 13px; }
.vault-import-card .eyebrow, .vault-import-card h2 { margin-bottom: 0; }
.vault-import-card label { display: grid; gap: 6px; color: #6d5d39; font-size: 12px; font-weight: 700; }
.vault-import-card input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #d3c8af; border-radius: 3px; color: #473e29; background: white; }
.vault-import-card input:focus { outline: 2px solid #dfca99; border-color: #85620f; }
.vault-import-card .form-message { margin: 0; }
.vault-import-card small { color: #90856b; line-height: 1.45; }

@media print {
  @page { size: A4 landscape; margin: 9mm; }
  .app-topbar, .sidebar, .report-actions, .data-toolbar, .report-filter-surface { display: none !important; }
  html, body, .app-shell, .workspace { width: 100%; min-width: 0; display: block; min-height: auto; margin: 0; background: white; }
  body { font-size: 8pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .workspace { padding: 0; overflow: visible; }
  .report-heading { margin: 0 0 14px; }
  .report-panel { width: 100%; margin: 0; border: 0; overflow: visible; }
  .table-wrap { overflow: visible; }
  .report-panel .report-table { width: 100%; min-width: 0; table-layout: fixed; }
  .report-table thead { display: table-header-group; }
  .report-table th { position: static; padding: 5px; font-size: 7pt; white-space: normal; }
  .report-table td { padding: 5px; font-size: 7pt; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .report-table tr { break-inside: avoid; page-break-inside: avoid; }
}

@media (max-width: 800px) {
  .legal-access-main { grid-template-columns: 1fr; width: min(680px, calc(100vw - 28px)); padding: 28px 0; }
  .legal-access-copy h1 { font-size: 38px; }
  .legal-access-card { padding: 20px; }
}

@media (max-width: 980px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .module-band { align-items: flex-start; flex-direction: column; }
  .fiscal-summary { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .vault-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-main { grid-template-columns: 1fr; padding-top: 30px; }
  .login-copy h1 { font-size: 42px; }
  .environment, .brand span, .top-status span { display: none; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 64px auto minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px; }
  .nav-button { min-width: 0; }
  .workspace { padding: 20px 14px 40px; }
  .page-heading { flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .data-toolbar label { min-width: 100%; }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .report-actions { width: 100%; flex-direction: column; }
  .fiscal-heading-actions { width: 100%; flex-direction: column; }
  .editor-grid { grid-template-columns: 1fr; }
  .field-with-action .field-control-row { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .conflict-row { align-items: stretch; flex-direction: column; }
  .vault-status-card dl { grid-template-columns: 1fr; }
  .pdf-preview-dialog { width: calc(100vw - 10px); height: calc(100dvh - 10px); max-height: calc(100dvh - 10px); }
  .pdf-preview-shell > header { gap: 10px; padding: 10px 12px; }
  .pdf-preview-shell > header > div:first-child { min-width: 0; }
  .pdf-preview-shell > header h2 { max-width: calc(100vw - 190px); font-size: 14px; }
  .pdf-preview-actions [data-pdf-download] { min-height: 34px; padding: 0 10px; }
}

@media (max-width: 460px) {
  .summary-grid { grid-template-columns: 1fr; }
  .fiscal-summary { grid-template-columns: 1fr 1fr; }
  .login-copy h1 { font-size: 36px; }
  .certificate-file-control { grid-template-columns: 1fr; }
  .certificate-file-button { width: 100%; }
  .pdf-preview-shell > header h2 { max-width: calc(100vw - 150px); }
  .pdf-preview-actions [data-pdf-download] { width: 38px; overflow: hidden; color: transparent; padding: 0; position: relative; }
  .pdf-preview-actions [data-pdf-download]::after { content: '\2193'; position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 20px; }
}

/* Desktop parity shell */
.mdl-icon { font-family: "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif; font-style: normal; font-weight: 400; }
.desktop-shell { min-height: 100vh; display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: 62px minmax(0, 1fr); background: #faf8f2; transition: grid-template-columns .18s ease; }
.desktop-shell.menu-expanded { grid-template-columns: 232px minmax(0, 1fr); }
.desktop-topbar { grid-column: 1 / -1; z-index: 10; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 14px; color: white; background: #2f291b; border-bottom: 3px solid #85620f; }
.desktop-brand { min-width: max-content; }
.desktop-brand img { width: 44px; height: 44px; }
.desktop-brand strong { font-size: 23px; }
.desktop-brand small { align-self: flex-end; margin: 0 0 3px 3px; color: #d4b878; font-size: 10px; }
.desktop-top-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-pill, .header-command { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #85620f; border-radius: 4px; color: white; background: transparent; font-size: 12px; font-weight: 650; white-space: nowrap; }
.header-pill.production { border-color: #82c900; }
.header-pill.company { max-width: 330px; overflow: hidden; text-overflow: ellipsis; }
.adn-header-status { cursor: pointer; font-family: inherit; }
.adn-header-status.ready { border-color: #72bd49; }
.adn-header-status.working, .adn-header-status.waiting { border-color: #f3bc55; }
.adn-header-status.failed { border-color: #ef7a73; }
.adn-header-status.working .mdl-icon { animation: adn-spin 1.2s linear infinite; }
.header-command { cursor: pointer; }
.header-command.accent { border-color: #83ca00; }
.desktop-sidebar { min-height: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 4px; overflow: hidden auto; color: white; background: #2f291b; scrollbar-width: thin; scrollbar-color: #a4946f transparent; }
.desktop-nav { flex: 0 0 auto; width: 100%; min-height: 40px; display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; padding: 0; border: 1px solid transparent; border-radius: 3px; color: #f8f2e5; background: transparent; text-align: left; }
.desktop-nav .mdl-icon { display: grid; place-items: center; font-size: 17px; }
.desktop-nav .nav-label { min-width: 0; padding-right: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity .15s ease; }
.menu-expanded .desktop-nav .nav-label { opacity: 1; }
.desktop-nav:hover { border-color: #806014; background: #403724; }
.desktop-nav.active { border-color: #7a5d1a; color: white; background: #85620f; }
.desktop-nav.toggle { margin-bottom: 4px; border-color: #806014; }
.desktop-nav-section { display: none; padding: 12px 12px 4px; color: #bba46d; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.menu-expanded .desktop-nav-section { display: block; }
.desktop-nav-spacer { flex: 1 1 auto; min-height: 8px; }
.desktop-workspace { min-width: 0; min-height: 0; padding: 0 0 62px; overflow: auto; }
.desktop-page-heading { min-width: 0; min-height: 122px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 18px 28px 16px; border-bottom: 1px solid #e6dfd0; background: white; }
.desktop-page-heading h1 { margin: 11px 0 3px; color: #352f1f; font-size: 29px; line-height: 1.15; letter-spacing: 0; }
.desktop-page-heading p { margin: 0; color: #85795c; font-size: 13px; }
.desktop-breadcrumb { display: flex; align-items: center; gap: 8px; min-height: 20px; color: #9c7d34; font-size: 12px; }
.desktop-breadcrumb button { padding: 0; border: 0; color: #846110; background: transparent; }
.desktop-breadcrumb strong { color: #655227; }
.page-heading-actions { align-self: center; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.soft-pill { min-height: 35px; display: inline-flex; align-items: center; padding: 0 13px; border: 1px solid #e8dab9; border-radius: 4px; color: #4d432c; background: #faf5eb; font-size: 12px; font-weight: 650; }
.soft-pill.success { border-color: #c9e6a7; color: #446d0b; background: #f3fae9; }
.toolbar-button { min-height: 38px; padding: 0 13px; border: 1px solid #d3c8af; border-radius: 3px; color: #6d5316; background: white; font-weight: 650; }
.toolbar-button:hover { border-color: #85620f; color: #75560d; background: #fbf8f2; }

.today-panel { margin: 18px auto 12px; width: min(1240px, calc(100% - 38px)); min-height: 148px; display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; border: 1px solid #e6ddc7; border-left: 4px solid #836111; border-radius: 5px; background: white; box-shadow: 0 5px 18px rgba(53, 47, 31, .045); }
.today-panel.critical { border-color: #e7c690; border-left-color: #d98216; background: #fffdf8; }
.today-panel.critical .today-icon { background: #d98216; }
.today-panel.dismissed { display: none; }
.today-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: white; background: #846110; font-size: 24px; }
.today-copy > div:first-child { display: flex; justify-content: space-between; gap: 15px; }
.today-copy .eyebrow { margin: 0; font-size: 11px; }
.today-copy time { color: #9a907a; font-size: 11px; }
.today-copy h2 { margin: 8px 0 3px; color: #453c27; font-size: 20px; }
.today-copy > p { margin: 0; color: #82775d; }
.today-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.today-chips button { min-height: 31px; padding: 0 10px; border: 1px solid #e5ddc9; border-radius: 16px; color: #725e31; background: #fcfbf7; font-size: 11px; }
.today-chips button .mdl-icon { margin-right: 5px; font-size: 13px; }
.today-chips button.attention { border-color: #e6bd7c; color: #8b520b; background: #fff5e5; font-weight: 700; }
.today-chips button.ready { border-color: #bcdca6; color: #3e6d22; background: #f3faee; }
.today-chips b { margin-left: 5px; color: #85620f; }
.today-actions { min-width: 150px; display: grid; gap: 7px; }
.today-actions button { min-height: 34px; border: 1px solid #dad0ba; border-radius: 3px; color: #6e5c31; background: white; font-size: 12px; font-weight: 650; }
.today-actions .primary-small { color: white; border: 0; background: #85620f; }

.home-module-list, .home-owner-module { width: min(1240px, calc(100% - 38px)); margin: 12px auto; overflow: hidden; border: 1px solid #e2dac8; border-radius: 5px; background: white; box-shadow: 0 5px 18px rgba(53, 47, 31, .035); }
.home-owner-module { margin-top: 10px; border-color: #dfd5bd; }
.home-module-row { position: relative; width: 100%; min-width: 0; min-height: 82px; display: grid; grid-template-columns: 52px minmax(260px, 1fr) minmax(0, auto) 34px; align-items: center; gap: 16px; padding: 13px 20px; border: 0; border-bottom: 1px solid #ebe6dc; color: #433a26; background: white; text-align: left; transition: background-color .16s ease, box-shadow .16s ease; }
.home-module-row:last-child { border-bottom: 0; }
.home-module-row:hover, .home-module-row:focus-visible { z-index: 1; outline: 0; background: #fcfbf7; box-shadow: inset 4px 0 #836111; }
.home-module-row.principal { box-shadow: inset 4px 0 #85620f; background: #fefdfb; }
.home-module-row.principal:hover, .home-module-row.principal:focus-visible { background: #fcf9f2; box-shadow: inset 5px 0 #85620f; }
.home-module-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 5px; color: #836110; background: #f9f4e9; font-size: 27px; }
.home-module-row.client .home-module-icon { color: #6ba900; background: #f0f9df; }
.home-module-row.nfse .home-module-icon { color: #85620f; background: #f6f0e3; }
.home-module-row.report .home-module-icon { color: #745b20; background: #faf6ec; }
.home-module-row.finance .home-module-icon { color: #75a900; background: #f1f8e4; }
.home-module-row.settings .home-module-icon { color: #897f68; background: #f4f2ee; }
.home-module-row.help .home-module-icon { color: #85620f; background: #faf5ea; }
.home-module-row.admin .home-module-icon { color: #7b5e19; background: #f8f4e9; }
.home-module-copy { min-width: 0; display: grid; gap: 5px; }
.home-module-copy strong { color: #433a26; font-size: 16px; line-height: 1.25; }
.home-module-copy small { color: #80755a; font-size: 12px; line-height: 1.38; overflow-wrap: anywhere; }
.home-module-meta { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.home-module-meta:empty { display: none; }
.home-module-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; color: #85620f; font-size: 11px; font-weight: 650; }
.home-module-meta em { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #d6c59c; border-radius: 3px; color: #805e0e; background: #fbf8f0; font-size: 10px; font-style: normal; font-weight: 700; }
.home-module-arrow { grid-column: 4; width: 100%; align-self: center; justify-self: end; color: #7c5e18; font-family: 'Segoe MDL2 Assets'; font-size: 20px; text-align: center; transition: transform .16s ease; }
.home-module-row:hover .home-module-arrow { transform: translateX(3px); }

.desktop-module-grid { width: min(1000px, calc(100% - 38px)); margin: 12px auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.desktop-module-grid > .desktop-module-card:nth-child(7) { grid-column: 2; }
.desktop-module-card { position: relative; min-width: 0; min-height: 176px; display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 0 16px; padding: 20px; border: 1px solid #e2dac8; border-radius: 5px; color: #433a26; background: white; text-align: left; }
.desktop-module-card:hover { border-color: #836111; box-shadow: 0 9px 24px rgba(56, 49, 32, .08); transform: translateY(-1px); }
.desktop-module-card.principal { border: 2px solid #85620f; }
.module-icon { grid-row: 1 / span 2; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 7px; color: #836110; background: #f9f4e9; font-size: 30px; }
.desktop-module-card.lime .module-icon { color: #83bf00; background: #f0f9df; }
.desktop-module-card.gray .module-icon { color: #887e66; background: #f5f3f0; }
.desktop-module-card.cyan .module-icon { color: #85610f; background: #faf5eb; }
.module-content { min-width: 0; display: grid; align-content: start; gap: 7px; }
.module-content strong { padding-right: 5px; font-size: 18px; line-height: 1.28; }
.module-content small { color: #80755a; line-height: 1.42; }
.module-content em { position: absolute; top: 10px; right: 10px; padding: 4px 7px; border-radius: 3px; color: white; background: #85620f; font-size: 10px; font-style: normal; }
.module-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; margin-top: 4px; color: #85620f; font-size: 11px; }
.module-arrow { grid-column: 2; align-self: end; justify-self: end; color: #7c5e18; font-size: 32px; font-weight: 300; }
.admin-home-card { width: min(600px, calc(100% - 38px)); min-height: 82px; margin: 10px auto; display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: 1px solid #dfd8c7; border-radius: 4px; color: #463d28; background: white; text-align: left; }
.admin-home-card > .mdl-icon { color: #7c5e18; font-size: 28px; }
.admin-home-card span:last-child { display: grid; gap: 4px; }
.admin-home-card small { color: #867b61; }
.quick-actions { position: sticky; bottom: 0; z-index: 4; width: calc(100% - 26px); min-height: 58px; margin: 12px 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border: 1px solid #e4dccb; border-radius: 4px; background: rgba(255, 255, 255, .97); box-shadow: 0 -4px 14px rgba(56, 49, 32, .05); }
.quick-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions button { min-height: 34px; padding: 0 16px; border: 1px solid #dcd4c2; border-radius: 3px; color: #6e551c; background: white; font-size: 11px; font-weight: 650; }

.nfse-menu-grid { width: min(1050px, calc(100% - 38px)); margin: 22px auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nfse-menu-grid .desktop-module-card:first-child { grid-column: 1 / -1; min-height: 160px; }
.form-surface, .filter-surface, .compact-summary, .action-ribbon, .split-data-view, .invoice-layout, .invoice-filters, .report-filter-surface, .settings-grid, .license-banner, .plan-grid, .finance-history, .help-layout, .support-layout, .support-history, .admin-tabs { width: calc(100% - 38px); margin-left: auto; margin-right: auto; }
.form-surface { margin-top: 18px; border: 1px solid #e2dac8; border-radius: 5px; background: white; }
.form-surface > header { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #e9e4d8; background: #fcfbf8; }
.form-surface > header .section-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 5px; color: #84610f; background: #f8f3e7; font-size: 24px; }
.form-surface > header div:nth-child(2) { min-width: 0; flex: 1; }
.form-surface > header h2 { margin: 0; font-size: 20px; }
.form-surface > header p { margin: 4px 0 0; color: #857a60; }
.detail-section { padding: 18px 22px; border-bottom: 1px solid #eeeae2; }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 { margin: 0 0 13px; color: #7e5c0e; font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.detail-grid div { min-width: 0; padding: 11px 12px; border: 1px solid #ebe6dc; background: #fefdfb; }
.detail-grid div.wide { grid-column: span 2; }
.detail-grid dt { color: #938973; font-size: 10px; text-transform: uppercase; }
.detail-grid dd { margin: 5px 0 0; color: #5f4c21; font-weight: 650; overflow-wrap: anywhere; }

.filter-surface, .invoice-filters { margin-top: 14px; display: flex; align-items: flex-end; gap: 10px; padding: 13px; border: 1px solid #e4dccb; border-radius: 4px; background: white; }
.search-field { min-width: 0; flex: 1; display: flex; align-items: center; border: 1px solid #d2c7ae; border-radius: 3px; background: white; }
.search-field .mdl-icon { width: 40px; display: grid; place-items: center; color: #867753; }
.search-field input { width: 100%; min-height: 38px; padding: 0 10px 0 0; border: 0; outline: 0; }
.filter-surface select, .invoice-filters select, .invoice-filters input { min-height: 38px; padding: 0 10px; border: 1px solid #d2c7ae; border-radius: 3px; background: white; }
.invoice-filters label { display: grid; gap: 5px; color: #6a5b39; font-size: 11px; font-weight: 650; }
.invoice-filters label.grow { min-width: 260px; flex: 1; }
.report-filter-surface { margin-top: 14px; display: flex; align-items: flex-end; gap: 10px; padding: 13px; border: 1px solid #e4dccb; border-radius: 4px; background: white; }
.report-filter-surface label { min-width: 120px; display: grid; gap: 5px; color: #6a5b39; font-size: 11px; font-weight: 650; }
.report-filter-surface label:first-child { min-width: 175px; }
.report-filter-surface label.grow { min-width: 240px; flex: 1; }
.report-filter-surface select, .report-filter-surface input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #d2c7ae; border-radius: 3px; background: white; }
.report-summary { margin-bottom: 12px; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.report-panel { width: calc(100% - 38px); margin: 0 auto 20px; }
.report-panel .report-table { min-width: 1280px; }
.compact-summary { display: grid; gap: 10px; margin-top: 12px; }
.compact-summary.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-summary.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.compact-summary.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.compact-summary article { min-width: 0; min-height: 82px; display: grid; align-content: space-between; padding: 13px 15px; border: 1px solid #e3dbca; border-radius: 4px; background: white; }
.compact-summary span { color: #84795e; font-size: 11px; }
.compact-summary strong { color: #443b27; font-size: 20px; overflow-wrap: anywhere; }
.success-text { color: #169224 !important; }
.warning-text { color: #e26b00 !important; }
.danger-text { color: #d52222 !important; }
.split-data-view, .invoice-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 12px; margin-top: 12px; }
.split-data-view .data-panel, .invoice-layout .data-panel { min-width: 0; }
.premium-grid { border-radius: 4px; box-shadow: 0 3px 14px rgba(56, 49, 32, .035); }
.premium-grid table { min-width: 760px; }
.premium-grid th { height: 42px; padding: 10px 12px; color: #6b5a31; background: #f7f4ed; }
.premium-grid th:has(.invoice-sort-button) { padding: 0; }
.invoice-sort-button { width: 100%; min-height: 42px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; color: inherit; background: transparent; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.invoice-sort-button:hover, .invoice-sort-button:focus-visible { color: #7b5a0e; background: #f6f0e2; outline: 0; }
.invoice-sort-button span { color: #9d9279; font-size: 14px; line-height: 1; }
.invoice-sort-button.active { color: #7b5a0e; background: #f8f3e7; }
.invoice-sort-button.active span { color: #85620f; }
.premium-grid td { height: 54px; padding: 10px 12px; background: white; }
.premium-grid tbody tr:nth-child(even) td { background: #fdfcf9; }
.premium-grid tbody tr:hover td { background: #faf5ea; }
.premium-grid tbody tr[data-contract-row] { cursor: pointer; }
.premium-grid td strong, .premium-grid td small { display: block; }
.premium-grid td small { margin-top: 4px; color: #958b75; font-size: 10px; }
.check-column { width: 42px; text-align: center; }
.record-preview { min-width: 0; align-self: start; border: 1px solid #e2dac8; border-radius: 4px; background: white; overflow: hidden; }
.record-preview > header { display: flex; justify-content: space-between; gap: 12px; padding: 17px; border-bottom: 1px solid #eae6dc; background: #fcfbf8; }
.record-preview header .eyebrow { margin: 0 0 5px; font-size: 10px; }
.record-preview h2 { margin: 0; color: #433b27; font-size: 18px; overflow-wrap: anywhere; }
.record-preview header span { display: block; margin-top: 5px; color: #877c63; font-size: 11px; }
.record-preview header button, .preview-actions button { min-height: 31px; padding: 0 10px; border: 1px solid #dad0b8; border-radius: 3px; color: #745714; background: white; }
.record-preview > section { padding: 14px 17px; border-bottom: 1px solid #eeebe3; }
.record-preview > section:last-child { border-bottom: 0; }
.record-preview h3 { margin: 0 0 8px; color: #715d2f; font-size: 12px; }
.record-preview p { margin: 4px 0; color: #867b60; line-height: 1.4; }
.preview-empty { min-height: 330px; display: grid; place-content: center; justify-items: center; padding: 28px; color: #8d836a; text-align: center; }
.preview-empty .mdl-icon { color: #735a21; font-size: 38px; }
.preview-empty h2 { margin: 14px 0 3px; }
.preview-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.preview-columns div { min-width: 0; display: grid; gap: 3px; }
.preview-columns span { color: #968d77; font-size: 10px; }
.preview-columns strong { color: #645021; font-size: 12px; overflow-wrap: anywhere; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.action-ribbon { margin-top: 12px; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #e4dcca; border-radius: 4px; background: white; }
.action-ribbon > div { display: flex; flex-wrap: wrap; gap: 7px; }
.action-ribbon button { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d7cdb7; border-radius: 3px; color: #6b5217; background: white; font-size: 11px; font-weight: 650; }
.action-ribbon button.primary-action { color: white; border-color: #85620f; background: #85620f; }
.action-ribbon button.success { color: #19782e; border-color: #9fcfaa; background: #eff9f1; }
.action-ribbon button.danger { color: #b72d29; border-color: #e8bbb8; background: #fff8f7; }
.action-ribbon button[hidden] { display: none; }
.action-ribbon > span { min-width: 180px; max-width: 400px; color: #8c8166; font-size: 11px; text-align: right; }
.fiscal-actions { align-items: flex-start; }
.fiscal-actions > div { flex: 1; }
.invoice-action-ribbon { min-height: 0; display: grid; gap: 0; padding: 0; overflow: visible; }
.invoice-action-ribbon > .invoice-action-row { width: 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 12px; }
.invoice-action-ribbon > .invoice-selection-actions { background: #f9f6ee; border-top: 1px solid #e0d4b8; }
.invoice-selection-actions[hidden] { display: none !important; }
.invoice-selection-label { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; border-right: 1px solid #e0d4b8; color: #825f0e; font-size: 11px; white-space: nowrap; }
.invoice-selection-label .mdl-icon { font-size: 16px; }
.invoice-operation-status { min-width: 150px; max-width: 400px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; margin-left: auto; color: #8c8166; font-size: 11px; text-align: right; }
.invoice-operation-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #49a46d; }
.invoice-adn-status { min-height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #ded6c5; border-radius: 3px; color: #766743; background: #fcfbf8; font-family: inherit; font-size: 11px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.invoice-adn-status i, .adn-dialog-state i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #a59a7f; }
.invoice-adn-status.ready i, .adn-dialog-state.ready i { background: #48a66d; }
.invoice-adn-status.waiting i, .adn-dialog-state.waiting i { background: #d99a27; }
.invoice-adn-status.working i, .adn-dialog-state.working i { background: #85620f; box-shadow: 0 0 0 4px rgba(133, 98, 15, .12); }
.invoice-adn-status.failed i, .adn-dialog-state.failed i { background: #c84a43; }
.adn-status-dialog { width: min(680px, calc(100vw - 28px)); padding: 0; border: 1px solid #d9cfb9; border-radius: 7px; color: #473e29; background: white; box-shadow: 0 24px 70px rgba(56, 49, 32, .25); }
.adn-status-dialog::backdrop { background: rgba(37, 33, 22, .55); }
.adn-status-dialog form { display: grid; gap: 16px; padding: 20px; }
.adn-status-dialog header, .adn-status-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.adn-status-dialog h2 { margin: 2px 0 7px; font-size: 21px; }
.adn-dialog-state { display: inline-flex; align-items: center; gap: 7px; color: #817559; font-size: 12px; font-weight: 700; }
.adn-status-summary { margin: 0; padding: 11px 13px; border-left: 3px solid #85620f; background: #faf7f0; color: #6f5e35; }
.adn-status-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adn-status-cards article { min-width: 0; display: grid; gap: 5px; padding: 14px; border: 1px solid #e7e2d5; border-radius: 5px; background: #fefdfb; }
.adn-status-cards span, .adn-result-grid span { color: #8d8268; font-size: 11px; }
.adn-status-cards strong { font-size: 18px; }
.adn-status-cards small { color: #827558; }
.adn-status-cards em { color: #b34640; font-size: 11px; font-style: normal; overflow-wrap: anywhere; }
.adn-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e7e2d5; border-radius: 5px; background: #e7e2d5; }
.adn-result-grid div { min-width: 0; display: grid; gap: 4px; padding: 11px; background: white; }
.adn-result-grid strong { font-size: 17px; }
.adn-status-dialog footer { padding-top: 4px; border-top: 1px solid #ede9e0; }
@keyframes adn-spin { to { transform: rotate(360deg); } }
.invoice-action-menu { position: relative; }
.invoice-action-menu > summary { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; border: 1px solid #d7cdb7; border-radius: 3px; color: #6b5217; background: white; font-size: 11px; font-weight: 650; white-space: nowrap; }
.invoice-action-menu > summary::-webkit-details-marker { display: none; }
.invoice-action-menu[open] > summary { border-color: #85620f; background: #faf5eb; }
.invoice-menu-chevron { margin-left: 2px; color: #8f8366; }
.invoice-action-menu-panel { position: absolute; top: calc(100% + 5px); left: 0; z-index: 35; min-width: 210px; display: grid; gap: 3px; padding: 6px; border: 1px solid #dad0b9; border-radius: 4px; background: white; box-shadow: 0 12px 30px rgba(41, 35, 23, .18); }
.invoice-action-menu-panel.align-right { right: 0; left: auto; }
.action-ribbon .invoice-action-menu-panel button { width: 100%; min-height: 34px; justify-content: flex-start; padding: 0 10px; border-color: transparent; background: white; text-align: left; }
.action-ribbon .invoice-action-menu-panel button:hover { border-color: #e4dbc5; background: #f9f6f0; }
.action-ribbon .invoice-action-menu-panel button.success { color: #19782e; background: #eff9f1; }
.action-ribbon .invoice-action-menu-panel button.danger { color: #b72d29; background: #fff8f7; }
.invoice-layout { grid-template-columns: minmax(0, 1fr) 380px; }
.payment-toggle { width: 34px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: #dbd6cc; }
.payment-toggle span { display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .15s ease; }
.payment-toggle.on { background: #53b145; }
.payment-toggle.on span { transform: translateX(14px); }
.invoice-inline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.invoice-inline-actions button { min-height: 27px; padding: 0 9px; border: 1px solid #d6c69f; border-radius: 3px; color: #72540d; background: #fff; font-size: 10px; font-weight: 700; }
.invoice-inline-actions button:hover { border-color: #85620f; background: #faf5eb; }
.status-chip.neutral { color: #7d7460; background: #f3f1ed; }
.status-chip.warning-chip { color: #a05d00; background: #fff0d2; }
.status-chip.danger-chip { color: #b82824; background: #fde9e7; }
.email-delivery-line { display: flex !important; align-items: center; gap: 8px; margin-top: 7px; }
.email-delivery-line em { color: #7d7460; font-style: normal; overflow-wrap: anywhere; }

.license-banner { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border: 1px solid #e4dcc8; border-left: 4px solid #88c500; border-radius: 4px; background: white; }
.license-banner .eyebrow { margin: 0; font-size: 10px; }
.license-banner h2 { margin: 5px 0; }
.license-banner p { margin: 0; color: #887c61; }
.plan-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-grid article { position: relative; min-height: 230px; display: grid; align-content: space-between; padding: 22px; border: 1px solid #e3dbca; border-radius: 5px; background: white; }
.plan-grid article.featured { border: 2px solid #85620f; }
.plan-grid em { position: absolute; top: 10px; right: 10px; padding: 4px 7px; color: white; background: #85620f; font-size: 10px; font-style: normal; }
.plan-grid span { color: #7a6b48; font-weight: 700; }
.plan-grid strong { color: #433a26; font-size: 30px; }
.plan-grid p { color: #867b61; }
.plan-grid button { min-height: 40px; border: 0; border-radius: 3px; color: white; background: #85620f; font-weight: 700; }
.finance-history { margin-top: 14px; }
.finance-history > header { padding: 14px 17px; border-bottom: 1px solid #eae6dc; }
.finance-history h2 { margin: 0; font-size: 17px; }

.settings-tabs, .admin-tabs { margin-top: 15px; display: flex; gap: 4px; border-bottom: 1px solid #e1d9c6; }
.settings-tabs button, .admin-tabs button { min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-bottom: 0; color: #796c4e; background: transparent; font-weight: 650; }
.settings-tabs button.active, .admin-tabs button.active { border-color: #e1d9c6; color: #85620f; background: white; }
.settings-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-section-title { margin: 8px 0 0; padding: 12px 2px 7px; border-bottom: 1px solid #eee9dc; color: #70520c; font-size: 15px; font-weight: 800; }
.editor-section-title:first-child { margin-top: 0; }
.settings-panel { min-width: 0; padding: 20px; border: 1px solid #e3dbc8; border-radius: 5px; background: white; }
.settings-panel > header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.settings-panel .eyebrow { margin: 0; font-size: 10px; }
.settings-panel h2 { margin: 5px 0 0; color: #433b27; font-size: 20px; }
.settings-panel > p { color: #84795e; line-height: 1.5; }
.settings-panel label:not(.check-line), .support-layout form label { display: grid; gap: 5px; margin-top: 11px; color: #6f603d; font-size: 11px; font-weight: 650; }
.settings-panel input, .settings-panel select, .settings-panel textarea, .support-layout input, .support-layout select, .support-layout textarea { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #d2c7ae; border-radius: 3px; color: #463d28; background: white; }
.settings-panel textarea { min-height: 160px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.check-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 11px; color: #786a48; font-size: 12px; }
.check-line input { width: 16px; min-height: 16px; }
.settings-actions { display: flex; gap: 8px; margin-top: 18px; }
.settings-form { max-height: none; padding: 0; }
.backup-list { display: grid; gap: 7px; }
.backup-list button { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #e6e0d3; border-radius: 3px; color: #655123; background: #fefdfb; text-align: left; }
.backup-list button.selected { border-color: #846110; background: #faf6ee; }
.backup-list span { display: grid; gap: 4px; }
.backup-list small { color: #928871; }
.backup-list em { color: #27833b; font-size: 11px; font-style: normal; }

.help-layout { margin-top: 15px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.help-layout > aside, .help-layout > article { border: 1px solid #e2dac8; border-radius: 5px; background: white; }
.help-layout > aside { display: grid; align-content: start; max-height: calc(100vh - 210px); padding: 12px; overflow-y: auto; }
.help-layout aside label { display: grid; gap: 5px; margin-bottom: 10px; color: #766745; font-size: 11px; font-weight: 650; }
.help-layout aside input { min-height: 40px; padding: 0 10px; border: 1px solid #d4cab2; border-radius: 4px; }
.help-topic-count { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; padding: 9px 10px; border: 1px solid #ebe4d4; background: #fcfaf6; color: #897d61; }
.help-topic-count strong { color: #85620f; font-size: 18px; }
.help-topic-count span { font-size: 11px; }
.help-nav-category { margin: 12px 8px 4px; color: #9c9178; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.help-layout aside button { min-height: 42px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; padding: 0 10px; border: 0; border-left: 3px solid transparent; color: #6f5c31; background: transparent; text-align: left; }
.help-layout aside button .mdl-icon { color: #755b1f; font-size: 16px; text-align: center; }
.help-layout aside button.active { border-left-color: #85620f; color: #78580d; background: #faf6ee; font-weight: 700; }
.help-layout > article { min-height: 560px; padding: 26px; }
.help-layout > article .eyebrow { margin: 0; font-size: 10px; }
.help-layout > article h2 { margin: 7px 0 8px; font-size: 25px; }
.help-layout > article p, .help-layout > article li { color: #807252; line-height: 1.55; }
.help-article-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #ebe5d8; }
.help-article-heading > div { min-width: 0; }
.help-article-heading > div > p:last-child { margin: 0; }
.help-article-heading .toolbar-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; }
.help-overview { margin: 18px 0; max-width: 940px; font-size: 14px; }
.help-steps { padding: 16px; border: 1px solid #e8dcbf; border-radius: 6px; background: #fcfaf4; }
.help-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: #4b412b; }
.help-section-title > .mdl-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; color: white; background: #846110; }
.help-section-title div { display: grid; gap: 2px; }
.help-section-title strong { font-size: 16px; }
.help-section-title small { color: #90856a; }
.help-step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.help-step { min-width: 0; min-height: 132px; display: grid; grid-template-columns: 36px 42px minmax(0, 1fr); align-items: start; gap: 9px; padding: 13px; border: 1px solid #e8e1d0; border-radius: 5px; background: white; }
.help-step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: #85620f; font-size: 12px; font-weight: 750; }
.help-step-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; color: #826012; background: #f9f5ea; font-size: 18px; }
.help-step div { min-width: 0; }
.help-step strong { display: block; color: #463d29; font-size: 13px; }
.help-step p { margin: 6px 0 0; font-size: 12px; }
.help-guidance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.help-guidance-grid > section { min-width: 0; padding: 15px; border: 1px solid #e7e1d3; border-radius: 5px; background: white; }
.help-guidance-grid h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; color: #4a402a; font-size: 14px; }
.help-guidance-grid h3 .mdl-icon { color: #85620f; }
.help-guidance-grid ul { margin: 0; padding-left: 19px; }
.help-guidance-grid li + li { margin-top: 5px; }
.help-warnings { border-color: #ead2aa !important; background: #fffaf1 !important; }
.help-warnings h3 .mdl-icon { color: #c67a18; }
.help-warnings.quiet { border-color: #e7e1d3 !important; background: #fcfbf8 !important; }
.help-callout { margin-top: 22px; padding: 15px; border-left: 4px solid #836111; background: #faf6ed; }
.help-callout p { margin-bottom: 0; }
.support-layout { margin-top: 15px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
.support-layout form textarea { min-height: 170px; resize: vertical; }
.support-layout form button { margin-top: 16px; }
.support-info { padding: 26px; border: 1px solid #e3dbc8; border-radius: 5px; color: #7f7151; background: #faf5ea; }
.support-info > .mdl-icon { color: #85620f; font-size: 42px; }
.support-info h2 { color: #443b27; }
.support-info li { margin: 9px 0; }
.support-history { margin-top: 14px; margin-bottom: 24px; }
.support-history > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #e9e3d6; background: #fcfbf8; }
.support-history > header h2 { margin: 3px 0 0; color: #443b27; font-size: 18px; }
.support-history .compact-command { min-height: 30px; margin: 2px; }
.future-state > .mdl-icon { color: #7b5e19; font-size: 50px; }

.settings-hero { width: min(1160px, calc(100% - 48px)); margin: 16px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; border: 1px solid #e4dbc7; border-left: 4px solid #82c800; border-radius: 5px; background: white; }
.settings-hero .eyebrow { margin: 0; color: #85620f; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.settings-hero h2 { margin: 6px 0; color: #433b27; font-size: 22px; }
.settings-hero p { max-width: 760px; margin: 0; color: #84785d; line-height: 1.5; }
.settings-hero .primary-command { min-width: 230px; }
.feature-band { width: min(1160px, calc(100% - 48px)); margin: 14px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-band article { min-width: 0; padding: 20px; border: 1px solid #e5decc; border-radius: 5px; background: white; }
.feature-band .mdl-icon { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 4px; color: #85620f; background: #f9f4e9; font-size: 22px; }
.feature-band h3 { margin: 14px 0 6px; color: #453c27; font-size: 15px; }
.feature-band p { margin: 0; color: #897e63; line-height: 1.45; }
.info-banner { width: min(1160px, calc(100% - 48px)); margin: 14px auto 24px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px; padding: 14px 16px; border: 1px solid #e1d5b9; border-radius: 4px; color: #726036; background: #faf6ed; }
.info-banner strong { color: #75560d; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 1000; width: min(410px, calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { min-height: 58px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 28px; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid #dfd3b7; border-left: 4px solid #816013; border-radius: 4px; color: #635023; background: white; box-shadow: 0 10px 32px rgba(41, 35, 23, .17); }
.toast.success { border-left-color: #25953a; }
.toast.warning { border-left-color: #e48600; }
.toast.danger { border-left-color: #ce342e; }
.toast p { margin: 0; line-height: 1.35; }
.toast button { border: 0; color: #887d64; background: transparent; font-size: 20px; }

@media (max-width: 1280px) {
  .header-pill.company { max-width: 220px; }
  .desktop-module-grid { width: calc(100% - 30px); }
  .form-surface, .filter-surface, .compact-summary, .action-ribbon, .split-data-view, .invoice-layout, .invoice-filters, .report-filter-surface, .report-panel, .settings-grid, .license-banner, .plan-grid, .finance-history, .help-layout, .support-layout, .support-history, .admin-tabs, .settings-hero, .feature-band, .info-banner { width: calc(100% - 30px); }
  .report-filter-surface { flex-wrap: wrap; }
  .report-filter-surface label.grow { min-width: 320px; }
  .split-data-view, .invoice-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .action-ribbon { align-items: stretch; flex-direction: column; }
  .action-ribbon > span { max-width: none; text-align: left; }
}

@media (max-width: 1050px) {
  .desktop-top-actions .header-pill.company, .desktop-top-actions .header-command:not(.accent), .desktop-brand small { display: none; }
  .desktop-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-module-card.principal { grid-column: 1 / -1; }
  .desktop-module-grid > .desktop-module-card:nth-child(7) { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; }
  .split-data-view, .invoice-layout { grid-template-columns: 1fr; }
  .record-preview { position: static; }
  .compact-summary.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-summary.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-module-row { grid-template-columns: 52px minmax(220px, 1fr) minmax(0, auto) 30px; gap: 13px; padding-inline: 16px; }
  .home-module-meta { gap: 10px; }
  .home-module-links { gap: 5px 10px; }
}

@media (max-width: 760px) {
  .desktop-shell, .desktop-shell.menu-expanded { grid-template-columns: 1fr; grid-template-rows: 62px auto minmax(0, 1fr); }
  .desktop-topbar { padding-inline: 10px; }
  .desktop-brand span, .desktop-top-actions .header-pill { display: none; }
  .desktop-top-actions .header-command.accent { display: inline-flex; }
  .desktop-sidebar { max-height: none; display: grid; grid-template-columns: repeat(5, minmax(56px, 1fr)); gap: 3px; padding: 5px; overflow: auto hidden; }
  .desktop-nav { min-width: 62px; grid-template-columns: 1fr; min-height: 46px; text-align: center; }
  .desktop-nav .nav-label, .menu-expanded .desktop-nav .nav-label { display: none; }
  .desktop-nav-section, .desktop-nav-spacer, .desktop-nav.toggle { display: none; }
  .desktop-page-heading { min-height: 0; align-items: stretch; flex-direction: column; padding: 15px 14px; }
  .desktop-page-heading h1 { font-size: 25px; }
  .page-heading-actions { align-self: stretch; justify-content: flex-start; }
  .today-panel { width: calc(100% - 20px); grid-template-columns: 48px minmax(0, 1fr); gap: 12px; margin-top: 10px; padding: 14px; }
  .today-icon { width: 44px; height: 44px; }
  .today-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .today-actions button:last-child { grid-column: 1 / -1; }
  .desktop-module-grid, .nfse-menu-grid { width: calc(100% - 20px); grid-template-columns: 1fr; }
  .desktop-module-grid > .desktop-module-card:nth-child(7) { grid-column: auto; width: 100%; justify-self: stretch; }
  .desktop-module-card.principal, .nfse-menu-grid .desktop-module-card:first-child { grid-column: auto; }
  .desktop-module-card { min-height: 160px; }
  .home-module-list, .home-owner-module { width: calc(100% - 20px); }
  .home-module-row { min-height: 88px; grid-template-columns: 48px minmax(0, 1fr) 28px; gap: 12px; padding: 13px 14px; }
  .home-module-icon { width: 48px; height: 48px; font-size: 25px; }
  .home-module-meta { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .home-module-links { justify-content: flex-start; }
  .home-module-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .admin-home-card, .form-surface, .filter-surface, .compact-summary, .action-ribbon, .split-data-view, .invoice-layout, .invoice-filters, .report-filter-surface, .report-panel, .settings-grid, .license-banner, .plan-grid, .finance-history, .help-layout, .support-layout, .support-history, .admin-tabs, .settings-hero, .feature-band, .info-banner { width: calc(100% - 20px); }
  .quick-actions { position: static; align-items: stretch; flex-direction: column; }
  .quick-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-surface, .invoice-filters { align-items: stretch; flex-direction: column; }
  .invoice-filters label.grow { min-width: 0; }
  .report-filter-surface { align-items: stretch; flex-direction: column; }
  .report-filter-surface label, .report-filter-surface label:first-child, .report-filter-surface label.grow { min-width: 0; }
  .compact-summary.four, .compact-summary.five, .compact-summary.six { grid-template-columns: 1fr 1fr; }
  .action-ribbon > div { display: grid; grid-template-columns: 1fr 1fr; }
  .action-ribbon button { justify-content: center; }
  .invoice-action-ribbon > .invoice-action-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-action-ribbon .invoice-selection-label, .invoice-action-ribbon .invoice-operation-status { grid-column: 1 / -1; justify-content: flex-start; margin-left: 0; padding-right: 0; border-right: 0; text-align: left; }
  .invoice-action-ribbon .invoice-adn-status { width: 100%; justify-content: center; }
  .invoice-action-ribbon .invoice-action-menu, .invoice-action-ribbon .invoice-action-menu > summary, .invoice-action-ribbon .invoice-action-row > button { width: 100%; }
  .invoice-action-ribbon .invoice-action-menu > summary { justify-content: center; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid div.wide { grid-column: auto; }
  .settings-grid, .plan-grid, .help-layout, .support-layout, .feature-band { grid-template-columns: 1fr; }
  .settings-hero { align-items: stretch; flex-direction: column; }
  .settings-hero .primary-command { min-width: 0; }
  .info-banner { grid-template-columns: 1fr; }
  .help-layout > aside { max-height: 330px; grid-template-columns: 1fr 1fr; }
  .help-layout aside label, .help-topic-count { grid-column: 1 / -1; }
  .help-nav-category { grid-column: 1 / -1; }
  .help-layout > article { padding: 18px; }
  .help-step-grid, .help-guidance-grid { grid-template-columns: 1fr; }
  .help-article-heading { align-items: stretch; flex-direction: column; }
  .help-article-heading .toolbar-button { align-self: flex-start; }
  .editor-grid.settings-form { grid-template-columns: 1fr; }
  .contract-progress-steps { grid-template-columns: 1fr; }
  .contract-progress-row { grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(110px, 1fr)); min-width: 650px; }
  .contract-progress-shell > footer { align-items: stretch; flex-direction: column; }
  .contract-progress-shell > footer > div { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 450px) {
  .desktop-sidebar { grid-template-columns: repeat(4, minmax(56px, 1fr)); }
  .desktop-brand strong { font-size: 20px; }
  .desktop-top-actions .header-command.accent { width: 38px; overflow: hidden; padding: 0 10px; }
  .compact-summary.four, .compact-summary.five, .compact-summary.six { grid-template-columns: 1fr; }
  .action-ribbon > div, .quick-actions > div { grid-template-columns: 1fr; }
  .invoice-action-ribbon > .invoice-action-row { grid-template-columns: 1fr; }
  .adn-status-cards, .adn-result-grid { grid-template-columns: 1fr; }
  .today-chips { display: grid; grid-template-columns: 1fr 1fr; }
  .today-chips button.attention, .today-chips button.ready { grid-column: 1 / -1; }
  .today-actions { grid-template-columns: 1fr; }
  .today-actions button:last-child { grid-column: auto; }
  .help-layout > aside { grid-template-columns: 1fr; }
  .help-layout aside label, .help-topic-count, .help-nav-category { grid-column: auto; }
  .help-step { grid-template-columns: 32px minmax(0, 1fr); }
  .help-step-icon { display: none; }
  .module-icon { width: 48px; height: 48px; font-size: 25px; }
  .desktop-module-card { grid-template-columns: 48px minmax(0, 1fr); padding: 15px; }
}

.identity-page{max-width:1200px;margin:36px auto;padding:20px}.identity-page>header{display:flex;align-items:center;gap:14px}.identity-card{background:white;border:1px solid #efeadf;border-radius:14px;padding:28px;margin-top:24px}.identity-card form{display:grid;gap:12px;margin:18px 0;max-width:500px}.identity-card label{display:grid;gap:5px}.identity-card input,.identity-card select{padding:10px;border:1px solid #dad4c7;border-radius:6px;min-width:0}.identity-card input[type=checkbox]{width:18px}.identity-card button{padding:10px 16px;margin:4px;border:1px solid #e0d6bd;border-radius:7px;cursor:pointer;background:#fdfbf7}.identity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:24px}.company-list{display:grid;gap:12px}.company-list button{display:flex;justify-content:space-between;gap:18px}#recovery-code{display:block;overflow-wrap:anywhere;padding:15px}.identity-card h3{margin-top:28px}
