/* The clinics' panel. No external fonts or scripts: everything is served by us (GDPR). */

:root {
	--bg: #f5f6f4;
	--surface: #ffffff;
	--text: #18201c;
	--muted: #5d6862;
	--line: #dfe3df;
	--accent: #1f6f54;
	--accent-text: #ffffff;
	--accent-soft: #e4f1eb;
	--warn: #8a4b00;
	--warn-soft: #fdf0dc;
	--danger: #a32222;
	--danger-soft: #fbe6e6;
	--radius: 10px;
	color-scheme: light;
}

/* Dark theme: chosen with the header button (data-theme, js/theme.js), or the system's when nothing was chosen. */
:root[data-theme="dark"] {
	--bg: #121614;
	--surface: #1a201d;
	--text: #e7ece9;
	--muted: #9aa69f;
	--line: #2c3530;
	--accent: #5fc39b;
	--accent-text: #0d1a14;
	--accent-soft: #1e3329;
	--warn: #f2b768;
	--warn-soft: #3a2c17;
	--danger: #f08c8c;
	--danger-soft: #3b1f1f;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #121614;
		--surface: #1a201d;
		--text: #e7ece9;
		--muted: #9aa69f;
		--line: #2c3530;
		--accent: #5fc39b;
		--accent-text: #0d1a14;
		--accent-soft: #1e3329;
		--warn: #f2b768;
		--warn-soft: #3a2c17;
		--danger: #f08c8c;
		--danger-soft: #3b1f1f;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.center {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 16px;
}

h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.inline { display: inline; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top__inner {
	max-width: 1100px; margin: 0 auto; padding: 10px 16px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
}
.brand { font-weight: 700; display: inline-flex; align-items: center; gap: 10px; }
.brand img { display: block; }
.login-logo { margin: 0 0 8px; line-height: 0; }
.login-logo img { height: 45px; width: auto; }

/* What changes with the theme: the logo variant and the toggle's icon. */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .on-light { display: none; }
	:root:not([data-theme="light"]) .on-dark { display: block; }
}

.theme-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
	background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--accent-soft); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--text); }
.nav a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.who { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }

.page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }

/* Cards and forms */
.card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px; margin: 16px 0;
}
.card--narrow { width: 100%; max-width: 420px; margin: 0; }
.stack { display: grid; gap: 14px; margin-top: 12px; }
.grid-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.grid-form .wide { grid-column: 1 / -1; }
label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
label.check { display: flex; gap: 6px; align-items: center; color: var(--text); }
input, select {
	font: inherit; color: var(--text); background: var(--bg);
	border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input[type="checkbox"] { width: auto; }
input:focus, select:focus, .button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.button {
	display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
	background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent);
	border-radius: 8px; padding: 9px 16px;
}
.button--small { padding: 5px 10px; font-size: 0.85rem; }
.button--ghost { background: transparent; color: var(--accent); }
.button--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }

.notice { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.notice--ok { background: var(--accent-soft); }
.notice--error { background: var(--danger-soft); color: var(--danger); }
.copy { margin-top: 6px; font-family: ui-monospace, monospace; font-size: 0.85rem; }

.tag {
	display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 2px 8px;
	border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--ok { background: var(--line); color: var(--muted); }

/* Filters, tabs, pager */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.tabs a.is-active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.search { flex: 1 1 200px; max-width: 280px; }
.pager { display: flex; gap: 16px; margin-top: 16px; }

/* Calls */
.calls, .appointments, .choices, .transcript { list-style: none; padding: 0; margin: 0; }
.call {
	display: flex; gap: 12px; align-items: center; background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px;
}
.call--callback { border-left: 4px solid var(--warn); }
.call__main { flex: 1; min-width: 0; padding: 12px 16px; text-decoration: none; color: var(--text); display: grid; gap: 4px; }
.call__meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.call__title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.call__summary { color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.call__action { padding-right: 12px; }

.call-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.call-head h1 { margin: 0; }
.summary { font-size: 1.05rem; margin: 0; }
.fields { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 20px; margin: 0; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; font-weight: 600; }
.transcript .line { padding: 8px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.line__who { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.line--agent .line__who { color: var(--accent); }

/* Appointments */
.day { margin-bottom: 24px; }
.appointment {
	display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px;
}
.appointment__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.appointment__body { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.appointment__reason { width: 100%; color: var(--muted); }
.appointment__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* Users, 2FA, clinic choice */
.table-wrap { overflow-x: auto; }
.code { margin: 12px 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; font: 0.85rem/1.5 ui-monospace, monospace; white-space: pre; }
.endpoints { margin: 12px 0; }
.endpoints td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.endpoints code { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.steps { padding-left: 20px; display: grid; gap: 10px; }
.qr { display: block; width: 200px; height: 200px; border-radius: 8px; background: #fff; }
.secret { font-family: ui-monospace, monospace; font-size: 0.95rem; letter-spacing: 0.05em; word-break: break-all; }
.choices li { margin-bottom: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 640px) {
	.appointment { grid-template-columns: 1fr; }
	.appointment__actions { justify-content: flex-start; }
	.call { flex-direction: column; align-items: stretch; }
	.call__action { padding: 0 16px 12px; }
	.transcript .line { grid-template-columns: 1fr; gap: 2px; }
	.who { margin-left: 0; }
}

/* Agent */
.info-rows { display: grid; gap: 8px; }
.info-row { display: grid; grid-template-columns: minmax(200px, 1.4fr) 3fr 36px; gap: 10px; align-items: start; }
.info-row input { font-weight: 600; }
.info-head { display: grid; grid-template-columns: minmax(200px, 1.4fr) 3fr 36px; gap: 10px; margin: 14px 0 6px;
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.versions li { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.prompt { white-space: pre-wrap; font-size: 0.85rem; max-height: 60vh; overflow: auto; }
details summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
.row-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 4px; }

.info-row__remove { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 40px; padding: 0;
	border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.info-row__remove[hidden] { display: none; }
.info-row__remove:hover, .info-row__remove:focus-visible { background: var(--danger-soft); color: var(--danger); }
.info-row__remove svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.info-add { margin-top: 12px; }
.written { display: block; font-weight: 400; font-size: 0.85rem; margin-top: 2px; }
@media (max-width: 640px) {
	.info-head { display: none; }
	.info-row { grid-template-columns: 1fr 36px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
	.info-row textarea { grid-column: 1; }
	.info-row__remove { grid-row: 1; grid-column: 2; }
}

/* Agentul meu: the assistant at the top, the form with a side column, the save bar */
.agent-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-bottom: 20px; }
.agent-hero__avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
	background: var(--accent); color: var(--accent-text); font-size: 1.5rem; font-weight: 700; }
.agent-hero__body { flex: 1 1 320px; min-width: 0; }
.agent-hero__name { margin: 0 0 6px; font-size: 1.1rem; }
.agent-hero__name .muted { font-size: 0.95rem; }
.agent-hero__greeting { margin: 0; }
.agent-hero__label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.agent-hero__greeting q { display: inline-block; margin-top: 4px; padding: 8px 12px; border-radius: 12px 12px 12px 4px; background: var(--accent-soft); font-style: normal; quotes: none; }
.agent-hero__status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.agent-layout { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .agent-layout { grid-template-columns: minmax(0, 1fr) 300px; } .agent-side { position: sticky; top: 16px; } }
.agent-form { display: grid; gap: 16px; }
.agent-form .card { margin: 0; }
.agent-side { display: grid; gap: 16px; }
.agent-side .card { margin: 0; }
.how { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 0.92rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; display: grid; gap: 12px; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.is-live::before { background: var(--accent); }
.timeline small { flex-basis: 100%; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px;
	padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }

/* Usage */
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0 12px; }
.meter span { display: block; height: 100%; background: var(--accent); }
.meter span.meter--warn { background: var(--warn); }
.meter span.meter--over { background: var(--danger); }
small { font-size: 0.85rem; }
tfoot td { border-bottom: 0; }
.input--narrow { width: 7em; }

/* Admin */
.jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 20px; }
#clinici, #pachete, #intretinere { margin-bottom: 36px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 6px 0 0; font-size: 1.25rem; }
details.add { flex: 1 1 100%; order: 1; }
details.add > summary { list-style: none; display: inline-flex; color: var(--accent-text); }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: 12px; }
@media (min-width: 720px) { details.add { flex: 0 1 auto; order: 0; } details.add[open] { flex-basis: 100%; } }
.clinic { margin-bottom: 16px; }
.clinic h3 { display: inline; margin: 0 8px 0 0; font-size: 1.1rem; }
.clinic__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.clinic__grid { display: grid; gap: 18px 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 16px 0 4px; }
.fact { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fact__label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.fact code { font-size: 0.78rem; overflow-wrap: anywhere; }
.fact details, .advanced { width: 100%; }
.advanced { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.plans td, .plans th { white-space: nowrap; vertical-align: middle; }
.legend { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }
.legend dt { font-weight: 600; color: var(--text); }
.legend dd { margin: 0; }
@media (max-width: 560px) { .legend { grid-template-columns: 1fr; } .legend dd { margin-bottom: 6px; } }

/* Setări: the connection tiles and the grouped form */
.settings-heading { margin: 8px 0 12px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 32px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover, .tile:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.tile svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile__title { font-weight: 700; }
.tile__text { font-size: 0.88rem; color: var(--muted); flex-grow: 1; }
.tile__status { align-self: flex-start; font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.tile__status.is-on { background: var(--accent-soft); color: var(--accent); }
.settings-form { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.settings-form .card { margin: 0; }
.settings-form h2 { margin-bottom: 4px; }
.settings-form__save { grid-column: 1 / -1; }

/* Programări: the day as a grid of 15-minute rows (scheduling/Agenda), one column per doctor; classes, not inline styles (CSP) */
:root { --src-agent: var(--accent); --src-panel: #6b7a73; --src-api: #6d4bb5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --src-panel: #a3b0a9; --src-api: #b39ce8; } }
:root[data-theme="dark"] { --src-panel: #a3b0a9; --src-api: #b39ce8; }

.agenda-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-nav h2 { margin: 0 6px; font-size: 1.3rem; }
.round { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 1.1rem; }
.round:hover { border-color: var(--accent); color: var(--accent); }
.pill { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.9rem; }
.pill.is-active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.agenda-tools { display: flex; align-items: center; gap: 10px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.segmented a { padding: 7px 14px; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.segmented a.is-active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.stats li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; }
.stats strong { font-size: 1rem; }
.legend-dots { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dot.src-agent { background: var(--src-agent); } .dot.src-panel { background: var(--src-panel); } .dot.src-api { background: var(--src-api); }

.agenda-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.agenda { display: grid; grid-auto-rows: 18px; grid-template-rows: 44px; position: relative; min-width: min-content; }
.agenda.cols-1 { grid-template-columns: 56px repeat(1, minmax(150px, 1fr)); }
.agenda.cols-2 { grid-template-columns: 56px repeat(2, minmax(150px, 1fr)); }
.agenda.cols-3 { grid-template-columns: 56px repeat(3, minmax(150px, 1fr)); }
.agenda.cols-4 { grid-template-columns: 56px repeat(4, minmax(150px, 1fr)); }
.agenda.cols-5 { grid-template-columns: 56px repeat(5, minmax(150px, 1fr)); }
.agenda.cols-6 { grid-template-columns: 56px repeat(6, minmax(150px, 1fr)); }
.agenda.cols-7 { grid-template-columns: 56px repeat(7, minmax(150px, 1fr)); }
.agenda.cols-8 { grid-template-columns: 56px repeat(8, minmax(150px, 1fr)); }
.agenda__head { grid-row: 1; position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 6px;
	padding: 0 10px; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }
.agenda__head .count { font-weight: 500; color: var(--muted); font-size: 0.8rem; }
.agenda__corner { grid-row: 1; grid-column: 1; border-bottom: 1px solid var(--line); }
.agenda__hour { font-size: 0.75rem; color: var(--muted); text-align: right; padding: 2px 8px 0 0; border-top: 1px solid var(--line); }
.agenda__col { border-left: 1px solid var(--line);
	background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 72px); }
.agenda__off { z-index: 1; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); opacity: .7; }
.agenda__free { z-index: 1; display: flex; align-items: center; padding: 0 8px; margin: 1px 4px; border-radius: 6px; color: transparent;
	text-decoration: none; font-size: 0.8rem; }
.agenda__free:hover, .agenda__free:focus-visible { color: var(--accent); background: var(--accent-soft); outline: 1px dashed var(--accent); }
.agenda__item { z-index: 2; display: flex; flex-direction: column; gap: 0; margin: 1px 4px; padding: 3px 8px; overflow: hidden;
	border-radius: 6px; border-left: 4px solid var(--src-panel); background: var(--bg); color: var(--text); text-decoration: none;
	font-size: 0.82rem; line-height: 1.25; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.agenda__item:hover, .agenda__item:focus-visible { box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.agenda__item.src-agent { border-left-color: var(--src-agent); background: var(--accent-soft); }
.agenda__item.src-api { border-left-color: var(--src-api); }
.agenda__item .t { font-weight: 700; font-size: 0.75rem; color: var(--muted); }
.agenda__item strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda__item .why { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda__item.s-1 .t, .agenda__item.s-1 .why, .agenda__item.s-2 .why { display: none; }
.agenda__item.s-2 { flex-direction: row; align-items: center; gap: 8px; }
.week__head small { display: block; font-weight: 500; color: var(--muted); }
.agenda-closed { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line); color: var(--muted); }

.week { display: grid; gap: 10px; grid-template-columns: repeat(7, minmax(130px, 1fr)); overflow-x: auto; }
.week__day { display: flex; flex-direction: column; gap: 6px; min-height: 160px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.week__day.is-today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.week__head { display: flex; justify-content: space-between; gap: 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.week__head .count { color: var(--muted); font-weight: 500; }
.week__item { display: block; padding: 4px 8px; border-radius: 6px; border-left: 3px solid var(--src-panel); background: var(--bg); color: var(--text); text-decoration: none; font-size: 0.82rem; }
.week__item.src-agent { border-left-color: var(--src-agent); background: var(--accent-soft); }
.week__item.src-api { border-left-color: var(--src-api); }
.week__item .t { font-weight: 700; margin-right: 4px; }
.week__item .who { display: block; color: var(--muted); font-size: 0.75rem; }
.week__empty { color: var(--muted); font-size: 0.82rem; }

.new-appointment { margin-top: 20px; }
.new-appointment > summary { list-style: none; display: inline-flex; color: var(--accent-text); }
.new-appointment > summary::-webkit-details-marker { display: none; }
.new-appointment[open] > summary { margin-bottom: 12px; }
.new-appointment fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.new-appointment legend { font-weight: 700; margin-bottom: 8px; }
.empty-day { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty-day svg { width: 40px; height: 40px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.r-1 { grid-row-start: 1; }
.r-2 { grid-row-start: 2; }
.r-3 { grid-row-start: 3; }
.r-4 { grid-row-start: 4; }
.r-5 { grid-row-start: 5; }
.r-6 { grid-row-start: 6; }
.r-7 { grid-row-start: 7; }
.r-8 { grid-row-start: 8; }
.r-9 { grid-row-start: 9; }
.r-10 { grid-row-start: 10; }
.r-11 { grid-row-start: 11; }
.r-12 { grid-row-start: 12; }
.r-13 { grid-row-start: 13; }
.r-14 { grid-row-start: 14; }
.r-15 { grid-row-start: 15; }
.r-16 { grid-row-start: 16; }
.r-17 { grid-row-start: 17; }
.r-18 { grid-row-start: 18; }
.r-19 { grid-row-start: 19; }
.r-20 { grid-row-start: 20; }
.r-21 { grid-row-start: 21; }
.r-22 { grid-row-start: 22; }
.r-23 { grid-row-start: 23; }
.r-24 { grid-row-start: 24; }
.r-25 { grid-row-start: 25; }
.r-26 { grid-row-start: 26; }
.r-27 { grid-row-start: 27; }
.r-28 { grid-row-start: 28; }
.r-29 { grid-row-start: 29; }
.r-30 { grid-row-start: 30; }
.r-31 { grid-row-start: 31; }
.r-32 { grid-row-start: 32; }
.r-33 { grid-row-start: 33; }
.r-34 { grid-row-start: 34; }
.r-35 { grid-row-start: 35; }
.r-36 { grid-row-start: 36; }
.r-37 { grid-row-start: 37; }
.r-38 { grid-row-start: 38; }
.r-39 { grid-row-start: 39; }
.r-40 { grid-row-start: 40; }
.r-41 { grid-row-start: 41; }
.r-42 { grid-row-start: 42; }
.r-43 { grid-row-start: 43; }
.r-44 { grid-row-start: 44; }
.r-45 { grid-row-start: 45; }
.r-46 { grid-row-start: 46; }
.r-47 { grid-row-start: 47; }
.r-48 { grid-row-start: 48; }
.r-49 { grid-row-start: 49; }
.r-50 { grid-row-start: 50; }
.r-51 { grid-row-start: 51; }
.r-52 { grid-row-start: 52; }
.r-53 { grid-row-start: 53; }
.r-54 { grid-row-start: 54; }
.r-55 { grid-row-start: 55; }
.r-56 { grid-row-start: 56; }
.r-57 { grid-row-start: 57; }
.r-58 { grid-row-start: 58; }
.r-59 { grid-row-start: 59; }
.r-60 { grid-row-start: 60; }
.r-61 { grid-row-start: 61; }
.r-62 { grid-row-start: 62; }
.r-63 { grid-row-start: 63; }
.r-64 { grid-row-start: 64; }
.r-65 { grid-row-start: 65; }
.r-66 { grid-row-start: 66; }
.r-67 { grid-row-start: 67; }
.r-68 { grid-row-start: 68; }
.r-69 { grid-row-start: 69; }
.r-70 { grid-row-start: 70; }
.r-71 { grid-row-start: 71; }
.r-72 { grid-row-start: 72; }
.r-73 { grid-row-start: 73; }
.r-74 { grid-row-start: 74; }
.r-75 { grid-row-start: 75; }
.r-76 { grid-row-start: 76; }
.r-77 { grid-row-start: 77; }
.r-78 { grid-row-start: 78; }
.r-79 { grid-row-start: 79; }
.r-80 { grid-row-start: 80; }
.r-81 { grid-row-start: 81; }
.r-82 { grid-row-start: 82; }
.r-83 { grid-row-start: 83; }
.r-84 { grid-row-start: 84; }
.r-85 { grid-row-start: 85; }
.r-86 { grid-row-start: 86; }
.r-87 { grid-row-start: 87; }
.r-88 { grid-row-start: 88; }
.r-89 { grid-row-start: 89; }
.r-90 { grid-row-start: 90; }
.r-91 { grid-row-start: 91; }
.r-92 { grid-row-start: 92; }
.r-93 { grid-row-start: 93; }
.r-94 { grid-row-start: 94; }
.r-95 { grid-row-start: 95; }
.r-96 { grid-row-start: 96; }
.r-97 { grid-row-start: 97; }
.r-98 { grid-row-start: 98; }
.s-1 { grid-row-end: span 1; }
.s-2 { grid-row-end: span 2; }
.s-3 { grid-row-end: span 3; }
.s-4 { grid-row-end: span 4; }
.s-5 { grid-row-end: span 5; }
.s-6 { grid-row-end: span 6; }
.s-7 { grid-row-end: span 7; }
.s-8 { grid-row-end: span 8; }
.s-9 { grid-row-end: span 9; }
.s-10 { grid-row-end: span 10; }
.s-11 { grid-row-end: span 11; }
.s-12 { grid-row-end: span 12; }
.s-13 { grid-row-end: span 13; }
.s-14 { grid-row-end: span 14; }
.s-15 { grid-row-end: span 15; }
.s-16 { grid-row-end: span 16; }
.s-17 { grid-row-end: span 17; }
.s-18 { grid-row-end: span 18; }
.s-19 { grid-row-end: span 19; }
.s-20 { grid-row-end: span 20; }
.s-21 { grid-row-end: span 21; }
.s-22 { grid-row-end: span 22; }
.s-23 { grid-row-end: span 23; }
.s-24 { grid-row-end: span 24; }
.s-25 { grid-row-end: span 25; }
.s-26 { grid-row-end: span 26; }
.s-27 { grid-row-end: span 27; }
.s-28 { grid-row-end: span 28; }
.s-29 { grid-row-end: span 29; }
.s-30 { grid-row-end: span 30; }
.s-31 { grid-row-end: span 31; }
.s-32 { grid-row-end: span 32; }
.s-33 { grid-row-end: span 33; }
.s-34 { grid-row-end: span 34; }
.s-35 { grid-row-end: span 35; }
.s-36 { grid-row-end: span 36; }
.s-37 { grid-row-end: span 37; }
.s-38 { grid-row-end: span 38; }
.s-39 { grid-row-end: span 39; }
.s-40 { grid-row-end: span 40; }
.s-41 { grid-row-end: span 41; }
.s-42 { grid-row-end: span 42; }
.s-43 { grid-row-end: span 43; }
.s-44 { grid-row-end: span 44; }
.s-45 { grid-row-end: span 45; }
.s-46 { grid-row-end: span 46; }
.s-47 { grid-row-end: span 47; }
.s-48 { grid-row-end: span 48; }
.s-49 { grid-row-end: span 49; }
.s-50 { grid-row-end: span 50; }
.s-51 { grid-row-end: span 51; }
.s-52 { grid-row-end: span 52; }
.s-53 { grid-row-end: span 53; }
.s-54 { grid-row-end: span 54; }
.s-55 { grid-row-end: span 55; }
.s-56 { grid-row-end: span 56; }
.s-57 { grid-row-end: span 57; }
.s-58 { grid-row-end: span 58; }
.s-59 { grid-row-end: span 59; }
.s-60 { grid-row-end: span 60; }
.s-61 { grid-row-end: span 61; }
.s-62 { grid-row-end: span 62; }
.s-63 { grid-row-end: span 63; }
.s-64 { grid-row-end: span 64; }
.s-65 { grid-row-end: span 65; }
.s-66 { grid-row-end: span 66; }
.s-67 { grid-row-end: span 67; }
.s-68 { grid-row-end: span 68; }
.s-69 { grid-row-end: span 69; }
.s-70 { grid-row-end: span 70; }
.s-71 { grid-row-end: span 71; }
.s-72 { grid-row-end: span 72; }
.s-73 { grid-row-end: span 73; }
.s-74 { grid-row-end: span 74; }
.s-75 { grid-row-end: span 75; }
.s-76 { grid-row-end: span 76; }
.s-77 { grid-row-end: span 77; }
.s-78 { grid-row-end: span 78; }
.s-79 { grid-row-end: span 79; }
.s-80 { grid-row-end: span 80; }
.s-81 { grid-row-end: span 81; }
.s-82 { grid-row-end: span 82; }
.s-83 { grid-row-end: span 83; }
.s-84 { grid-row-end: span 84; }
.s-85 { grid-row-end: span 85; }
.s-86 { grid-row-end: span 86; }
.s-87 { grid-row-end: span 87; }
.s-88 { grid-row-end: span 88; }
.s-89 { grid-row-end: span 89; }
.s-90 { grid-row-end: span 90; }
.s-91 { grid-row-end: span 91; }
.s-92 { grid-row-end: span 92; }
.s-93 { grid-row-end: span 93; }
.s-94 { grid-row-end: span 94; }
.s-95 { grid-row-end: span 95; }
.s-96 { grid-row-end: span 96; }
.c-1 { grid-column: 1; }
.c-2 { grid-column: 2; }
.c-3 { grid-column: 3; }
.c-4 { grid-column: 4; }
.c-5 { grid-column: 5; }
.c-6 { grid-column: 6; }
.c-7 { grid-column: 7; }
.c-8 { grid-column: 8; }
.c-9 { grid-column: 9; }
.field-static { display: grid; gap: 4px; align-content: start; }
.field-static strong { padding: 9px 0; }

/* Medici și program */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1 1 260px; display: grid; gap: 4px; }
.doctor { margin-bottom: 16px; scroll-margin-top: 16px; }
.doctor.is-inactive { opacity: .7; }
.doctor__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.doctor__name { flex: 1 1 260px; }
.doctor__name input { font-weight: 700; font-size: 1.05rem; }
.tag--on { background: var(--accent-soft); color: var(--accent); }
a.tag { text-decoration: none; }
.week-hours { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 1000px) { .week-hours { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.week-hours__day { display: grid; gap: 4px; }
.week-hours__day span { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.week-hours__day input:placeholder-shown { background: transparent; border-style: dashed; }
.add-doctor { margin: 4px 0 32px; }
.add-doctor > summary { list-style: none; display: inline-flex; }
.add-doctor > summary::-webkit-details-marker { display: none; }
.add-doctor[open] > summary { margin-bottom: 12px; }
.specials { scroll-margin-top: 16px; }
.special-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.special-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.agenda__gbusy { z-index: 2; margin: 1px 4px; padding: 3px 8px; overflow: hidden; border-radius: 6px; font-size: 0.78rem; color: var(--muted);
	border: 1px dashed var(--muted); background: repeating-linear-gradient(45deg, var(--surface) 0 6px, var(--bg) 6px 12px); }
.dot--google { background: var(--muted); }
