/* Patient pages, direction "B - Biletul". Fonts come from /buletin-assets/fonts.css. */
:root {
    --blue: #075da4;
    --blue-dark: #054a84;
    --ink: #0b2238;
    --muted: #5d6b79;
    --rule: #c9d3de;
    --mist: #eef3f8;
    --white: #fff;
    --red: #d52b1e;
    --red-bg: #fdeceb;
    --mark: #fff1c7;
    --ui: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --serif: 'Fraunces', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--mist); color: var(--ink);
    font: 16px/1.5 var(--ui);
    min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.muted { color: var(--muted); }

/* Top bar and footer */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); }
.bar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 38px; height: 38px; border-radius: 4px; display: block; }
.brand-name { font-weight: 600; color: var(--blue); font-size: 1.05rem; }
.bar-form { margin: 0; }
.bar-link {
    font: inherit; font-weight: 500; color: var(--muted); background: none; border: 0; cursor: pointer;
    padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px;
}
.bar-link:hover { color: var(--ink); }
.site-footer { color: var(--muted); font-size: .85rem; padding: 18px 0 22px; }
.site-footer .bar-inner { justify-content: center; padding-top: 0; padding-bottom: 0; }

main { flex: 1; }
.main { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 20px 32px; }
.main-wide { max-width: 1040px; }

/* Headlines */
.display { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1.12; margin: 0 0 12px; letter-spacing: -.01em; }
.display-sm { font-size: 1.75rem; }
.lead { margin: 0 0 16px; color: var(--muted); }

/* Buttons */
.btn {
    display: inline-block; font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
    padding: 11px 18px; border-radius: 8px; border: 1.5px solid transparent; min-height: 44px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: var(--white); color: var(--blue); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-link { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding-left: 0; font-weight: 500; }
.btn-block { display: block; width: 100%; }

/* Alerts */
.alert { padding: 12px 14px; border-radius: 8px; margin: 14px 0; border: 1px solid; }
.alert-error { background: var(--red-bg); border-color: var(--red); color: #8f1a11; }
.alert-notice { background: var(--mist); border-color: transparent; color: var(--ink); }

/* Login: split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; padding: 0; max-width: none; width: 100%; }
.split-left { padding: 56px 48px 56px max(24px, calc((100vw - 1120px) / 2 + 20px)); display: flex; flex-direction: column; justify-content: center; }
.split-right { background: var(--white); padding: 40px 24px; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--rule); }
.split-left .lead { max-width: 30rem; }
.form-box { width: 100%; max-width: 400px; }
.form-title { font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; }

.slip {
    margin: 12px 0 8px; max-width: 380px; background: var(--white); border-radius: 8px; padding: 16px 18px;
    box-shadow: 0 10px 28px rgba(11, 34, 56, .14); transform: rotate(-2deg); font-size: .85rem; color: var(--muted);
    animation: slip-in .5s ease-out both;
}
.slip-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--rule); }
.slip-row:last-child { border-bottom: 0; }
.slip-row > span:last-child { color: var(--ink); text-align: right; }
.slip mark { background: var(--mark); color: var(--ink); font-weight: 600; padding: 1px 6px; border-radius: 3px; }
.pin { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 8px; border-radius: 50%; background: var(--blue); color: #fff; font: 600 .7rem var(--ui); font-style: normal; }
.slip-caption { font-size: .8rem; color: var(--muted); margin: 6px 0 0; max-width: 380px; }
@keyframes slip-in { from { opacity: 0; transform: rotate(-2deg) translateY(8px); } to { opacity: 1; transform: rotate(-2deg); } }

/* Forms */
label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 16px 0 6px; }
.dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 600; flex: none; }
input[type=text] {
    width: 100%; font: inherit; padding: 10px 12px; min-height: 46px; border: 1.5px solid var(--rule); border-radius: 8px; color: var(--ink); background: var(--white);
}
input[type=text]:focus { border-color: var(--blue); }
.terms-row { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.terms-row input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--blue); }
.terms-row label { margin: 0; font-weight: 400; display: block; }
.cf-turnstile { margin: 0 0 16px; }

/* Cards (confirmation, PDF error) */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: 10px; padding: 28px; box-shadow: 0 6px 20px rgba(11, 34, 56, .06); }
.card-narrow { max-width: 520px; margin: 0 auto; }
.card-confirm { max-width: 760px; margin: 0 auto; padding: 32px 36px; }
/* The buletin fragment sits directly in the card: no second frame around it. Not named
   `.identity`: the fragment's own stylesheet uses that class and would restyle this box. */
.confirm-summary { margin: 24px 0; overflow-x: auto; }
.confirm-row { display: flex; gap: 16px 24px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin: 24px 0 0; }
.confirm-row p { flex: 1 1 260px; margin: 0; font-size: .92rem; }
.exit-form { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }

/* Buletin page */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.who { margin: 0; color: var(--muted); font-size: .95rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet { background: var(--white); border-radius: 10px; box-shadow: 0 6px 20px rgba(11, 34, 56, .08); overflow: hidden; }
.buletin-frame { display: block; width: 100%; min-height: 420px; border: 0; background: var(--white); }

/* Terms modal */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(11, 34, 56, .6); z-index: 10;
    align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
}
.modal:target { display: flex; }
.modal-box { background: var(--white); border-radius: 10px; max-width: 640px; max-height: 90vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-box h2 { margin-top: 0; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; padding-right: 32px; }
.modal-close { position: absolute; top: 8px; right: 10px; font-size: 1.6rem; line-height: 1; text-decoration: none; color: var(--muted); padding: 6px 10px; }

@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
    .split-left { padding: 28px 20px 24px; }
    .split-right { border-left: 0; border-top: 1px solid var(--rule); padding: 28px 20px 36px; }
    .display { font-size: 1.75rem; }
}
@media (max-width: 420px) {
    .slip { padding: 10px 12px; font-size: .78rem; max-width: 300px; }
    .brand-name { font-size: .95rem; }
    .bar-inner { padding-left: 16px; padding-right: 16px; }
    .main { padding-left: 16px; padding-right: 16px; }
    .card { padding: 20px 16px; }
    .actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .slip { animation: none; }
    * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
    .site-header, .site-footer, .hero .actions { display: none; }
    body { background: #fff; }
}
