/* Framed sheet, seed 1738732504. Existing brand and Segoe UI retained.
   Canvas: 100% - 272px navigation - 2 * 24px gutters; equal halves with 24px gap. */
:root, html[data-theme="light"], html[data-theme="dark"] {
  color-scheme: light; --ground:#f3f7f7; --surface:#fff; --text:#18292b; --muted:#526366;
  --accent:#006f73; --border:#e2e9e9; --primary:#22383a; --secondary:#22383a;
  --primary-fg:#fff; --body-fg:var(--text); --body-bg:var(--ground); --body-quiet-color:var(--muted);
  --body-loud-color:var(--text); --header-color:var(--text); --header-branding-color:var(--text);
  --header-bg:var(--ground); --header-link-color:var(--text); --breadcrumbs-fg:var(--muted);
  --breadcrumbs-link-fg:var(--text); --breadcrumbs-bg:var(--ground); --link-fg:#006a6d;
  --link-hover-color:#003e41; --link-selected-fg:var(--text); --hairline-color:var(--border);
  --border-color:var(--border); --darkened-bg:#f5f8f8; --selected-bg:#e9eeee;
  --selected-row:#eef3f3; --button-fg:#fff; --button-bg:#22383a; --button-hover-bg:#15292b;
  --default-button-bg:#22383a; --default-button-hover-bg:#15292b; --close-button-bg:#526366;
  --object-tools-fg:#fff; --object-tools-bg:#22383a; --object-tools-hover-bg:#15292b;
  --font-family-primary:"Segoe UI", Arial, sans-serif;
  --font-family-monospace:Consolas, monospace;
}
body { font-family:var(--font-family-primary); font-size:14px; height:auto; min-height:100vh; }
#container { height:auto; min-height:100vh; }
#header { min-height:64px; padding:12px 24px; gap:16px; flex-wrap:wrap; flex-shrink:0; }
#branding { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.brand { display:block; height:62px; }
.brand img { object-fit:contain; }
.brand-scope { font-size:14px; color:var(--muted); }
#user-tools { font-size:12px; letter-spacing:normal; text-transform:none; line-height:1.8; }
#user-tools a, #logout-form button { border:0; color:var(--text); text-decoration:underline; text-underline-offset:3px; }
.breadcrumbs { font-size:13px; padding:10px 24px; }
.main { gap:8px; padding-right:8px; }
.main > .content, .main > #nav-sidebar + .content, .main.shifted > #nav-sidebar + .content { min-width:0; max-width:none; flex:1 1 0; }
.dashboard #content { width:auto; }
#content { min-width:0; padding:24px; background:var(--surface); border:1px solid var(--border); border-radius:16px; margin-bottom:8px; }
#content h1 { color:var(--text); font-size:24px; font-weight:600; margin:0 0 16px; }
#nav-sidebar { background:var(--ground); border:0; width:240px; min-width:240px; box-sizing:border-box; padding:8px 12px; }
#nav-sidebar .module { background:transparent; }
#nav-sidebar th, #nav-sidebar td { background:transparent; }
#nav-sidebar .current-model { background:#e4ebeb; }
#nav-sidebar .module caption { background:transparent; color:var(--muted); font-size:12px; text-transform:none; padding:12px 8px; }
#nav-sidebar .module caption a { color:var(--muted); }
#nav-filter { height:36px; box-sizing:border-box; border:1px solid #b8c5c5; border-radius:6px; }
.toggle-nav-sidebar { border:0; background:var(--ground); color:var(--muted); }
.module h2, .module caption, .inline-group h2 { background:#edf2f2; color:var(--text); font-size:14px; text-transform:none; letter-spacing:normal; }
table { width:100%; background:#fff; }
table thead th, table tbody td, table tbody th { background:#fff; }
thead th { background:transparent; color:var(--muted); font-size:12px; font-weight:500; text-transform:none; }
tbody tr, .row1, .row2 { background:transparent; }
th, td { padding:13px 12px; border-bottom:1px solid #edf1f1; font-size:14px; vertical-align:middle; }
td.num, th.num, .field-amount, .field-price, .field-terminals, .field-users, .field-months { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
td a { font-weight:500; }
td small { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.title-row { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; margin-bottom:24px; }
#content .title-row h1 { margin-bottom:8px; }
.subtitle, .scope-note { color:var(--muted); margin:0; font-size:14px; }
.summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--border); padding-bottom:24px; gap:24px; }
.summary span { display:block; color:var(--muted); font-size:13px; margin-bottom:8px; }
.summary strong { font-size:28px; font-weight:500; font-variant-numeric:tabular-nums; line-height:1.2; }
.quick-nav { display:flex; gap:24px; flex-wrap:wrap; margin:24px 0; padding-bottom:16px; border-bottom:1px solid var(--border); }
.quick-nav a { color:var(--text); }
.two-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.data-panel { min-width:0; }
.data-panel h2, .first-run h2 { margin:0; font-size:16px; font-weight:600; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.section-title a { font-size:12px; }
.payments-panel { margin-top:24px; }
.text-link { display:inline-block; margin-top:16px; }
.empty { color:var(--muted); padding:20px 12px; }
.first-run { background:#f3f7f7; border-radius:8px; padding:20px; margin-bottom:24px; }
.first-run p { margin:8px 0 12px; }
.separator { margin:0 8px; color:var(--muted); }
.scope-note { margin-top:24px; font-size:12px; }
.developer { display:flex; align-items:center; justify-content:center; gap:8px; color:var(--muted); font-size:12px; padding:16px; }
.developer img { object-fit:contain; }
.button, input[type=submit], input[type=button], .submit-row input, a.button { border-radius:6px; padding:10px 16px; font-size:14px; line-height:20px; box-sizing:border-box; }
a.button { display:inline-block; background:#edf2f2; color:var(--text); white-space:nowrap; }
a.button.primary { background:#22383a; color:#fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:3px solid #007d82; outline-offset:3px; }
input, select, textarea { color:var(--text); background:#fff; font:inherit; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea { border:1px solid #b8c5c5; border-radius:6px; min-height:38px; box-sizing:border-box; padding:8px; max-width:100%; }
.form-row { padding:16px 12px; }
.help, .helptext { font-size:12px; color:var(--muted); }
.state { display:inline-block; border-radius:4px; padding:3px 8px; font-size:12px; background:#edf1f1; color:var(--text); white-space:nowrap; }
.state.good { background:#e3f3ec; color:#165436; }
.state.warning { background:#fff2d2; color:#704b00; }
.login #container { width:min(440px,calc(100% - 32px)); min-width:0; margin:64px auto; border:0; background:transparent; border-radius:0; }
.login #container > .main { flex:0 0 auto; padding:0; }
.login #header { background:transparent; padding:12px 0 24px; }
.login #branding { display:block; }
.login .brand-scope { display:block; margin-top:8px; }
.login #content { padding:24px; }
.login .submit-row { padding:0; margin-top:24px; }
.login .form-row label { display:block; margin-bottom:8px; }
.login .form-row input { width:100%; }
.table-scroll { overflow-x:auto; }
#changelist .actions { background:#f5f8f8; padding:10px; }
.mobile-menu { display:none; }
#logout-form button { margin-left:12px; text-transform:none; font:inherit; }
@media(max-width:1100px) {
  #header { display:grid; grid-template-columns:minmax(0,1fr); height:auto; min-height:0; gap:8px; justify-items:start; }
  #branding { gap:8px; } #header { align-items:center; }
  #nav-sidebar, #toggle-nav-sidebar { display:none; }
  .mobile-menu { display:block; width:100%; }
  .mobile-menu summary { cursor:pointer; padding:10px 0; }
  .mobile-menu nav { display:flex; flex-wrap:wrap; gap:16px; }
  .mobile-menu a { padding:12px 0; }
  .main.shifted> #nav-sidebar + .content { margin-left:0; }
  .main { padding:8px; } #content { padding:20px; }
}
@media(max-width:640px) {
  #header { padding:12px 16px; align-items:flex-start; }
  #branding { display:block; } .brand-scope { display:block; margin-top:4px; font-size:12px; }
  #user-tools { text-align:left; }
  #content { padding:16px; } #content h1 { font-size:22px; }
  .title-row { flex-direction:column; gap:16px; }
  .summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .summary strong { font-size:24px; }
  .quick-nav { gap:16px; } .quick-nav a { padding:8px 0; min-height:28px; }
  .two-columns { grid-template-columns:minmax(0,1fr); }
  .section-title { gap:8px; } .section-title a { min-height:32px; display:flex; align-items:center; }
  th,td { padding:12px 8px; } .section-title h2 { font-size:15px; }
  .developer { font-size:12px; flex-wrap:wrap; }
  .form-row>div>label { float:none; padding:0 0 8px; }
  .submit-row { display:flex; flex-direction:column; gap:12px; }
  .breadcrumbs { padding:10px 16px; }
  .payments-panel table thead { display:none; }
  .payments-panel table tbody { display:block; }
  .payments-panel table, .payments-panel tbody, .payments-panel tr, .payments-panel td { background:#fff; }
  .payments-panel table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 16px; padding:12px 0; border-bottom:1px solid var(--border); }
  .payments-panel table td { border:0; padding:0; min-width:0; }
  .payments-panel table td:nth-child(1) { grid-column:1; grid-row:1; }
  .payments-panel table td:nth-child(4) { grid-column:2; grid-row:1; }
  .payments-panel table td:nth-child(2) { grid-column:1; grid-row:2; color:var(--muted); font-size:12px; }
  .payments-panel table td:nth-child(3) { grid-column:2; grid-row:2; color:var(--muted); font-size:12px; }
  .payments-panel table td.empty { grid-column:1 / -1; }
  .aligned .form-row .flex-container { display:block; }
  .aligned .form-row div, .aligned .related-widget-wrapper { min-width:0; max-width:100%; box-sizing:border-box; }
  .aligned .related-widget-wrapper { display:flex; flex-wrap:wrap; gap:8px; }
  .aligned label { float:none; width:auto; display:block; }
  .aligned textarea { width:100%; }
  .select2-container { width:100% !important; min-width:0; }
}
