/* Q57: compact conventional documents; keep full-value editors and responsive reflow. */
body.classic {
  --green:#315e84; --green-soft:#eef2f5; --ink:#242424; --text:#303030;
  --muted:#656565; --line:#d3d3d3; --red:#a63832;
  margin:0; background:#fff; color:#242424; font:14px/1.5 "Microsoft YaHei","PingFang SC",Arial,sans-serif;
  overflow-x:visible;
}
body.classic *,body.classic *::before,body.classic *::after {box-sizing:border-box;animation:none!important;transition:none!important;}
body.classic [hidden] {display:none!important;}
body.classic .app-shell {display:grid;grid-template-columns:156px minmax(0,1fr);min-height:100vh;width:100%;max-width:none;}
body.classic .sidebar {position:sticky;top:0;align-self:start;display:flex;flex-direction:column;width:156px;height:100vh;overflow-y:auto;padding:14px 8px;background:#f6f6f6;color:#303030;border-right:1px solid #ccc;border-radius:0;box-shadow:none;}
body.classic .brand {padding:0 10px 16px;gap:0;margin:0;border-bottom:1px solid #ddd;}
body.classic .brand strong {font-size:17px;color:#222;}
body.classic .brand small {font-size:12px;color:#666;display:block;margin-top:2px;}
body.classic .sidebar nav {display:flex;flex-direction:column;gap:2px;margin-top:12px;}
body.classic .sidebar button {display:block;min-height:34px;width:100%;padding:6px 12px;border:1px solid transparent;border-radius:2px;background:transparent;color:#333;font-size:14px;font-weight:400;text-align:left;box-shadow:none;white-space:nowrap;}
body.classic .sidebar button:hover {background:#eaeaea;}
body.classic .sidebar button.active {background:#e8edf2;color:#173f60;border:1px solid #ccd5dd;font-weight:600;box-shadow:none;}
body.classic .nav-section {font-size:12px;color:#777;padding:14px 12px 4px;}
body.classic .sidebar-footer {display:block;margin-top:auto;padding-top:8px;border-top:1px solid #ddd;}
body.classic .workspace {width:100%;max-width:none;min-width:0;padding:0 18px 24px;}
body.classic .topbar {height:auto;min-height:54px;padding:8px 0;margin:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;border-bottom:1px solid #ccc;background:#fff;}
body.classic .topbar h1 {font-size:18px;font-weight:600;margin:0;line-height:1.4;}
body.classic .topbar-actions {gap:16px;font-size:12px;min-width:0;max-width:100%;flex-wrap:wrap;}
body.classic .current-user {border:0;padding:0;display:flex;gap:8px;align-items:center;min-width:0;max-width:100%;flex-wrap:wrap;overflow-wrap:anywhere;}
body.classic .current-user span {font-size:13px;font-weight:400;color:#333;}
body.classic .current-user small {font-size:12px;color:#777;}
body.classic #mobileSystem {display:none!important;}
body.classic .classic-preview-note {font-size:12px;color:#666;border:1px solid #ddd;padding:2px 7px;background:#fafafa;}
body.classic #app {min-width:0;padding-top:12px;max-width:none;}
body.classic :is(h2,h3) {font-size:16px;font-weight:600;line-height:1.5;margin:0 0 10px;color:#242424;}
body.classic p {line-height:1.6;}
body.classic :is(.eyebrow,.section-intro .eyebrow) {display:none;}
body.classic :is(button,.sheet-button) {min-height:30px;line-height:1.4;font:inherit;font-size:13px;font-weight:400;letter-spacing:0;padding:5px 12px;border:1px solid #bbb;border-radius:2px;color:#333;background:#f7f7f7;box-shadow:none;white-space:normal;}
body.classic button:hover {background:#eceff2;color:#222;transform:none;}
body.classic button:disabled {opacity:.55;cursor:not-allowed;}
body.classic button:focus-visible,body.classic a:focus-visible {outline:2px solid #467598;outline-offset:2px;}
body.classic :is(button[type=submit],button[data-mode=confirm],.expense-save,#matConfirm,#authSubmit) {background:#416681;color:#fff;border-color:#416681;}
body.classic :is(button.secondary,.secondary,.sheet-button) {background:#fafafa;color:#333;border:1px solid #c9c9c9;}
body.classic :is(.danger-link,.expense-remove,.sheet-remove,.sheet-remove-cost) {color:#a12c26;background:transparent;border:0;white-space:nowrap;min-width:48px;}
body.classic :is(input,select,textarea) {color:#222;background:#fff;border:1px solid #c7c7c7;border-radius:2px;min-height:32px;font:inherit;font-size:14px;font-weight:400;padding:5px 7px;box-shadow:none;max-width:100%;}
body.classic input::placeholder,body.classic textarea::placeholder {font-size:13px;font-weight:400;color:#888;opacity:1;}
body.classic :is(input,textarea,select):focus {outline:1px solid #517da2;outline-offset:-1px;box-shadow:none;border-color:#517da2;}
body.classic label {font-size:13px;font-weight:400;color:#444;line-height:1.5;}
body.classic label small {font-size:12px;color:#777;font-weight:400;}
body.classic :is(.panel,.mat-panel,.sheet-document,.section-intro,.simple-more,.metric-card,.record,.master-card) {background:#fff;background-image:none;box-shadow:none;border-radius:0;}
body.classic :is(.panel,.mat-panel) {padding:12px;margin-top:12px;border:1px solid #d6d6d6;}
body.classic .panel:first-child,body.classic .mat-panel:first-child {margin-top:0;}
body.classic .section-intro {padding:8px 0;margin:0 0 8px;border:0;min-height:0;}
body.classic .section-intro h2 {font-size:16px;}
body.classic .section-intro p {font-size:13px;color:#666;max-width:none;margin:4px 0;}
body.classic .section-intro>strong {font-size:16px;color:#555;}
body.classic .section-intro>strong small {font-size:12px;}
body.classic .form-grid {gap:10px 16px;grid-template-columns:repeat(3,minmax(0,1fr));}
body.classic .form-grid label {gap:4px;}
body.classic .form-grid button {align-self:end;}
body.classic .form-grid textarea {min-height:60px;}
body.classic .record {border:0;border-bottom:1px solid #ddd;padding:10px 0;margin:0;min-height:0;}
body.classic .record-main strong {font-size:14px;}
body.classic .record-main span {font-size:12px;color:#666;}
body.classic .record-actions {gap:6px;}
body.classic .classic-home {max-width:1100px;}
body.classic .classic-home-table {border-collapse:collapse;width:100%;table-layout:fixed;margin:0;font-size:14px;}
body.classic .classic-home-table :is(th,td) {border:1px solid #d4d4d4;padding:10px 14px;text-align:left;background:#fff;overflow-wrap:anywhere;}
body.classic .classic-home-table th {background:#f3f3f3;font-weight:600;}
body.classic .classic-home-table :is(th,td):first-child {width:170px;}
body.classic .classic-home-table :is(th,td):last-child {width:96px;text-align:center;}
body.classic .classic-home-table td button {min-width:58px;}
body.classic .classic-home-note {font-size:12px;color:#777;margin-top:12px;}
body.classic .sheet-toolbar,body.classic .mat-toolbar {gap:8px;padding:8px 0;margin:0;min-height:0;}
body.classic #app.sheet-page .sheet-toolbar h2 {font-size:16px;}
body.classic #app.sheet-page :is(button,.sheet-button) {font-size:13px;min-height:30px;padding:5px 10px;}
body.classic #app.sheet-page .sheet-fields {padding:12px 0;gap:8px 16px;grid-template-columns:repeat(3,minmax(0,1fr));}
body.classic #app.sheet-page .sheet-fields label {grid-template-columns:70px minmax(0,1fr);font-size:13px;}
body.classic #app.sheet-page :is(input,select,textarea) {min-height:32px;height:32px;font-size:14px;}
body.classic #app.sheet-page .sheet-cellbar {display:flex;flex-wrap:wrap;align-items:center;padding:0 0 8px;gap:6px;min-height:0;background:#fff;border:0;}
body.classic #app.sheet-page .sheet-cellbar>input {flex:1 1 220px;min-width:0;}
body.classic #app.sheet-page .sheet-cellbar>.complete-value {order:1;flex:0 0 100%;}
body.classic #app.sheet-page .sheet-cellbar button {font-size:12px;min-height:26px;padding:3px 8px;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid,.fd-grid) {font-size:14px;color:#222;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid,.fd-grid) th {background:#f1f1f1!important;color:#333!important;font-size:13px!important;font-weight:600!important;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid,.fd-grid) :is(th,td) {border-color:#d4d4d4!important;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid,.fd-grid) tbody tr {background:#fff;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid,.fd-grid) tbody tr:nth-child(even) {background:#fcfcfc;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid,.fd-grid) tbody tr:focus-within {background:#f3f6f8;}
body.classic #app.sheet-page .sheet-grid :is(th,td) {font-size:14px;min-height:32px;height:32px;line-height:1.45;}
body.classic #app.sheet-page .sheet-grid :is(input,select,textarea) {font-size:14px;min-height:32px;height:32px;padding:4px 6px;}
body.classic :is(.sheet-grid,.expense-sheet-table,.mat-grid) .editable-choice-input {padding-right:28px!important;}
body.classic .editable-choice>button.editable-choice-arrow {min-width:24px!important;width:24px!important;padding:0!important;border-radius:0;font-size:11px!important;color:#777!important;background:transparent!important;}
body.classic :is(.editable-choice-list,.mat-choices,.expense-product-choices) {max-width:calc(100vw - 16px);background:#fff;border:1px solid #bbb;border-radius:2px;box-shadow:0 3px 8px #0002;font-size:14px;}
body.classic :is(.editable-choice-list,.mat-choices,.expense-product-choices)>button {font-size:14px;min-height:32px;padding:6px 10px;color:#333;background:#fff;font-weight:400;white-space:normal;overflow-wrap:anywhere;}
body.classic :is(.editable-choice-list,.mat-choices,.expense-product-choices)>button:is(:hover,[aria-selected=true]) {background:#eef2f5;}
body.classic #app.sheet-page .sheet-subhead {font-size:13px;margin:14px 0 6px;gap:12px;}
body.classic #app.sheet-page .sheet-subhead span {font-size:12px;color:#777;}
body.classic #app.sheet-page .sheet-price-note {font-size:12px;color:#777;margin:5px 0;}
body.classic #app.sheet-page .sheet-footer {font-size:13px;gap:16px;align-items:center;flex-wrap:wrap;background:#fafafa;padding:10px;border:1px solid #ddd;margin-top:10px;}
body.classic #app.sheet-page .sheet-footer [role=status] {font-size:12px;color:#666;}
body.classic #app.sheet-page .sheet-query {padding:10px 0;gap:8px;font-size:13px;}
body.classic .material-entry-links {display:none;}
body.classic .receipt-kind-tabs {font-size:13px;gap:8px;margin:0 0 8px;border-bottom:1px solid #ccc;padding:0 0 8px;}
body.classic .receipt-kind-tabs :is(button,strong) {font-size:13px;min-height:30px;padding:5px 10px;background:#fff;border:1px solid #ccc;color:#333;}
body.classic .receipt-kind-tabs strong {background:#edf1f4;}
body.classic .material-page {font-size:14px;}
body.classic .material-page :is(h2,h3) {font-size:16px;}
body.classic .material-page .mat-fields {gap:10px 18px;margin:8px 0;}
body.classic .material-page .mat-fields :is(label,input) {font-size:14px;min-height:32px;}
body.classic .material-page .mat-grid input {font-size:14px;min-height:32px;}
body.classic .material-page .mat-note {font-size:12px;color:#777;margin:6px 0;}
body.classic .material-page .mat-editbar {display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;padding:6px 8px;background:#fafafa;border:1px solid #d4d4d4;font-size:13px;}
body.classic .material-page .mat-editbar textarea {min-height:40px;height:auto;max-width:100%;resize:vertical;}
body.classic .material-page .mat-total {font-size:15px;color:#333;}
body.classic .notice {border-radius:2px;box-shadow:none;font-size:14px;}
body.classic :is(.form-error,.sheet-error,.mat-error) {font-size:13px;color:#a32a26;}
body.classic .dialog {border-radius:3px;background:#fff;box-shadow:0 10px 30px #0002;max-width:calc(100vw - 24px);padding:20px;}
body.classic .dialog h2 {font-size:18px;}
/* Keep long document titles clear of the absolute-positioned close button. */
body.classic .dialog > h2 {padding-right:36px;min-width:0;overflow-wrap:anywhere;}
body.classic.logged-out .app-shell {display:block;}
body.classic.logged-out :is(.sidebar,.topbar) {display:none!important;}
body.classic.logged-out .workspace {width:100%;max-width:none;padding:0;}
body.classic.logged-out #app {padding:0;min-height:100vh;display:grid;place-items:center;}
body.classic .classic-login {width:min(380px,calc(100% - 32px));margin:36px auto;padding:26px;border:1px solid #ccc;background:#fff;}
body.classic .classic-login h1 {font-size:20px;font-weight:600;margin:0 0 24px;}
body.classic .classic-login h2 {font-size:16px;}
body.classic .premium-form-kicker,body.classic .premium-form-heading>p {display:none;}
body.classic .premium-form {display:grid;gap:14px;}
body.classic .premium-form label {display:grid;gap:5px;}
body.classic .premium-form input {width:100%;height:38px;}
body.classic .password-control {display:flex;min-width:0;gap:0;}
body.classic .password-control input {min-width:0;flex:1;}
body.classic .password-toggle {width:48px;min-width:48px;}
body.classic .premium-help {font-size:12px;color:#666;margin:18px 0 0;}
body.classic .premium-form .form-error:empty {display:none;}
/* Q98V: login-only sizing beats the later compact business-field rules. */
@media screen {
  body.classic.logged-out #app .classic-login {width:min(520px,calc(100% - 32px));min-width:0;margin:32px auto;padding:32px;font-size:16px;overflow-wrap:anywhere;}
  body.classic.logged-out #app .classic-login h1 {font-size:24px;margin-bottom:24px;}
  body.classic.logged-out #app .classic-login h2 {font-size:22px;}
  body.classic.logged-out #app .classic-login #authForm {gap:18px;min-width:0;}
  body.classic.logged-out #app .classic-login #authForm label {font-size:16px;gap:8px;min-width:0;}
  body.classic.logged-out #app .classic-login #authForm input {height:48px;min-height:48px;width:100%;min-width:0;font-size:16px;padding:10px 12px;}
  body.classic.logged-out #app .classic-login #authForm input::placeholder {font-size:16px;}
  body.classic.logged-out #app .classic-login #authForm .password-toggle {width:64px;min-width:64px;height:48px;min-height:48px;font-size:16px;}
  body.classic.logged-out #app .classic-login #authSubmit {width:100%;min-height:48px;font-size:16px;font-weight:600;background:#315e84;border-color:#315e84;color:#fff;margin-top:4px;}
  body.classic.logged-out #app .classic-login #authSubmit:hover:not(:disabled) {background:#244b6b;border-color:#244b6b;color:#fff;}
  body.classic.logged-out #app .classic-login :is(.premium-help,.form-error) {font-size:16px;overflow-wrap:anywhere;}
  body.classic.logged-out #app .classic-login label small {font-size:14px;overflow-wrap:anywhere;}
  body.classic.logged-out #app .classic-login #authForm .form-error {margin:0;min-width:0;}
  body.classic.logged-out #app .classic-login #authForm .form-error[data-feedback=status] {color:#315e84;}
}
@media screen and (max-width:480px) {
  body.classic.logged-out #app .classic-login {width:calc(100% - 24px);margin:24px auto;padding:24px 20px;}
}
/* Q99 preserves Q98X login guidance without replacing any signed-in business theme. */
@media screen {
  body.classic.logged-out #app .classic-login .login-environment {margin:0 0 8px;color:#315e84;font-size:16px;font-weight:600;}
  body.classic.logged-out #app .classic-login :is(.login-account-note,.login-rules,.login-attempt-info) {min-width:0;margin:12px 0 0;color:#526575;font-size:16px;line-height:1.6;overflow-wrap:anywhere;}
  body.classic.logged-out #app .classic-login #authAttemptInfo {margin:0;color:#a3342b;}
  body.classic.logged-out #app .classic-login #authAttemptInfo:empty {display:none;}
  body.classic.logged-out #app .classic-login #authSubmit:disabled {opacity:1;border-color:#aebdcb;background:#dce6ee;color:#364e62;cursor:not-allowed;}
}
/* Screen-only refinements leave the existing print and narrow-screen row structure intact. */
@media screen {
 body.classic .complete-value {min-width:0;max-width:100%;margin:3px 0 0;padding:0;border:0;background:transparent;color:#444;font-size:13px;font-weight:400;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;}
 /* The operation column is deliberately narrow. Do not impose a 48px button
    plus table padding on it, or break the two-character delete label. */
 body.classic #app .sheet-grid:not(.reflow-split) tbody td:last-child:has(>.danger-link),
 body.classic #app #matEntryTable:not(.reflow-split) tbody td:last-child {padding-left:2px;padding-right:2px;}
 body.classic #app .sheet-grid :is(.sheet-remove,.sheet-remove-cost),
 body.classic #app #matEntryTable [data-mat-remove] {min-width:0;max-width:100%;width:100%;min-height:32px;padding:4px 2px;white-space:nowrap!important;overflow-wrap:normal;}
 body.classic #app #matEntryTable:not(.reflow-split) :is(th,td) {font-size:14px;line-height:1.45;}
 body.classic #app #matEntryTable:not(.reflow-split) input {height:32px;min-height:32px;font-size:14px;}
}
@media(max-width:1000px) {
 body.classic .app-shell {grid-template-columns:136px minmax(0,1fr);}
 body.classic .sidebar {width:136px;}
 body.classic .workspace {padding:0 12px 20px;}
 body.classic .topbar-date {display:none;}
 body.classic #app.sheet-page .sheet-fields {grid-template-columns:repeat(2,minmax(0,1fr));}
 body.classic .form-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px) {
 body.classic .app-shell {display:block;}
 body.classic .sidebar {position:static;width:100%;height:auto;padding:6px 8px;border-right:0;border-bottom:1px solid #ccc;}
 body.classic .brand,body.classic .nav-section {display:none;}
 body.classic .sidebar nav {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0;gap:2px;}
 body.classic .sidebar nav button:not([hidden]) {font-size:12px;padding:7px 3px;text-align:center;min-height:44px;display:block!important;}
 body.classic .sidebar nav button[hidden] {display:none!important;}
 body.classic .sidebar nav #settingsNav:not([hidden]) {display:block!important;}
 body.classic .sidebar-footer {display:flex;justify-content:flex-end;border:0;padding:2px 0;margin:0;}
 body.classic .sidebar-footer button {width:auto;min-height:32px;font-size:12px;padding:3px 9px;}
 body.classic .workspace {padding:0 10px 18px;}
 body.classic .topbar {height:auto;min-height:44px;flex-wrap:wrap;gap:4px;}
 body.classic .topbar h1 {font-size:16px;}
 body.classic .topbar-actions {gap:6px;}
 body.classic .current-user small {display:none;}
 body.classic .classic-preview-note {font-size:10px;}
 body.classic .classic-home-table :is(th,td) {padding:8px;font-size:13px;}
 body.classic .classic-home-table :is(th,td):first-child {width:86px;}
 body.classic .classic-home-table :is(th,td):last-child {width:70px;}
 body.classic .classic-home-table td button {min-width:48px;padding:6px;}
 body.classic .sheet-toolbar {gap:5px;}
 body.classic #app.sheet-page .sheet-toolbar h2 {flex-basis:100%;font-size:15px;}
 body.classic #app.sheet-page .sheet-fields {grid-template-columns:minmax(0,1fr);gap:8px;}
 body.classic :is(.form-grid,.split-panels) {grid-template-columns:minmax(0,1fr);}
 body.classic #app.sheet-page .sheet-subhead {flex-wrap:wrap;}
 body.classic #app.sheet-page :is(button,.sheet-button),body.classic .material-page button {min-height:44px;}
 body.classic #app.sheet-page :is(input,select,textarea) {font-size:16px;min-height:44px;height:auto;}
 body.classic #app.sheet-page .sheet-grid :is(input,select,textarea) {min-height:44px;height:auto;font-size:16px;}
 body.classic #app.sheet-page .sheet-cellbar>span:not(.complete-value) {flex-basis:56px;}
 body.classic #app.sheet-page .sheet-cellbar>input {flex-basis:calc(100% - 64px);}
 body.classic #app.sheet-page .sheet-cellbar>button {min-height:44px;}
 body.classic .material-page .mat-editbar {grid-template-columns:minmax(0,1fr);}
 body.classic .material-page .mat-editbar textarea {min-height:44px;font-size:16px;}
 body.classic #app .reflow-split :is(.sheet-remove,.sheet-remove-cost),
 body.classic #app #matEntryTable.reflow-split [data-mat-remove] {min-height:44px;width:auto;min-width:48px;padding:7px 12px;}
 body.classic :is(.editable-choice-list,.mat-choices,.expense-product-choices)>button {min-height:44px;font-size:16px;}
 body.classic .dialog-backdrop {padding:8px;align-items:center;}
 body.classic .dialog {max-height:92vh;padding:16px;}
}
@media print {
 body.classic .sidebar,body.classic .topbar,body.classic .classic-preview-note {display:none!important;}
 body.classic .app-shell {display:block;}
}
