/* Simplex Team — stil simplu, lizibil, rapid; fără animații decorative. */
:root {
  --bg: #f4f6f9; --card: #fff; --text: #1b2430; --muted: #64748b; --line: #e3e8ef;
  --primary: #1f4e79; --primary-2: #2563eb; --ok: #15803d; --warn: #b45309; --danger: #b91c1c;
  --green-bg: #dcfce7; --green: #166534; --yellow-bg: #fef3c7; --yellow: #92400e; --red-bg: #fee2e2; --red: #991b1b;
  --blue-bg: #dbeafe; --blue: #1e40af; --orange-bg: #ffedd5; --orange: #9a3412; --gray-bg: #eef2f6; --gray: #475569; --violet-bg: #ede9fe; --violet: #5b21b6;
  --radius: 10px; --nav-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --card: #18202a; --text: #e6edf3; --muted: #94a3b8; --line: #2a3441;
    --primary: #5b9bd5; --primary-2: #60a5fa;
    --green-bg: #12351f; --green: #86efac; --yellow-bg: #3a2e0b; --yellow: #fde68a; --red-bg: #3b1515; --red: #fca5a5;
    --blue-bg: #172a4a; --blue: #93c5fd; --orange-bg: #3d2410; --orange: #fdba74; --gray-bg: #232c38; --gray: #cbd5e1; --violet-bg: #2a2050; --violet: #c4b5fd;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
body.noscroll { overflow: hidden; }
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0; }
h2 { font-size: 1.15rem; margin: .2rem 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
h4 { font-size: .92rem; margin: 1rem 0 .4rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); min-height: 42px;
}
textarea { resize: vertical; min-height: 60px; }
input[type="checkbox"] { width: auto; min-height: 0; }
/* iPhone: câmpurile de dată / oră au o lățime proprie și ies din ecran */
input[type="date"], input[type="time"] { display: block; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
input[type="color"] { width: 42px; padding: 2px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 1px; }
code { background: var(--gray-bg); padding: 0 4px; border-radius: 4px; font-size: .85em; }
.pre { background: var(--gray-bg); padding: .8rem; border-radius: 8px; overflow: auto; font-size: .8rem; }

/* butoane */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem 1rem; min-height: 42px;
  border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger-link, .btn.danger-text { color: var(--danger); }
.btn.sm { padding: .3rem .7rem; min-height: 34px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn-icon { border: 1px solid var(--line); background: var(--card); border-radius: 8px; min-width: 40px; min-height: 40px; cursor: pointer; font-size: 1.1rem; }
.link { background: none; border: 0; color: var(--primary-2); cursor: pointer; padding: .2rem; font-size: .9rem; }

/* layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: var(--card); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar nav { flex: 1; overflow: auto; padding: .3rem; }
.sidebar nav a, .more a { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 8px; color: var(--text); position: relative; }
.sidebar nav a.on, .more a.on { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
.sidebar nav a:hover { text-decoration: none; background: var(--gray-bg); }
.ic { width: 1.3rem; text-align: center; }
.side-user { padding: .8rem 1rem; border-top: 1px solid var(--line); font-size: .9rem; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand.small { padding: 1rem; gap: .5rem; }
.brand .logo { border-radius: 8px; background: #fff; flex-shrink: 0; }
.login-brand { flex-direction: column; text-align: center; }
.login-brand .logo { border-radius: 14px; }
.main { flex: 1; min-width: 0; }
.topbar { display: none; }
.content { max-width: 1200px; margin: 0 auto; padding: 1rem 1.2rem 2rem; }
.bottomnav, .more-bg { display: none; }
.dot { background: var(--danger); color: #fff; border-radius: 10px; font-size: .7rem; padding: 0 .4rem; margin-left: auto; font-weight: 700; }

@media (max-width: 860px) {
  /* iPhone: câmpurile sub 16px fac zoom automat la atingere, iar după zoom bara de jos pare că „plutește” */
  input, select, textarea { font-size: 16px !important; }
  /* nimic nu are voie să lărgească pagina peste ecran (altfel iOS permite deplasarea laterală) */
  html, body { overflow-x: clip; }
  /* iPhone: pagina nu mai derulează; derulează doar conținutul dintre bara de sus și cea de jos.
     Bara de jos face parte din aranjare (nu „position: fixed”), deci iOS nu o mai poate muta la mijlocul ecranului. */
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .shell { flex-direction: column; height: 100%; height: 100dvh; min-height: 0; }
  .main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: clip; overscroll-behavior-y: contain; }
  /* formular deschis: bara de jos dispare, formularul ocupă ecranul până jos (butoanele lui rămân vizibile) */
  body.noscroll .bottomnav { display: none; }
  .sidebar { display: none; }
  .login { height: 100%; min-height: 0; overflow-y: auto; align-items: flex-start; padding-top: max(2rem, env(safe-area-inset-top)); }
  .topbar { display: flex; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 20; background: var(--primary); color: #fff; padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); }
  .topbar-title { flex: 1; }
  .topbar-logo { border-radius: 6px; background: #fff; }
  .bell { color: #fff; position: relative; font-size: 1.2rem; }
  .bell .dot { position: absolute; top: -6px; right: -10px; }
  .content { padding: .8rem .75rem 1.5rem; }
  .bottomnav { display: flex; position: relative; flex-shrink: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    transform: translateZ(0); -webkit-backface-visibility: hidden; }
  .bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; color: var(--muted);
    background: none; border: 0; position: relative; cursor: pointer; }
  .bottomnav .ic { font-size: 1.25rem; }
  .bottomnav .on { color: var(--primary-2); font-weight: 700; }
  .bottomnav .dot { position: absolute; top: 4px; right: 22%; }
  .more-bg { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 25; }
  .more { position: absolute; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); left: 0; right: 0; background: var(--card); border-radius: 14px 14px 0 0; padding: .5rem; }
  .more a { padding: .85rem 1rem; font-size: 1rem; }
}

/* elemente */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.gap { gap: .5rem; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 160px; }
.mt { margin-top: .7rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.warn { color: var(--warn); }
.error { color: var(--danger); }
.ok-text { color: var(--ok); }
.big { font-size: 1.4rem; }
.back { display: inline-block; margin-bottom: .6rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 .9rem; }
.grid2c { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 .7rem; }
@media (max-width: 520px) { .grid2c { grid-template-columns: minmax(0, 1fr); } .grid2 { grid-template-columns: minmax(0, 1fr); } }
.field { display: block; margin-bottom: .7rem; }
.field-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; color: var(--muted); }
.req { color: var(--danger); }
.hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; margin: .4rem 0; cursor: pointer; }
.check.inline { display: inline-flex; margin-right: .6rem; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.inline-field { display: flex; flex-direction: column; font-size: .78rem; color: var(--muted); min-width: 140px; }
.inline-field select, .inline-field input { margin-top: 2px; color: var(--text); font-size: .95rem; }
.empty { color: var(--muted); padding: .8rem 0; }
.loading { padding: 2rem; text-align: center; color: var(--muted); }
.badge { display: inline-block; padding: .08rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--gray-bg); color: var(--gray); white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); } .b-yellow { background: var(--yellow-bg); color: var(--yellow); }
.b-red { background: var(--red-bg); color: var(--red); } .b-blue { background: var(--blue-bg); color: var(--blue); }
.b-orange { background: var(--orange-bg); color: var(--orange); } .b-gray { background: var(--gray-bg); color: var(--gray); } .b-violet { background: var(--violet-bg); color: var(--violet); }
.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .6rem; }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; font-size: .88rem; min-height: 36px; }
.pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabs { display: flex; gap: .3rem; margin-bottom: .8rem; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 3px solid transparent; padding: .6rem .8rem; cursor: pointer; white-space: nowrap; color: var(--muted); font-weight: 600; }
.tabs .on { color: var(--primary-2); border-bottom-color: var(--primary-2); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: .8rem; }
.seg button { flex: 1; padding: .7rem; border: 0; background: var(--card); cursor: pointer; font-weight: 600; min-height: 46px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg .on { background: var(--primary); color: #fff; }
.seg .s-realizat { background: var(--ok); } .seg .s-anulat { background: var(--gray); } .seg .s-amanat { background: #c2410c; }
.seg.small { margin: 0; } .seg.small button { padding: .4rem .8rem; min-height: 36px; }
.item, .item-link { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.item:last-child, .item-link:last-child { border-bottom: 0; }
.item-link { display: block; color: var(--text); }
.item-link:hover { text-decoration: none; background: var(--gray-bg); }
.item-link small, .act-body small { display: block; color: var(--muted); }
.item-link.unread b::before { content: '● '; color: var(--primary-2); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .9rem; margin: .8rem 0 0; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; } .dl dt { margin-top: .3rem; } }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.alerts { list-style: none; margin: 0; padding: 0; }
.period { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; }
.period .btn { min-height: 42px; }
.datenav .period { align-items: center; }
.alerts li { padding: .5rem .7rem; border-radius: 8px; margin-bottom: .35rem; }
.alerts .al-row { display: flex; align-items: flex-start; gap: .5rem; }
.alerts .al-row a { flex: 1; }
.al-x { flex-shrink: 0; width: 30px; height: 30px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .7; cursor: pointer; font-size: 1rem; }
.al-x:hover, .al-x:focus-visible { opacity: 1; background: rgba(127,127,127,.18); }
.al-red { background: var(--red-bg); } .al-red a { color: var(--red); }
.al-yellow { background: var(--yellow-bg); } .al-yellow a { color: var(--yellow); }
.alert-card { border-color: #f59e0b; background: var(--yellow-bg); }
.info-card { border-color: var(--primary-2); background: var(--blue-bg); }
.counts { margin-bottom: .7rem; }
.dayhead { text-transform: capitalize; }

/* tabele */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .78rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }
.table.small { font-size: .82rem; }
.row-total td { font-weight: 700; background: var(--gray-bg); }
.row-alert td { background: var(--red-bg); }
.num-input { max-width: 160px; text-align: right; }

/* statistici */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-bottom: .6rem; }
.tiles.small { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .tiles, .tiles.small { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--gray-bg); border-radius: 10px; padding: .7rem .8rem; }
.stat-label { font-size: .72rem; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.stat-value { font-size: 1.35rem; font-weight: 800; margin-top: .15rem; overflow-wrap: anywhere; }
.tiles.small .stat-value { font-size: 1.1rem; }
.stat-sub { font-size: .76rem; color: var(--muted); }
.stat.green { background: var(--green-bg); } .stat.green .stat-value { color: var(--green); }
.stat.yellow { background: var(--yellow-bg); } .stat.yellow .stat-value { color: var(--yellow); }
.stat.red { background: var(--red-bg); } .stat.red .stat-value { color: var(--red); }
.stat.violet { background: var(--violet-bg); } .stat.violet .stat-value { color: var(--violet); }
.stat-btn { padding: 0; border: 2px solid transparent; background: none; border-radius: 12px; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.stat-btn.on { border-color: var(--primary-2); }
.item.offer { display: flex; flex-direction: column; gap: .2rem; }
.mt-xs { margin-top: .15rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar i { display: block; width: 100%; background: var(--primary-2); border-radius: 3px 3px 0 0; }
.bar small { font-size: .62rem; color: var(--muted); }

/* planificare */
.act { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: 0; }
.act-time { width: 48px; flex-shrink: 0; font-weight: 700; color: var(--primary); }
.act-body { flex: 1; min-width: 0; }
.act-body .result { color: var(--ok); }
.act-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.act.done .act-body b { opacity: .85; }
.act.moved { opacity: .75; }
.quick-report { display: flex; flex-direction: column; gap: .3rem; }
@media (max-width: 520px) {
  .act { flex-wrap: wrap; }
  .act-side { width: 100%; align-items: stretch; }
  .quick-report { flex-direction: row; } .quick-report .btn { flex: 1; }
}
.datenav { display: flex; align-items: center; gap: .4rem; }
.datenav input { width: auto; }

/* sheet (dialog) */
.sheet-bg { position: fixed; inset: 0; background: rgba(15,20,26,.45); z-index: 50; display: flex; align-items: center; justify-content: center; }
.sheet { background: var(--card); border-radius: 14px; width: min(620px, 96vw); max-height: 92vh; display: flex; flex-direction: column; }
.sheet-wide { width: min(900px, 96vw); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.05rem; }
.sheet-body { padding: 1rem; overflow-y: auto; }
.sticky-actions { position: sticky; bottom: -1rem; background: var(--card); padding: .7rem 0 .2rem; margin-top: .5rem; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .sheet-bg { align-items: flex-end; }
  .sheet, .sheet-wide { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

/* selector client */
.picker { position: relative; }
.picker-list { position: absolute; z-index: 5; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; max-height: 260px; overflow: auto; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.picker-item { display: block; width: 100%; text-align: left; padding: .55rem .7rem; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; }
.picker-item small { display: block; color: var(--muted); }
.picker-item:hover { background: var(--gray-bg); }
.picker-item.new { color: var(--primary-2); font-weight: 600; }
.picker-empty { padding: .6rem .7rem; color: var(--muted); }
.picked { display: flex; justify-content: space-between; align-items: center; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--gray-bg); }
.newclient { display: grid; gap: .4rem; padding: .6rem; border: 1px dashed var(--primary-2); border-radius: 8px; }

/* timeline */
.timeline { list-style: none; margin: .5rem 0 0; padding: 0; }
.timeline li { border-left: 3px solid var(--line); padding: .3rem 0 .7rem .8rem; }
.tl-meta { font-size: .8rem; color: var(--muted); }
.tl-text { white-space: pre-wrap; }
.commentbox { display: flex; gap: .5rem; align-items: flex-end; margin-bottom: .6rem; }

/* obiecte */
.stages { display: flex; gap: .3rem; flex-wrap: wrap; margin: .5rem 0; }
.stage { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: .35rem .6rem; font-size: .82rem; cursor: pointer; min-height: 34px; }
.stage.on { color: #fff; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .4rem; margin-top: .7rem; }
.thumb { padding: 0; border: 0; background: var(--gray-bg); border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-new { position: relative; cursor: default; }
.pic-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-width: 100vw; max-height: calc(100vh - 70px); object-fit: contain; touch-action: pinch-zoom; }
.lb-bar { display: flex; gap: .5rem; align-items: center; color: #fff; padding: .6rem; flex-wrap: wrap; justify-content: center; }

/* hartă */
.map { height: 62vh; min-height: 360px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: .9rem; z-index: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; margin-bottom: .5rem; color: var(--muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* datorii */
.debt { border-bottom: 1px solid var(--line); }
.debt-head { display: flex; gap: .8rem; width: 100%; text-align: left; background: none; border: 0; padding: .7rem 0; cursor: pointer; }
.debt-head small { display: block; color: var(--muted); }
.debt-amt { text-align: right; white-space: nowrap; }
.debt-amt b { display: block; color: var(--red); font-size: 1.05rem; }
.debt-body { padding: 0 0 .8rem; }
.debt-form { background: var(--gray-bg); border-radius: 8px; padding: .7rem; margin-bottom: .5rem; }

/* calendar */
.ev { display: block; font-size: .78rem; padding: .15rem .35rem; border-radius: 4px; margin-top: 2px; color: var(--text); background: var(--blue-bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev:hover { text-decoration: none; filter: brightness(.95); }
.ev-task { background: var(--violet-bg); } .ev-followup { background: var(--orange-bg); }
.ev.st-realizat { background: var(--green-bg); } .ev.st-anulat { background: var(--gray-bg); text-decoration: line-through; }
.legend .ev-activity { background: var(--blue-bg); border: 1px solid var(--blue); } .legend .ev-task { border: 1px solid var(--violet); } .legend .ev-followup { border: 1px solid var(--orange); }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: .6rem; }
.cal-h { font-size: .75rem; color: var(--muted); text-align: center; font-weight: 700; }
.cal-cell { min-height: 84px; background: var(--gray-bg); border-radius: 6px; padding: 3px; overflow: hidden; }
.cal-cell.out { opacity: .45; } .cal-cell.today { outline: 2px solid var(--primary-2); }
.cal-day { border: 0; background: none; font-weight: 700; font-size: .8rem; cursor: pointer; padding: 0 2px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; margin-top: .6rem; }
@media (max-width: 860px) { .cal-week { grid-template-columns: 1fr; } .cal-cell { min-height: 60px; } .cal-month .ev { font-size: .66rem; } }
.cal-col { background: var(--gray-bg); border-radius: 8px; padding: .4rem; min-height: 80px; }
.cal-col.today { outline: 2px solid var(--primary-2); }
.cal-dayhead { border: 0; background: none; font-weight: 700; font-size: .82rem; cursor: pointer; padding: 0; margin-bottom: .2rem; text-transform: capitalize; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; width: min(440px, 100%); }
.login-box h1 { font-size: 1.4rem; }
.login-box .brand { margin-bottom: 1rem; }
.user-list { display: grid; gap: .4rem; max-height: 60vh; overflow: auto; }
.user-btn { text-align: left; padding: .8rem 1rem; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font-size: 1rem; cursor: pointer; min-height: 48px; }
.user-btn:hover { border-color: var(--primary-2); background: var(--blue-bg); }

/* toast */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); display: grid; gap: .4rem; width: min(480px, 92vw); }
.toast { background: #1f2937; color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast-error { background: var(--danger); }
@media (min-width: 861px) { .toasts { bottom: 20px; } }
details summary { cursor: pointer; color: var(--primary-2); padding: .3rem 0; }
details.warn summary { color: var(--warn); }
.client-row b { font-size: 1rem; }
.pre-line { white-space: pre-line; }

/* datorii: partenerul comentat azi se vede imediat (verde) */
.debt.done-today { background: var(--green-bg); border-left: 4px solid var(--green); border-radius: 8px; }
.debt.done-today .debt-head { padding-left: .6rem; padding-right: .6rem; }
.debt.done-today + .debt.done-today { margin-top: .3rem; }
.debt.done-today .done-name { color: var(--green); }
.span-all { grid-column: 1 / -1; }
.reminder small { display: block; }
/* contoarele de statut din planificare funcționează ca filtru */
.count-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 999px; }
.count-btn.on .badge { outline: 2px solid var(--primary-2); outline-offset: 1px; }
.kpi-items .num-input { width: 6.5rem; }
.kpi-items select { min-width: 7rem; }
.grid2 > .span-all { grid-column: 1 / -1; }
/* datorii: progresul completării, corecțiile administratorului */
.progress-card.done { border-color: var(--ok, #16a34a); }
.bar-line { display: block; height: 6px; background: var(--gray-bg); border-radius: 4px; overflow: hidden; margin-top: .35rem; }
.bar-line i { display: block; height: 100%; background: var(--primary-2); }
.progress-card.done .bar-line i { background: #16a34a; }
.progress-list { display: grid; gap: .45rem; margin-top: .4rem; }
.progress-row { display: grid; grid-template-columns: 1fr auto auto; gap: .2rem .7rem; align-items: center; background: none; border: 0; padding: .25rem 0; text-align: left; color: inherit; cursor: pointer; font: inherit; }
.progress-row .bar-line { grid-column: 1 / -1; margin-top: 0; }
.ok-text { color: #16a34a; }
.danger-text { color: var(--danger); }
.err-line { color: #b45309; }
.admin-line { color: var(--primary-2); }
.admin-tools h4 { margin: .6rem 0 .2rem; }
.review-box { border: 1px dashed #dc2626; border-radius: 8px; padding: .6rem; margin: .4rem 0; }
.own-actions { margin-bottom: .5rem; }
/* raportul cu 7 coloane: tabel pe calculator, carduri pe telefon */
.report7-cards { display: none; }
.r7 { padding: .7rem .8rem; margin-bottom: .5rem; display: grid; gap: .25rem; }
.r7-missing { border-left: 4px solid #dc2626; }
.r7-sums { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .92rem; }
@media (max-width: 760px) { .report7-table { display: none; } .report7-cards { display: block; } }
.necompletat { color: #dc2626; }
.admin-box { border: 1px solid var(--line); border-left: 4px solid #b45309; border-radius: 8px; padding: .6rem .8rem; margin-bottom: .6rem; background: var(--card); }
.err-sums { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: .2rem 0 .5rem; }
.big-check { font-size: 1.02rem; padding: .3rem 0; }
.big-check input { width: 1.2rem; height: 1.2rem; }

/* text formatat (raportul agentului AI în sarcină) */
.rich-text { margin: .4rem 0 .8rem; line-height: 1.5; }
.rich-text .rt-p { margin: .35rem 0; }
.rich-text .rt-h { margin: .9rem 0 .3rem; font-size: .95rem; text-transform: none; color: var(--primary-2); }
.rich-text .rt-list { margin: .2rem 0 .5rem; padding-left: 1.3rem; }
.rich-text .rt-list li { margin: .15rem 0; }
.rich-text .rt-list li.rt-sub { margin-left: 1.1rem; list-style: circle; }

/* selectorul de echipă */
.team-switch { padding: .2rem .9rem .6rem; display: grid; gap: .25rem; }
.team-switch .team-select { display: grid; gap: .15rem; font-size: .78rem; color: var(--muted); }
.team-switch select { width: 100%; font-weight: 600; }
.team-switch .team-name { font-weight: 600; font-size: .9rem; }
.team-switch .check.small { font-size: .78rem; }
.team-switch.compact { padding: 0; margin-left: auto; margin-right: .5rem; }
.team-switch.compact .team-select span { display: none; }
.team-switch.compact select { max-width: 9.5rem; padding: .25rem .4rem; font-size: .85rem; background: rgba(255,255,255,.95); color: #1f2937; border-radius: 8px; border: 0; }
.team-switch.compact .team-name { color: #fff; font-size: .82rem; }
@media (min-width: 900px) { .team-switch.compact { display: none; } }
.lang-switch { display: flex; justify-content: center; gap: 1rem; margin-top: 1.2rem; }
.lang-switch .link.active { font-weight: 700; text-decoration: underline; }
