/* Laromed — variabile de temă, reset, componente de bază */
:root {
  --primary: #48ADB5;
  --primary-dark: #2F8A92;
  --primary-soft: #E3F3F4;
  --primary-tint: #F1F9F9;
  --accent: #C77D91;
  --accent-dark: #A95E73;
  --accent-soft: #F7E9EE;
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #1F2A2E;
  --ink-2: #4A5A60;
  --ink-3: #7B8A90;
  --line: #D9D3C8;
  --line-2: #E6E1D8;
  --frame: 1px solid var(--line);
  --ok: #3E9C6C; --ok-soft: #E6F5EC;
  --warn: #D89A2B; --warn-soft: #FBF1DC;
  --danger: #D1565E; --danger-soft: #FBE5E7;
  --info: #4E8FD1; --info-soft: #E6EFF9;
  --radius: 18px; --radius-sm: 12px; --radius-lg: 28px; --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(31,42,46,.05), 0 2px 8px rgba(31,42,46,.04);
  --shadow: 0 6px 24px rgba(31,42,46,.07), 0 2px 6px rgba(31,42,46,.04);
  --shadow-lg: 0 24px 60px rgba(31,42,46,.12);
  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
input, select, textarea { min-width: 0; max-width: 100%; }
.hint { overflow-wrap: anywhere; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.em { color: var(--accent); font-style: normal; font-weight: 500; }
.hi { color: var(--primary-dark); }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.narrow { max-width: 820px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.logo { display: inline-flex; align-items: center; gap: .65rem; color: inherit; }
.logo-img { height: 40px; width: auto; }
.logo-mark svg { width: 40px; height: 40px; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; color: var(--accent); letter-spacing: -.02em; }
.logo-text small { font-size: .62rem; font-weight: 800; letter-spacing: .28em; color: var(--primary); margin-top: 3px; }
[hidden] { display: none !important; }

/* butoane */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: var(--pill); border: 1.5px solid transparent;
  font: 600 .95rem var(--font-body); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s; white-space: nowrap; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(72,173,181,.28); }
.btn-primary:hover { color: #fff; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(199,125,145,.28); }
.btn-accent:hover { color: #fff; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-tint); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--primary-tint); color: var(--primary-dark); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-sm { padding: .5rem .95rem; font-size: .85rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* formulare */
.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-size: .85rem; font-weight: 700; color: var(--ink-2); margin-bottom: .35rem; }
.input, select, textarea, input:not([type]), input[type=url], input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search] {
  width: 100%; padding: .75rem .95rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: 1rem var(--font-body); color: var(--ink); outline: none; transition: border .15s, box-shadow .15s; }
.input:focus, select:focus, textarea:focus, input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { min-height: 110px; resize: vertical; }
select { text-overflow: ellipsis; padding-right: 2rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--primary); flex: none; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.row-2 { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row > *, .row-2 > * { min-width: 0; }
.hint { font-size: .8rem; color: var(--ink-3); margin-top: .3rem; }
.req::after { content: " *"; color: var(--accent); }

/* carduri, badge-uri, alerte */
.card { background: var(--surface); border: var(--frame); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .7rem; border-radius: var(--pill); font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--primary-soft); color: var(--primary-dark); }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--line-2); color: var(--ink-3); }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-size: .92rem; margin-bottom: 1rem; border: 1px solid rgba(0,0,0,.06); }
.alert-success { background: var(--ok-soft); color: #22633F; }
.alert-error { background: var(--danger-soft); color: #9B2F36; }
.alert-info { background: var(--info-soft); color: #2B5C94; }
.alert-warn { background: var(--warn-soft); color: #7A5410; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--primary-soft); color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
.stack > * + * { margin-top: 1rem; }
.flex { display: flex; gap: .75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-0 { margin-bottom: 0; }
.divider { border: 0; border-top: 1px solid var(--line-2); margin: 1.5rem 0; }

/* tabele */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: .6rem .75rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.table td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.nw, .table td:nth-child(2), .table td:nth-child(3) { white-space: nowrap; }
.table tr:hover td { background: var(--primary-tint); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }

/* locuri pentru poze (până sunt încărcate) */
.ph { position: relative; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-soft), #fff 60%, var(--accent-soft)); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink-3); min-height: 90px; }
.ph::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, rgba(72,173,181,.18), transparent 40%), radial-gradient(circle at 80% 70%, rgba(199,125,145,.14), transparent 40%); }
.ph-label { position: relative; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 1rem; line-height: 1.5; }
.ph-label b { display: block; font-size: .8rem; color: var(--primary-dark); overflow-wrap: anywhere; }
.ph-icon { position: relative; width: 44px; height: 44px; opacity: .5; margin-bottom: .4rem; }
.photo { border-radius: var(--radius-lg); object-fit: cover; width: 100%; height: 100%; }
.frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }

/* toast / notificări */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1200; display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.toast { background: var(--ink); color: #fff; padding: .85rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toast-in .25s ease-out; cursor: pointer; }
.toast b { display: block; font-size: .92rem; }
.toast.reminder { background: var(--primary-dark); } .toast.penalty, .toast.warning { background: var(--danger); } .toast.chat { background: var(--accent-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(31,42,46,.45); display: none; align-items: center; justify-content: center; z-index: 1100; padding: 16px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; width: min(100%, 560px); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-box h3 { margin-top: 0; }

/* tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs a, .tabs button { padding: .65rem 1rem; border: 0; background: none; font: 600 .9rem var(--font-body); color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs a.active, .tabs button.active { color: var(--primary-dark); border-color: var(--primary); }

@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } .btn { white-space: normal; } }
@media print { .no-print { display: none !important; } body { background: #fff; } }

/* ---------- culorile clinicii: nuanțele se calculează din culorile alese în Admin → Setări → Culori ---------- */
@supports (color: color-mix(in srgb, red 50%, white)) {
  :root {
    --primary-dark: color-mix(in srgb, var(--primary) 76%, #0b2a2e);
    --primary-soft: color-mix(in srgb, var(--primary) 20%, #fff);
    --primary-tint: color-mix(in srgb, var(--primary) 8%, #fff);
    --accent-dark: color-mix(in srgb, var(--accent) 80%, #2a0d16);
    --accent-soft: color-mix(in srgb, var(--accent) 18%, #fff);
    --accent-tint: color-mix(in srgb, var(--accent) 7%, #fff);
  }
}
:root { --accent-tint: #FBF3F6; --brand-grad: linear-gradient(135deg, var(--primary), var(--accent)); }
/* butoanele colorate: gradientul rămâne tot timpul pe buton; la mouse deasupra / la atingere „alunecă” lin spre nuanța închisă.
   (înainte gradientul dispărea brusc și butonul clipea alb o fracțiune de secundă) */
.btn-primary { background: var(--primary-dark) linear-gradient(135deg, var(--primary), var(--primary-dark) 50%, var(--primary-dark)) 0 0 / 230% 100% no-repeat; }
.btn-accent { background: var(--accent-dark) linear-gradient(135deg, var(--accent), var(--accent-dark) 50%, var(--accent-dark)) 0 0 / 230% 100% no-repeat; }
.btn-primary:hover, .btn-accent:hover, .btn-primary:focus-visible, .btn-accent:focus-visible { background-position: 100% 0; }
.btn { transition: transform .15s, box-shadow .2s, background-color .2s, background-position .35s cubic-bezier(.2,.8,.2,1), border-color .2s, color .15s; }
.btn-outline { border-color: var(--primary-soft); color: var(--primary-dark); }
.badge { background: var(--primary-soft); }
.table th { background: var(--primary-tint); color: var(--primary-dark); border-bottom: 2px solid var(--primary-soft); }
.table th:first-child { border-top-left-radius: 10px; } .table th:last-child { border-top-right-radius: 10px; }
.card { border-color: var(--primary-soft); }

/* telefon: prefixul țării + număr */
.tel-wrap { display: flex; gap: .4rem; align-items: stretch; }
.tel-wrap > input { flex: 1; min-width: 0; }
.tel-wrap .tel-cc { flex: none; width: auto; min-width: 104px; padding-left: .6rem; padding-right: 1.6rem; font-weight: 700; color: var(--primary-dark); background-color: var(--primary-tint); }
.tel-wrap.tel-auto .tel-cc { display: none; }
.tel-wrap.tel-auto.tel-on .tel-cc { display: block; }
.tel-err { color: var(--danger); font-weight: 600; margin-top: .3rem; }
.helper-form .tel-wrap .tel-cc { min-width: 88px; font-size: .85rem; padding: .45rem 1.4rem .45rem .5rem; }
/* logo-ul Laromed (imagine la rezoluție triplă) */
.logo-brand { display: block; height: 44px; width: auto; }
.footer .logo-brand { height: 56px; }
.sidebar-head .logo-brand { height: 40px; }
.mnav-head .logo-brand { height: 40px; }
@media (max-width: 900px) { .logo-brand { height: 40px; } }
@media (max-width: 420px) { .logo-brand { height: 36px; } }
/* „ochiul” de la câmpurile de parolă */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 3rem; }
.pw-eye { position: absolute; top: 50%; right: .4rem; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; background: none; border-radius: 50%; color: var(--ink-3); cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--primary-dark); background: rgba(72, 173, 181, .12); }
.pw-eye svg { width: 20px; height: 20px; display: block; }
