/* EBB_THEME_V2: purple as the single lead colour, green only for "done/received" states,
   a compact header, larger upload actions and consistent spacing. Loaded last. */
:root{
  --ebb-purple:#6a4a86; --ebb-purple-dark:#553a6e; --ebb-purple-soft:#f2ecf7; --ebb-purple-line:#e2d7ec;
  --ebb-green:#3f7a4f; --ebb-green-soft:#eaf4ec; --ebb-text:#282333; --ebb-muted:#6f6878;
}
a{color:var(--ebb-purple)}
a:hover{color:var(--ebb-purple-dark)}
button{background:var(--ebb-purple)}
button.secondary,.secondary{background:var(--ebb-purple-soft);color:var(--ebb-purple-dark)}
button:disabled{background:#ddd3e6!important;color:#6d6478!important;cursor:not-allowed;opacity:1}
.success{color:var(--ebb-green)}
.hint{color:var(--ebb-muted)}

/* Header: smaller logo, language switch in the same row. */
header[data-ebb-personal-bar]{padding-block:10px!important;gap:12px!important}
header[data-ebb-personal-bar] img[src*="ebb-logo"]{height:56px!important;max-height:56px!important;max-width:130px!important}
header[data-ebb-personal-bar] > span{font-size:1.35rem!important}
header[data-ebb-personal-bar] .ebb-language{padding:0;flex:0 0 auto}
header[data-ebb-personal-bar] .ebb-language button{min-width:38px;min-height:36px;padding:4px 8px}
@media(max-width:600px){
  header[data-ebb-personal-bar]{gap:8px!important;padding-inline:12px!important}
  header[data-ebb-personal-bar] img[src*="ebb-logo"]{height:44px!important;max-height:44px!important;max-width:96px!important}
  header[data-ebb-personal-bar] > span{font-size:1.1rem!important}
  header[data-ebb-personal-bar] form[action="/logout"] button{min-height:38px!important;padding:4px 9px!important;font-size:.85rem!important}
}

/* Even spacing between cards. */
main{margin-top:18px}
.panel{margin:14px 0;border-radius:16px}
@media(max-width:600px){.panel{padding:16px}main{padding:0 12px}}
.panel h2{display:flex;align-items:center;gap:8px}
.panel h2 a{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--ebb-purple)}
.panel h2 a:hover{text-decoration:underline}
.ebb-icon{flex:0 0 auto;vertical-align:middle}
.ebb-footer a{color:var(--ebb-muted)}

/* Upload card. */
#ebb-multi .ebb-open-month{display:flex;align-items:center;gap:6px;margin:-4px 0 12px;font-weight:700;color:var(--ebb-purple-dark)}
#ebb-multi #batch-camera,#ebb-multi #batch-choose{min-height:72px!important;font-size:1.05rem;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:14px}
#ebb-multi #batch-choose{border:1.5px solid var(--ebb-purple-line)}
#ebb-multi #batch-next{width:100%;min-height:50px;margin-top:6px;font-size:1.05rem;border-radius:12px}
#ebb-multi #batch-next-hint{text-align:center;margin:6px 0 0}

/* "Finish month" button: purple like every other action. */
button.ebb-vat-finish{background:var(--ebb-purple)!important}

/* Requests from the office. */
.ebb-requests{border-top:4px solid var(--ebb-purple)}
.ebb-requests ul{list-style:none;margin:0;padding:0}
.ebb-requests li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #eee}
.ebb-requests li:last-child{border-bottom:0}
.ebb-requests li form{margin:0;flex:0 0 auto}
.ebb-requests li button{padding:8px 14px}
.ebb-requests li.done .ebb-request-text{color:var(--ebb-muted)}
.ebb-requests li.done .ebb-icon{color:var(--ebb-green)}
.ebb-requests .ebb-request-text{overflow-wrap:anywhere}

/* Status on each uploaded document. */
.ebb-doc-status{display:inline-flex;align-items:center;gap:3px;margin-inline-start:6px;padding:1px 8px;border-radius:999px;background:var(--ebb-green-soft);color:var(--ebb-green);font-size:.82em;font-weight:600;white-space:nowrap}
html:not([lang^="en"]) .ebb-doc-status [lang=en],html[lang^="en"] .ebb-doc-status [lang=he]{display:none}

/* News: purple accent. */
.ebb-news{border-top-color:var(--ebb-purple)}
.ebb-news-heading{display:flex;align-items:center;gap:8px}
@media(max-width:420px){header[data-ebb-personal-bar] > span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}header[data-ebb-personal-bar]{justify-content:space-between}}
select{display:block;width:100%;padding:12px;margin-top:8px;border:1px solid #cfc5d7;border-radius:8px;font:inherit;background:#fff;color:var(--ebb-text)}

/* EBB_READABLE_V1: slightly larger text and stronger contrast for every client. */
body{font-size:17px;line-height:1.55}
.hint{font-size:14.5px;color:#5e5768}
label{font-size:16px}
input,select,button{font-size:16px}
.ebb-footer{font-size:14px}

/* EBB_BOTTOM_NAV_V1 */
.ebb-tabbar{position:fixed;inset-inline:0;bottom:0;z-index:50;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-top:1px solid var(--ebb-purple-line);box-shadow:0 -4px 18px rgba(60,40,80,.06);padding-bottom:env(safe-area-inset-bottom)}
.ebb-tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:60px;color:#6f6878;text-decoration:none;font-size:13px;font-weight:600}
.ebb-tabbar a.active{color:var(--ebb-purple)}
.ebb-tabbar a.active .ebb-icon{stroke-width:2.3}
body.ebb-has-tabbar{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
@media(min-width:900px){.ebb-tabbar{inset-inline:auto;left:50%;transform:translateX(-50%);width:520px;bottom:16px;border:1px solid var(--ebb-purple-line);border-radius:18px}}

/* EBB_BUSINESS_SWITCH_V1 */
.ebb-business-switch{padding:12px 16px!important}
.ebb-business-switch label{margin:0;display:flex;align-items:center;gap:10px;font-weight:700;color:var(--ebb-purple-dark)}
.ebb-business-switch select{margin:0;flex:1}

/* Notifications card: one quiet line once notifications are on. */
.ebb-push-panel.is-on > p:not([id]),.ebb-push-panel.is-on #ebb-push-enable{display:none}
.ebb-push-panel.is-on #ebb-push-status{color:var(--ebb-green);font-weight:600}

/* EBB_DARK_MODE_V1: follows the phone's dark-mode setting. */

html[data-theme="dark"]{--ebb-purple:#c3a6e0;--ebb-purple-dark:#dccaf0;--ebb-purple-soft:#3a2f47;--ebb-purple-line:#4a3d59;--ebb-green:#8fd19f;--ebb-green-soft:#1f3a27;--ebb-text:#ece8f1;--ebb-muted:#b3abbd;color-scheme:dark}
html[data-theme="dark"],html[data-theme="dark"] body{background:#17131c!important;color:var(--ebb-text)!important}
html[data-theme="dark"] header,html[data-theme="dark"] header[data-ebb-personal-bar]{background:#201a27!important;border-color:#3a2f47!important}
html[data-theme="dark"] header[data-ebb-personal-bar] > span{color:var(--ebb-purple-dark)!important}
html[data-theme="dark"] .panel,html[data-theme="dark"] .ebb-tabbar,html[data-theme="dark"] dialog,html[data-theme="dark"] .ebb-vat-choice[popover]{background:#221c29!important;border-color:#3a2f47!important;color:var(--ebb-text)!important;box-shadow:none!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3{color:var(--ebb-purple-dark)!important}
html[data-theme="dark"] .hint,html[data-theme="dark"] small{color:var(--ebb-muted)!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#1b1621!important;color:var(--ebb-text)!important;border-color:#4a3d59!important}
html[data-theme="dark"] button{background:#7d5aa0;color:#fff}
html[data-theme="dark"] button.secondary,html[data-theme="dark"] .secondary{background:#3a2f47!important;color:#e5d8f2!important}
html[data-theme="dark"] button:disabled{background:#2f2838!important;color:#8c8496!important}
html[data-theme="dark"] .ebb-upload-list li,html[data-theme="dark"] .ebb-requests li,html[data-theme="dark"] .batch-period{border-color:#3a2f47!important}
html[data-theme="dark"] .ebb-tabbar a{color:#a79fb2}
html[data-theme="dark"] .ebb-tabbar a.active{color:var(--ebb-purple)}
html[data-theme="dark"] #ebb-pending-documents{background:#2a2232!important;border-color:#4a3d59!important}
html[data-theme="dark"] .ebb-language button{background:#3a2f47;color:#e5d8f2;border-color:#4a3d59}
html[data-theme="dark"] .ebb-language button[aria-pressed=true]{background:#7d5aa0;color:#fff}
html[data-theme="dark"] header img[src*="ebb-logo"]{filter:brightness(1.15)!important}
