/* Știu să scriu brand palette — the Romanian flag. Mirrors
   Stiusascriu.Client/Resources/Styles/Colors.xaml.
   Blue carries the product (actions, navigation, the daily card), yellow is
   progress and encouragement (streak, tips), red is for mistakes and is used
   sparingly so it never reads as "everything is an error". */
:root {
    --blue: #002B7F;
    --blue-dark: #001A4D;
    --blue-soft: #E8EEF9;
    --blue-muted: #C9D4EE;
    --yellow: #FCD116;
    --yellow-soft: #FFF6CC;
    --yellow-text: #7A5B00;
    --red: #CE1126;
    --red-soft: #FDECEE;
    --red-text: #8C0C1A;
    --green: #2A7D43;
    --green-soft: #E6F4EA;
    --ink: #14213D;
    --muted: #7A8299;
    --line: #E3E6EE;
    --input-line: #D5DAE5;
    --page-bg: #F6F7FB;
    --card: #FFFFFF;
    --radius: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
    /* The mobile browsers' tap flash is a sharp-cornered rectangle that ignores
       border-radius — replaced by our own :active feedback below. */
    -webkit-tap-highlight-color: transparent;
}

button:active,
a:active {
    filter: brightness(0.95);
}

/* FocusOnNavigate (App.razor) focuses the page's h1 for screen readers;
   that focus is programmatic, so no visible ring. */
h1:focus {
    outline: none;
}

html, body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

a {
    color: var(--blue);
}

.tagline {
    color: var(--muted);
    margin: 0 0 1.25rem 0;
}

.page-loading {
    color: var(--muted);
}

.error {
    color: var(--red);
    margin: 0.75rem 0 0 0;
}

.field-error {
    color: var(--red);
    font-size: 0.85rem;
    margin: 0.3rem 0 0 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The flag stripe used as the brand's small signature. */
.flag-bar {
    display: inline-flex;
    height: 5px;
    width: 54px;
    border-radius: 3px;
    overflow: hidden;
}

    .flag-bar span {
        flex: 1;
    }

        .flag-bar span:nth-child(1) {
            background: var(--blue);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
        }

        .flag-bar span:nth-child(2) {
            background: var(--yellow);
        }

        .flag-bar span:nth-child(3) {
            background: var(--red);
        }

/* ---------- Buttons ---------- */

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-danger-outline,
.btn-outline-dark {
    font: inherit;
    font-weight: 600;
    border-radius: var(--radius);
    padding: 0.7rem 1.1rem;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

    .btn-primary:hover:not(:disabled) {
        background: var(--blue-dark);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: default;
    }

.btn-secondary,
.btn-outline-dark {
    background: var(--card);
    color: var(--blue);
    border-color: var(--blue);
}

    .btn-secondary:hover:not(:disabled),
    .btn-outline-dark:hover {
        background: var(--blue-soft);
    }

.btn-danger {
    background: var(--red);
    color: #fff;
}

    .btn-danger:hover:not(:disabled) {
        background: #A50E1F;
    }

.btn-danger-outline {
    background: var(--card);
    color: var(--red);
    border-color: var(--red);
}

    .btn-danger-outline:hover:not(:disabled) {
        background: var(--red-soft);
    }

    .btn-secondary:disabled,
    .btn-danger:disabled,
    .btn-danger-outline:disabled {
        opacity: 0.5;
        cursor: default;
    }

/* An <a> that looks like a button. */
.btn-link {
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.85rem;
    color: var(--blue);
    cursor: pointer;
}

.row-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

/* ---------- Layout ---------- */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--blue);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.7rem 16px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.dot {
    color: var(--yellow);
}

.topbar-nav {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

    .topbar-nav a {
        color: var(--blue-muted);
        text-decoration: none;
        padding: 0.4rem 0.75rem;
        border-radius: 8px;
        font-weight: 500;
    }

        .topbar-nav a:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.08);
        }

        .topbar-nav a.active {
            color: #fff;
            background: rgba(255, 255, 255, 0.14);
            box-shadow: inset 0 -2px 0 var(--yellow);
        }

.topbar-user,
.topbar-guest {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.user-name {
    color: var(--blue-muted);
    font-size: 0.9rem;
}

.btn-outline {
    font: inherit;
    font-size: 0.9rem;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    text-decoration: none;
}

    .btn-outline:hover {
        background: rgba(255, 255, 255, 0.1);
    }

.menu-toggle,
.nav-user-mobile {
    display: none;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 16px 3rem;
}

.site-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.25rem 16px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

    .site-footer a {
        color: var(--muted);
        text-decoration: none;
    }

        .site-footer a:hover {
            color: var(--blue);
        }

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
    }

    .topbar-user {
        display: none;
    }

    .topbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--blue);
        padding: 0.5rem 16px 1rem;
    }

        .topbar-nav.open {
            display: flex;
        }

    .nav-user-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 0.5rem;
        padding-top: 0.75rem;
    }
}

/* ---------- Cards, notices, tags ---------- */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
}

.empty-state {
    max-width: 520px;
    margin: 3rem auto;
    text-align: center;
}

.notice {
    max-width: 640px;
    background: var(--yellow-soft);
    color: var(--yellow-text);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

    .notice a {
        color: var(--yellow-text);
        font-weight: 600;
    }

.tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    text-decoration: none;
}

    .tag.ok {
        background: var(--green-soft);
        color: var(--green);
    }

    .tag.warn {
        background: var(--yellow-soft);
        color: var(--yellow-text);
    }

/* ---------- Auth (sign-in, sign-up, verification, reset) ---------- */

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 880px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--card);
}

.auth-brand {
    background: var(--blue);
    color: #fff;
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.auth-brand-name {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 1.25rem;
}

.auth-brand-text {
    color: var(--blue-muted);
    margin: 0.6rem 0 0;
    line-height: 1.6;
}

.rule-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
}

.rule-card-label {
    color: var(--yellow);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-card {
    background: var(--card);
    padding: 2.25rem 2.25rem 2rem;
    display: flex;
    flex-direction: column;
}

/* Used alone (reset-password.html) the card gets its own frame. */
.auth-wrap > .auth-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.auth-logo {
    align-self: center;
    margin-bottom: 0.75rem;
}

.auth-card label {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.75rem 0 0.3rem;
}

.auth-card input[type=email],
.auth-card input[type=password],
.auth-card input[type=text],
.data-editor input,
.admin-search,
.admin-select {
    font: inherit;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--input-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

    .auth-card input:focus,
    .data-editor input:focus,
    .admin-search:focus,
    .admin-select:focus {
        outline: none;
        border-color: var(--blue);
        box-shadow: 0 0 0 3px var(--blue-soft);
    }

.code-input {
    font-size: 1.4rem !important;
    letter-spacing: 0.4em;
    text-align: center;
}

.forgot-row {
    text-align: right;
    margin: 0.5rem 0 1rem;
    font-size: 0.85rem;
}

    .forgot-row a {
        text-decoration: none;
    }

.auth-card .btn-primary {
    width: 100%;
    margin-top: 0.75rem;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
    margin: 1.25rem 0 0.75rem;
}

    .divider::before,
    .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
    }

.social-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.btn-social {
    font: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.4rem;
    border: 1px solid var(--input-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

    .btn-social:hover {
        background: var(--page-bg);
    }

.terms-row {
    display: flex !important;
    gap: 0.5rem;
    align-items: flex-start;
    color: var(--ink) !important;
    margin-top: 1rem !important;
}

    .terms-row input {
        margin-top: 0.2rem;
        accent-color: var(--blue);
    }

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    margin: 1.25rem 0 0;
}

    .auth-footer a {
        color: var(--red);
        font-weight: 600;
        text-decoration: none;
    }

.completed-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.completed-text {
    text-align: center;
    font-weight: 600;
}

@media (max-width: 760px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 1.25rem 1.4rem;
    }

    .auth-brand-name {
        font-size: 1.4rem;
        margin-top: 0.75rem;
    }

    .rule-card {
        display: none;
    }

    .auth-card {
        padding: 1.5rem 1.4rem;
    }
}

/* ---------- Landing ---------- */

.landing {
    max-width: 920px;
    margin: 0 auto;
}

.landing-hero {
    padding: 2.5rem 0 2rem;
}

    .landing-hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin: 1rem 0 0.75rem;
        max-width: 640px;
    }

.landing-lead {
    font-size: 1.1rem;
    color: #4A5068;
    max-width: 620px;
    margin: 0 0 1.5rem;
}

.landing-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

    .feature-card p {
        color: #4A5068;
        margin: 0;
    }

.feature-dot {
    display: block;
    width: 28px;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 0.9rem;
}

    .feature-dot.blue {
        background: var(--blue);
    }

    .feature-dot.yellow {
        background: var(--yellow);
    }

    .feature-dot.red {
        background: var(--red);
    }

/* ---------- Home (Acasă) ---------- */

.home-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    max-width: 640px;
}

.home-hello {
    color: var(--muted);
    margin: 0;
}

.home-title {
    font-size: 1.6rem;
    margin: 0;
}

.streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--yellow-soft);
    color: var(--yellow-text);
    font-weight: 700;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
}

.daily-card {
    background: var(--blue);
    color: #fff;
    border-radius: 18px;
    padding: 1.4rem 1.5rem;
    max-width: 640px;
}

.daily-kicker {
    color: var(--yellow);
    font-size: 0.85rem;
    font-weight: 600;
}

.daily-title {
    font-size: 1.3rem;
    margin: 0.35rem 0 1rem;
}

.daily-track {
    height: 7px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.daily-fill {
    height: 100%;
    background: var(--yellow);
    border-radius: 4px;
}

.daily-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.9rem;
    color: var(--blue-muted);
    font-size: 0.9rem;
}

.daily-btn {
    background: #fff;
    color: var(--blue);
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

    .daily-btn.disabled {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
    }

.section-label {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 600;
    margin: 1.75rem 0 0.6rem;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 640px;
}

.chapter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    color: inherit;
    text-decoration: none;
}

    a.chapter-row:hover {
        border-color: var(--blue-muted);
    }

.chapter-main {
    flex: 1;
    min-width: 0;
}

.chapter-name {
    font-weight: 600;
}

.chapter-blurb {
    color: var(--muted);
    font-size: 0.85rem;
}

.chapter-track {
    height: 5px;
    background: var(--page-bg);
    border-radius: 3px;
    margin-top: 0.5rem;
}

.chapter-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 3px;
}

.chapter-percent {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

    .chapter-percent.good {
        color: var(--green);
    }

    .chapter-percent.mid {
        color: var(--yellow-text);
    }

    .chapter-percent.low {
        color: var(--red);
    }

    .chapter-percent.muted {
        color: var(--muted);
        font-weight: 400;
    }

.streak-chip.pending {
    background: var(--page-bg);
    color: var(--muted);
}

/* ---------- Teorie ---------- */

.theory-page,
.rule-page,
.exercises-page {
    max-width: 720px;
}

.theory-chapter {
    margin-top: 1.75rem;
    scroll-margin-top: 80px;
}

.theory-chapter-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

    .theory-chapter-head h2 {
        margin: 0;
    }

.theory-chapter-percent {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.rule-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.rule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    color: inherit;
    text-decoration: none;
}

    .rule-row:hover {
        border-color: var(--blue-muted);
    }

.rule-title {
    font-weight: 600;
}

.rule-summary {
    color: var(--muted);
    font-size: 0.85rem;
}

.rule-meta {
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.back-link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

    .back-link:hover {
        color: var(--blue);
    }

.rule-body {
    font-size: 1.05rem;
    line-height: 1.7;
}

    .rule-body strong {
        color: var(--blue);
    }

.example-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.example {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.example-tag {
    display: inline-block;
    min-width: 4.2rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.example-wrong {
    color: var(--red-text);
}

    .example-wrong .example-tag {
        color: var(--red);
    }

.example-correct .example-tag {
    color: var(--green);
}

.example-note {
    color: var(--muted);
    font-size: 0.85rem;
}

.rule-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.rule-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

    .rule-nav a {
        text-decoration: none;
    }

.exercises-soon {
    margin-top: 1.25rem;
}

/* ---------- Exercițiul zilei ---------- */

.quiz-page {
    max-width: 640px;
    margin: 0 auto;
}

.quiz-top {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
}

.quiz-close {
    color: var(--muted);
    text-decoration: none;
    font-size: 1.1rem;
}

.quiz-track {
    flex: 1;
    height: 8px;
    background: var(--line);
    border-radius: 4px;
}

.quiz-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 4px;
    transition: width 0.25s;
}

.quiz-count {
    color: var(--muted);
    font-size: 0.85rem;
}

.quiz-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.5rem;
}

.quiz-instruction {
    color: var(--muted);
    font-size: 0.85rem;
}

.quiz-prompt {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.6;
    margin: 0.4rem 0 1.25rem;
}

.gap {
    display: inline-block;
    min-width: 4.5rem;
    border-bottom: 2px dashed var(--blue);
    margin: 0 0.2rem;
}

    .gap.filled {
        min-width: 0;
        border-bottom-style: solid;
        border-bottom-color: var(--green);
        color: var(--green);
        padding: 0 0.15rem;
    }

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quiz-option {
    font: inherit;
    font-size: 1.02rem;
    text-align: left;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

    .quiz-option:hover:not(:disabled) {
        border-color: var(--blue);
        background: var(--blue-soft);
    }

    .quiz-option:disabled {
        cursor: default;
    }

    .quiz-option.correct {
        border-color: var(--green);
        background: var(--green-soft);
        color: var(--green);
        font-weight: 600;
    }

    .quiz-option.chosen-wrong {
        border-color: var(--red);
        background: var(--red-soft);
        color: var(--red-text);
        text-decoration: line-through;
    }

    .quiz-option.dim {
        opacity: 0.55;
    }

.quiz-feedback {
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

    .quiz-feedback.right {
        background: var(--green-soft);
        color: #1E5B32;
    }

    .quiz-feedback.wrong {
        background: var(--yellow-soft);
        color: #5C4500;
    }

.quiz-verdict {
    font-weight: 700;
}

.quiz-rule-link {
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
}

.quiz-next {
    width: 100%;
    margin-top: 1rem;
}

.quiz-summary {
    text-align: center;
    padding: 2rem 1.5rem;
}

    .quiz-summary h1 {
        margin-top: 1rem;
    }

    .quiz-summary .rule-list {
        text-align: left;
    }

    .quiz-summary .row-actions {
        justify-content: center;
    }

.quiz-score {
    font-size: 1.15rem;
    margin: 0.25rem 0 1rem;
}

    .quiz-score strong {
        color: var(--blue);
        font-size: 1.6rem;
    }

.quiz-streak {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    color: var(--yellow-text);
    font-weight: 600;
}

/* ---------- Profil ---------- */

.profile-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 640px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px var(--yellow);
}

.profile-name {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.data-list {
    margin: 0;
}

.data-row {
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
}

    .data-row dt {
        display: flex;
        justify-content: space-between;
        color: var(--muted);
        font-size: 0.85rem;
    }

    .data-row dd {
        margin: 0.15rem 0 0;
        font-weight: 500;
    }

.data-editor {
    margin-top: 0.4rem;
}

.danger-title {
    color: var(--red);
}

.danger-warning {
    background: var(--red-soft);
    color: var(--red-text);
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
}

/* ---------- Admin (Utilizatori) ---------- */

.admin-card {
    padding: 1rem;
}

.admin-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-search {
    flex: 1;
    min-width: 200px;
}

.admin-select {
    width: auto;
}

.admin-btn {
    padding: 0.6rem 1rem;
}

.admin-message {
    background: var(--green-soft);
    color: var(--green);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .admin-table th {
        text-align: left;
        color: var(--muted);
        font-weight: 600;
        font-size: 0.8rem;
        padding: 0.5rem;
        border-bottom: 1px solid var(--line);
        white-space: nowrap;
    }

    .admin-table td {
        padding: 0.7rem 0.5rem;
        border-bottom: 1px solid var(--line);
        vertical-align: top;
    }

    .admin-table tr.is-admin td {
        background: var(--blue-soft);
    }

.admin-user-name {
    font-weight: 600;
}

.admin-you,
.admin-user-email,
.admin-muted {
    color: var(--muted);
}

.admin-small {
    font-size: 0.8rem;
}

.admin-block {
    display: block;
    margin-top: 0.25rem;
}

.admin-badges {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.admin-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.admin-btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
}

.admin-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.status-chip {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

    .status-chip.blue {
        background: var(--blue-soft);
        color: var(--blue);
    }

    .status-chip.red {
        background: var(--red-soft);
        color: var(--red-text);
    }

    .status-chip.green {
        background: var(--green-soft);
        color: var(--green);
    }

    .status-chip.yellow {
        background: var(--yellow-soft);
        color: var(--yellow-text);
    }

    .status-chip.gray {
        background: var(--page-bg);
        color: var(--muted);
    }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 33, 61, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
}

.modal-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    max-width: 440px;
    width: 100%;
}

.modal-text {
    color: #4A5068;
}

/* ---------- Blazor boot and error UI ---------- */

#blazor-error-ui {
    background: var(--yellow-soft);
    color: var(--yellow-text);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--line);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--blue);
            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(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Se încarcă");
    }

/* Static intro under the spinner in index.html — what crawlers and the first
   paint see before Blazor replaces #app. */
.loading-intro {
    position: absolute;
    inset: calc(20vh + 10rem) 0 auto 0;
    max-width: 32rem;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
    color: var(--muted);
}

    .loading-intro h1 {
        font-size: 1.4rem;
        margin: 0 0 0.5rem;
        color: var(--blue);
    }

    .loading-intro .loading-legal {
        font-size: 0.85rem;
    }

        .loading-intro .loading-legal a {
            color: var(--muted);
        }
