:root {
    --gbo-plum: #4A2C44;
    --gbo-copper: #B5734A;
    --gbo-gold: #C9A227;
    --gbo-steel: #4F4A52;
    --gbo-paper: #F7F4F3;
    --gbo-ink: #241A22;
    --gbo-muted: #8A7F86;
    --gbo-line: #ECE5E2;
    --gbo-chip-off-bg: #EFEAE7;
    --gbo-chip-off-fg: #B3A8A2;
}

html, body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--gbo-paper);
    color: var(--gbo-ink);
    -webkit-font-smoothing: antialiased;
}

h1:focus { outline: none; }

.gbo-display {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-optical-sizing: auto;
}

/* ── App bar ── */
.gbo-appbar { border-bottom: 1px solid var(--gbo-line); }

.gbo-brand {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--gbo-plum);
}

.gbo-content { max-width: 640px; }

/* ── Date navigator (hero) ── */
.gbo-datenav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 24px;
}

.gbo-datepicker .mud-input-root { font-size: 1.7rem; }

.gbo-datepicker input {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--gbo-plum);
    text-align: center;
    cursor: pointer;
}

.gbo-navarrow { color: var(--gbo-plum) !important; }

/* ── Section headers ── */
.gbo-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 2px 12px;
}

.gbo-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gbo-muted);
}

.gbo-count {
    background: var(--gbo-copper);
    color: #fff;
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 0.76rem;
    font-weight: 700;
}

.gbo-empty {
    color: var(--gbo-muted);
    font-size: 0.9rem;
    padding: 6px 2px 18px;
}

/* ── Appointment cards ── */
.gbo-row { cursor: pointer; }

.gbo-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--gbo-line);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s ease, transform 0.08s ease;
}

.gbo-row:hover .gbo-card { box-shadow: 0 6px 18px rgba(74, 44, 68, 0.09); }
.gbo-row:active .gbo-card { transform: scale(0.992); }

.gbo-card-time {
    font-variant-numeric: tabular-nums;
    text-align: center;
    min-width: 46px;
    line-height: 1.2;
}

.gbo-t-start { font-weight: 700; color: var(--gbo-plum); font-size: 1.02rem; }
.gbo-t-end { color: var(--gbo-muted); font-size: 0.78rem; }

.gbo-card-main { flex: 1 1 auto; min-width: 0; }
.gbo-card-name { font-weight: 600; color: var(--gbo-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbo-card-svc { color: var(--gbo-muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbo-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ── Un-administered: compact rows ── */
.gbo-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
}

.gbo-mini:hover { background: rgba(74, 44, 68, 0.045); }
.gbo-mini-main { flex: 1 1 auto; min-width: 0; }
.gbo-mini-date { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.86rem; color: var(--gbo-ink); }
.gbo-mini-svc { color: var(--gbo-muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Treatment chips (the signature) ── */
.treatment-chips { display: inline-flex; gap: 4px; }

.t-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 6px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.t-chip.off { background: var(--gbo-chip-off-bg); color: var(--gbo-chip-off-fg); }
.t-chip.on { background: #34303A; color: #fff; }

/* ── GuestDialog ── */
.gbo-selected { background: rgba(74, 44, 68, 0.08); border-radius: 8px; }

/* Master-detail: list hugs its content, detail fills the rest */
.gbo-md { display: flex; gap: 20px; align-items: flex-start; }
.gbo-md-list { flex: 0 0 auto; }
.gbo-md-detail { flex: 1 1 auto; min-width: 0; border-left: 1px solid var(--gbo-line); padding-left: 20px; }

/* ── Diagnostics form ── */
.gbo-field { margin-top: 4px; }

.gbo-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gbo-muted);
    margin-bottom: 6px;
}

.gbo-chipset { display: flex; flex-wrap: wrap; gap: 6px; }

.gbo-opt {
    border: 1px solid var(--gbo-line);
    background: #fff;
    color: var(--gbo-ink);
    border-radius: 9px;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.gbo-opt:hover { border-color: var(--gbo-plum); }
.gbo-opt.sel { background: var(--gbo-plum); color: #fff; border-color: var(--gbo-plum); }

.gbo-checks { display: flex; flex-direction: column; gap: 0; }

/* Two-column diagnostics layout (tablet); single column on phone */
.gbo-diag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 14px;
    margin: 4px 0;
}

.gbo-span2 { grid-column: 1 / -1; }

/* Diagnostics: left column = stacked chip groups, right column = care matrix */
.gbo-diag-2col { display: flex; gap: 28px; align-items: flex-start; }
.gbo-diag-left { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.gbo-diag-right { flex: 0 0 auto; }

/* Care-habits matrix: item chip + two checkbox columns */
.gbo-care {
    display: grid;
    grid-template-columns: max-content 96px 96px;
    align-items: center;
    column-gap: 8px;
}

.gbo-care-head {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--gbo-muted);
    text-align: center;
    padding-bottom: 6px;
}

.gbo-care-cell {
    display: flex;
    justify-content: center;
}

.gbo-care-item {
    justify-self: start;
    margin: 2px 0;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--gbo-chip-off-bg);
    color: var(--gbo-ink);
    font-size: 0.82rem;
    font-weight: 600;
}

@media (max-width: 599px) {
    .gbo-diag-grid { grid-template-columns: 1fr; }
    .gbo-diag-2col { flex-direction: column; }
}

/* ── Blazor boot / errors ── */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 30vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e6ddd9;
    stroke-width: 0.5rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #4A2C44;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(30vh + 3.3rem) 0 auto 0.2rem;
    color: var(--gbo-plum);
}

.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Betöltés"); }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}

.blazor-error-boundary::after { content: "Hiba történt."; }
