/* ═══════════════════════════════════════════════════════════════════
   SoliAcct V7 — Law Firm Professional Theme
   Fonts   : Cinzel Decorative (brand) · Cinzel (nav / labels)
             Cormorant Garamond (headings) · Lato (body / data)
   Palette :
     #0c0c1e   Sidebar deep jewel-night
     #140e2e   Sidebar mid purple-navy
     #e0b840   Gold accent
     #d4b86a   Gold light
     #8b1a3b   Burgundy primary (buttons, table headers, labels)
     #6b0f2a   Burgundy dark
     #fdf7ee   Body warm cream
     #2c1f14   Body text warm brown
     #5c4a3a   Text mid brown
     #9c8878   Text muted
     #e8d9c8   Border warm light
     #ffffff   Surface / card
     #e53e3e   Error
     #276749   Success
═══════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    height: 100%;
    background: #fdf7ee;
}

body {
    background-color: #fdf7ee;
    border-top: none;
    color: #2c1f14;
    font-family: 'Lato', 'Segoe UI', Verdana, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

header, footer, hgroup, nav, section, article, aside { display: block; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT: full-width main; sidebar is always a fixed overlay
══════════════════════════════════════════════════════════════════ */

.app-layout {
    display: block;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
#sidebar {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 400;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.26s ease;

    background:
        radial-gradient(ellipse at top center, rgba(201,168,76,0.12) 0%, transparent 55%),
        linear-gradient(180deg, #0c0c1e 0%, #140e2e 50%, #0c0c1e 100%);

    box-shadow: 4px 0 32px rgba(0,0,0,0.55);
    scrollbar-width: thin;
    scrollbar-color: rgba(201,168,76,0.3) transparent;
}

#sidebar.sidebar-open { transform: translateX(0); }

/* Large watermark scales behind nav */
#sidebar::after {
    content: '\2696';
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 200px;
    line-height: 1;
    color: rgba(201,168,76,0.035);
    pointer-events: none;
    z-index: 0;
}

/* ── Sidebar: brand block ─────────────────────────────────────── */
.sb-brand {
    padding: 28px 20px 22px;
    text-align: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(201,168,76,0.15);
}

/* Circular medallion frame */
.sb-medallion {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1.5px solid rgba(201,168,76,0.40);
    background: radial-gradient(circle at 50% 40%,
        rgba(201,168,76,0.16) 0%,
        rgba(201,168,76,0.05) 60%,
        transparent 100%);
    box-shadow:
        0 0 28px rgba(201,168,76,0.14),
        inset 0 0 16px rgba(201,168,76,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.sb-scales {
    font-size: 42px;
    line-height: 1;
    color: #e0b840;
    display: block;
    text-shadow:
        0 0 18px rgba(201,168,76,0.60),
        0 0 50px rgba(201,168,76,0.22);
    transition: text-shadow 0.3s;
}

.sb-medallion:hover .sb-scales {
    text-shadow:
        0 0 28px rgba(201,168,76,0.90),
        0 0 80px rgba(201,168,76,0.40);
}

.sb-firm {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.sb-rule {
    width: 40px;
    height: 1.5px;
    background: linear-gradient(to right, transparent, #e0b840, transparent);
    margin: 0 auto 10px;
}

.sb-app {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9px;
    font-weight: 700;
    color: #e0b840;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.sb-tagline {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    font-size: 8.5px;
    font-weight: 700;
    color: rgba(201,168,76,0.50);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ── Sidebar: navigation ──────────────────────────────────────── */
.sb-nav {
    flex: 1;
    padding: 12px 0;
    position: relative;
    z-index: 1;
}

ul#menu {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1em;
    font-weight: 700;
    text-align: left;
}

ul#menu li {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
}

ul#menu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 22px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(201,168,76,0.65) !important;
    text-decoration: none !important;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-left: 3px solid transparent;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
    position: relative;
}

/* Small diamond dot indicator */
ul#menu li a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border: 1px solid rgba(201,168,76,0.40);
    transform: rotate(45deg);
    margin-right: 12px;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s, transform 0.22s;
}

ul#menu li a:hover {
    color: #ffffff !important;
    background: rgba(201,168,76,0.08) !important;
    border-left-color: #e0b840;
    text-decoration: none !important;
}

ul#menu li a:hover::before {
    background: #e0b840;
    border-color: #e0b840;
    transform: rotate(45deg) scale(1.5);
}

/* ── Sidebar: footer / session ────────────────────────────────── */
.sb-footer {
    padding: 10px 0 4px;
    border-top: 1px solid rgba(201,168,76,0.12);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.sb-user {
    display: block;
    font-family: 'Lato', 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(201,168,76,0.70);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 22px;
}

#login { display: block; }

#login ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#login li { display: block; }

#login a,
.hdr-action {
    display: block;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9px !important;
    font-weight: 600;
    color: rgba(201,168,76,0.55) !important;
    text-decoration: none !important;
    padding: 4px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.15s;
    background: transparent !important;
    border: none;
}

#login a:hover,
.hdr-action:hover {
    color: #e0b840 !important;
    background: transparent !important;
    text-decoration: none !important;
}

.username {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    color: #e0b840;
    font-weight: 700;
    font-size: 12px;
}

/* ── Main content area ────────────────────────────────────────── */
.app-main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fdf7ee;
}

/* ══════════════════════════════════════════════════════════════════
   FEATURED BANNER
══════════════════════════════════════════════════════════════════ */
.page-banner { /* wrapper */ }

.featured {
    background:
        linear-gradient(135deg, #6b0f2a 0%, #8b1a3b 45%, #6b0f2a 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #e0b840;
}

/* Decorative scales watermark on banner */
.featured::after {
    content: '\2696';
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 110px;
    line-height: 1;
    color: rgba(201,168,76,0.10);
    pointer-events: none;
}

/* Dot pattern overlay */
.featured::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
}

.featured .content-wrapper {
    background:       none !important;
    background-color: transparent !important;
    background-image: none !important;
    padding:          26px 36px;
    max-width:        none;
    position:         relative;
    z-index:          1;
}

.featured hgroup.title h1 {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size:   1.85em !important;
    font-weight: 600 !important;
    font-style:  italic !important;
    color:       #ffffff !important;
    display:     block !important;
    margin:      0 0 4px !important;
    padding:     0;
    line-height: 1.2;
}

.featured hgroup.title h2 {
    font-family: 'Lato', 'Segoe UI', sans-serif !important;
    font-size:   0.85em !important;
    font-weight: 300 !important;
    color:       rgba(255,255,255,0.65) !important;
    display:     block !important;
    width:       auto !important;
    margin:      0 !important;
    letter-spacing: 0.3px;
}

.featured p {
    font-size: 0.8em;
    color:     rgba(255,255,255,0.50);
    margin:    4px 0 0 0;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE CONTENT
══════════════════════════════════════════════════════════════════ */
.page-section {
    padding: 60px 32px 24px;
    flex: 1;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    color:         #8b1a3b;
    margin-top:    0;
    margin-bottom: 8px;
    padding-bottom: 0;
    line-height:   1.25;
}

h1 { font-size: 1.7em;  font-weight: 600; font-style: italic; }
h2 { font-size: 1.4em;  font-weight: 600; width: auto; }
h3 { font-size: 1.15em; font-weight: 600; text-align: left; font-family: 'Cormorant Garamond', Georgia, serif; }
h4 { font-size: 1em;    font-weight: 600; font-family: 'Lato', 'Segoe UI', sans-serif; color: #2c1f14; }
h5, h6 { font-size: 0.9em; font-weight: 700; font-family: 'Lato', 'Segoe UI', sans-serif; color: #2c1f14; }

hgroup.title { margin-bottom: 12px; }
hgroup.title h1, hgroup.title h2 { display: inline; }
hgroup.title h2 {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    font-weight: 300;
    font-size:   0.95em;
    color:       #9c8878;
    margin-left: 8px;
    width:       auto;
    font-style:  normal;
}

h5 a:link, h5 a:visited, h5 a:active { padding: 0; text-decoration: none; }

/* ── Links ────────────────────────────────────────────────────── */
a {
    color: #8b1a3b;
    outline: none;
    text-decoration: none;
    padding: 0;
    transition: color 0.15s;
}

a:link, a:visited, a:active { color: #8b1a3b; }
a:hover { color: #e0b840; background: transparent; text-decoration: underline; }

/* ── Marks ────────────────────────────────────────────────────── */
mark {
    background: linear-gradient(to right, #fef3c7, #fde68a);
    color:         #92400e;
    padding:       1px 5px;
    border-radius: 2px;
    font-weight:   500;
}

/* ── Utility ──────────────────────────────────────────────────── */
.float-left   { float: left; }
.float-right  { float: right; }
.float-centre { }
.label { font-weight: 700; }

.clear-fix:after {
    content: "";
    clear: both;
    display: block;
    height: 0;
    visibility: hidden;
}

/* ══════════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════════ */
fieldset { border: none; margin: 0; padding: 0; }
fieldset legend { display: none; }
fieldset ol { padding: 0; list-style: none; }
fieldset ol li { padding-bottom: 8px; }

label {
    display:        block;
    font-family:    'Cinzel', Georgia, serif;
    font-size:      9.5px;
    font-weight:    600;
    color:          #8b1a3b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom:  5px;
}

label.checkbox {
    display:        inline;
    text-transform: none;
    font-weight:    400;
    font-size:      13px;
    letter-spacing: normal;
    font-family:    'Lato', 'Segoe UI', sans-serif;
    color:          #2c1f14;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    font-family:         'Lato', 'Segoe UI', sans-serif;
    font-size:           13px;
    font-weight:         400;
    color:               #2c1f14;
    background:          #fdfaf6;
    border:              1px solid #e0d2be;
    border-bottom:       2px solid #c4af95;
    border-radius:       3px 3px 0 0;
    padding:             9px 12px;
    margin:              0 0 2px 0;
    height:              auto;
    transition:          border-bottom-color 0.22s, box-shadow 0.22s, background 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color:        #e0d2be;
    border-bottom-color: #8b1a3b;
    box-shadow:          0 3px 0 0 rgba(139,26,59,0.10);
    outline:             none;
    background:          #ffffff;
}

textarea { font-family: inherit; }

input[type="checkbox"] {
    background: transparent;
    border: inherit;
    width: auto;
    margin: 0 5px 0 0;
    vertical-align: middle;
}

/* ── Primary button ───────────────────────────────────────────── */
input[type="submit"],
input[type="button"],
button {
    font-family:    'Cinzel', Georgia, serif;
    font-size:      9.5px;
    font-weight:    700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color:          #ffffff;
    background:     linear-gradient(135deg, #8b1a3b 0%, #6b0f2a 100%);
    border:         none;
    border-radius:  3px;
    cursor:         pointer;
    padding:        9px 18px;
    margin-right:   6px;
    box-shadow:     0 2px 8px rgba(139,26,59,0.30);
    transition:     background 0.18s, box-shadow 0.18s, transform 0.1s;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
    background: linear-gradient(135deg, #a82048 0%, #8b1a3b 100%);
    box-shadow: 0 4px 14px rgba(139,26,59,0.40);
    transform:  translateY(-1px);
}

input[type="submit"]:active,
input[type="button"]:active,
button:active {
    background: #4a0a1e;
    transform:  translateY(0);
    box-shadow: 0 1px 4px rgba(139,26,59,0.20);
}

td input[type="submit"],
td input[type="button"],
td button {
    font-size:      9px;
    padding:        5px 10px;
    margin-right:   4px;
    letter-spacing: 0.6px;
    transform:      none !important;
}

/* ══════════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════════ */
table {
    border-collapse: collapse;
    border-spacing:  0;
    border-style:    none;
    margin-top:      0;
    font-size:       13px;
    font-family:     'Lato', 'Segoe UI', sans-serif;
    width:           100%;
}

th {
    background:     linear-gradient(90deg, #8b1a3b 0%, #a82048 100%);
    color:          #ffffff;
    font-family:    'Cinzel', Georgia, serif;
    font-size:      9px;
    font-weight:    700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align:     left;
    padding:        11px 14px;
    border:         none;
    white-space:    nowrap;
}

th a { display: block; position: relative; }

th a:link, th a:visited, th a:active, th a:hover {
    color:           #fde68a;
    font-weight:     700;
    text-decoration: none;
    padding:         0;
}

th a:hover { color: #ffffff; }

th.asc  a:after { content: ' ▲'; font-size: 0.78em; display: inline; position: static; }
th.desc a:after { content: ' ▼'; font-size: 0.78em; display: inline; position: static; }

td {
    padding:        8px 14px;
    border:         0 none;
    border-bottom:  1px solid #efe3d4;
    color:          #2c1f14;
    vertical-align: middle;
    font-size:      13px;
}

tr:nth-child(even) > td { background-color: #fdf0e4; }
tr:hover > td            { background-color: #f5e6d4; }

tr.pager td { padding: 4px 8px; }

/* ══════════════════════════════════════════════════════════════════
   MESSAGES & VALIDATION
══════════════════════════════════════════════════════════════════ */
.message-info {
    background:    #eff6ff;
    border:        1px solid #bfdbfe;
    border-left:   4px solid #3b82f6;
    color:         #1e40af;
    padding:       12px 16px;
    border-radius: 3px;
    font-size:     13px;
    clear:         both;
    margin:        10px 0;
}

.message-error {
    color:         #e53e3e;
    font-size:     0.9em;
    font-weight:   600;
    margin:        10px 0;
    clear:         both;
    padding:       10px 14px;
    background:    #fff5f5;
    border:        1px solid #fed7d7;
    border-left:   4px solid #e53e3e;
    border-radius: 3px;
}

.message-success {
    color:         #276749;
    font-size:     0.9em;
    font-weight:   600;
    margin:        10px 0;
    clear:         both;
    padding:       10px 14px;
    background:    #f0fff4;
    border:        1px solid #9ae6b4;
    border-left:   4px solid #38a169;
    border-radius: 3px;
}

.error { color: #e53e3e; }

.field-validation-error {
    color:       #e53e3e;
    font-size:   0.82em;
    font-weight: 600;
    display:     block;
    margin-top:  3px;
}

.field-validation-valid { display: none; }

input.input-validation-error { border-color: #e53e3e; }
input[type="checkbox"].input-validation-error { border: 0 none; }

.validation-summary-errors {
    color:         #e53e3e;
    font-weight:   600;
    font-size:     0.9em;
    background:    #fff5f5;
    border:        1px solid #fed7d7;
    border-left:   4px solid #e53e3e;
    padding:       12px 16px;
    border-radius: 3px;
    margin-bottom: 14px;
}

.validation-summary-valid { display: none; }

/* ══════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════ */
#site-footer {
    background:  linear-gradient(90deg, #0c0c1e 0%, #140e2e 100%);
    border-top:  2px solid #e0b840;
    padding:     14px 32px;
    margin-top:  auto;
}

.ftr-inner {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    flex-wrap:       wrap;
    gap:             8px;
}

.ftr-firm {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size:   10px;
    color:       rgba(201,168,76,0.70);
    letter-spacing: 0.5px;
}

.ftr-note {
    font-family:    'Lato', 'Segoe UI', sans-serif;
    font-size:      10px;
    color:          rgba(201,168,76,0.40);
    letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════════════════════
   LEGACY HELPERS
══════════════════════════════════════════════════════════════════ */
.site-title { color: #8b1a3b; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.6em; margin: 0; }
.site-title a, .site-title a:hover { background: none; color: #8b1a3b; text-decoration: none; }

#loginForm              { float: left; }
#loginForm .validation-error { display: block; margin-left: 15px; }
#socialLoginForm        { float: left; margin-left: 40px; }

.contact h3 { font-size: 1.05em; }
.contact p  { margin: 4px 0 0 10px; }
.contact iframe { border: 1px solid #d4c4b0; margin: 4px 0 0 10px; }

article { float: left; width: 70%; }
aside   { float: right; width: 25%; }
aside ul { list-style: none; padding: 0; }
aside ul li { padding: 2px 0 2px 14px; }

ol.round { list-style-type: none; padding-left: 0; }
ol.round li { margin: 20px 0; padding-left: 40px; }

/* ══════════════════════════════════════════════════════════════════
   PAGE HEADER — dynamic title + branch badge
══════════════════════════════════════════════════════════════════ */
.page-hdr {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8d9c8;
}

span.page-ttl {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5em;
    font-weight: 600;
    font-style: italic;
    color: #8b1a3b;
    line-height: 1.2;
}

span.page-branch {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.72em;
    font-weight: 600;
    color: #e0b840;
    background: rgba(201,168,76,0.08);
    border: 1px solid rgba(201,168,76,0.25);
    padding: 3px 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
    align-self: center;
}

/* ══════════════════════════════════════════════════════════════════
   FORMS — labelled grid layout
══════════════════════════════════════════════════════════════════ */
.form-grid {
    max-width: 600px;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    align-items: start;
    gap: 6px 0;
    margin-bottom: 18px;
}

.form-row > label {
    font-family:    'Cinzel', Georgia, serif;
    font-size:      9px;
    font-weight:    700;
    color:          #5c4a3a;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align:     right;
    padding-top:    11px;
    padding-right:  14px;
    line-height:    1.3;
    border-right:   2px solid rgba(201,168,76,0.40);
}

.form-row .form-hint {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #9c8878;
    margin-top: 2px;
}

.form-actions {
    margin-top: 8px;
}

/* Password rules / info block */
.pwd-rules {
    margin-top: 24px;
    padding: 14px 18px;
    background: #fffdf9;
    border: 1px solid #e8d9c8;
    border-left: 3px solid #e0b840;
    border-radius: 3px;
    max-width: 720px;
}

.pwd-rules h4 {
    margin: 0 0 8px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9.5px;
    letter-spacing: 1px;
    color: #8b1a3b;
    font-style: normal;
}

.pwd-rules ul {
    margin: 0;
    padding-left: 18px;
    color: #5c4a3a;
    font-size: 12.5px;
    line-height: 1.9;
}

/* Password requirements live-check list */
.pwd-req-list {
    list-style: none;
    padding: 0.2rem 0;
    margin: 0;
    font-size: 11.5px;
    color: #5c4a3a;
    line-height: 1.8;
}
.pwd-req-list li::before {
    content: '○';
    margin-right: 0.35rem;
    color: #9c8878;
}
.pwd-req-list li.req-ok {
    color: #276749;
    font-weight: 600;
}
.pwd-req-list li.req-ok::before {
    content: '✓';
    color: #276749;
}

/* Display-only status/info TextBoxes */
.display-field {
    background: #fdf0e4 !important;
    border-color: #e8d9c8 !important;
    color: #5c4a3a !important;
    font-weight: 600 !important;
}

/* Section divider headings inside pages */
.section-hdr {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9.5px;
    font-weight: 700;
    color: #8b1a3b;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-bottom: 1px solid #e8d9c8;
    padding-bottom: 6px;
    margin: 24px 0 14px;
}

/* Search / filter bar */
.search-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 18px;
    padding: 14px 20px;
    background: linear-gradient(to right, #fdfaf6, #fdf7ee);
    border: 1px solid #e0d2be;
    border-left: 3px solid rgba(201,168,76,0.45);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 1px 6px rgba(44,31,20,0.04);
}

.search-bar label {
    display: inline;
    text-transform: none;
    font-family: 'Lato', 'Segoe UI', sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: normal;
    color: #5c4a3a;
    margin-bottom: 0;
}

/* User-rights checklist */
.rights-section { margin-top: 24px; }

.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4px 24px;
    margin: 10px 0 20px;
}

.rights-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Lato', 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #2c1f14;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    cursor: pointer;
    padding: 4px 0;
}

/* Voucher / data entry table */
.data-table {
    border-collapse: collapse;
    border: 1px solid #e8d9c8;
    border-radius: 3px;
    overflow: hidden;
    width: auto;
    margin-bottom: 12px;
}

.data-table th {
    background: linear-gradient(90deg, #8b1a3b 0%, #a82048 100%);
    color: #ffffff;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 12px;
    white-space: nowrap;
    border: none;
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #efe3d4;
    vertical-align: middle;
    background: #ffffff;
}

/* Receipt entry group borders */
.receipt-group {
    border: 1px solid #e8d9c8;
    border-left: 3px solid rgba(201,168,76,0.45);
    border-radius: 3px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

/* ── Hamburger button (always visible) ───────────────────────── */
#hamburger {
    display:       flex;
    position:      fixed;
    top:           12px;
    left:          12px;
    z-index:       500;
    width:         42px;
    height:        42px;
    padding:       0;
    background:    #0c0c1e;
    border:        1px solid rgba(201,168,76,0.45);
    border-radius: 4px;
    color:         #e0b840;
    font-size:     20px;
    font-family:   inherit;
    font-weight:   400;
    letter-spacing: 0;
    text-transform: none;
    line-height:   1;
    cursor:        pointer;
    align-items:   center;
    justify-content: center;
    box-shadow:    0 2px 12px rgba(0,0,0,0.40);
    transition:    background 0.18s;
}
#hamburger:hover {
    background: #140e2e;
    transform:  none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.40);
}

/* ── Sidebar overlay backdrop ─────────────────────────────────── */
#sidebar-overlay {
    display:    none;
    position:   fixed;
    inset:      0;
    background: rgba(0,0,0,0.52);
    z-index:    390;
}
#sidebar-overlay.active { display: block; }

/* ── Mobile layout ────────────────────────────────────────────── */
@media only screen and (max-width: 900px) {

    .page-section { padding: 60px 14px 14px; }

    table { font-size: 12px; }
    th, td { padding: 7px 8px; }

    article, aside { float: none; width: 100%; }

    #site-footer { padding: 10px 16px; }
    .ftr-note { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   V8 — PAGE HEADER
══════════════════════════════════════════════════════════════════ */
h2.page-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5em;
    font-weight: 600;
    font-style: italic;
    color: #8b1a3b;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8d9c8;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    line-height: 1.25;
}

small.office-badge {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.5em;
    font-weight: 600;
    color: #e0b840;
    background: rgba(201,168,76,0.09);
    border: 1px solid rgba(201,168,76,0.28);
    padding: 3px 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
    font-style: normal;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — ALERTS
══════════════════════════════════════════════════════════════════ */
.alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #e53e3e;
    color: #9b2335;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 16px;
    font-weight: 500;
}

.alert-ok {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-left: 4px solid #38a169;
    color: #276749;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 16px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — COLLAPSIBLE FORM PANEL
══════════════════════════════════════════════════════════════════ */
.form-panel {
    background: #ffffff;
    border: 1px solid #e0d2be;
    border-left: 3px solid rgba(201,168,76,0.45);
    border-radius: 0 4px 4px 0;
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(44,31,20,0.07);
    padding: 18px 22px;
}

.form-panel:has(details.collapsible),
.form-panel:has(.collapsible-header) {
    padding: 0;
}

details.collapsible { margin-bottom: 20px; }

summary.collapsible-header,
.collapsible-header {
    display: block;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9px;
    font-weight: 700;
    color: #5c4a3a;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 18px 12px 20px;
    background: linear-gradient(90deg, #fdf5e8 0%, #fdfaf5 60%, #fdf7ee 100%);
    border-bottom: 1px solid #e8d9c8;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

/* Hide browser's default triangle */
summary.collapsible-header::-webkit-details-marker { display: none; }
summary.collapsible-header::marker { display: none; }

summary.collapsible-header::before {
    content: '▶';
    font-size: 7px;
    margin-right: 8px;
    opacity: 0.6;
    transition: transform 0.18s;
    display: inline-block;
}

details[open] > summary.collapsible-header::before {
    transform: rotate(90deg);
}

.form-inner {
    padding: 22px 26px 18px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — FORM UTILITIES
══════════════════════════════════════════════════════════════════ */
.req {
    color: #e53e3e;
    font-size: 11px;
    font-weight: 700;
    margin-left: 1px;
}

.form-input {
    width: 100%;
    max-width: 360px;
    display: block;
}

.form-input-sm {
    display: inline-block;
    min-width: 110px;
    width: auto;
}

.form-input-inline {
    width: 100%;
    padding: 4px 7px !important;
    font-size: 12px !important;
    margin: 0 !important;
    min-width: 70px;
}

/* Password show/hide wrapper */
.pwd-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 360px;
}

.pwd-wrap .form-input,
.pwd-wrap .lp-input { flex: 1; max-width: none; }

.pwd-toggle {
    font-family: 'Lato', sans-serif;
    font-size: 10px !important;
    padding: 8px 10px !important;
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(135deg, #5c4a3a 0%, #3d2e1e 100%) !important;
    letter-spacing: 0.4px !important;
    box-shadow: none !important;
}

.pwd-toggle:hover {
    background: linear-gradient(135deg, #7a6352 0%, #5c4a3a 100%) !important;
    transform: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — BUTTON VARIANTS
══════════════════════════════════════════════════════════════════ */
/* .btn-primary uses the base button styles */
.btn-primary {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #8b1a3b 0%, #6b0f2a 100%);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 9px 18px;
    box-shadow: 0 2px 8px rgba(139,26,59,0.30);
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
    display: inline-block;
    text-decoration: none !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #a82048 0%, #8b1a3b 100%);
    box-shadow: 0 4px 14px rgba(139,26,59,0.40);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-secondary {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #2c1f14;
    background: linear-gradient(135deg, #d4b86a 0%, #e0b840 100%);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 9px 18px;
    box-shadow: 0 2px 6px rgba(201,168,76,0.35);
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
    display: inline-block;
    text-decoration: none !important;
}
.btn-secondary:hover {
    background: linear-gradient(135deg, #e0c878 0%, #d4b86a 100%);
    box-shadow: 0 4px 12px rgba(201,168,76,0.45);
    transform: translateY(-1px);
    color: #2c1f14 !important;
}

/* Table action link-buttons */
.btn-edit, .btn-save, .btn-cancel, .btn-delete, .btn-danger {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    padding: 5px 10px;
    display: inline-block;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.btn-edit {
    color: #1a5276;
    background: rgba(26,82,118,0.09);
    border: 1px solid rgba(26,82,118,0.22);
}
.btn-edit:hover { background: rgba(26,82,118,0.17); color: #1a5276 !important; transform: none; }

.btn-save {
    color: #276749;
    background: rgba(39,103,73,0.10);
    border: 1px solid rgba(39,103,73,0.25);
}
.btn-save:hover { background: rgba(39,103,73,0.18); color: #276749 !important; transform: none; }

.btn-cancel {
    color: #5c4a3a;
    background: rgba(92,74,58,0.08);
    border: 1px solid rgba(92,74,58,0.20);
}
.btn-cancel:hover { background: rgba(92,74,58,0.14); color: #5c4a3a !important; transform: none; }

.btn-delete {
    color: #c0392b;
    background: rgba(192,57,43,0.07);
    border: 1px solid rgba(192,57,43,0.20);
}
.btn-delete:hover { background: rgba(192,57,43,0.14); color: #c0392b !important; transform: none; }

.btn-danger {
    color: #ffffff;
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    border: none;
    box-shadow: 0 2px 6px rgba(192,57,43,0.30);
}
.btn-danger:hover { background: linear-gradient(135deg, #d44235 0%, #c0392b 100%); color: #ffffff !important; transform: none; }

/* ══════════════════════════════════════════════════════════════════
   V8 — SEARCH RESULTS
══════════════════════════════════════════════════════════════════ */
.result-count {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #5c4a3a;
    margin: 0 0 8px;
    letter-spacing: 0.2px;
}

.no-results {
    font-style: italic;
    color: #9c8878;
    font-size: 13px;
    padding: 16px 4px;
}

/* Inline-edit row highlight */
tr.edit-row > td,
tr.edit-row > form > td {
    background: #fffdf0 !important;
    border-bottom: 2px solid #e0b840;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — DASHBOARD
══════════════════════════════════════════════════════════════════ */
.dash-hero {
    background:
        radial-gradient(ellipse at top left, rgba(201,168,76,0.10) 0%, transparent 50%),
        linear-gradient(135deg, #0c0c1e 0%, #1a0e30 55%, #0c0c1e 100%);
    border-radius: 6px;
    padding: 36px 44px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #e0b840;
    box-shadow: 0 6px 28px rgba(0,0,0,0.16);
}
.dash-hero::after {
    content: '\2696';
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 150px;
    line-height: 1;
    color: rgba(201,168,76,0.05);
    pointer-events: none;
}
.dash-greeting {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9px;
    font-weight: 700;
    color: rgba(201,168,76,0.65);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    position: relative;
}
.dash-username {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4em;
    font-weight: 600;
    font-style: italic;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 12px;
    position: relative;
}
.dash-meta {
    font-family: 'Lato', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(201,168,76,0.50);
    letter-spacing: 0.4px;
    position: relative;
}
.dash-meta span.dash-sep {
    margin: 0 8px;
    opacity: 0.4;
}

.dash-section-hdr {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 8.5px;
    font-weight: 700;
    color: #8b1a3b;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8d9c8;
}

.dash-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.dash-module-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 18px 18px;
    background: #ffffff;
    border: 1px solid #e8d9c8;
    border-top: 3px solid #e0b840;
    border-radius: 4px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(44,31,20,0.04);
    transition: box-shadow 0.2s, transform 0.18s, border-top-color 0.2s;
    cursor: pointer;
}
.dash-module-card:hover {
    box-shadow: 0 8px 26px rgba(44,31,20,0.12);
    transform: translateY(-3px);
    border-top-color: #8b1a3b;
    text-decoration: none !important;
}

.dmc-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b1a3b 0%, #6b0f2a 100%);
    color: #ffffff;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(139,26,59,0.28);
    line-height: 1;
}

.dmc-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9.5px;
    font-weight: 700;
    color: #2c1f14;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    line-height: 1.35;
}

.dmc-desc {
    font-family: 'Lato', sans-serif;
    font-size: 11.5px;
    color: #9c8878;
    line-height: 1.55;
    flex: 1;
}

.dash-session-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #e8d9c8;
    border-left: 3px solid rgba(201,168,76,0.45);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(44,31,20,0.04);
    font-size: 12.5px;
    color: #5c4a3a;
}
.dash-session-strip strong {
    color: #2c1f14;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — DASHBOARD LICENSE FOOTER
══════════════════════════════════════════════════════════════════ */
.dash-license {
    margin-top: 2.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e8d9c8;
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem;
    color: #a08878;
    line-height: 1.7;
    letter-spacing: 0.02em;
}
.dash-license-primary {
    color: #7a6355;
    font-weight: 600;
    letter-spacing: 0.06em;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — SIDEBAR SIGN-OUT BUTTON (styled to match nav items)
══════════════════════════════════════════════════════════════════ */
.sb-signout {
    display: flex;
    align-items: center;
    width: 100%;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px !important;
    font-weight: 700;
    color: rgba(201,168,76,0.65) !important;
    background: transparent !important;
    border: none;
    border-left: 3px solid transparent;
    padding: 10px 20px 10px 22px !important;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none !important;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
    text-align: left;
    margin: 0;
}
.sb-signout::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border: 1px solid rgba(201,168,76,0.40);
    transform: rotate(45deg);
    margin-right: 12px;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s, transform 0.22s;
}
.sb-signout:hover {
    color: #ffffff !important;
    background: rgba(201,168,76,0.08) !important;
    border-left-color: #e0b840;
    box-shadow: none !important;
    transform: none !important;
}
.sb-signout:hover::before {
    background: #e0b840;
    border-color: #e0b840;
    transform: rotate(45deg) scale(1.5);
}

/* ══════════════════════════════════════════════════════════════════
   V8 — LOGIN PAGE
══════════════════════════════════════════════════════════════════ */
body.login-body {
    background: linear-gradient(135deg, #0c0c1e 0%, #140e2e 65%, #0c0c1e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lp-card {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 28px 80px rgba(0,0,0,0.60), 0 0 0 1px rgba(201,168,76,0.12);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.lp-brand {
    background: linear-gradient(135deg, #8b1a3b 0%, #6b0f2a 100%);
    padding: 30px 32px 22px;
    text-align: center;
    border-bottom: 3px solid #e0b840;
    position: relative;
    overflow: hidden;
}
.lp-brand::after {
    content: '\2696';
    position: absolute;
    right: 16px;
    bottom: -10px;
    font-size: 90px;
    color: rgba(201,168,76,0.08);
    pointer-events: none;
}

.lp-scales {
    font-size: 46px;
    color: #e0b840;
    text-shadow: 0 0 22px rgba(201,168,76,0.55);
    margin-bottom: 14px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.lp-firm {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.lp-rule {
    width: 40px;
    height: 1.5px;
    background: linear-gradient(to right, transparent, #e0b840, transparent);
    margin: 0 auto 10px;
    position: relative;
    z-index: 1;
}

.lp-tagline {
    font-family: 'Lato', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.50);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.lp-form {
    padding: 26px 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lp-errmsg {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #e53e3e;
    color: #9b2335;
    padding: 9px 12px;
    border-radius: 3px;
    font-size: 12.5px;
    font-weight: 500;
}

.lp-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lp-lbl {
    font-family:    'Cinzel', Georgia, serif;
    font-size:      9px;
    font-weight:    700;
    color:          #5c4a3a;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom:  5px;
    display:        flex;
    align-items:    center;
    gap:            7px;
}
.lp-lbl::before {
    content:     '';
    display:     block;
    width:       2px;
    height:      11px;
    background:  linear-gradient(to bottom, #d4b86a 0%, #e0b840 100%);
    border-radius: 1px;
    flex-shrink: 0;
}

.lp-input {
    font-family:   'Lato', sans-serif;
    font-size:     13.5px;
    color:         #2c1f14;
    background:    #fffdf9;
    border:        1.5px solid #d4c4b0 !important;
    border-radius: 3px !important;
    padding:       10px 13px;
    width:         100%;
    transition:    border-color 0.18s, box-shadow 0.18s;
    margin:        0;
}
.lp-input:focus {
    border-color: #8b1a3b !important;
    box-shadow:   0 0 0 3px rgba(139,26,59,0.10);
    outline:      none;
    background:   #ffffff;
}

.lp-btn {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #8b1a3b 0%, #6b0f2a 100%);
    border: none;
    border-radius: 3px;
    padding: 13px 20px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(139,26,59,0.38);
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
    margin-top: 4px;
    width: 100%;
}
.lp-btn:hover {
    background: linear-gradient(135deg, #a82048 0%, #8b1a3b 100%);
    box-shadow: 0 5px 18px rgba(139,26,59,0.48);
    transform: translateY(-1px);
}

.lp-copy {
    font-family: 'Lato', sans-serif;
    font-size: 10px;
    color: #9c8878;
    text-align: center;
    padding: 11px 32px 18px;
    border-top: 1px solid #e8d9c8;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — IDLE TIMEOUT WARNING MODAL
══════════════════════════════════════════════════════════════════ */
#idle-warning {
    position: fixed;
    inset: 0;
    background: rgba(12,12,30,0.72);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.idle-modal {
    background: #fdf7ee;
    border: 1px solid #e8d9c8;
    border-top: 3px solid #e0b840;
    border-radius: 6px;
    padding: 2rem 2.5rem 1.8rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 12px 48px rgba(12,12,30,0.50);
}
.idle-modal-icon {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}
.idle-modal-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2c1f14;
    letter-spacing: 0.04em;
    margin-bottom: 0.85rem;
}
.idle-modal-body {
    font-family: 'Lato', sans-serif;
    font-size: 0.875rem;
    color: #5c4a3a;
    line-height: 1.7;
    margin-bottom: 1.4rem;
}
.idle-modal-body strong {
    color: #8b1a3b;
    font-size: 1rem;
}
.idle-modal-btn {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #e0b840 0%, #a07830 100%);
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.8rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(160,120,48,0.38);
    transition: background 0.15s, transform 0.1s;
}
.idle-modal-btn:hover {
    background: linear-gradient(135deg, #d4b860 0%, #b08840 100%);
    transform: translateY(-1px);
}

/* ── Contact info table ── */
.info-table { width:100%; border-collapse:collapse; }
.info-table th, .info-table td { padding:10px 14px; border-bottom:1px solid #e8dcc8; vertical-align:top; }
.info-table th { width:140px; background:none; color:#8b1a3b; font-family:'Cinzel','Segoe UI',sans-serif; font-size:.82rem; letter-spacing:.04em; text-transform:uppercase; text-align:left; }
.info-table td { color:#2c1f14; }
.info-table a { color:#8b1a3b; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom:none; }

/* ── Field container (div wrapping .lp-lbl + input) ── */
div:has(> .lp-lbl) {
    display:        flex;
    flex-direction: column;
    gap:            0;
}

/* ── Tab nav ── */
.tab-nav { display:flex; gap:4px; border-bottom:2px solid #e0b840; margin-bottom:0; }
.tab-btn { display:inline-block; padding:8px 20px; font-family:'Cinzel','Segoe UI',sans-serif; font-size:.78rem; letter-spacing:.07em; text-transform:uppercase; color:#8b1a3b; text-decoration:none; border:1px solid transparent; border-bottom:none; border-radius:4px 4px 0 0; transition:background .15s, color .15s; }
.tab-btn:hover { background:#f5ede0; color:#5c4a3a; }
.tab-active { background:#ffffff !important; border-color:#e0b840 !important; color:#0c0c1e !important; font-weight:700; }

/* ══════════════════════════════════════════════════════════════════
   V8 — PAGE SECTION BANNERS (Voucher, OR, BankRec headings)
══════════════════════════════════════════════════════════════════ */
.page-section-banner {
    display:         block;
    font-family:     'Cinzel', Georgia, serif;
    font-size:       .75rem;
    font-weight:     700;
    letter-spacing:  .20em;
    text-transform:  uppercase;
    color:           #e0b840;
    background:      linear-gradient(135deg, #0c0c1e 0%, #1a1035 100%);
    padding:         9px 20px 8px;
    border-radius:   4px 4px 0 0;
    border-left:     4px solid #e0b840;
    margin-bottom:   1rem;
}

/* ══════════════════════════════════════════════════════════════════
   V8 — VOUCHER FORM SECTIONS
══════════════════════════════════════════════════════════════════ */
.vf-section {
    margin-bottom: 4px;
}

.vf-section-label {
    font-family:    'Cinzel', Georgia, serif;
    font-size:      7.5px;
    font-weight:    700;
    color:          rgba(201,168,76,0.80);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom:  8px;
    display:        flex;
    align-items:    center;
    gap:            8px;
}
.vf-section-label::after {
    content:    '';
    flex:       1;
    height:     1px;
    background: linear-gradient(to right, rgba(201,168,76,0.35), transparent);
}

.vf-row {
    display:   flex;
    flex-wrap: wrap;
    gap:       10px 16px;
    align-items: flex-end;
}

.vf-sep {
    height:     1px;
    border:     none;
    background: linear-gradient(to right, rgba(201,168,76,0.30), transparent);
    margin:     14px 0 12px;
}

/* ── Official Receipt field rows ─────────────────────────────── */
.or-field-row {
    display:       flex;
    align-items:   center;
    margin-bottom: 7px;
    gap:           8px;
}
.or-lbl {
    font-family:     'Cinzel', serif;
    font-size:       9.5px;
    font-weight:     700;
    letter-spacing:  1px;
    text-transform:  uppercase;
    color:           #8b1a3b;
    width:           170px;
    min-width:       170px;
    display:         inline-block;
    flex-shrink:     0;
}
.or-receipt-group {
    border-left:  3px solid rgba(201,168,76,0.30);
    padding-left: 10px;
    margin:       6px 0 10px;
}

/* ── Official Receipt print copies ─────────────────────────── */
.or-print-copy {
    border: 1px solid #bbb;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    font-size: 11px;
    background: #fff;
    color: #000;
}
.or-print-label {
    text-align: right;
    font-size: 10px;
    font-style: italic;
    color: #444;
    margin-bottom: 6px;
}
.or-print-hdr {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
}
.or-print-left { vertical-align: top; }
.or-print-right { vertical-align: top; text-align: right; min-width: 160px; }
.or-cn-name {
    font-size: 15px;
    font-weight: bold;
    font-family: '標楷體', 'DFKai-SB', 'SimSun', serif;
}
.or-en-name {
    font-size: 17px;
    font-weight: bold;
    font-family: 'Aldhabi', 'Times New Roman', serif;
}
.or-addr { font-size: 9px; color: #333; }
.or-receipt-title {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
}
.or-receipt-no { font-size: 12px; font-weight: bold; margin-top: 4px; }
.or-print-meta {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 6px;
}
.or-ml { font-weight: bold; width: 80px; padding-right: 8px; white-space: nowrap; }
.or-print-data {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 6px;
}
.or-print-data th,
.or-print-data td {
    border: 1px solid #555;
    padding: 3px 5px;
    vertical-align: top;
}
.or-print-data th {
    background: #eee;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
}
.or-rfrom   { width: 20%; }
.or-amtcell { text-align: right; white-space: nowrap; }
.or-totalcell {
    text-align: right;
    font-weight: bold;
    white-space: nowrap;
    vertical-align: middle;
    width: 15%;
}
.or-print-legend {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    margin-bottom: 6px;
    border: 1px solid #777;
}
.or-print-legend td {
    padding: 2px 4px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}
.or-print-notice {
    font-size: 9px;
    line-height: 1.55;
    margin-bottom: 10px;
}
.or-print-sig {
    text-align: right;
    font-size: 10px;
    margin-top: 16px;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: .9rem 0 .4rem;
    flex-wrap: wrap;
}
.pg-btn, .pg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 3px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #8b1a3b;
    background: #fff;
    border: 1px solid #e8d9c8;
    transition: background .15s, border-color .15s;
}
.pg-btn:hover, .pg-num:hover {
    background: #fdf7ee;
    border-color: #8b1a3b;
}
.pg-num.active {
    background: #8b1a3b;
    color: #fff;
    border-color: #8b1a3b;
    cursor: default;
}

/* ── Print media: show only the 3 receipt copies ───────────── */
@media print {
    body { visibility: hidden; }
    #orPrintArea { visibility: visible; position: fixed; top: 0; left: 0; width: 100%; }
    #orPrintArea * { visibility: visible; }
    #orPrintArea .or-print-copy {
        page-break-after: always;
        border: none;
        margin: 0;
        padding: 10mm 12mm;
    }
    #orPrintArea .or-print-copy:last-child { page-break-after: avoid; }
}
