:root {
  --bg: #f2f3f5; --card: #fff; --text: #1b1f24; --muted: #6b7280; --line: #e5e7eb;
  --accent: #09a34f; --accent-dark: #077f3d; --danger: #d92d20; --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); padding-top: max(10px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: baseline; gap: 1px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.wordmark { height: 30px; width: auto; display: block; }
.spacer { flex: 1; }

main { max-width: 1200px; margin: 0 auto; padding: 16px; padding-bottom: 110px; }
.loading, .empty { color: var(--muted); padding: 40px 16px; text-align: center; grid-column: 1 / -1; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: #f7f8fa; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.iconbtn:hover { background: #f7f8fa; }
.iconbtn.danger { color: var(--danger); }
.iconbtn:disabled { opacity: .35; cursor: default; }
select, input[type=text], input[type=email], textarea { font: inherit; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.hint { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.dochead { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.dochead .title { flex: 1 1 260px; font-size: 18px; font-weight: 600; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; }
.dochead .title:hover, .dochead .title:focus { border-color: var(--line); background: var(--card); outline: none; }
.dochead .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dochead .secondary-row { flex-basis: 100%; }
.btn.small { padding: 7px 10px; font-size: 13px; border-radius: 8px; }
select.small { padding: 7px 8px; font-size: 13px; border-radius: 8px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: #e6f6ec; color: #0b5c30; margin-bottom: 16px; font-size: 14px; }

.grid { display: grid; gap: 14px; }
.grid.docs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.pages { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.doc { position: relative; }
.card.doc .thumb, .card.doc .title { color: inherit; text-decoration: none; display: block; }
.cardmenu { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.cardmenu .btn.small { flex: 1; justify-content: center; }
.cardmenu .iconbtn { width: 32px; height: 32px; font-size: 15px; }
.card.doc:hover { box-shadow: 0 4px 12px rgba(16,24,40,.12); }
.thumb { position: relative; aspect-ratio: 3 / 4; background: #e9ebef; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nothumb { color: var(--muted); font-size: 13px; }
.meta { padding: 10px 12px; }
.meta .title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.badge { position: absolute; left: 8px; top: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.warn { position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 8px; background: #fde68a; color: #92400e; font-size: 11px; font-weight: 600; }
.hint.bad { color: #fca5a5; }
.label { position: absolute; right: 8px; top: 8px; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.9); color: var(--muted); font-size: 11px; font-weight: 600; }
.pageactions { display: flex; gap: 6px; padding: 8px; align-items: center; flex-wrap: wrap; }
.pageactions select { flex: 1 1 100%; padding: 7px 8px; font-size: 13px; }
.pageactions .iconbtn { width: 34px; height: 34px; }

#fab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; justify-content: center; align-items: flex-end; gap: 28px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); pointer-events: none; }
#fab > * { pointer-events: auto; }
.fab-main { width: 68px; height: 68px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(9,163,79,.45); display: grid; place-items: center; cursor: pointer; }
.fab-main .ic { width: 30px; height: 30px; }
.fab-side { display: grid; place-items: center; gap: 4px; background: none; border: 0; color: var(--text); font-size: 11px; cursor: pointer; }
.fab-side .circle { width: 46px; height: 46px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; }
@media (min-width: 701px) and (pointer: fine) { #fab { display: none !important; } main { padding-bottom: 32px; } }

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--card); border-radius: 16px; padding: 20px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h3 { margin: 0 0 8px; font-size: 18px; }
.modal .qr { display: block; width: min(300px, 80vw); margin: 14px auto; border: 1px solid var(--line); border-radius: 10px; }
.modal .link { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); word-break: break-all; text-align: center; }
.modal .choices { display: grid; gap: 8px; margin: 14px 0; }
.modal .choices .btn { justify-content: flex-start; }
.modal form { display: grid; gap: 8px; margin-top: 10px; }
.modal textarea { min-height: 70px; resize: vertical; }

.lightbox { background: rgba(0,0,0,.92); padding: 0; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .iconbtn { position: fixed; top: 14px; right: 14px; }

.editor { background: #111; display: flex; flex-direction: column; padding: 0; place-items: stretch; }
.ed-top, .ed-bottom { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #1c1c1e; color: #fff; }
.ed-top { padding-top: max(10px, env(safe-area-inset-top)); }
.ed-top .ed-title { flex: 1; text-align: center; font-weight: 600; font-size: 15px; }
.ed-top .iconbtn { background: transparent; border-color: #3a3a3c; color: #fff; }
.ed-bottom { padding-bottom: max(10px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.ed-bottom .step1, .ed-bottom .step2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; width: 100%; }
.ed-bottom label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #d1d5db; }
.ed-bottom select { background: #2c2c2e; color: #fff; border-color: #3a3a3c; }
.ed-bottom .btn { background: #2c2c2e; color: #fff; border-color: #3a3a3c; }
.ed-bottom .hint { color: #9ca3af; }
.ed-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.ed-body canvas, .ed-body img.preview { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; touch-action: none; display: block; }
.ed-body img.preview { background: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid #3a3a3c; background: #2c2c2e; color: #fff; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); }

#toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: rgba(28,28,30,.95); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; max-width: 90vw; }
@media (min-width: 701px) and (pointer: fine) { #toast { bottom: 28px; } }

#after-capture { position: fixed; left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 16; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: 0 8px 24px rgba(16,24,40,.18); font-size: 14px; }
@media (min-width: 701px) and (pointer: fine) { #after-capture { bottom: 24px; left: auto; right: 24px; } }

.camera { background: #000; display: flex; flex-direction: column; padding: 0; place-items: stretch; }
.cam-view { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cam-view video { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-overlay { position: absolute; pointer-events: none; }
.cam-hint { text-align: center; color: #fff; font-size: 14px; padding: 8px 14px; background: rgba(0,0,0,.4); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.cam-bar { display: flex; align-items: center; justify-content: space-around; padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); background: #000; }
.cam-bar .iconbtn { background: #1c1c1e; border-color: #3a3a3c; color: #fff; width: 48px; height: 48px; border-radius: 50%; }
.cam-bar .iconbtn.on { background: #facc15; color: #000; border-color: #facc15; }
.cam-shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 4px #000; cursor: pointer; }
.cam-shutter:active { transform: scale(.94); }

.search { flex: 1 1 160px; min-width: 140px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; background: var(--card); }
.section { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px; }
.grid.folders { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card.folder { padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.card.folder .folderlink { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.card.folder .folderlink > .ic { width: 28px; height: 28px; color: var(--accent); }
.card.folder .txt { display: flex; flex-direction: column; min-width: 0; }
.card.folder .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.folder .sub { color: var(--muted); font-size: 12px; }
.card.folder .cardmenu { margin: 0; }
.folderhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.folderhead h2 { margin: 0; font-size: 20px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folderhead > .ic { width: 26px; height: 26px; color: var(--accent); }
.dochead .actions select { padding: 9px 10px; }

.credit { text-align: center; color: var(--muted); font-size: 12px; padding: 12px 16px calc(110px + env(safe-area-inset-bottom)); }
.credit a { color: var(--muted); }
@media (min-width: 701px) and (pointer: fine) { .credit { padding-bottom: 24px; } }

/* ---- sectiuni, vizualizator de pagina, foaie de jos */
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 8px; }
.section-row .section { margin: 0; }
#top-actions .iconbtn { border: 0; background: transparent; }
.viewer { background: #111; display: flex; flex-direction: column; padding: 0; place-items: stretch; }
.viewer .ed-body { position: relative; padding: 8px 48px; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.navbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 60px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.navbtn.prev { left: 4px; } .navbtn.next { right: 4px; }
.navbtn:disabled { opacity: .2; cursor: default; }
.viewer .ed-top .iconbtn { background: transparent; border-color: #3a3a3c; color: #fff; }
.viewer .ed-bottom .row { width: 100%; }
.viewer .ed-bottom .row .btn:disabled { opacity: .4; }

@media (max-width: 700px), (pointer: coarse) {
  .mob-hide { display: none !important; }
  main { padding: 12px; padding-bottom: 120px; }
  .toolbar { margin-bottom: 8px; }
  .search { flex: 1 1 100%; padding: 11px 14px; font-size: 15px; }
  .dochead { margin-bottom: 10px; }
  .dochead .actions { display: none; }
  .dochead .title { font-size: 17px; padding: 8px 10px; }
  .pageactions { display: none; }
  .grid.pages, .grid.docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.folders { grid-template-columns: 1fr; }
  .iconbtn { width: 42px; height: 42px; }
  .card .meta { padding: 8px 10px; }
  .cardmenu .btn.small { padding: 7px 8px; }
  .overlay.sheet { place-items: end center; padding: 0; }
  .overlay.sheet .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 85vh; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .viewer .ed-body { padding: 8px 4px; }
  .navbtn { display: none; }
  .viewer .ed-bottom .row .btn { flex: 1 1 45%; justify-content: center; }
}

/* ---- bun venit, cont, mod fara cont */
body.auth .topbar, body.auth #fab, body.auth .credit, body.auth #after-capture { display: none !important; }
body.auth main { padding: 0; max-width: none; }
.welcome { position: fixed; inset: 0; background: var(--accent); display: flex; align-items: stretch; justify-content: center; overflow: auto; }
.phone-card { width: 100%; max-width: 480px; min-height: 100%; display: flex; flex-direction: column; color: #fff; position: relative; }
@media (min-width: 701px) and (min-height: 700px) {
  .welcome { align-items: center; padding: 24px; }
  .phone-card { min-height: 0; height: min(820px, 100%); border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); background: var(--accent); }
}
.w-top { padding: max(26px, env(safe-area-inset-top)) 24px 6px; text-align: center; }
.w-top.small { text-align: left; }
.w-brand img { height: 32px; width: auto; filter: brightness(0) invert(1); }
.w-title { font-size: 34px; line-height: 1.08; font-weight: 800; margin: 16px 0 10px; letter-spacing: -0.02em; }
.w-text { font-size: 15px; line-height: 1.45; opacity: .94; margin: 0; }
.w-hero { position: relative; flex: 1; min-height: 250px; display: grid; place-items: center; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.w-hero::before { content: ''; position: absolute; left: -12%; right: -12%; bottom: -1px; height: 52%; background: #fff; border-radius: 50% 50% 0 0 / 42% 42% 0 0; }
.hero-card { position: relative; width: 156px; height: 156px; background: #fff; border-radius: 36px; box-shadow: 0 22px 50px rgba(0,0,0,.18); display: grid; place-items: center; }
.scan-frame { width: 108px; height: 108px; position: relative; display: grid; place-items: center; }
.scan-frame::before, .scan-frame::after, .scan-frame img { position: relative; }
.scan-frame::before { content: ''; position: absolute; inset: 0; border-radius: 22px; background:
  linear-gradient(var(--accent), var(--accent)) top left / 28px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) top left / 4px 28px no-repeat,
  linear-gradient(var(--accent), var(--accent)) top right / 28px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) top right / 4px 28px no-repeat,
  linear-gradient(var(--accent), var(--accent)) bottom left / 28px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) bottom left / 4px 28px no-repeat,
  linear-gradient(var(--accent), var(--accent)) bottom right / 28px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) bottom right / 4px 28px no-repeat; }
.scan-frame img { width: 60px; height: auto; }
.chip-f { position: absolute; background: #fff; color: #1b1f24; border-radius: 14px; padding: 8px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(0,0,0,.16); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip-f .ci { font-size: 16px; }
.c1 { left: 6%; top: 16%; transform: rotate(-8deg); }
.c2 { right: 6%; top: 12%; transform: rotate(6deg); }
.c3 { left: 8%; bottom: 16%; transform: rotate(5deg); }
.c4 { right: 7%; bottom: 18%; transform: rotate(-6deg); }
.spark { position: absolute; color: #fff; opacity: .9; font-size: 16px; }
.s1 { left: 12%; top: 5%; } .s2 { right: 16%; top: 3%; font-size: 10px; } .s3 { left: 50%; top: 9%; font-size: 10px; }
.w-bottom { background: #fff; color: var(--text); padding: 6px 24px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.w-tip { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.w-btn { border: 0; border-radius: 14px; padding: 15px 18px; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; font-family: inherit; }
.w-btn.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(9,163,79,.35); }
.w-btn.primary span { margin-left: auto; }
.w-btn.secondary { background: #e6f6ec; color: #0b5c30; }
.w-skip { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 6px; cursor: pointer; font-family: inherit; }
.dots { display: flex; justify-content: center; gap: 8px; padding-top: 2px; }
.dot { width: 8px; height: 8px; border-radius: 4px; border: 0; background: #d1d5db; padding: 0; cursor: pointer; transition: width .2s; }
.dot.on { background: var(--accent); width: 22px; }
.form-card .w-bottom.form { flex: 1; border-radius: 28px 28px 0 0; margin-top: 14px; padding-top: 22px; }
.w-back { background: none; border: 0; color: #fff; font-size: 15px; padding: 0 0 10px; cursor: pointer; opacity: .9; font-family: inherit; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-form input:not([type=checkbox]) { padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 16px; font-family: inherit; }
.auth-form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 13px; }
.form-err { color: var(--danger); font-size: 13px; }
.w-note { font-size: 12px; color: var(--muted); text-align: center; margin: 4px 0 0; }
.mail-art { font-size: 64px; text-align: center; padding: 6px 0; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); font-family: inherit; }
.acct-btn:not(.guest) { padding: 2px; border: 0; }
.acct-btn .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.acct-btn .pill { background: #e6f6ec; color: #0b5c30; border-radius: 999px; padding: 5px 8px; font-size: 12px; }
#top-actions { display: flex; align-items: center; gap: 8px; }

/* ---- desktop: bara laterala */
#sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: var(--card); border-right: 1px solid var(--line); padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; overflow: auto; z-index: 10; }
body.with-sidebar .topbar { display: none; }
body.with-sidebar main { margin-left: 260px; max-width: none; padding: 28px 32px 40px; }
body.with-sidebar .credit { display: none; }
body.auth #sidebar { display: none !important; }
body.auth main { margin-left: 0 !important; }
.sb-brand { display: block; padding: 4px 6px 14px; }
.sb-brand img { height: 32px; width: auto; display: block; }
.sb-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sb-btn { justify-content: flex-start; width: 100%; }
.sb-section { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 8px 6px; }
.sb-section.row-between { display: flex; align-items: center; justify-content: space-between; }
.sb-plus { width: 26px; height: 26px; border-radius: 8px; font-size: 16px; }
.sb-link { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; }
.sb-link:hover { background: #f3f4f6; }
.sb-link.on { background: #e6f6ec; color: #0b5c30; font-weight: 600; }
.sb-link .ic { width: 18px; height: 18px; color: var(--muted); }
.sb-link.on .ic { color: var(--accent); }
.sb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-count { font-size: 12px; color: var(--muted); }
.sb-empty { font-size: 13px; color: var(--muted); padding: 6px 10px; }
.sb-folders { display: flex; flex-direction: column; gap: 2px; }
.sb-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.sb-account .acct-btn { width: 100%; justify-content: flex-start; }
.sb-credit { font-size: 12px; color: var(--muted); padding: 0 4px; }
.sb-credit a { color: var(--muted); }
.page-title { font-size: 22px; margin: 0; flex: 1; }
body.with-sidebar .toolbar { align-items: center; margin-bottom: 20px; }
body.with-sidebar .search { flex: 0 1 340px; }
body.with-sidebar .grid.docs { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
body.with-sidebar .grid.pages { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
body.with-sidebar .dochead { gap: 10px; }

/* ---- desktop: bun venit lat, pe doua coloane */
@media (min-width: 900px) {
  .welcome { align-items: center; padding: 32px; }
  .phone-card { max-width: 1060px; min-height: 0; height: auto; display: grid; grid-template-columns: 1.05fr 1fr; grid-template-areas: "top hero" "bottom hero"; border-radius: 32px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); background: var(--accent); }
  .w-top { grid-area: top; text-align: left; padding: 48px 44px 0; }
  .w-title { font-size: 50px; margin: 22px 0 14px; }
  .w-text { font-size: 17px; max-width: 460px; }
  .w-hero { grid-area: hero; min-height: 560px; }
  .w-hero::before { display: none; }
  .w-hero::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.12); }
  .hero-card { z-index: 1; width: 190px; height: 190px; border-radius: 44px; }
  .scan-frame { width: 132px; height: 132px; }
  .scan-frame img { width: 74px; }
  .chip-f { font-size: 14px; z-index: 2; }
  .c1 { left: 10%; top: 22%; } .c2 { right: 10%; top: 18%; } .c3 { left: 12%; bottom: 22%; } .c4 { right: 11%; bottom: 24%; }
  .w-bottom { grid-area: bottom; margin: 24px 44px 44px; border-radius: 22px; padding: 22px 22px 18px; }
  .form-card { grid-template-columns: 1fr; grid-template-areas: "top" "bottom"; max-width: 560px; }
  .form-card .w-top { padding: 40px 40px 0; }
  .form-card .w-title { font-size: 40px; }
  .form-card .w-bottom.form { margin: 20px 40px 40px; border-radius: 22px; }
}

/* ---- bonuri si facturi */
.rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rc-head .page-title { margin-bottom: 4px; }
.month-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 10px; }
.month-chips::-webkit-scrollbar { display: none; }
.mchip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); text-transform: capitalize; }
.mchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mchip.other { color: var(--muted); text-transform: none; }
.mcount { background: rgba(0,0,0,.08); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.mchip.on .mcount { background: rgba(255,255,255,.25); }
.mcount.pend { background: #fde68a; color: #92400e; } .mchip.on .mcount.pend { background: #fde68a; color: #92400e; }
.mcount.sent { background: #d1fae5; color: #065f46; }
.rc-summary { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.rc-summary.sent { border-color: #a7f3d0; background: #f0fdf4; }
.rc-month { font-size: 20px; font-weight: 700; text-transform: capitalize; margin-bottom: 6px; }
.rc-stats { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.rc-stats strong { color: var(--text); font-size: 16px; }
.rc-status { color: #92400e; font-weight: 600; }
.rc-summary.sent .rc-status { color: #065f46; }
.rc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid.receipts { grid-template-columns: 1fr; gap: 8px; }
.card.receipt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: inherit; text-decoration: none; }
.rthumb { width: 56px; height: 72px; border-radius: 8px; overflow: hidden; background: #e9ebef; flex: none; display: grid; place-items: center; }
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rthumb .nothumb { font-size: 10px; text-align: center; }
.rmeta { flex: 1; min-width: 0; }
.rvendor { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ramount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.receipt-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; background: #f0fdf4; border: 1px solid #a7f3d0; border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.receipt-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.receipt-bar input { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 15px; background: #fff; }
.rc-settings { display: flex; flex-direction: column; gap: 10px; }
.rc-settings label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rc-settings label.check { flex-direction: row; align-items: center; gap: 8px; }
.rc-settings input:not([type=checkbox]), .rc-settings select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 15px; }
.rc-entry { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--accent); color: #fff; text-decoration: none; margin: 4px 0 10px; box-shadow: 0 8px 20px rgba(9,163,79,.3); }
.rc-entry .ic { width: 28px; height: 28px; flex: none; }
.rc-entry .txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 13px; }
.rc-entry strong { font-size: 15px; }
.rc-entry .arrow { font-size: 24px; opacity: .8; }
body.with-sidebar .grid.receipts, body.with-sidebar .rc-list-head { max-width: 900px; }

.cam-bar .iconbtn.auto { width: auto; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.cam-bar .iconbtn.auto.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cam-view.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: camflash .25s ease-out forwards; }
@keyframes camflash { from { opacity: .9; } to { opacity: 0; } }

/* ---- introducerea sectiunii Bonuri si facturi */
.rintro { position: fixed; inset: 0; z-index: 70; background: var(--accent); display: flex; align-items: stretch; justify-content: center; overflow: auto; }
.rintro-card { width: 100%; max-width: 480px; min-height: 100%; display: flex; flex-direction: column; color: #fff; position: relative; }
.rintro-brand { text-align: center; padding: max(26px, env(safe-area-inset-top)) 24px 0; }
.rintro-brand img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.rintro-art { flex: 1; min-height: 240px; display: grid; place-items: center; padding: 10px 24px 0; }
.rintro-art svg { width: min(100%, 340px); height: auto; }
.rintro-body { padding: 8px 28px 0; }
.rintro-title { font-family: 'Fredoka', 'Arial Rounded MT Bold', -apple-system, sans-serif; font-weight: 700; font-size: 34px; line-height: 1.12; margin: 0 0 10px; letter-spacing: -0.01em; }
.rintro-text { font-size: 15px; line-height: 1.5; margin: 0; color: rgba(255,255,255,.92); }
.rintro-bar { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px calc(24px + env(safe-area-inset-bottom)); }
.rintro .dots { padding: 0; }
.rintro .dot { background: rgba(255,255,255,.4); }
.rintro .dot.on { background: #fff; }
.rintro-next { display: inline-flex; align-items: center; gap: 10px; border: 0; background: #111; color: #c6ef5b; border-radius: 999px; padding: 14px 18px 14px 20px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.rintro-next .arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #c6ef5b; color: #111; font-size: 18px; }
.rintro-next.last { background: #fff; color: var(--accent); }
.rintro-next.last .arrow { background: var(--accent); color: #fff; }
@media (min-width: 701px) and (min-height: 700px) {
  .rintro { align-items: center; padding: 24px; }
  .rintro-card { min-height: 0; height: min(800px, 100%); border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); background: var(--accent); }
}

#dropzone { position: fixed; inset: 12px; z-index: 80; border: 3px dashed var(--accent); border-radius: 20px; background: rgba(9,163,79,.08); display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--accent); pointer-events: none; }

/* ===== mobil: aspect de aplicatie nativa ===== */
#tabbar, #docbar { display: none; }
.fade { animation: fadein .22s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.btn:active, .card:active, .qa:active, .folder-chip:active, .tab-fab:active { transform: scale(.98); }
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--muted); }
.empty-state svg { width: 120px; height: 90px; margin-bottom: 6px; }
.empty-state strong { color: var(--text); font-size: 16px; }
.pages-badge { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(17,17,17,.75); color: #fff; font-size: 11px; font-weight: 600; }
.page-title, .section, .rc-month, .dochead .title, .modal h3, .w-title { font-family: 'Fredoka', -apple-system, 'Segoe UI', sans-serif; }

@media (max-width: 700px), (pointer: coarse) {
  /* bara de navigare de jos */
  #tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; align-items: flex-end; justify-content: space-around; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  #tabbar .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; padding: 6px 0 2px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; font-family: inherit; }
  #tabbar .tab .ic { width: 22px; height: 22px; }
  #tabbar .tab.on { color: var(--accent); }
  .tab-fab { width: 62px; height: 62px; margin-top: -28px; border-radius: 50%; border: 4px solid #fff; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(9,163,79,.4); cursor: pointer; }
  .tab-fab .ic { width: 28px; height: 28px; }
  #fab { display: none !important; }
  /* bara documentului, deasupra tab-urilor */
  #docbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 14; gap: 8px; padding: 8px; border-radius: 16px; background: var(--card); box-shadow: 0 8px 24px rgba(16,24,40,.16); }
  #docbar .pill { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); }
  #docbar .pill.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  body.with-doc main { padding-bottom: 150px; }
  main { padding-bottom: 100px; }
  #after-capture { bottom: calc(136px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .credit { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* antetul verde de pe prima pagina */
  body.home-hero .topbar { display: none; }
  body.home-hero main { padding-top: 0; }
  .hero { margin: -12px -12px 14px; padding: max(16px, env(safe-area-inset-top)) 18px 18px; background: linear-gradient(160deg, #0cb45a, #077f3d); color: #fff; border-radius: 0 0 26px 26px; box-shadow: 0 10px 30px rgba(9,163,79,.25); }
  .hero-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .hero-brand { height: 26px; width: auto; filter: brightness(0) invert(1); }
  .hero-acct .acct-btn { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
  .hero-acct .acct-btn .pill { background: rgba(255,255,255,.9); color: #0b5c30; }
  .hello { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 28px; line-height: 1.1; }
  .hero-sub { opacity: .9; font-size: 14px; margin: 4px 0 14px; }
  .hero-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 0 12px; color: var(--muted); }
  .hero-search .ic { width: 18px; height: 18px; flex: none; }
  .hero-search .search { flex: 1; border: 0; padding: 12px 0; background: transparent; font-size: 15px; }
  .hero-search .search:focus { outline: none; }

  /* actiuni rapide */
  .quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
  .qa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 6px 12px; border-radius: 18px; border: 0; font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
  .qa .ic { width: 26px; height: 26px; }
  .qa-green { background: var(--accent); color: #fff; }
  .qa-lime { background: #c6ef5b; color: #0b2e1b; }
  .qa-dark { background: #1b1f24; color: #fff; }
  .qa-white { background: #fff; color: var(--text); }

  /* foldere ca cipuri orizontale */
  .folder-strip { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0 12px; }
  .folder-strip::-webkit-scrollbar { display: none; }
  .folder-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; max-width: 70vw; }
  .folder-chip .ic { width: 20px; height: 20px; color: var(--accent); }
  .folder-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .folder-chip em { font-style: normal; color: var(--muted); font-size: 12px; }

  /* carduri */
  .card { border-radius: 16px; }
  .card.doc .thumb { border-radius: 16px 16px 0 0; }
  .grid.docs, .grid.pages { gap: 12px; }
  .section { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 700; margin: 14px 0 10px; }
  .section-row { margin: 14px 0 10px; }
  .section-row .btn.small { font-weight: 600; }
}

/* ===== pagini publice: planuri, b2b, legal ===== */
.page { max-width: 860px; margin: 0 auto; }
.page .lead { font-size: 16px; color: var(--text); margin: 6px 0 18px; }
.page h2 { font-family: 'Fredoka', sans-serif; font-size: 18px; margin: 22px 0 8px; }
.page p, .page li { line-height: 1.55; font-size: 14.5px; }
.page table { width: 100%; border-collapse: collapse; font-size: 13px; }
.page th, .page td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page .code { background: #1b1f24; color: #c6ef5b; padding: 14px; border-radius: 12px; font-size: 13px; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.billing-toggle { display: inline-flex; background: #e9ebef; border-radius: 999px; padding: 4px; margin: 0 0 16px; }
.billing-toggle button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); }
.billing-toggle button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.billing-toggle em { font-style: normal; color: var(--accent); font-size: 12px; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.plan.featured { border-color: var(--accent); box-shadow: 0 10px 30px rgba(9,163,79,.18); }
.plan .ribbon { position: absolute; top: -10px; right: 14px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-family: 'Fredoka', sans-serif; margin: 0; font-size: 20px; }
.plan .tagline { color: var(--muted); font-size: 13px; }
.plan .price { font-size: 24px; font-weight: 800; margin-top: 6px; }
.plan .price-sub { color: var(--muted); font-size: 12px; }
.plan ul { margin: 8px 0 12px; padding-left: 18px; }
.plan li { font-size: 13.5px; margin: 4px 0; }
.plan .btn { margin-top: auto; justify-content: center; }
.b2b-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 10px; }
.b2b-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.b2b-card.featured { border-color: var(--accent); }
.b2b-card h3 { font-family: 'Fredoka', sans-serif; margin: 0 0 6px; font-size: 18px; }
.b2b-card .price { font-size: 22px; font-weight: 800; }
.b2b-card .price span { font-size: 12px; color: var(--muted); font-weight: 500; }
.b2b-card ul { padding-left: 18px; margin: 8px 0 0; }
.b2b-card li { font-size: 13.5px; margin: 4px 0; }
.lead-form { display: grid; gap: 10px; max-width: 520px; }
.lead-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lead-form input, .lead-form select, .lead-form textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 15px; }
.lead-form textarea { min-height: 90px; }
.legal-links { text-align: center; margin: 6px 0 0; }
.legal-links a { color: var(--muted); }
.credit a { color: var(--muted); }
#cookie-note { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 18; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: #1b1f24; color: #fff; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
#cookie-note a { color: #c6ef5b; }
@media (min-width: 701px) and (pointer: fine) { #cookie-note { left: auto; right: 24px; bottom: 24px; max-width: 520px; } }

/* prezentarea Bonuri si facturi in modul fara acces */
.rintro-brand { position: relative; }
.rintro-close { position: absolute; right: 16px; top: max(20px, env(safe-area-inset-top)); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 16px; cursor: pointer; }
.rintro-alt { display: none; text-align: center; padding: 0 28px calc(18px + env(safe-area-inset-bottom)); margin-top: -10px; }
.rintro-alt.show { display: block; }
.rintro-link { border: 0; background: transparent; color: rgba(255,255,255,.9); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.plan.hl { box-shadow: 0 0 0 4px rgba(9,163,79,.22), 0 10px 30px rgba(9,163,79,.18); }
.plan .ribbon.mine { background: #1b1f24; color: #c6ef5b; }

/* ===== WhatsApp ===== */
.row.between { justify-content: space-between; }
.btn.wa { background: #25D366; border-color: #25D366; color: #06311a; font-weight: 700; }
.btn.wa:hover { background: #20bd5a; }
.btn.wa:disabled { opacity: .45; }
.iconbtn.wa { background: #25D366; border-color: #25D366; color: #06311a; }
.iconbtn.wa:hover { background: #20bd5a; }
.wa-status { margin: 4px 0 8px; }
/* bara documentului pe mobil: patru actiuni, iconita deasupra textului */
#docbar .pill { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 11.5px; line-height: 1.1; }
#docbar .pill .ic { width: 21px; height: 21px; }
#docbar .pill.wa { background: #25D366; border-color: #25D366; color: #06311a; }
@media (max-width: 700px), (pointer: coarse) {
  .card.doc .cardmenu [data-act=rename] { display: none; }   /* redenumirea ramane in document */
}
@media (max-width: 700px), (pointer: coarse) {
  .folderhead .btn.wa { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 10px; }
  .folderhead .btn.wa .lbl { display: none; }
}

/* ---------------------------------------------------------------- cont: cod, dispozitive */
.auth-form input.code { font-size: 26px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.devices { margin: 6px 0 12px; }
.device { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line, #e4e7eb); font-size: 14px; }
.device:first-of-type { border-top: 0; }
.device .dk { font-weight: 700; min-width: 84px; }
.device .dl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5f6b7a; }
.device .dt { color: #8a94a3; font-size: 12.5px; }
.device.cur .dl { color: #14181d; }
.demo-note { background: #fff3cd; color: #7a5a00; border-radius: 10px; padding: 10px 12px; }

/* ---------------------------------------------------------------- admin */
.page.admin { max-width: 1100px; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.atab { padding: 8px 14px; border-radius: 999px; border: 1px solid #d9dde3; text-decoration: none; color: #14181d; font-weight: 600; font-size: 14px; }
.atab.on { background: #14181d; color: #fff; border-color: #14181d; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 18px; }
.tiles.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.tile { background: #fff; border: 1px solid #e4e7eb; border-radius: 14px; padding: 14px; }
.tile .tv { font-size: 22px; font-weight: 800; }
.tile .tl { font-size: 12.5px; color: #5f6b7a; margin-top: 2px; }
.atable { overflow-x: auto; background: #fff; border: 1px solid #e4e7eb; border-radius: 14px; }
.atable table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atable th, .atable td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #eef0f3; white-space: nowrap; }
.atable th { font-size: 12px; color: #5f6b7a; text-transform: uppercase; letter-spacing: .03em; }
.atable tr[data-id] { cursor: pointer; }
.atable tr[data-id]:hover { background: #f6f8fa; }
.plan-tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f3; }
.plan-tag.personal { background: #e3f2ff; } .plan-tag.business { background: #dcf5e6; } .plan-tag.cabinet { background: #f1e6ff; }
.st.paid { color: #09A34F; font-weight: 700; } .st.failed, .bad { color: #c62828; }
.members .member { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #eef0f3; }
.plan-form { gap: 8px; flex-wrap: wrap; }
.leads .lead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px; background: #fff; border: 1px solid #e4e7eb; border-radius: 12px; margin-bottom: 8px; }
.leads .lead.done { opacity: .65; }
.mfa { max-width: 420px; }
.mfa .qr { width: 200px; height: 200px; display: block; margin: 12px 0; border: 1px solid #e4e7eb; border-radius: 12px; }
.mfa .mfa-form { margin-top: 10px; }
.mfa-form .btn { margin-top: 8px; }
.mfa .qr-box { width: 200px; height: 200px; margin: 12px 0; border: 1px solid #e4e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.mfa .qr-box svg, .mfa .qr-box img { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- fara zoom, fara miscare stanga-dreapta, peste tot */
html, body { overflow-x: hidden; max-width: 100%; overscroll-behavior-x: none; touch-action: pan-y; }
#view, #sidebar, .page, .modal { overflow-x: hidden; }
img, svg, video, canvas, table, pre, iframe { max-width: 100%; }
.page, .modal, .card, .hint, .empty, .empty-state, h1, h2, h3, p, li, td, th { overflow-wrap: anywhere; }
.welcome, .rintro { overflow-x: hidden; }
.ed-body canvas, .cam-overlay, .viewer img { touch-action: none; }   /* colturile si glisarea le trateaza aplicatia */
@media (max-width: 700px) {
  .atable { overflow-x: hidden; }
  .atable table { table-layout: fixed; }
  .atable th, .atable td { white-space: normal; font-size: 12px; padding: 7px 6px; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------- consimtamant cookie-uri */
#consent { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 18; }
@media (min-width: 701px) and (pointer: fine) { #consent { left: auto; right: 24px; bottom: 24px; max-width: 560px; } }
.consent-box { background: #1b1f24; color: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 12px; }
.consent-text { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; }
.consent-text a { color: #c6ef5b; }
.consent-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.consent-btns .btn { background: #2b3139; color: #fff; border-color: #3a414b; }
.consent-btns .btn.primary { background: var(--accent, #09A34F); border-color: transparent; }
.consent-cats { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.consent-cat { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e4e7eb; border-radius: 12px; cursor: pointer; }
.consent-cat.off { opacity: .55; cursor: default; }
.consent-cat .cc-text { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.consent-cat .cc-text span { color: #5f6b7a; font-size: 12.5px; line-height: 1.45; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #cfd4db; border-radius: 999px; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--accent, #09A34F); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled + i { opacity: .6; }
.consent-state { background: #f6f8fa; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- notificari in aplicatie */
.ntoast { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 19; background: #fff; color: #14181d; border-radius: 16px; padding: 12px 14px; box-shadow: 0 12px 34px rgba(16,24,40,.22); display: flex; align-items: center; gap: 12px; border-left: 5px solid #09A34F; }
.ntoast.info { border-left-color: #2f6fed; } .ntoast.warning { border-left-color: #e8a317; } .ntoast.success { border-left-color: #09A34F; }
@media (min-width: 701px) and (pointer: fine) { .ntoast { left: auto; right: 24px; bottom: 24px; max-width: 480px; } }
.ntoast .nt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; line-height: 1.4; }
.ntoast .nt-text span { color: #5f6b7a; }
.ntoast .nt-btns { display: flex; gap: 6px; flex: none; }
.nt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nt-head h3 { margin: 0; }
.nt-dot { width: 12px; height: 12px; border-radius: 50%; background: #2f6fed; flex: none; }
.nt-head.success .nt-dot { background: #09A34F; } .nt-head.warning .nt-dot { background: #e8a317; }
.nt-body { margin: 0 0 10px; line-height: 1.5; }
.nt-more { background: #f6f8fa; border-radius: 12px; padding: 12px; line-height: 1.5; font-size: 14px; margin-bottom: 10px; }

/* ---------------------------------------------------------------- admin: notificari, parteneri */
.admin form.aform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fff; border: 1px solid #e4e7eb; border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.admin form.aform label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #5f6b7a; }
.admin form.aform label.wide { grid-column: 1 / -1; }
.admin form.aform input, .admin form.aform select, .admin form.aform textarea { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #d9dde3; border-radius: 10px; }
.admin form.aform textarea { min-height: 70px; resize: vertical; }
.admin form.aform .row.end { grid-column: 1 / -1; }
.admin form.aform label.check { flex-direction: row; align-items: center; gap: 8px; }
@media (max-width: 700px) { .admin form.aform { grid-template-columns: 1fr; } }
.keybox { background: #1b1f24; color: #c6ef5b; padding: 12px; border-radius: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; word-break: break-all; margin: 8px 0; }
.nlist .nitem { background: #fff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.nlist .nitem.archived { opacity: .55; }
.banner.free { background: #fff3cd; color: #5a4300; border: 1px solid #f1dc8a; border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.4; }
.banner.free a { color: #5a4300; font-weight: 700; }
.banner.free .ic { flex: none; width: 18px; height: 18px; }

/* ---------------------------------------------------------------- bun venit: documentul zboara de pe telefon pe calculator */
.hero-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 30px 10px 24px; pointer-events: none; }
.hero-scene svg { width: 100%; height: 100%; max-width: 400px; display: block; overflow: visible; }
.sync-anim .doc { animation: xf-fly 3.4s ease-in-out infinite; transform: translate(66px, 109px) scale(.55); }
@keyframes xf-fly {
  0%   { transform: translate(66px, 109px) scale(.55); opacity: 0; }
  12%  { transform: translate(66px, 109px) scale(.75); opacity: 1; }
  50%  { transform: translate(158px, 36px) scale(.95); opacity: 1; }
  80%  { transform: translate(246px, 88px) scale(.7); opacity: 1; }
  90%, 100% { transform: translate(246px, 88px) scale(.7); opacity: 0; }
}
.sync-anim .trail { stroke-dasharray: 3 9; animation: xf-dash 1.1s linear infinite; }
@keyframes xf-dash { to { stroke-dashoffset: -24; } }
.sync-anim .ok { animation: xf-ok 3.4s ease-in-out infinite; opacity: 0; }
@keyframes xf-ok { 0%, 76% { opacity: 0; transform: scale(.4); } 86% { opacity: 1; transform: scale(1.1); } 92%, 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .sync-anim .doc, .sync-anim .trail, .sync-anim .ok { animation: none; opacity: 1; } }

/* slide 1: foaia fotografiata stramb devine document scanat */
.scan-anim .sheet { transform-box: fill-box; transform-origin: center; animation: xf-scan-sheet 4.2s ease-in-out infinite; }
@keyframes xf-scan-sheet { 0%, 32% { transform: rotate(-9deg) skewX(-12deg) scale(.9); } 54%, 100% { transform: none; } }
.scan-anim .paper { animation: xf-scan-paper 4.2s ease-in-out infinite; }
@keyframes xf-scan-paper { 0%, 36% { fill: #d9dfe6; } 58%, 100% { fill: #fff; } }
.scan-anim .corners { animation: xf-scan-corners 4.2s ease-in-out infinite; }
@keyframes xf-scan-corners { 0%, 44% { opacity: 1; } 56%, 100% { opacity: 0; } }
.scan-anim .scanline { opacity: 0; animation: xf-scan-line 4.2s ease-in-out infinite; }
@keyframes xf-scan-line { 0%, 56% { transform: translateY(0); opacity: 0; } 60% { opacity: 1; } 82% { transform: translateY(150px); opacity: 1; } 86%, 100% { transform: translateY(150px); opacity: 0; } }
.scan-anim .ok { opacity: 0; animation: xf-scan-ok 4.2s ease-in-out infinite; }
@keyframes xf-scan-ok { 0%, 82% { opacity: 0; transform: scale(.4); } 88% { opacity: 1; transform: scale(1.15); } 93%, 100% { opacity: 1; transform: scale(1); } }
/* slide 3: mana trimite bonul la contabil */
.send-anim .hand { animation: xf-hand 3.8s ease-in-out infinite; }
@keyframes xf-hand { 0%, 8% { transform: translate(0, 8px); } 22% { transform: translate(8px, -8px); } 40%, 100% { transform: translate(0, 0); } }
.send-anim .receipt { transform: translate(64px, 104px) scale(.9); animation: xf-send 3.8s ease-in-out infinite; }
@keyframes xf-send { 0%, 10% { transform: translate(64px, 104px) scale(.9); opacity: 1; } 24% { transform: translate(84px, 78px) scale(1); opacity: 1; } 56% { transform: translate(166px, 34px) scale(1); opacity: 1; } 78% { transform: translate(250px, 92px) scale(.55); opacity: 1; } 84%, 100% { transform: translate(250px, 92px) scale(.55); opacity: 0; } }
.send-anim .trail { stroke-dasharray: 3 9; animation: xf-dash 1.1s linear infinite; }
.send-anim .ok { opacity: 0; animation: xf-send-ok 3.8s ease-in-out infinite; }
@keyframes xf-send-ok { 0%, 78% { opacity: 0; transform: scale(.4); } 86% { opacity: 1; transform: scale(1.15); } 92%, 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .scan-anim .sheet, .scan-anim .paper, .scan-anim .corners, .scan-anim .scanline, .scan-anim .ok, .send-anim .hand, .send-anim .receipt, .send-anim .trail, .send-anim .ok { animation: none; opacity: 1; transform: none; } .scan-anim .corners { opacity: 0; } }
.send-anim .envelope { opacity: 0; animation: xf-envelope 3.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes xf-envelope { 0%, 40% { opacity: 0; transform: scale(.6); } 50%, 62% { opacity: 1; transform: scale(1); } 72%, 100% { opacity: 0; transform: scale(.6); } }
.modal textarea[name=message] { width: 100%; min-height: 70px; font: inherit; padding: 8px 10px; border: 1px solid #d9dde3; border-radius: 10px; margin: 6px 0 10px; resize: vertical; }
.w-btn.google { background: #fff; color: #14181d; border: 1px solid #d9dde3; display: flex; align-items: center; justify-content: center; gap: 10px; }
.w-btn.google .gi { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- pagina /admin, separata de aplicatie */
body.admin-mode .credit, body.admin-mode #tabbar, body.admin-mode #docbar, body.admin-mode #fab, body.admin-mode #sidebar, body.admin-mode #consent { display: none !important; }
body.admin-mode main { margin-left: 0; max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
body.admin-mode .topbar { display: none; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-head .page-title { margin: 0; }
.admin-who-inline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #5f6b7a; }
.admin-login .w-title::after { content: ''; }

/* ---------------------------------------------------------------- admin: stare platforma, abonamente, spatiu */
.usebar { height: 8px; border-radius: 99px; background: #eef0f3; overflow: hidden; margin: 6px 0 4px; }
.usebar span { display: block; height: 100%; border-radius: 99px; background: #09a34f; }
.usebar.warn span { background: #e8a10c; } .usebar.bad span { background: #d92d20; }
.usebar-l { font-size: 12.5px; color: #5f6b7a; }
.warnc { color: #b77800; font-weight: 700; }
.status-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; }
.status-head.ok { background: #e8f7ee; color: #077f3d; } .status-head.bad { background: #fdecea; color: #b42318; }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.scard { background: #fff; border: 1px solid #e4e7eb; border-radius: 14px; padding: 16px; }
.scard h3 { margin: 0 0 10px; font-size: 16px; } .scard h4 { margin: 14px 0 2px; font-size: 13px; color: #5f6b7a; }
.scard p { font-size: 14px; line-height: 1.5; margin: 0 0 10px; }
.scard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.scard dt { color: #5f6b7a; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checks li .sdot { margin-top: 5px; } .checks li.ok .sdot { background: #09a34f; } .checks li.bad .sdot { background: #d92d20; }
.activity { font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }

/* ---------------------------------------------------------------- Personal: documentele care expira curand */
.expiry { color: #b77800; font-weight: 600; } .expiry.soon { color: #d92d20; }

/* ---------------------------------------------------------------- Contabilitate in bara laterala, 3 pachete, pagina pentru firme */
.sb-btn.on { border-color: var(--accent); color: var(--accent); background: #e6f6ec; }
@media (min-width: 900px) { .plans.three { grid-template-columns: repeat(3, 1fr); } }
.b2b-card p { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0 0 8px; }
.steps { padding-left: 20px; line-height: 1.7; margin: 0 0 12px; }
@media (min-width: 1000px) { .b2b-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------- 4 pachete pe un rand; Professional „in curand” */
/* cardurile isi pastreaza marimea (cam 270px): pagina de preturi foloseste toata latimea, cu 4 pe rand de la 1200px;
   sub, 2 pe rand, nu 3 + 1 */
.page.page-plans { max-width: 1180px; }
.page.page-plans > .lead, .page.page-plans > .hint, .page.page-plans > .billing-toggle { max-width: 860px; }
@media (min-width: 701px) { .plans.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .plans.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan.soon { display: flex; flex-direction: column; background: #f6f7f9; border-style: dashed; }
.plan.soon h3 { color: var(--muted); }
.plan.soon .soon-body { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 140px; color: var(--muted); font-weight: 700; font-size: 15px; letter-spacing: .02em; }

/* ---------------------------------------------------------------- Contabilitate: prezentarea pe desktop */
.rintro-wide { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 32px; background: rgba(16, 24, 40, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: auto; animation: riw-fade .2s ease-out; }
@keyframes riw-fade { from { opacity: 0; } to { opacity: 1; } }
.riw-card { position: relative; width: min(1080px, 100%); background: #fff; border-radius: 28px; padding: 40px 44px 30px; box-shadow: 0 30px 90px rgba(0, 0, 0, .35); animation: riw-rise .25s ease-out; }
@keyframes riw-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.riw-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f2f3f5; color: var(--text); font-size: 16px; cursor: pointer; }
.riw-close:hover { background: #e5e7eb; }
.riw-head { max-width: 720px; margin-bottom: 28px; }
.riw-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); background: #e6f6ec; padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.riw-head h1 { font-family: 'Fredoka', 'Arial Rounded MT Bold', -apple-system, sans-serif; font-size: 36px; line-height: 1.12; margin: 0; letter-spacing: -0.01em; color: var(--text); }
.riw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.riw-step { position: relative; display: flex; flex-direction: column; }
.riw-art { aspect-ratio: 16 / 12; border-radius: 22px; background: var(--accent); display: grid; place-items: center; overflow: hidden; margin-bottom: 16px; }
.riw-art svg { width: 84%; height: auto; }
.riw-num { position: absolute; top: 12px; left: 12px; width: 32px; height: 32px; border-radius: 50%; background: #c6ef5b; color: #111; font-weight: 800; display: grid; place-items: center; font-size: 15px; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.riw-step h2 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; color: var(--text); }
.riw-step p { font-size: 15px; line-height: 1.55; margin: 0; color: var(--muted); }
.riw-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.riw-hint { font-size: 14px; color: var(--muted); }
.riw-actions { display: flex; gap: 10px; }
.riw-go { padding: 12px 22px; font-size: 15px; }
@media (max-height: 760px) { .riw-card { padding: 28px 36px 22px; } .riw-head { margin-bottom: 18px; } .riw-head h1 { font-size: 30px; } .riw-art { aspect-ratio: 16 / 10; } }

/* ---------------------------------------------------------------- prezentarea pe desktop: pas cu pas */
.riw-card.riw-stepper { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; padding: 0; width: min(980px, 100%); overflow: hidden; min-height: 460px; }
.riw-stepper .riw-art { aspect-ratio: auto; border-radius: 0; margin: 0; min-height: 460px; }
.riw-stepper .riw-art svg { width: 78%; }
.riw-side { display: flex; flex-direction: column; padding: 44px 40px 32px; }
.riw-side .rintro-title { font-family: 'Fredoka', 'Arial Rounded MT Bold', -apple-system, sans-serif; font-size: 32px; line-height: 1.15; margin: 4px 0 12px; color: var(--text); }
.riw-side .rintro-text { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0; }
.riw-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 28px; }
.riw-stepper .dots { padding: 0; } .riw-stepper .dot { background: #d9dde3; } .riw-stepper .dot.on { background: var(--accent); }
.riw-back { background: transparent; border-color: transparent; color: var(--muted); }
.riw-go.last { background: var(--accent); }

/* ---------------------------------------------------------------- Setari cont (#/cont) */
.acct-row { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0 -8px 6px; border-radius: 12px; text-decoration: none; color: var(--text); }
.acct-row:hover, .acct-row.on { background: #f2f3f5; }
.acct-row .avatar, .acc-who .avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.acct-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acct-txt strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-txt span { font-size: 12px; color: var(--muted); }
.acct-go { color: var(--muted); font-size: 18px; }
a.acct-btn { text-decoration: none; }
.page.page-account { max-width: 1060px; }
.acc-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.acc-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.acc-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600; }
.acc-nav a:hover { background: #f2f3f5; } .acc-nav a.danger { color: var(--danger); }
.acc-main { display: flex; flex-direction: column; gap: 14px; }
.acc-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; scroll-margin-top: 16px; }
.acc-card h2 { font-size: 17px; margin: 0 0 10px; }
.acc-card.danger { border-color: #f5c2bd; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; } .acc-head h2 { margin: 0; }
.acc-who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.acc-who .avatar.big { width: 48px; height: 48px; font-size: 20px; }
.acc-form { display: grid; gap: 10px; } .acc-form.two { grid-template-columns: 1fr 1fr; } .acc-form.two .row { grid-column: 1 / -1; }
.acc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.acc-form input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; }
.acc-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; }
.acc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.acc-stats > div { background: #f7f8fa; border-radius: 12px; padding: 12px 14px; }
.acc-stats strong { font-size: 18px; }
.row.wrap { flex-wrap: wrap; gap: 8px; } .acc-sec { margin-top: 14px; }
@media (max-width: 900px) {
  .acc-grid { grid-template-columns: 1fr; }
  .acc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .acc-nav a { white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
  .acc-form.two, .acc-stats { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- rotita de setari (coltul de cont) */
.acct-gear { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.acct-gear .ic { width: 22px; height: 22px; }
.acct-gear:hover, .acct-gear.on { background: #f2f3f5; color: var(--text); }
.hero-acct .acct-gear { color: #fff; background: rgba(255, 255, 255, .16); }
.hero-acct .acct-gear:hover { background: rgba(255, 255, 255, .26); color: #fff; }

/* ---------------------------------------------------------------- date pentru factura */
.seg { display: inline-flex; background: #f2f3f5; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.bill-cui { display: flex; align-items: flex-end; gap: 10px; }
.bill-cui label { flex: 1; }
.bill-cui .btn { height: 42px; white-space: nowrap; }
.anaf-note:empty { display: none; }
.acc-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.acc-form label.check input { width: 18px; height: 18px; }
.acc-form.three { grid-template-columns: 1.4fr 1fr .7fr; }
.acc-form [hidden] { display: none !important; }
@media (max-width: 900px) { .acc-form.three { grid-template-columns: 1fr 1fr; } .acc-form.three label:last-child { grid-column: 1 / -1; } .bill-cui { flex-direction: column; align-items: stretch; } }
/* campurile din formularele de cont nu ies din card pe telefon (gridul nu le lasa sub latimea lor implicita) */
.acc-form > *, .acc-form label { min-width: 0; }
.acc-form input:not([type=checkbox]) { width: 100%; min-width: 0; box-sizing: border-box; }

/* ---------------------------------------------------------------- tichete de suport */
.overlay.wide .modal { max-width: 720px; width: 100%; }
.tickets { display: flex; flex-direction: column; gap: 6px; }
.ticket-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #f7f8fa; border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; }
.ticket-row:hover { border-color: var(--line); background: #fff; }
.tk-num { font-weight: 700; color: var(--muted); font-size: 13px; }
.tk-sub { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tk-sub strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-st { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef0f3; color: var(--muted); white-space: nowrap; }
.tk-st.open { background: #fff3cd; color: #7a5a00; } .tk-st.answered { background: #e6f6ec; color: #077f3d; } .tk-st.closed { background: #eef0f3; color: #6b7280; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; margin: 12px 0; padding-right: 4px; }
.msg { max-width: 88%; border-radius: 14px; padding: 10px 12px; font-size: 14.5px; line-height: 1.5; }
.msg.user { align-self: flex-start; background: #f2f3f5; } .msg.admin { align-self: flex-end; background: #e6f6ec; }
.msg-who { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.msg-body { overflow-wrap: anywhere; }
.msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; } .msg-files a { font-size: 13px; font-weight: 600; color: var(--accent-dark); text-decoration: none; }
.ticket-form textarea, .ticket-form select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; width: 100%; box-sizing: border-box; resize: vertical; }
.file-pick input { font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips .chip { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chips .chip.on { background: #14181d; color: #fff; border-color: #14181d; }
.badge-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #d92d20; color: #fff; font-size: 11.5px; font-weight: 800; margin-left: 4px; }

/* ---------------------------------------------------------------- documentatia proiectului in admin */
.md-doc { background: #fff; border: 1px solid #e4e7eb; border-radius: 16px; padding: 24px 28px; line-height: 1.6; font-size: 14.5px; max-width: 980px; }
.md-doc h1 { font-size: 24px; margin: 0 0 6px; } .md-doc h2 { font-size: 19px; margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid #eef0f3; }
.md-doc h3 { font-size: 16px; margin: 18px 0 6px; } .md-doc p { margin: 0 0 10px; }
.md-doc ul, .md-doc ol { margin: 0 0 12px; padding-left: 22px; } .md-doc li { margin: 3px 0; }
.md-doc code { background: #f2f3f5; border-radius: 6px; padding: 1px 6px; font-size: 13px; overflow-wrap: anywhere; }
.md-doc .md-table { overflow-x: auto; margin: 8px 0 14px; border: 1px solid #eef0f3; border-radius: 12px; }
.md-doc table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md-doc th, .md-doc td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.md-doc th { background: #f7f8fa; font-size: 12.5px; color: #5f6b7a; }
@media (max-width: 700px) { .md-doc { padding: 16px; } .md-doc .md-table { overflow-x: hidden; } .md-doc th, .md-doc td { overflow-wrap: anywhere; } }
.doc-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 980px; margin-bottom: 12px; }

/* ---------------------------------------------------------------- selectie multipla (Documente, Contabilitate) */
.selbtn.on { background: var(--text); border-color: var(--text); color: #fff; }
.selbtn .ic { width: 16px; height: 16px; }
.toolbar .selbtn { margin-left: auto; }
.selecting .card[data-id] { position: relative; cursor: pointer; user-select: none; -webkit-user-select: none; }
.selecting .card[data-id] .cardmenu { visibility: hidden; }
.selecting .card[data-id]:not(.sel) { opacity: .82; }
.selecting .card.sel { opacity: 1; box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(9,163,79,.18); }
.selbox { position: absolute; top: 8px; left: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff;
  background: rgba(27,31,36,.35); display: grid; place-items: center; color: transparent; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.selbox .ic { width: 16px; height: 16px; stroke-width: 3; }
.card.sel .selbox { background: var(--accent); border-color: var(--accent); color: #fff; }
.card.receipt .selbox { position: static; flex: none; order: -1; border-color: var(--line); background: #fff; box-shadow: none; }
.card.receipt.sel .selbox { background: var(--accent); border-color: var(--accent); }
.selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 30; width: min(760px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: #1b1f24; color: #fff;
  box-shadow: 0 14px 40px rgba(16,24,40,.35); animation: selbar-in .16s ease-out; }
@keyframes selbar-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
body.with-sidebar .selbar { left: calc(50% + 130px); width: min(820px, calc(100vw - 260px - 48px)); }
.selhead { display: flex; align-items: center; gap: 8px; flex: none; }
.selhead .iconbtn { width: 32px; height: 32px; background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.selhead .iconbtn .ic { width: 16px; height: 16px; }
.selcount { font-size: 14px; white-space: nowrap; }
.selhead .btn { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.selacts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.selacts .btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.selacts .btn:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.selacts .btn .ic { width: 16px; height: 16px; }
.selacts .btn.danger { color: #ff8a80; }
.selacts .btn:disabled { opacity: .4; cursor: default; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-settings .mode-pick label { flex-direction: row; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--text); }
.rc-settings .mode-pick label:has(input:checked) { border-color: var(--accent); background: #f0fdf4; }
.mode-pick input { margin: 3px 0 0; accent-color: var(--accent); }
.mode-pick span { display: flex; flex-direction: column; gap: 2px; }
.mode-pick em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.rc-list-head { margin-top: 18px; }
@media (max-width: 700px), (pointer: coarse) {
  body.selecting #tabbar, body.selecting #fab { display: none !important; }
  .selbar { left: 0; right: 0; bottom: 0; transform: none; width: auto; border-radius: 18px 18px 0 0; flex-direction: column; align-items: stretch; gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); animation: none; }
  body.with-sidebar .selbar { left: 0; width: auto; }
  .selhead .btn { margin-left: auto; }
  .selacts { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; gap: 4px; }
  .selacts .btn { flex-direction: column; gap: 3px; padding: 8px 2px; font-size: 11px; border-radius: 10px; min-width: 0; }
  .selacts .btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .selacts .btn .ic { width: 20px; height: 20px; }
  html body.selecting main { padding-bottom: 150px; }
  .mode-pick { grid-template-columns: 1fr; }
}
body.selecting main { padding-bottom: 110px; }
