/* EBB_THEME_V3: the approved design – deep aubergine, small gold details, Frank Ruhl Libre headings,
   IBM Plex Sans Hebrew text. Loaded after every other stylesheet. */
:root{
  --ebb-ink:#2E1A45; --ebb-purple:#4B2E6B; --ebb-purple-dark:#2E1A45; --ebb-purple-soft:#EFE8F6; --ebb-purple-line:#E7E2EE;
  --ebb-field:#D6CBE4; --ebb-gold:#B08A4E; --ebb-gold-text:#8C6A3F; --ebb-bg:#F6F4F8; --ebb-card:#FFFFFF;
  --ebb-text:#1C1824; --ebb-muted:#5F5869; --ebb-green:#2E7D4F; --ebb-green-soft:#E8F4EC; --ebb-wait:#7A5200; --ebb-wait-soft:#FFF4D6;
  --ebb-sans:'IBM Plex Sans Hebrew',system-ui,-apple-system,'Segoe UI',Arial,sans-serif; --ebb-serif:'Frank Ruhl Libre',Georgia,serif;
}
html,body{background:var(--ebb-bg)!important}
body,button,input,select,textarea{font-family:var(--ebb-sans)!important}
body{color:var(--ebb-text);font-size:17px;line-height:1.55}
h1{font-family:var(--ebb-serif);font-weight:700;color:var(--ebb-ink);letter-spacing:0}
h2{font-family:var(--ebb-sans);font-weight:600;font-size:1.15rem;color:var(--ebb-text)}
a{color:var(--ebb-purple);text-underline-offset:3px}
.hint,small{color:var(--ebb-muted)}
.ebb-center{text-align:center}
.ebb-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;margin:-1px!important;padding:0!important;border:0!important}

/* Buttons */
button{background:var(--ebb-purple);color:#fff;border:0;border-radius:14px;min-height:50px;font-weight:600;font-size:16px;box-shadow:0 6px 16px rgba(75,46,107,.22)}
button.secondary,.secondary{background:#fff!important;color:var(--ebb-purple)!important;border:1.5px solid var(--ebb-field)!important;box-shadow:none!important}
button:disabled{background:#E9E4EF!important;color:#7A7284!important;box-shadow:none!important}
input,select,textarea{border:1.5px solid var(--ebb-field)!important;border-radius:12px!important;min-height:50px;font-size:17px!important;background:#fff;color:var(--ebb-text)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--ebb-purple)!important;box-shadow:0 0 0 4px var(--ebb-purple-soft)}
input[type=checkbox],input[type=radio]{min-height:0;accent-color:var(--ebb-purple)}

/* Cards */
.panel{background:var(--ebb-card);border:1px solid var(--ebb-purple-line);border-radius:20px;box-shadow:0 1px 2px rgba(46,26,69,.04)}
.ebb-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.ebb-card-head h2{margin:0}
.ebb-card-head a{font-weight:600;text-decoration:none;font-size:15px}
.ebb-count{min-width:24px;height:24px;padding:0 8px;border-radius:999px;background:var(--ebb-gold);color:#fff;font-size:13px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.ebb-summary{cursor:pointer;font-weight:600;color:var(--ebb-purple)}

/* Header: dark for clients and sign-in */
body.ebb-dark-head header[data-ebb-personal-bar]{background:var(--ebb-ink)!important;border:0!important;box-shadow:none!important;color:#fff}
body.ebb-dark-head header[data-ebb-personal-bar] > span{color:#DCD0EA!important;font-family:var(--ebb-sans)}
header[data-ebb-personal-bar] .ebb-logo{height:40px;width:auto;max-width:120px;display:block}
body.ebb-dark-head header[data-ebb-personal-bar] form[action="/logout"] button{background:transparent!important;color:#fff!important;border:1px solid rgba(255,255,255,.3)!important;box-shadow:none!important;min-height:38px!important}
body.ebb-dark-head header .ebb-language button{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.3);box-shadow:none;min-height:36px}
body.ebb-dark-head header .ebb-language button[aria-pressed=true]{background:#fff;color:var(--ebb-ink)}

/* Home hero */
body.ebb-home main{margin-top:0!important}
.ebb-hero{background:var(--ebb-ink);color:#fff;margin:0 calc(50% - 50vw);padding:6px max(20px,calc(50vw - 360px)) 76px;display:flex;flex-direction:column;gap:10px}
.ebb-hero h1{color:#fff;font-size:clamp(1.7rem,7vw,2.1rem);margin:6px 0 0;line-height:1.15}
.ebb-hero-month{margin:0;color:#DCD0EA;font-size:15px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ebb-dot{width:8px;height:8px;border-radius:999px;background:#D8B77E;display:inline-block}
.ebb-hero-business select{min-height:36px;width:auto;max-width:100%;border-radius:999px!important;border:0!important;background:rgba(255,255,255,.12);color:#fff;font-size:14px!important;padding:0 14px;margin:0}
.ebb-hero-business option{color:var(--ebb-text)}
html:not([lang^="en"]) .ebb-hero [lang=en],html[lang^="en"] .ebb-hero [lang=he]{display:none}
body.ebb-home #ebb-multi{margin-top:-56px;position:relative;box-shadow:0 10px 30px rgba(46,26,69,.10);border:0}

/* Upload card */
#ebb-multi .batch-actions:has(#batch-camera){display:flex!important;flex-direction:column;gap:12px}
#ebb-multi #batch-camera{min-height:64px!important;flex-direction:row!important;font-size:18px;border-radius:16px}
#ebb-multi #batch-choose{min-height:54px!important;flex-direction:row!important;border-radius:16px}
#ebb-multi #batch-camera .ebb-icon,#ebb-multi #batch-choose .ebb-icon{width:24px;height:24px}

/* Requests */
.ebb-requests{border-top:1px solid var(--ebb-purple-line)!important}
.ebb-requests li{border-top:1px solid #EFEBF3;border-bottom:0!important}

/* VAT card */
.ebb-stepper{list-style:none;margin:6px 0 10px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ebb-stepper li{font-size:13px;color:var(--ebb-muted);padding-top:12px;position:relative}
.ebb-stepper li::before{content:"";position:absolute;inset-inline:0;top:0;height:6px;border-radius:999px;background:var(--ebb-purple-line)}
.ebb-stepper li.on{color:var(--ebb-purple);font-weight:600}
.ebb-stepper li.on::before{background:var(--ebb-purple)}
.ebb-vat-card .batch-period{border:0!important;padding:0!important;background:none!important}
.ebb-vat-card .batch-period > strong,.ebb-vat-card .batch-period > span{display:none}
button.ebb-vat-finish{width:100%;background:var(--ebb-purple-soft)!important;color:var(--ebb-ink)!important;box-shadow:none!important;min-height:52px}

/* Recent documents */
.ebb-doc-list{list-style:none;margin:0;padding:0}
.ebb-doc{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #EFEBF3}
.ebb-doc-icon{width:42px;height:42px;border-radius:12px;background:#F3EEF8;color:var(--ebb-purple);display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.ebb-doc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ebb-doc-main a{text-decoration:none;color:var(--ebb-text)}
.ebb-doc-main strong{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ebb-doc-main small{font-size:14px}
.ebb-chip{height:28px;padding:0 10px;border-radius:999px;font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.ebb-chip-ok{background:var(--ebb-green-soft);color:var(--ebb-green)}
.ebb-chip-wait{background:var(--ebb-wait-soft);color:var(--ebb-wait)}
.ebb-chip-reported{background:var(--ebb-purple-soft);color:var(--ebb-purple)}
html:not([lang^="en"]) :is(.ebb-doc,.ebb-vat-card) [lang=en],html[lang^="en"] :is(.ebb-doc,.ebb-vat-card) [lang=he]{display:none}

/* News: gold label */
.ebb-news{border-top:1px solid var(--ebb-purple-line)!important}
.ebb-news-heading{font-size:13px!important;font-weight:700!important;letter-spacing:.06em;color:var(--ebb-gold-text)!important}
.ebb-news-heading .ebb-icon{display:none}

/* Send sheet */
#batch-dialog{border:0;border-radius:26px 26px 0 0;padding:12px 20px 28px;width:100%;max-width:560px;margin:auto auto 0;box-sizing:border-box}
#batch-dialog::backdrop{background:rgba(28,24,36,.55)}
@media(min-width:700px){#batch-dialog{border-radius:24px;margin:auto}}
.ebb-sheet-handle{width:44px;height:5px;border-radius:999px;background:#DCD5E4;margin:0 auto 10px}
#batch-title{font-family:var(--ebb-serif);font-size:26px;color:var(--ebb-ink)}
.ebb-chips{border:0;padding:0;margin:0 0 6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ebb-chips legend{font-size:15px;font-weight:600;margin-bottom:8px;padding:0}
.ebb-chips label{margin:0;position:relative}
.ebb-chips input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.ebb-chips span{display:flex;align-items:center;justify-content:center;min-height:48px;border:1.5px solid var(--ebb-field);border-radius:12px;font-size:15px;font-weight:500;text-align:center;padding:0 4px}
.ebb-chips input:checked + span{border:2px solid var(--ebb-purple);background:var(--ebb-purple-soft);color:var(--ebb-ink);font-weight:700}
.ebb-chips input:focus-visible + span{box-shadow:0 0 0 4px var(--ebb-purple-soft)}
#batch-target{padding:12px 14px;border:1px solid var(--ebb-purple-line);border-radius:12px}

/* Sign-in */
body.ebb-login header[data-ebb-personal-bar] .ebb-logo,body.ebb-login header[data-ebb-personal-bar] > span{visibility:hidden}
.ebb-login-hero{background:var(--ebb-ink);margin:0 calc(50% - 50vw);padding:10px 20px 84px;display:flex;flex-direction:column;align-items:center;gap:12px}
.ebb-login-hero img{height:88px;width:auto}
.ebb-login-hero p{margin:0;color:#DCD0EA;font-size:15px;letter-spacing:.04em}
body.ebb-login main{margin-top:0!important}
.ebb-login-card{margin-top:-52px!important;position:relative;border:0!important;box-shadow:0 14px 34px rgba(46,26,69,.12)!important}
.ebb-login-card h1{font-size:28px;margin-top:0}

/* Tab bar */
.ebb-tabbar{border-top:1px solid var(--ebb-purple-line)}
.ebb-tabbar a{color:var(--ebb-muted)}
.ebb-tabbar a.active{color:var(--ebb-purple);font-weight:700}

/* Dark mode */

html[data-theme="dark"]{--ebb-bg:#15111B;--ebb-card:#211B29;--ebb-text:#EEE9F4;--ebb-muted:#B6AEC1;--ebb-purple:#CDB4EA;--ebb-purple-soft:#3A2D49;--ebb-purple-line:#342B3F;--ebb-field:#4A3D59;--ebb-ink:#1E1429;--ebb-green:#8FD19F;--ebb-green-soft:#1F3528;--ebb-wait:#F0C875;--ebb-wait-soft:#3A2E14;--ebb-gold-text:#D8B77E}
html[data-theme="dark"] h1{color:#F0E8F8}
html[data-theme="dark"] button{background:#7C58A6;color:#fff}
html[data-theme="dark"] button.secondary,html[data-theme="dark"] .secondary{background:var(--ebb-card)!important;color:var(--ebb-purple)!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#1B1621;color:var(--ebb-text)}
html[data-theme="dark"] .ebb-doc-icon{background:#2E2638}
html[data-theme="dark"] .ebb-stepper li.on::before{background:#7C58A6}
html[data-theme="dark"] button.ebb-vat-finish{color:#F0E8F8!important}
html[data-theme="dark"] .ebb-doc,html[data-theme="dark"] .ebb-requests li{border-color:#342B3F!important}
html[data-theme="dark"] #batch-dialog{background:var(--ebb-card);color:var(--ebb-text)}
/* fixes after first look */
.ebb-hero h1,.ebb-hero h1 *{color:#fff!important}
html:not([lang^="en"]) #batch-camera [lang=en],html[lang^="en"] #batch-camera [lang=he]{display:none}
.ebb-vat-card .batch-period{font-size:0}
.ebb-vat-card .batch-period button.ebb-vat-finish{font-size:16px}
.ebb-vat-card .ebb-vat-choice{font-size:17px}
#batch-title:focus{outline:none}
#batch-target:empty{display:none}
.ebb-login-card form > button:last-of-type,.ebb-login-card form > button:not([type=button]){width:100%;min-height:56px;font-size:18px}

html[data-theme="dark"]{--ebb-purple-dark:#E6D6F7}
html[data-theme="dark"] h2,html[data-theme="dark"] .panel h2{color:var(--ebb-text)!important}
html[data-theme="dark"] button:disabled{background:#2F2838!important;color:#8C8496!important}
html[data-theme="dark"] .ebb-hero{background:#231833}
html[data-theme="dark"] body.ebb-dark-head header[data-ebb-personal-bar]{background:#231833!important}
html[data-theme="dark"] .ebb-login-hero{background:#231833}

/* EBB_THEME_PICK_V1: the light/dark switch in the header */
.ebb-theme-toggle{width:40px;min-width:40px;height:38px;min-height:38px!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:transparent!important;color:var(--ebb-purple)!important;border:1px solid var(--ebb-field)!important;box-shadow:none!important}
body.ebb-dark-head .ebb-theme-toggle{color:#fff!important;border-color:rgba(255,255,255,.3)!important}
.ebb-theme-toggle .ebb-sun{display:none}
html[data-theme="dark"] .ebb-theme-toggle .ebb-sun{display:block}
html[data-theme="dark"] .ebb-theme-toggle .ebb-moon{display:none}

/* The greeting uses the same font as the rest of the app */
.ebb-hero h1{font-family:var(--ebb-sans)!important;font-weight:700;letter-spacing:0}

/* EBB_GOLD_DETAILS_V1: a hairline under the dark band, "reported" in gold, a gold dot under the active tab */
.ebb-hero,.ebb-login-hero{border-bottom:2px solid var(--ebb-gold)}
body.ebb-dark-head:not(.ebb-home):not(.ebb-login) header[data-ebb-personal-bar]{border-bottom:2px solid var(--ebb-gold)!important}
.ebb-chip-reported{background:#F6EEDF;color:#7A5A2A}
.ebb-tabbar a{position:relative}
.ebb-tabbar a.active::after{content:"";position:absolute;bottom:6px;left:50%;width:5px;height:5px;margin-left:-2.5px;border-radius:999px;background:var(--ebb-gold)}
html[data-theme="dark"] .ebb-chip-reported{background:#3A2E1A;color:#E3C58E}

/* EBB_ONE_FONT_V1: every title in the same font as the rest of the app */
h1,#batch-title,.ebb-login-card h1,.ebb-hero h1{font-family:var(--ebb-sans)!important;font-weight:700!important;letter-spacing:0}
main h1{font-size:clamp(1.5rem,6.5vw,1.85rem);line-height:1.2;margin:0 0 6px}

/* EBB_GOLD_VISIBLE_V1: gold where it can be seen */
h1::after{content:"";display:block;width:44px;height:3px;border-radius:3px;background:var(--ebb-gold);margin-top:10px}
.ebb-hero h1::after{background:#D8B77E}
body.ebb-dark-head header[data-ebb-personal-bar]{border-bottom:2px solid var(--ebb-gold)!important}
body.ebb-home header[data-ebb-personal-bar],body.ebb-login header[data-ebb-personal-bar]{border-bottom:2px solid var(--ebb-gold)!important}
.ebb-hero,.ebb-login-hero{border-bottom:0}
.ebb-hero{padding-top:16px}

/* Inner pages: folder and file rows */
.office-entries{list-style:none;margin:12px 0 0;padding:0}
.office-entries li{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #EFEBF3}
.office-entries li a{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ebb-text);font-weight:600;flex:1;min-width:0}
.ebb-entry-icon{width:40px;height:40px;border-radius:12px;background:#F3EEF8;color:var(--ebb-purple);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.office-file-actions{display:flex;align-items:center;gap:12px;width:100%}
.office-download{flex:0 0 auto;font-weight:600;font-size:15px;text-decoration:none;padding:8px 12px;border:1.5px solid var(--ebb-field);border-radius:10px;color:var(--ebb-purple)!important}
.office-path{font-size:15px;color:var(--ebb-muted);margin:8px 0}
html[data-theme="dark"] .office-entries li{border-color:#342B3F}
html[data-theme="dark"] .ebb-entry-icon{background:#2E2638}
/* EBB_HOME_TWEAKS_V1 */
.ebb-office-web.ebb-office-web-inline{display:block;margin:18px 0 10px;border:1px solid var(--ebb-line,#e2d5eb);border-radius:14px;background:var(--ebb-surface-2,#f3edf8);font-size:13.5px;line-height:1.5;padding:10px 42px}
html[data-theme="dark"] .ebb-office-web.ebb-office-web-inline{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14);color:#E9E1F2}
html[data-theme="dark"] .ebb-office-web.ebb-office-web-inline a{color:#D8B77E}
header[data-ebb-personal-bar] img[src*="ebb-logo"]{height:60px!important;max-height:60px!important;max-width:150px!important}
@media(max-width:600px){header[data-ebb-personal-bar] img[src*="ebb-logo"]{height:50px!important;max-height:50px!important;max-width:130px!important}}
.ebb-login-hero img{height:72px!important}
.ebb-office-web-inline a,.ebb-office-web-inline bdi{white-space:nowrap}
.ebb-hero h1{font-size:clamp(1.4rem,5.8vw,1.75rem)!important}
