/* EnyaBooks — styling matched to the existing screens */
:root {
    --eb-sidebar: #4f5563;
    --eb-topbar: #9eadc6;
    --eb-head: #9eadc6;
    --eb-accent: #a887e6;
    --eb-accent-dark: #8f6bd8;
    --eb-link: #2b6fd6;
    --eb-text: #555;
    --eb-border: #e3e6ea;
}

body { font-family: 'Poppins', sans-serif; color: var(--eb-text); background: #f3f4f6; margin: 0; }

.eb-shell { display: flex; min-height: 100vh; }
.eb-sidebar { width: 237px; flex-shrink: 0; background: var(--eb-sidebar); color: #c9ccd3; }
.eb-brand { color: #fff; font-weight: 600; font-size: 19px; text-align: center; padding: 26px 0 30px; letter-spacing: .5px; }
.eb-nav { display: flex; align-items: center; gap: 10px; color: #c9ccd3; text-decoration: none; padding: 14px 16px; font-size: 15px; }
.eb-nav:hover { color: #fff; }
.eb-sub { display: block; color: #c9ccd3; text-decoration: none; padding: 10px 46px; font-size: 15px; }
.eb-sub.active { color: #fff; font-weight: 500; }

.eb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.eb-topbar { background: var(--eb-topbar); height: 43px; display: flex; align-items: center; padding: 0 12px 0 14px; color: #fff; font-size: 18px; }
.eb-user { margin-left: auto; font-size: 24px; font-weight: 300; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; padding-left: 12px; }
.eb-content { padding: 12px 20px 0 28px; }
.eb-card { background: #fff; padding: 26px 26px 40px; min-height: calc(100vh - 60px); }
.eb-title { font-size: 14px; font-weight: 500; color: #222; letter-spacing: .3px; }

.eb-btn { background: var(--eb-accent); color: #fff; border-radius: 0; padding: 7px 14px; }
.eb-btn:hover { background: var(--eb-accent-dark); color: #fff; }

.eb-table { font-size: 14px; margin: 0; }
.eb-table thead th { background: var(--eb-head); color: #fff; font-weight: 400; border: 0; padding: 9px 8px; }
.eb-table td { padding: 5px 8px; border-color: #eceef1; vertical-align: middle; }
.eb-table tbody tr:nth-child(odd) td { background: #f7f8fa; }
.eb-group td { font-weight: 500; color: #555; }
.eb-primary td { color: #555; font-weight: 600; }
.eb-link { color: var(--eb-link); text-decoration: none; font-weight: 400; }
.eb-link:hover { text-decoration: underline; }
.eb-ico { color: #444; font-size: 15px; margin-left: 4px; text-decoration: none; }
.eb-ico:hover { color: var(--eb-accent-dark); }
.eb-ico.disabled { color: #c8c8c8; cursor: not-allowed; }

/* modals */
.eb-modal-title { font-weight: 300; font-size: 28px; color: #222; }
.eb-label { font-weight: 500; font-size: 17px; color: #555; }
.eb-input { border-radius: 0; border-color: var(--eb-border); padding: 10px 14px; }
.eb-btn-close { background: #e6e9ec; color: #555; border-radius: 0; padding: 10px 24px; }
.eb-btn-submit { background: var(--eb-accent); color: #fff; border-radius: 0; padding: 10px 24px; font-weight: 500; }
.eb-btn-submit:hover { background: var(--eb-accent-dark); color: #fff; }
.eb-section { border-top: 1px solid var(--eb-border); padding-top: 14px; margin-top: 4px; }
.eb-section legend { font-size: 14px; font-weight: 500; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.select2-container .select2-selection--single { height: 46px; border-radius: 4px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 44px; padding-left: 16px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }

/* panels (settings screens) */
.eb-panel { border: 1px solid var(--eb-border); padding: 20px; }

/* client addresses */
.eb-subtitle { font-size: 13px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.eb-addr-table { font-size: 13px; }
.eb-addr-table thead th { background: #eef1f6; color: #555; font-weight: 500; border: 0; }
.eb-addr-table td { vertical-align: top; }
.eb-addr-editor { background: #f7f5fd; border: 1px solid #e3dcf7; padding: 14px; margin-top: 6px; }

/* top bar session info + logout button */
.eb-session { display: flex; gap: 18px; font-size: 14px; opacity: .95; }
.eb-nav-btn { background: none; border: 0; width: 100%; text-align: left; }

/* sidebar accordion */
.eb-nav-btn { color: #c9ccd3; font-size: 15px; display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.eb-nav-btn:hover, .eb-nav.open { color: #fff; }
.eb-chev { transition: transform .15s; }
.eb-nav.open .eb-chev { transform: rotate(90deg); }
.eb-group { padding-bottom: 6px; }

/* bank / cash */
.eb-filters .form-control, .eb-filters .form-select { font-size: 14px; }
.eb-tile { border: 1px solid var(--eb-border); padding: 10px 14px; background: #fafbfc; height: 100%; color: inherit; }
.eb-tile-l { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .4px; }
.eb-tile-v { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.eb-tile-warn { background: #fff7e6; border-color: #f3d38a; }
.eb-bank-table td { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.eb-bank-table .eb-narr { word-break: break-word; }
.eb-opening-row td { background: #eef1f6 !important; }
.eb-uncat td { background: #fffaf0 !important; }
.eb-acct { border: 1px solid var(--eb-border); background: #fff; border-radius: 4px; padding: 3px 8px; font-size: 13px;
           max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; width: 100%; }
.eb-acct:hover { border-color: var(--eb-accent); }
.eb-acct-uncat { border-color: #f0ad4e; color: #a15c00; background: #fff4e0; }
.eb-bulkbar { background: #f3effc; border: 1px solid #e3dcf7; padding: 6px 12px; font-size: 14px; }
.eb-imp-summary .badge { font-size: 12px; }
.eb-doc-count { position: absolute; top: -6px; right: -8px; background: var(--eb-accent); color: #fff; border-radius: 8px;
                font-size: 10px; line-height: 1; padding: 2px 4px; font-style: normal; }
.eb-dropzone { border: 2px dashed #d5cdee; background: #faf8ff; text-align: center; padding: 18px; color: #666; }
.eb-dropzone.over { border-color: var(--eb-accent); background: #f1ebff; }
/* inline account dropdown in the list */
.eb-acct-cell .select2-container { min-width: 210px; }
.eb-acct-cell .select2-selection--single { height: 30px !important; }
.eb-acct-cell .select2-selection__rendered { line-height: 28px !important; font-size: 13px; padding-left: 8px !important; }
.eb-acct-cell .select2-selection__arrow { height: 28px !important; }
.eb-saved { animation: ebsaved 1.2s; }
@keyframes ebsaved { from { background: #d9f7e3; } to { background: transparent; } }

/* restore countdown */
.eb-countdown { font-size: 54px; font-weight: 300; color: #dc3545; line-height: 1.1; margin-bottom: 4px; }

/* sign-in screen */
.eb-auth-body { background: #f0f0f0; min-height: 100vh; }
.eb-auth-topline { height: 14px; background: #333d2e; }
.eb-auth-wrap { max-width: 460px; margin: 0 auto; padding: 48px 16px 24px; }
.eb-auth-wrap.eb-auth-wide { max-width: 780px; }
.eb-setup-step { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--eb-accent); }
.eb-setup-sec { border-top: 1px solid #e5e5e5; padding-top: 16px; margin-top: 18px; }
.eb-setup-sec h2 { font-size: 17px; font-weight: 600; color: #333; margin-bottom: 12px; }
.eb-auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.eb-auth-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--eb-accent); color: #fff;
                display: grid; place-items: center; font-weight: 600; font-size: 22px; }
.eb-auth-name { font-weight: 600; font-size: 20px; color: #333; line-height: 1.1; }
.eb-auth-tag { font-size: 12px; color: #888; letter-spacing: .4px; text-transform: uppercase; }
.eb-auth-card { background: #fff; border: 1px solid #ddd; padding: 28px 30px 26px; }
.eb-auth-title { font-size: 34px; font-weight: 300; color: #333; margin-bottom: 18px; }
.eb-auth-label { font-weight: 600; color: #333; margin-bottom: 6px; }
.eb-auth-input { padding: 10px 12px; border-radius: 4px; }
.eb-auth-foot { text-align: center; color: #999; font-size: 12px; margin-top: 18px; }

@media (max-width: 768px) {
    .eb-session { display: none; }
    .eb-sidebar { display: none; }
    .eb-content { padding: 8px; }
    .eb-user { font-size: 18px; }
}
.eb-imp-skip td { color: #9aa1a9 !important; text-decoration: line-through; text-decoration-color: #c9ced4; }
.eb-imp-skip td:last-child { text-decoration: none; }
/* Account filter (type to search) sized like the other filter boxes */
.eb-filters .select2-container .select2-selection--single { height: 38px; border-color: #dee2e6; border-radius: .375rem; }
.eb-filters .select2-container .select2-selection__rendered { line-height: 36px; font-size: 14px; padding-left: 12px; }
.eb-filters .select2-container .select2-selection__arrow { height: 36px; }
/* Journal lines */
.eb-jv-lines thead th { background: #f1f3f6; font-weight: 500; font-size: 13px; border-bottom: 1px solid var(--eb-border); }
.eb-jv-lines td { vertical-align: middle; }
.eb-jv-lines .select2-container .select2-selection--single { height: 31px; }
.eb-jv-lines .select2-container .select2-selection__rendered { line-height: 29px; font-size: 13.5px; }
.eb-jv-lines .select2-container .select2-selection__arrow { height: 29px; }
/* Purchase */
.eb-pu-box { border: 1px solid var(--eb-border); background: #fafbfc; padding: 12px 14px; }
.eb-pu-lines.eb-no-gst .eb-gst { display: none; }
.eb-pu-lines.eb-type-i .eb-local { display: none; }
.eb-pu-lines.eb-type-l .eb-igst { display: none; }
@media (min-width: 1300px) { .eb-modal-wide { max-width: 1260px; } }
.eb-recon-tile { cursor: pointer; }
.eb-recon-tile.active { outline: 2px solid var(--eb-accent); }
/* Invoice design */
.eb-logo-box { width: 200px; height: 80px; border: 1px dashed var(--eb-border); display: flex; align-items: center; justify-content: center; background: #fff; }
.eb-logo-box img { max-width: 190px; max-height: 70px; }
.eb-swatch { width: 26px; height: 26px; border: 2px solid #fff; outline: 1px solid var(--eb-border); border-radius: 50%; padding: 0; }
.eb-tpl-list .list-group-item { position: relative; }
.eb-tpl-list .active-tpl { border-left: 4px solid var(--eb-accent); background: #f7f4fd; }
.eb-tpl-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
/* Reports */
.eb-rep-table { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.eb-rep-table thead th { background: var(--eb-head); color: #fff; font-weight: 400; border: 0; }
.eb-rep-table .eb-rep-group td { font-weight: 600; background: #f4f6f9; }
.eb-rep-table .eb-rep-total td { font-weight: 700; border-top: 2px solid #999; background: #eef1f5; }
.eb-rep-table .eb-jv-first td { border-top: 1px solid #c9ced6; }
.eb-rep-table .eb-jv-narr td { border-top: 0; padding-top: 0; }
@media print {
    .eb-sidebar, .eb-topbar, .d-print-none { display: none !important; }
    .eb-main { margin: 0 !important; }
    .eb-content { padding: 0 !important; }
    .eb-card { padding: 0 !important; min-height: 0 !important; }
    .eb-rep-table thead th { color: #000; background: #e9ecef !important; }
    a { color: inherit !important; text-decoration: none !important; }
}
/* report heading like the printed books */
.eb-rep-head { text-align: center; position: relative; margin-bottom: 14px; }
.eb-rep-head h1 { font-size: 28px; font-weight: 400; margin: 0 0 6px; }
.eb-rep-company { font-size: 20px; }
.eb-rep-period { font-size: 16px; margin-top: 4px; }
.eb-rep-tools { position: absolute; right: 0; top: 0; display: flex; gap: 4px; }
.eb-pl .eb-pl-sub td { font-weight: 600; border-top: 1px solid #999; }
.eb-ledger .eb-lg-name td { font-weight: 700; font-size: 14px; background: #fff; padding-top: 10px; border-bottom: 1px solid #c9ced6; }
.eb-ledger .eb-lg-name a { color: #333; text-decoration: none; }
.eb-ledger .eb-lg-close td { border-bottom: 2px solid #c9ced6; }
.eb-doc-btn { display: inline-flex; width: 26px; height: 24px; align-items: center; justify-content: center; border: 1px solid #ccc;
              border-radius: 3px; color: #333; background: #fafafa; text-decoration: none; }
.eb-doc-btn.has { background: #7cb342; border-color: #5d8f2e; color: #fff; }
.eb-doc-btn .eb-doc-count { display: none; }
.eb-table tfoot .eb-coa-total td { font-weight: 700; background: #eef1f5; border-top: 2px solid #c9ced6; }
/* Opening balances */
.eb-ob td { vertical-align: middle; }
.eb-ob .eb-ob-diff td { background: #fff8e1; font-style: italic; }
.eb-ob input.eb-ob-changed { background: #fff3cd; border-color: #e0b84a; }
.eb-tile-ok { border-color: #a5d6a7; background: #f1f8f1; }

/* Amazon purchase list: compact so all columns fit the screen */
.eb-amz-table { font-size: 12.5px; }
.eb-amz-table > :not(caption) > * > * { padding: 5px 6px; }
.eb-amz-table .eb-amz-cat { max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-ob tr.eb-ac-changed td { background: #fff3cd; }
.eb-ap-bad td { background: #fff5f5; }
.eb-ap-changed td { background: #fff3cd; }
.eb-si-lines.eb-export .eb-unit { display: none; }
#ledgerModal { z-index: 1060; }
.modal-backdrop.show ~ .modal-backdrop.show { z-index: 1058; }

/* dashboard */
.eb-dash-box { border: 1px solid #e3e3e3; padding: 16px 18px 18px; background: #fff; height: 100%; }
.eb-dash-h { font-size: 30px; font-weight: 300; color: #333; margin-bottom: 14px; }
.eb-dash-h2 { font-size: 17px; font-weight: 600; color: #555; margin: 18px 0 6px; }
.eb-dash-table td { border-color: #eee; padding: 4px 8px; }
.eb-dash-table tbody tr:nth-child(odd) td { background: #fafafa; }
.eb-dash-table a { text-decoration: none; }

/* Settings > Add-ons */
.eb-addon { border: 1px solid #e3e3e3; background: #fff; padding: 16px 18px; height: 100%; }
.eb-addon.on { border-color: #b9dfc6; background: #fbfefc; }
.eb-addon-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: #eef4fb; color: #1d5a86; flex: none; }
.eb-addon-t { font-size: 18px; font-weight: 600; color: #333; }

/* top bar: year / company switch */
.eb-tb-dd { color: #fff; text-decoration: none; }
.eb-tb-dd:hover { color: #fff; opacity: .85; }
.eb-topbar .dropdown-menu { font-size: 14px; max-height: 70vh; overflow-y: auto; }
.eb-topbar .dropdown-menu form { margin: 0; }
.eb-user.dropdown { overflow: visible; }

/* ---- Stock Add-On ---- */
.eb-nt-lines.eb-no-gst .eb-gst { display: none; }
.eb-stock-pick { font-size: 12px; }
.eb-stock-note { font-size: 11px; line-height: 1.2; }
.eb-si-lines.eb-export .eb-stock-note, .eb-si-lines.eb-export .eb-stock-list { display: none !important; }
/* the description box also picks a stock item: the matching items below it */
.eb-stock-list { position: fixed; z-index: 1070; background: #fff; border: 1px solid #d0d5dd; border-radius: 6px;
                 box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.eb-stock-list button { display: flex; justify-content: space-between; gap: 10px; width: 100%; border: 0; background: none; text-align: left;
                        padding: 6px 10px; font-size: 13px; }
.eb-stock-list button small { color: #6c757d; white-space: nowrap; }
.eb-stock-list button.active, .eb-stock-list button:hover { background: #efeafc; }
.eb-stock-note a.js-unitem { color: #6c757d; text-decoration: none; font-weight: 600; padding: 0 4px; }
.eb-stock-note a.js-unitem:hover { color: #c0392b; }
.eb-stock-tabs .nav-link { padding: 6px 14px; }

/* Journal: several TDS lines (one per deductee) */
.eb-tds-row + .eb-tds-row { border-top: 1px dashed var(--bs-border-color, #ccc); margin-top: .5rem; padding-top: .5rem; }

/* Chart of Accounts: Front (Dashboard and mobile app) Y / N */
.eb-yn { border: 1px solid #d8d2e6; background: #fff; color: #8a8597; border-radius: 6px; width: 30px; height: 24px; font-size: 12px; font-weight: 700; line-height: 1; }
.eb-yn.on { background: #8f6ad6; border-color: #8f6ad6; color: #fff; }

/* drop-downs with more than 9 choices: a search box (eb-search-select.js) */
.eb-ss.select2-container { max-width: 100%; }
.eb-ss-sm .select2-selection--single { height: 31px !important; }
.eb-ss-sm .select2-selection--single .select2-selection__rendered { line-height: 29px !important; padding-left: 8px !important; font-size: .875rem; }
.eb-ss-sm .select2-selection--single .select2-selection__arrow { height: 29px !important; }
