/* TechNow Accounts — AdminLTE "skin-green" look.
   All local CSS (no CDN): the app must work offline on a client server.
   Palette (AdminLTE 2 skin-green):
   header green #00a65a, logo block #008d4c, sidebar #222d32,
   sidebar hover/active #1e282c, submenu #2c3b41, sidebar text #b8c7ce,
   content background #ecf0f5, link blue #3c8dbc, box border #d2d6de. */

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

html { position: relative; min-height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  color: #333;
  background-color: #ecf0f5;
}

a { color: #3c8dbc; text-decoration: none; }
a:hover, a:focus { color: #72afd2; text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
  textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #00a65a; outline-offset: 1px; }

/* ---------- AdminLTE shell ---------- */
.wrapper { min-height: 100vh; position: relative; }

.main-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
  height: 50px; background-color: #00a65a; color: #fff;
  display: flex; align-items: stretch;
}
.main-header .logo {
  display: flex; align-items: center; justify-content: center;
  width: 230px; flex: 0 0 230px; height: 50px;
  background-color: #008d4c; color: #fff;
  font-size: 20px; line-height: 50px; font-weight: 300;
  overflow: hidden; white-space: nowrap;
}
.main-header .logo:hover { color: #fff; text-decoration: none; background-color: #008d4c; }
.main-header .logo .logo-mini { display: none; font-weight: 700; }
.main-header .navbar { flex: 1; display: flex; align-items: center; padding: 0; min-height: 50px; }
.main-header .sidebar-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; color: #fff; font-size: 20px; line-height: 1;
  background: transparent; border: 0; cursor: pointer; padding: 0;
}
.main-header .sidebar-toggle:hover, .main-header .sidebar-toggle:focus { background-color: rgba(0, 0, 0, .1); color: #fff; text-decoration: none; }
.main-header .navbar-company {
  color: #fff; font-size: 15px; padding: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.main-header .navbar-company .version { opacity: .85; font-size: 13px; }
.main-header .navbar-custom-menu { margin-left: auto; display: flex; align-items: center; height: 50px; }
.main-header .navbar-custom-menu .nav-icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 50px; color: #fff; font-size: 18px;
}
.main-header .navbar-custom-menu .nav-icon-link:hover { background-color: rgba(0, 0, 0, .1); color: #fff; text-decoration: none; }
.main-header .navbar-custom-menu .dropdown-toggle { color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 50px; }
.main-header .navbar-custom-menu .dropdown-toggle:hover, .main-header .navbar-custom-menu .dropdown-toggle:focus { background-color: rgba(0, 0, 0, .1); color: #fff; text-decoration: none; }
.main-header .navbar-custom-menu .user-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .25); color: #fff; font-weight: 700; font-size: 14px;
}
.main-header .navbar-custom-menu .user-avatar-img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
}
.main-header .navbar-custom-menu .dropdown-menu { margin-top: 0; border-radius: 0 0 3px 3px; border: 1px solid #d2d6de; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.main-header .navbar-custom-menu .dropdown-header { padding: 8px 14px; font-size: 13px; color: #333; background: #f4f4f4; border-bottom: 1px solid #e5e5e5; }

.main-sidebar {
  position: fixed; top: 50px; bottom: 0; left: 0; z-index: 1020;
  width: 230px; background-color: #222d32; color: #b8c7ce;
  overflow-y: auto; overflow-x: hidden;
  transition: margin-left .3s ease-in-out;
}
.main-sidebar .user-panel {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; overflow: hidden; white-space: nowrap;
}
.main-sidebar .user-panel .user-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 45px; height: 45px; border-radius: 50%; flex: 0 0 45px;
  background: #00a65a; color: #fff; font-weight: 700; font-size: 18px;
}
.main-sidebar .user-panel .user-avatar-img {
  width: 45px; height: 45px; border-radius: 50%; object-fit: cover; flex: 0 0 45px;
}
.main-sidebar .user-panel .user-info { line-height: 1.25; min-width: 0; }
.main-sidebar .user-panel .user-info p { margin: 0; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.main-sidebar .user-panel .user-info small { color: #b8c7ce; }
.main-sidebar .user-panel .user-info .online-dot { color: #00a65a; }

.sidebar-menu { list-style: none; margin: 0; padding: 0; }
.sidebar-menu > li.header {
  color: #4b646f; background: #1a2226; padding: 10px 15px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  overflow: hidden; white-space: nowrap;
}
.sidebar-menu > li { position: relative; margin: 0; padding: 0; }
.sidebar-menu > li > a, .sidebar-menu .treeview-menu > li > a {
  display: block; padding: 12px 5px 12px 15px; color: #b8c7ce;
  border-left: 3px solid transparent; text-decoration: none; white-space: nowrap; overflow: hidden;
}
.sidebar-menu > li > a:hover, .sidebar-menu .treeview-menu > li > a:hover { color: #fff; background: #1e282c; text-decoration: none; }
.sidebar-menu > li > a.active, .sidebar-menu .treeview-menu > li > a.active { color: #fff; background: #1e282c; border-left-color: #00a65a; }
.sidebar-menu > li > a > .menu-icon { display: inline-block; width: 22px; text-align: center; margin-right: 4px; }
.sidebar-menu .treeview-menu { display: none; list-style: none; margin: 0; padding: 0 0 0 0; background: #2c3b41; }
.sidebar-menu .treeview.menu-open > .treeview-menu { display: block; }
.sidebar-menu .treeview-menu > li > a { padding-left: 40px; font-size: 13px; }
.sidebar-menu .treeview > a .caret-icon { float: right; margin-right: 8px; transition: transform .2s; font-size: 12px; }
.sidebar-menu .treeview.menu-open > a .caret-icon { transform: rotate(90deg); }
.sidebar-menu .treeview.menu-open > a { color: #fff; background: #1e282c; }

.content-wrapper { margin: 50px 0 0 230px; padding: 15px 15px 20px; min-height: calc(100vh - 101px); transition: margin-left .3s ease-in-out; }
.main-footer {
  margin-left: 230px; background: #fff; border-top: 1px solid #d2d6de;
  padding: 15px; color: #444; font-size: 13px;
  transition: margin-left .3s ease-in-out;
}
.sidebar-overlay { display: none; }

/* Collapsed sidebar (desktop) */
body.sidebar-collapse .main-sidebar { margin-left: -230px; }
body.sidebar-collapse .content-wrapper, body.sidebar-collapse .main-footer { margin-left: 0; }

/* Mobile: sidebar off-canvas, hamburger opens it */
@media (max-width: 767px) {
  .main-header .logo { width: 50px; flex-basis: 50px; }
  .main-header .logo .logo-lg { display: none; }
  .main-header .logo .logo-mini { display: inline; }
  .main-header .navbar-company { display: none; }
  .main-sidebar { margin-left: -230px; }
  body.sidebar-open .main-sidebar { margin-left: 0; }
  .content-wrapper, .main-footer { margin-left: 0; }
  body.sidebar-open .sidebar-overlay {
    display: block; position: fixed; inset: 50px 0 0 0; z-index: 1010;
    background: rgba(0, 0, 0, .4);
  }
}

/* ---------- Page titles, boxes, grids (AdminLTE) ---------- */
.content-wrapper h1, .content h1 { font-size: 24px; margin: 0 0 15px; font-weight: 400; }
.content-wrapper h2 { font-size: 20px; }
.content-wrapper h3 { font-size: 18px; }

.card {
  background: #fff; border: 1px solid #d2d6de; border-top: 3px solid #d2d6de;
  border-radius: 3px; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); margin-bottom: 15px;
}
.card-header { background: transparent; border-bottom: 1px solid #f4f4f4; padding: 10px 15px; }
.card-title { font-size: 18px; margin: 0; font-weight: 400; }
.card-body { padding: 15px; }

.table { background: #fff; }
.table thead th { background: #f9f9f9; border-bottom: 2px solid #f4f4f4; font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #f5f5f5; }
/* Document lines tables (Sales UAT 2026-11-17 Q6): fixed layout with the
   column widths from the table's <colgroup>, so a wide table (the
   quotation lines table ran off the right edge at 1920px) stays inside
   the page and the GST code select is not cut off. The inputs shrink to
   their cells; the autocomplete results dropdown is absolutely positioned
   and is not clipped. */
.doc-lines-table { table-layout: fixed; width: 100%; }
.doc-lines-table .form-control { min-width: 0; }
.doc-lines-table th, .doc-lines-table td { overflow-wrap: break-word; }
/* Items-table pass (2026-11-21): the lines table scrolls sideways as
   one piece on narrow screens instead of crushing its columns, and
   the min-width keeps every column label whole at desktop widths.
   Numbers are right-aligned; the per-line Amount and the quantity
   Total readout are bold and never wrap. The GST pick sits quietly
   under the product and turns orange when the line is an exception
   to its standard code. */
.doc-lines-scroll { overflow-x: auto; }
.doc-lines-scroll .doc-lines-table { min-width: 1100px; }
.doc-lines-table input.num { text-align: right; }
.doc-lines-table .line-amount { font-weight: 600; white-space: nowrap; }
.doc-lines-table .line-qty-total { font-weight: 600; white-space: nowrap; }
.line-gst { font-size: .82rem; color: #5a6b80; margin-top: .15rem; white-space: nowrap; }
/* The GST pick is quiet TEXT, not a box (approved sample, 2026-11-20;
   the Boss flagged the boxed select as too big, 2026-11-21): no border,
   no background, just the code and a small caret. */
.line-gst select { display: inline-block; width: auto; max-width: 100%; font-size: .82rem; font-weight: 600; color: #33465e; border: none; background-color: transparent; box-shadow: none; padding: 0 .85rem 0 .1rem; height: auto; line-height: 1.25; cursor: pointer; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235a6b80' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .05rem center; background-size: 8px 6px; }
.line-gst select:focus { border: none; box-shadow: none; outline: 1px dotted #8aa0b8; }
.line-gst.is-exception { color: #c25e00; font-weight: 600; }
.line-gst.is-exception select { color: #c25e00; font-weight: 600; border-color: transparent; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c25e00' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.table-bordered { border: 1px solid #f4f4f4; }
.table-bordered th, .table-bordered td { border: 1px solid #f4f4f4; }

/* Buttons — primary follows the green theme */
.btn { border-radius: 3px; }
.btn-primary { color: #fff; background-color: #00a65a; border-color: #008d4c; }
.btn-primary:hover, .btn-primary:focus { background-color: #008d4c; border-color: #008d4c; color: #fff; }
.btn-success { background-color: #00a65a; border-color: #008d4c; }
.btn-success:hover, .btn-success:focus { background-color: #008d4c; border-color: #008d4c; }
.btn-outline-primary { color: #00a65a; border-color: #00a65a; }
.btn-outline-primary:hover, .btn-outline-primary:focus { background-color: #00a65a; border-color: #00a65a; color: #fff; }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(0, 166, 90, .5);
}
.form-control:focus, .form-select:focus { border-color: #00a65a; box-shadow: 0 0 0 0.2rem rgba(0, 166, 90, .25); }

.alert { border-radius: 3px; }
.badge { border-radius: 3px; }

/* Module launcher tiles */
.module-tile { display: block; text-decoration: none; color: inherit; height: 100%; }
.module-tile:hover { text-decoration: none; }
.module-tile .card { height: 100%; border: 2px solid #dee2e6; border-top: 3px solid #00a65a; }
.module-tile:hover .card { border-color: #00a65a; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.module-tile .module-icon { font-size: 2.5rem; line-height: 1; }
.module-tile-disabled .card { background: #f1f3f5; border: 2px dashed #ced4da; border-top: 3px dashed #ced4da; color: #868e96; }
.module-tile-disabled .module-icon { opacity: .55; }

/* Favourites (2026-11-13): the gold star on list rows, and the reusable
   on/off toggle switch. No JavaScript — the star and the switch are
   submit buttons, so they work on every page. */
.fav-star { font-size: 1.3rem; line-height: 1; color: #b58900; text-decoration: none; vertical-align: middle; }
.fav-star:hover { color: #8a6d00; text-decoration: none; }
.onoff-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ced4da; border-radius: 20px; background: #e9ecef; color: #495057; padding: 3px 10px 3px 4px; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.onoff-toggle.on { background: #00a65a; border-color: #00a65a; color: #fff; }
.onoff-toggle .onoff-knob { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); order: 0; }
.onoff-toggle.on .onoff-knob { order: 2; }
.onoff-toggle .onoff-text { font-weight: 600; }

/* Login page — AdminLTE login box, no sidebar */
.login-page { background: #d2d6de; min-height: 100vh; }
.login-box { width: 360px; max-width: calc(100vw - 30px); margin: 7% auto 20px; }
.login-logo { font-size: 35px; text-align: center; margin-bottom: 25px; font-weight: 300; }
.login-logo a { color: #444; }
.login-logo a:hover { text-decoration: none; }
.login-logo .logo-mark { color: #00a65a; font-weight: 700; }
.login-logo-img { max-width: 280px; max-height: 140px; width: auto; height: auto; }
/* Header logo: white badge with the green ledger-book mark, next to the name. */
.main-header .logo .logo-img { height: 36px; width: 36px; background: #fff; border-radius: 6px; padding: 2px; vertical-align: middle; }
.login-box-body { background: #fff; padding: 20px; border-top: 0; color: #666; border-radius: 3px; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.login-box-msg { margin: 0; text-align: center; padding: 0 20px 20px; }
.login-footer { text-align: center; color: #666; font-size: 13px; padding: 0 15px 20px; }

/* Print: shell hidden, document only */
@media print {
  body { background: #fff; }
  .main-header, .main-sidebar, .main-footer, .sidebar-overlay, .no-print, .alert { display: none !important; }
  .content-wrapper { margin: 0 !important; padding: 0 !important; min-height: 0; }
  .card { box-shadow: none; }
}

/* ---------- Convenience improvements: search, bell, badges ---------- */
.navbar-search { display: flex; align-items: center; margin-left: 12px; }
.navbar-search input {
  width: 220px; height: 32px; padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 16px;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 13px;
}
.navbar-search input::placeholder { color: rgba(255, 255, 255, .75); }
.navbar-search input:focus { background: rgba(255, 255, 255, .3); outline: none; border-color: #fff; }
@media (max-width: 767px) { .navbar-search { display: none; } }
.menu-badge {
  display: inline-block; min-width: 18px; padding: 1px 5px; margin-left: 6px;
  border-radius: 9px; background: #dd4b39; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center; line-height: 1.5;
}
.notif-bell { position: relative; }
.notif-bell .nav-icon-link { position: relative; }
.notif-count {
  position: absolute; top: 6px; right: 2px; min-width: 16px; padding: 0 4px;
  border-radius: 8px; background: #dd4b39; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.notif-menu { min-width: 340px; max-width: calc(100vw - 20px); }
.notif-menu .dropdown-item { white-space: normal; font-size: 13px; }

/* Button/card layout for list pages (Button Layout pass, 2026-11-14):
   same look as the Reports card grid — white card, green hover border,
   round icon, bold name, plain-word lines, buttons in a row. A list card
   is a <div> (not a link) because a row has several actions; the name
   links to the record, and the star sits in the top-right corner. */
.list-card { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid #d2d6de; border-radius: 3px; padding: 16px; height: 100%; color: inherit; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); position: relative; text-decoration: none; }
a.list-card:hover { border-color: #008a5e; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); text-decoration: none; color: inherit; }
div.list-card:hover { border-color: #008a5e; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.list-card-icon { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: #008a5e; color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.list-card-icon img { width: 48px; height: 48px; object-fit: cover; }
.list-card-body { flex: 1 1 auto; min-width: 0; }
.list-card.has-star .list-card-body { padding-right: 24px; }
.list-card-name { font-weight: 700; font-size: 16px; margin: 2px 0 2px; }
.list-card-line { color: #666; font-size: 14px; margin: 0 0 2px; word-break: break-word; }
.list-card-amount { font-weight: 700; font-size: 15px; color: #333; margin: 4px 0 2px; }
.list-card-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.list-card-star { position: absolute; top: 2px; right: 10px; z-index: 1; }
.list-card-status { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #eef2f7; color: #333; font-size: 12px; font-weight: 700; }

/* Settings index tile grid (owner-approved Option 2, 2026-11-24):
   every setting is one small box under its group heading — name in
   bold, one short line under it, the whole tile a link straight to
   the setting. Four across on desktop, fewer on narrow screens. */
.settings-group { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: #6c757d; margin: 18px 0 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 6px; }
@media (max-width: 991px) { .settings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-tile { display: block; height: 100%; background: #fff; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 8px; padding: 13px 14px; color: inherit; text-decoration: none; }
.settings-tile:hover { border-color: #008a5e; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); color: inherit; text-decoration: none; }
.settings-tile b { display: block; font-size: 14.5px; color: #071330; margin-bottom: 3px; }
.settings-tile span { display: block; color: #6c757d; font-size: 12px; line-height: 1.35; }

/* Settings boxed layout (master-forms pass s11, owner-approved
   sample v2 2026-11-24): every Settings page is a stack of boxes —
   a titled white card per section — instead of one long undivided
   form. Toggles sit in a tight multi-column grid with hairline
   separators, so a wall of checkboxes scans in seconds; related
   halves (Reports | Cash) sit side by side inside one box. */
.settings-box { background: #fff; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.settings-box-head { font-size: 15px; font-weight: 600; color: #071330; background: #f8f9fa; border-bottom: 1px solid var(--bs-border-color, #dee2e6); padding: 9px 16px; }
.settings-box-body { padding: 12px 16px; }
.settings-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.settings-half h3 { font-size: 13.5px; font-weight: 600; color: #071330; margin: 2px 0 8px; }
@media (max-width: 767px) { .settings-halves { grid-template-columns: 1fr; } }
.toggle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.toggle-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.toggle-grid .form-check { min-height: 34px; padding-top: 5px; border-bottom: 1px solid #f1f3f4; }
.toggle-grid .form-check .form-check-input { float: none; margin: 3px 8px 0 0; vertical-align: top; }
@media (max-width: 991px) { .toggle-grid, .toggle-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .toggle-grid, .toggle-grid.cols-2 { grid-template-columns: 1fr; } }
.settings-sub { font-size: 13px; font-weight: 600; color: #071330; margin: 10px 0 4px; }

/* List view (List/Grid pass item 1): the same cards, one row per
   record, full width and a little tighter — a list reads faster
   than a grid of cards. The Grid view keeps the default 3-across
   cards. Applied by adding "list-view" to the cards row. */
.list-view > div { flex: 0 0 100%; max-width: 100%; }
.list-view .list-card { padding: 10px 16px; }

/* Form standards pass (2026-11-20): every data-entry form ends with a
   sticky action bar — the Save/Back row stays pinned to the bottom of
   the scrolling content area (position: sticky, in the page flow, so it
   never covers the sidebar) and the user never has to scroll to the end
   of a long form just to save. Buttons in the bar are wider than the
   default. The bar stays inside its <form>, so submit behaviour is
   unchanged. Bottom padding on the form keeps the last fields clear of
   the bar at the very end of the scroll. */
.form-action-bar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  background: #fff; border-top: 1px solid #d2d6de;
  box-shadow: 0 -4px 14px rgba(7, 19, 48, .10);
  padding: .6rem .25rem; margin-top: 1rem;
}
.form-action-bar .btn { min-width: 130px; padding-left: 2.4rem; padding-right: 2.4rem; }
form:has(.form-action-bar) { padding-bottom: .75rem; }

/* Document forms pass — Option C (Project Rose item 5, 2026-11-24):
   the slim header strip (everyday fields in one tight flex row, small
   labels, no explanation lines), the one-row Billing | Delivery
   address pair, the "+ More fields" expander for everything not keyed
   daily, and the live grand total at the right end of the sticky bar
   (fed by lineTotalsUpdate in site.js — display only). */
.doc-strip { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: flex-start; }
.doc-strip > .doc-field { flex: 1 1 150px; min-width: 130px; }
.doc-strip > .doc-field.wide { flex: 2.2 1 260px; }
.doc-strip .form-label, .doc-addr .form-label { font-size: .8rem; margin-bottom: .15rem; }
.doc-addr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; margin-top: .55rem; }
@media (max-width: 767px) { .doc-addr { grid-template-columns: 1fr; } }
.more-fields { border: 1px solid #d2d6de; border-radius: .375rem; padding: .35rem .75rem .6rem; margin-top: .6rem; }
.more-fields > summary { cursor: pointer; color: #1e7d32; font-size: .9rem; list-style: none; }
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields[open] > summary { margin-bottom: .5rem; }
.form-action-bar .bar-total { margin-left: auto; font-weight: 600; white-space: nowrap; width: 88px; text-align: right; }

/* Buttons standard (Sample D revised, owner-approved 2026-11-25):
   every action bar is one row in two groups — LEFT: Back, then Print,
   then Download PDF; RIGHT: the page's save family in its own order.
   On a new (unsaved) document form, Print / Download PDF are replaced
   by .bar-slot placeholders with the same button size but
   visibility: hidden, so the reserved space never shifts the bar when
   the real buttons appear after the first save. Print pages carry the
   same bar pinned to the top (.bar-top) above the document preview. */
.form-action-bar { justify-content: space-between; }
.form-action-bar .bar-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.form-action-bar .bar-right { margin-left: auto; justify-content: flex-end; }
.form-action-bar .bar-slot { visibility: hidden; }
.form-action-bar.bar-top { top: 0; bottom: auto; border-top: none; border-bottom: 1px solid #d2d6de; box-shadow: 0 4px 14px rgba(7, 19, 48, .10); margin-top: 0; margin-bottom: 1rem; }

/* Gate round 2 walk fix (2026-11-25, FAIL 1): the save family must sit
   at the SAME x on Create and Edit. Three width terms used to differ:
   the plain save button's label ("Save Draft" on Create is narrower
   than "Save changes" on Edit), the bar total (its width followed the
   amount's digits — fixed at 88px in the .bar-total rule above), and
   the buttons Edit does not have (now reserved with .bar-slot
   placeholders in the Edit views, the same trick as Print / PDF).
   The floor below gives the plain save button — always the button
   right after SaveAndSecond — one width for both labels. */
.form-action-bar .bar-right button[name="SaveAndSecond"] + button { min-width: 180px; }
/* Gate walk fix round 2 (2026-11-26): the same floor when the element
   before the plain save is the reserved slot instead of the button —
   on the Sales Edit page for a non-draft invoice (reachable when the
   company allows editing issued invoices), Save & Issue renders as a
   .bar-slot span, the adjacency above misses, and "Save changes" fell
   back to its natural ~172px, shifting the save family ~8px right
   versus Create. In every current bar-right the only slot followed
   by a button is that one, so this rule completes the pair. */
.form-action-bar .bar-right .bar-slot + button { min-width: 180px; }
/* The same fix shaves the right group's side padding a touch (2.4rem
   to 2.15rem): with the floor above and the fixed-width total, the
   widest family (Quotation, "Save & Mark Sent") overflowed the bar's
   row by a few px at desktop width and wrapped to two rows — the
   Revised-D standard is one row. Left-group padding is untouched. */
.form-action-bar .bar-right .btn { padding-left: 2.15rem; padding-right: 2.15rem; }

/* Required-field mark (Form standards pass, 2026-11-20): a red asterisk
   after the label of a genuinely compulsory field. */
.req { color: #d42a2a; font-weight: 700; }
