/* Fonturile și culorile veterinarul.ro: Montserrat (text), Raleway (titluri), verde-petrol #05504e */
@font-face { font-family: "Montserrat"; font-weight: 400; src: url("../fonts/Montserrat-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Montserrat"; font-weight: 600; src: url("../fonts/Montserrat-SemiBold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Montserrat"; font-weight: 700; src: url("../fonts/Montserrat-Bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Raleway"; font-weight: 700; src: url("../fonts/Raleway-Bold.ttf") format("truetype"); font-display: swap; }

:root {
  --brand: #05504e;
  --brand-hover: #0e7176;
  --brand-soft: #73b8b4;
  --brand-tint: #f2fbfa;
  --accent: #ff7f11;
  --text: #333333;
  --muted: #505050;
  --line: #dde5e4;
  --error: #b3261e;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--brand-tint);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1, h2 { font-family: "Raleway", "Montserrat", sans-serif; font-weight: 700; color: var(--brand); margin: 0 0 8px; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }

#app { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 18px rgba(5, 80, 78, .08);
}

.logo { display: block; height: 44px; width: auto; margin: 0 auto 20px; }
.lead { color: var(--muted); margin: 0 0 20px; font-size: .95rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }

input {
  width: 100%;
  min-height: 48px;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid #b9c7c6;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
input:focus { outline: 3px solid var(--brand-soft); outline-offset: 1px; border-color: var(--brand); }

input.pin { text-align: center; letter-spacing: .5em; font-size: 1.5rem; font-weight: 700; }

button {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--brand-hover); }
button:disabled { opacity: .6; cursor: default; }

button.link {
  background: none;
  color: var(--brand);
  font-weight: 600;
  min-height: 44px;
  margin-top: 8px;
  text-decoration: underline;
}
button.link:hover:not(:disabled) { background: none; color: var(--brand-hover); }

.msg { min-height: 1.4em; margin: 14px 0 0; font-size: .9rem; color: var(--error); }
.msg.info { color: var(--brand); }
.banner { background: #fff4e5; border: 1px solid var(--accent); border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin-bottom: 16px; }

.checks { margin: 8px 0 4px; }
label.check { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0; font-weight: 600; border-bottom: 1px solid var(--line); cursor: pointer; }
label.check input { width: 22px; min-height: 22px; height: 22px; margin: 0; accent-color: var(--brand); flex: none; }

/* ---------- cadrul aplicației: conținut + bara de jos ---------- */
:root { --tabbar-h: 64px; }

#app.app--shell { display: block; padding: 0; min-height: 100vh; }

.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; }

.view {
  padding: 24px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom));
  outline: none;
}

.banner--top { margin: 0; border-radius: 0; border-width: 0 0 1px; text-align: center; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; }

.tabbar {
  display: flex;
  justify-content: center;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1 1 0;
  max-width: 112px;
  min-height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: .68rem;
  font-weight: 600;
}
.tabbar .tab .icon { width: 24px; height: 24px; }
.tabbar .tab[aria-current="page"] { color: var(--brand); }
.tabbar .tab:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: -3px; border-radius: 8px; }

.back { display: inline-flex; align-items: center; gap: 2px; margin: -8px 0 8px -6px; padding: 8px 6px; color: var(--brand); font-weight: 600; text-decoration: none; }
.back .icon { width: 18px; height: 18px; transform: rotate(180deg); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 16px; }
.panel-title { margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 6px 0; }
ol.steps { padding-left: 20px; }
ol.steps li { margin: 8px 0; }

.rows { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
a.row:hover { background: var(--brand-tint); }
.row .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.row-label small { display: block; font-weight: 400; color: var(--muted); }
.row--soon { color: var(--muted); }
.soon { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--brand-tint); border-radius: 999px; padding: 2px 10px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { text-align: right; overflow-wrap: anywhere; }

.view button { max-width: 420px; }

a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
.soon { white-space: nowrap; flex: none; }

/* ---------- fluxul de știri ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.news-list { display: grid; gap: 16px; }
.news { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(5, 80, 78, .06); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--brand-tint); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { padding: 14px 16px 18px; }
.news-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .78rem; color: var(--muted); }
.news-title { font-size: 1.12rem; line-height: 1.3; margin: 0 0 8px; }
.news-title a { color: var(--brand); text-decoration: none; }
.news-intro { margin: 0 0 14px; font-size: .94rem; color: var(--text); }

.badge-new { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em; border-radius: 6px; padding: 3px 8px; }
.thumb .badge-new { position: absolute; top: 10px; left: 10px; }
.badge-lock { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(22, 64, 59, .88); color: #fff; }
.badge-lock .icon, .lock-inline .icon { width: 16px; height: 16px; }
.lock-inline { display: inline-flex; color: var(--brand); }

a.btn { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 10px; text-decoration: none; }
a.btn:hover { background: var(--brand-hover); color: #fff; }

.feed-status { margin-top: 16px; text-align: center; }
.feed-status .lead { margin-bottom: 12px; }
.feed-status a.btn { max-width: 420px; margin: 0 auto; }

/* ---------- Veterinarul Azi: card și mini-player ---------- */
.azi { position: relative; background: var(--brand); color: #fff; border-radius: 16px; padding: 16px 16px 14px; margin: 0 0 20px; box-shadow: 0 4px 18px rgba(5, 80, 78, .25); }
.azi-head { display: flex; align-items: center; gap: 14px; padding-right: 34px; }
.azi-text { min-width: 0; }
.azi-text p { margin: 0; }
.azi-name { font-family: "Raleway", "Montserrat", sans-serif; font-weight: 700; font-size: 1.1rem; }
.azi-date { font-size: .82rem; color: var(--brand-soft); font-weight: 600; }
.azi-title { margin-top: 4px !important; font-size: .88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.azi-play, .mini-play { flex: none; display: grid; place-items: center; border-radius: 50%; padding: 0; margin: 0; }
.azi-play { width: 52px; height: 52px; background: #fff; color: var(--brand); }
.azi-play:hover:not(:disabled) { background: var(--brand-tint); }
.azi-play .icon { width: 24px; height: 24px; }

.azi-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.azi input.azi-range { flex: 1; min-height: 32px; padding: 0; border: 0; background: none; accent-color: #fff; }
.azi-time { font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.azi-msg { margin: 6px 0 0; font-size: .82rem; color: #ffd9b3; }
.azi-msg:empty { display: none; }
.azi .azi-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; margin: 0; padding: 0; background: none; color: #fff; display: grid; place-items: center; border-radius: 50%; }
.azi .azi-close:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.azi .azi-close .icon { width: 20px; height: 20px; }

.mini { position: relative; display: flex; align-items: center; gap: 12px; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px 6px 12px; box-shadow: 0 -4px 14px rgba(5, 80, 78, .08); }
.mini[hidden] { display: none; }
.mini-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--line); }
.mini-progress span { display: block; height: 100%; background: var(--accent); }
.mini-play { width: 40px; height: 40px; background: var(--brand); color: #fff; }
.mini-play .icon { width: 18px; height: 18px; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; }
.mini-time { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini .mini-close { flex: none; width: 44px; height: 44px; margin: 0; padding: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 50%; }
.mini .mini-close:hover:not(:disabled) { background: var(--brand-tint); }
.mini .mini-close .icon { width: 20px; height: 20px; }

/* ---------- Vocea Profesiei, live ---------- */
.live { background: #fff; border: 2px solid var(--brand); border-radius: 16px; padding: 14px; margin: 0 0 20px; box-shadow: 0 4px 18px rgba(5, 80, 78, .18); }
.live-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.live-head time { margin-left: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; background: #d62828; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; border-radius: 6px; padding: 3px 8px; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-badge i { animation: none; } }
.live-video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.live-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-title { margin: 10px 0 0; font-weight: 600; color: var(--brand); }

.chat { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat h2 { font-size: 1.05rem; }
.chat-form input[readonly] { background: var(--brand-tint); color: var(--muted); }
.chat-form textarea { width: 100%; font: inherit; padding: 10px 14px; border: 1px solid #b9c7c6; border-radius: 10px; resize: vertical; min-height: 80px; color: var(--text); }
.chat-form textarea:focus { outline: 3px solid var(--brand-soft); outline-offset: 1px; border-color: var(--brand); }
.chat-list { list-style: none; margin: 14px 0 0; padding: 0; }
.chat-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.chat-item:last-child { border-bottom: 0; }
.chat-author { display: block; font-size: .82rem; color: var(--brand); }
.chat-item p { margin: 2px 0 0; font-size: .92rem; overflow-wrap: anywhere; white-space: pre-wrap; }

.row-label small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.rows + .feed-status { margin-top: 16px; }

/* ---------- CMVRO ---------- */
.panel-top { display: flex; align-items: center; justify-content: space-between; }
.panel-top .panel-title { margin: 0; }
.year { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.year-btn { width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0; display: grid; place-items: center; background: none; color: var(--brand); border-radius: 50%; transform: rotate(180deg); }
.year-btn--next { transform: none; }
.year-btn:disabled { opacity: .3; }
.year-btn .icon { width: 18px; height: 18px; }
.total { margin: 6px 0 10px; font-size: 1rem; color: var(--muted); }
.total strong { font-family: "Raleway", "Montserrat", sans-serif; font-size: 2.4rem; color: var(--brand); line-height: 1; }
.total--small { margin: 8px 0 0; font-size: .95rem; }
.total--small strong { font-size: 1rem; }
ul.plain--tight { list-style: none; padding: 0; }
ul.plain--tight li { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
ul.plain--tight li:last-child { border-bottom: 0; }
ul.plain--tight li strong { white-space: nowrap; }
.rows--gap { margin: 16px 0 0; }
h2.section { margin: 24px 0 10px; font-size: 1.05rem; }
.nodoc { color: var(--accent); font-weight: 600; }
.hint { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.entry-form select, .entry-form input[type="date"], .entry-form input[type="number"] { width: 100%; min-height: 48px; font: inherit; padding: 10px 14px; border: 1px solid #b9c7c6; border-radius: 10px; background: #fff; color: var(--text); }
.entry-form input[type="file"] { min-height: 0; border: 0; padding: 8px 0; }
.doc-img { display: block; width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
button.danger { background: #b3261e; }
button.danger:hover:not(:disabled) { background: #8c1d18; }
.link--danger { color: #b3261e; }

a.row, a.row:hover { color: var(--text); }
a.back:hover { color: var(--brand-hover); }

.banner--ok { background: #e9f7ef; border-color: #2e8b57; color: #1d5b3a; }
a.btn--ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
a.btn--ghost:hover { background: var(--brand-tint); color: var(--brand); }
.report-result { display: grid; gap: 12px; margin-top: 16px; }
.report-result .btn, .report-result button { margin: 0; }
.link-open { text-align: center; font-weight: 600; padding: 8px; }

/* ---------- anunțuri CMVRO ---------- */
.ann-list { display: grid; gap: 12px; }
.ann { display: grid; gap: 4px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; }
a.ann:hover { color: var(--text); background: var(--brand-tint); }
.ann-meta { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); }
.ann-title { color: var(--brand); font-size: 1rem; line-height: 1.3; }
.ann-intro { font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-more { display: inline-flex; align-items: center; gap: 2px; font-size: .84rem; font-weight: 600; color: var(--brand); margin-top: 2px; }
.ann-more .icon { width: 16px; height: 16px; }
.ann-section a.btn { margin-top: 4px; }

/* ---------- parolă cu buton Arată ---------- */
.pw { position: relative; }
.pw input { padding-right: 92px; }
.pw .reveal { position: absolute; top: 0; right: 0; width: auto; min-height: 48px; margin: 0; padding: 0 14px; background: none; color: var(--brand); font-weight: 600; font-size: .9rem; border-radius: 0 10px 10px 0; }
.pw .reveal:hover:not(:disabled) { background: var(--brand-tint); color: var(--brand-hover); }

/* mesaj de eroare vizibil (logare, PIN) */
.msg.error { margin: 14px 0 6px; padding: 10px 12px; background: #fdecea; border: 1px solid #f1b8b3; border-radius: 10px; color: var(--error); font-weight: 600; }

/* PIN: cifre mascate fără a fi câmp de parolă */
input.pin { -webkit-text-security: disc; text-security: disc; }

/* ---------- pagina de instalare ---------- */
.install-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card--wide { max-width: 460px; }
ol.steps--big { padding-left: 22px; }
ol.steps--big li { margin: 14px 0; line-height: 1.5; }
.inline-icon { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; color: var(--brand); }
.address { margin: 6px 0 12px; font-family: "Raleway", "Montserrat", sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--brand); overflow-wrap: anywhere; }
.install-page .link-open { display: block; margin-top: 12px; text-align: center; }

/* ---------- tastatură PIN ---------- */
.pinpad { margin: 8px auto 4px; max-width: 280px; }
.dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 22px; min-height: 18px; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand); background: transparent; transition: background .1s; }
.dot.on { background: var(--brand); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key { margin: 0; min-height: 60px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-size: 1.5rem; font-weight: 600; border: 1px solid var(--line); }
.key:active { background: var(--brand-soft); color: #fff; }
.pinpad.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .pinpad.shake { animation: none; } }
.key { aspect-ratio: 1 / 1; min-height: 0; width: 100%; max-width: 74px; justify-self: center; padding: 0; }

button.row--btn { width: 100%; margin: 0; background: none; color: var(--text); text-align: left; border-radius: 0; border-bottom: 0; font-size: 1rem; }
button.row--btn:hover:not(:disabled) { background: var(--brand-tint); }

/* ---------- cititor: articole și episoade în aplicație ---------- */
.reader-hero { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; margin: 4px 0 14px; background: var(--brand-tint); }
.reader-meta { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.reader-title { font-size: 1.7rem; line-height: 1.25; margin: 0 0 16px; }
.reader-sub { margin: -6px 0 16px; font-size: 1.05rem; color: var(--muted); line-height: 1.5; }
.reader, .reader-text { font-size: 1.15rem; line-height: 1.75; color: #222; }
.reader-text { margin: 0 0 16px; }
.reader > *:first-child { margin-top: 0; }
.reader p { margin: 0 0 1.1em; }
.reader h2, .reader h3, .reader h4 { font-family: "Raleway", "Montserrat", sans-serif; color: var(--brand); line-height: 1.3; margin: 1.6em 0 .6em; }
.reader h2 { font-size: 1.4rem; } .reader h3 { font-size: 1.25rem; } .reader h4 { font-size: 1.1rem; }
.reader ul, .reader ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.reader li { margin: .45em 0; }
.reader a { color: var(--brand); text-decoration: underline; overflow-wrap: anywhere; }
.reader img { display: block; max-width: 100%; height: auto; margin: 1.2em auto; border-radius: 10px; }
.reader figure { margin: 1.2em 0; }
.reader figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: -.6em; }
.reader blockquote { margin: 1.3em 0; padding: .2em 0 .2em 1em; border-left: 4px solid var(--brand-soft); color: #444; font-style: italic; }
.reader hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.table-scroll { overflow-x: auto; margin: 1.2em 0; }
.reader table { border-collapse: collapse; font-size: .95rem; min-width: 100%; }
.reader td, .reader th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.reader-site { display: block; margin: 24px 0 8px; text-align: center; font-size: .9rem; color: var(--muted); }
.reader-audio { width: 100%; margin: 0 0 18px; }
.lock-panel { display: flex; gap: 12px; align-items: flex-start; }
.lock-panel .icon { width: 22px; height: 22px; flex: none; color: var(--brand); margin-top: 2px; }
.lock-panel p { margin: 0; }

.news-cat { display: inline-block; background: var(--brand-tint); color: var(--brand); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.reader-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reader-author { margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1rem; color: var(--muted); }
.reader-author strong { color: var(--text); }
.azi-name { line-height: 1.25; }
.ann-section + a.btn { margin-top: 12px; }
