/*!
 * Ingesta Core UI — design system „RIPLU OS”.
 * Fără stiluri inline: CSP-ul aplicației nu permite 'unsafe-inline'.
 * Tema se aplică prin data-theme="dark|light" pe <html>.
 * Fonturi: Geist și Geist Mono (Vercel, SIL OFL 1.1), servite local.
 */

/* ───────────────────────────── Fonturi ───────────────────────────── */
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/GeistMono-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ───────────────────────────── Tokens ───────────────────────────── */
:root {
    --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --accent: #F28B50;
    --accent-hover: #FFA877;
    --accent-soft: #F59A66;
    --accent-tint: #FFD2B5;
    --on-accent: #000;
    --r1: 1px;
    --r2: 2px;
    --r3: 3px;
    --r4: 4px;
    --r6: 6px;
    --r8: 8px;
    --sh-drawer: -24px 0 48px rgba(0, 0, 0, .25);
    --sh-modal: 0 30px 80px rgba(0, 0, 0, .5);
    --sh-popover: 0 12px 32px rgba(0, 0, 0, .35);
    --header-h: 52px;
    --nav-w: 232px;
    --nav-w-mini: 60px;
    --ease-drawer: cubic-bezier(.3, .7, .2, 1);
}

:root,
[data-theme=dark] {
    color-scheme: dark;
    --bg: #09090A;
    --s1: #111113;
    --s2: #17171A;
    --s3: #202024;
    --ln: #232327;
    --ln2: #33333A;
    --ink: #F3F2EF;
    --ink2: #A6A6AD;
    --ink3: #7C7C84;
    --ort: #F28B50;
    --orbg: rgba(242, 139, 80, .12);
    --ok: #4CC38A;
    --crit: #F0524F;
    --grid: rgba(255, 255, 255, .04);
}

[data-theme=light] {
    color-scheme: light;
    --bg: #F1EFEB;
    --s1: #FFFFFF;
    --s2: #F8F7F4;
    --s3: #ECE9E4;
    --ln: #E2DED8;
    --ln2: #CFCAC2;
    --ink: #0B0B0C;
    --ink2: #4F4F56;
    --ink3: #74747A;
    --ort: #B4561F;
    --orbg: rgba(242, 139, 80, .16);
    --ok: #1C9560;
    --crit: #D2382F;
    --grid: rgba(0, 0, 0, .05);
}

/* ───────────────────────────── Bază ───────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.01em; }
p { margin: 0; }
input, button, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(242, 139, 80, .35); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(128, 128, 128, .3); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

[hidden] { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ───────────────────────────── Animații ───────────────────────────── */
@keyframes rpPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes rpRing { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes rpDraw { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 0; } }
@keyframes rpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rpSlide { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes rpFlow { to { stroke-dashoffset: -24; } }
@keyframes rpFlowL { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes rpGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rpBig { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.18); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ───────────────────────────── Tipografie utilitară ───────────────────────────── */
.mono { font-family: var(--font-mono); }
.tabnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.accent { color: var(--ort); }
.ok { color: var(--ok); }
.crit { color: var(--crit); }

/* Etichetă mono: 10px, uppercase, spațiere .14em (stilul etichetelor din template). */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink3);
}

.eyebrow--accent { color: var(--ort); }
.eyebrow--ink { color: var(--ink); }
.eyebrow--tight { letter-spacing: .1em; }

.title-xl { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.title-lg { font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.num-lg { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.num-xl { font-family: var(--font-mono); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.num-xxl { font-family: var(--font-mono); font-size: 42px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ───────────────────────────── Indicatori de stare ───────────────────────────── */
.rp-dot {
    position: relative;
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink3);
    flex: none;
}

.rp-dot--ok { background: var(--ok); }
.rp-dot--run,
.rp-dot--warn,
.rp-dot--accent { background: var(--accent); }
.rp-dot--crit { background: var(--crit); }
.rp-dot--idle { background: var(--ink3); }
.rp-dot--lg { width: 8px; height: 8px; }
.rp-dot--sm { width: 5px; height: 5px; }
.rp-dot--square { border-radius: 0; }
.rp-dot--diamond { border-radius: 0; width: 7px; height: 7px; transform: rotate(45deg); }
.rp-dot--hollow { background: transparent; border: 1px solid var(--ink3); }
.rp-dot.is-pulse { animation: rpPulse 2.4s ease-in-out infinite; }
.rp-dot.is-pulse-fast { animation: rpPulse 1.4s ease-in-out infinite; }

/* Inel care pulsează în jurul punctului (status live). */
.rp-dot.is-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: rpRing 1.8s ease-out infinite;
}

.rp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.rp-status--ok { color: var(--ok); }
.rp-status--run,
.rp-status--warn { color: var(--accent); }
.rp-status--crit { color: var(--crit); }
.rp-status--idle { color: var(--ink3); }

/* ───────────────────────────── Butoane ───────────────────────────── */
.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s, transform .15s ease-out;
}

.rp-btn:hover { border-color: var(--ink3); color: var(--ink); }
.rp-btn:disabled,
.rp-btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }

.rp-btn--primary {
    border: 0;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
}

.rp-btn--primary:hover { background: var(--accent-soft); color: var(--on-accent); }

/* CTA mare din login / drawere: 42px, uppercase cu spațiere largă. */
.rp-btn--cta {
    height: 42px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.rp-btn--block { width: 100%; }
.rp-btn--tall { height: 42px; }
.rp-btn--lg { height: 38px; padding: 0 14px; }
.rp-btn--ghost { border-color: transparent; color: var(--ink2); }
.rp-btn--ghost:hover { color: var(--ink); background: var(--s2); border-color: transparent; }
.rp-btn--muted { color: var(--ink2); }
.rp-btn--accent-outline:hover { border-color: var(--accent); }
.rp-btn--danger:hover { color: var(--crit); border-color: var(--crit); }

.rp-iconbtn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: transparent;
    color: var(--ink2);
    flex: none;
}

.rp-iconbtn:hover { color: var(--ink); }
.rp-iconbtn--sm { width: 28px; height: 28px; }
.rp-iconbtn svg { width: 14px; height: 14px; }

.rp-count {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
}

.rp-kbd {
    padding: 2px 6px;
    border: 1px solid var(--ln2);
    border-radius: var(--r3);
    font-family: var(--font-mono);
    font-size: 10px;
    white-space: nowrap;
}

/* ───────────────────────────── Formulare ───────────────────────────── */
.rp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rp-field__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink3);
}

.rp-field__error {
    color: var(--crit);
    font-size: 12px;
}

.rp-field__hint {
    color: var(--ink3);
    font-size: 11px;
}

.rp-input,
.rp-select,
.rp-textarea {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: var(--s1);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}

.rp-input:focus,
.rp-select:focus,
.rp-textarea:focus { border-color: var(--accent); }
.rp-input::placeholder,
.rp-textarea::placeholder { color: var(--ink3); }
.rp-input[aria-invalid=true] { border-color: var(--crit); }
.rp-input--lg { height: 40px; }
.rp-input--sm { height: 32px; font-size: 12px; }
.rp-input--sunken { background: var(--bg); }
.rp-textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }

/* Codul 2FA: mono 22px, cifre spațiate, centrat. */
.rp-input--code {
    height: 48px;
    font-family: var(--font-mono);
    font-size: 22px;
    letter-spacing: .5em;
    text-align: center;
}

.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.rp-chip {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: transparent;
    color: var(--ink2);
    font-size: 12px;
    white-space: nowrap;
}

.rp-chip.is-active,
.rp-chip[aria-pressed=true] { border-color: var(--accent); background: var(--orbg); color: var(--ink); }

/* Comutator segmentat (ex. Estimat / Real / Comparație). */
.rp-seg {
    display: inline-flex;
    align-self: flex-start;
    padding: 2px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: var(--bg);
}

.rp-seg__btn {
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--r3);
    background: transparent;
    color: var(--ink2);
    font-size: 12px;
}

.rp-seg__btn:hover { color: var(--ink); }
.rp-seg__btn.is-active,
.rp-seg__btn[aria-pressed=true] { background: var(--s3); color: var(--ink); }

/* ───────────────────────────── Carduri și secțiuni ───────────────────────────── */
.rp-card {
    min-width: 0;
    border: 1px solid var(--ln);
    border-radius: var(--r6);
    background: var(--s1);
    overflow: hidden;
}

.rp-card--pad { padding: 12px 14px; }
.rp-card--flex { display: flex; flex-direction: column; }

.rp-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ln);
}

.rp-card__body { padding: 12px 14px; }
.rp-card__foot { padding: 10px 14px; border-top: 1px solid var(--ln); }

.rp-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
.rp-row > * { flex: 1 1 300px; }
.rp-row > .grow-2 { flex: 2 1 600px; }
.rp-stack { display: flex; flex-direction: column; gap: 14px; }
.rp-stack--sm { gap: 8px; }

.rp-empty {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px dashed var(--ln2);
    border-radius: var(--r6);
    color: var(--ink2);
}

/* Bandă de indicatori (status companie). */
.rp-kpis {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--ln);
    border-radius: var(--r6);
    background: var(--s1);
    overflow: hidden;
}

.rp-kpis__lead {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
    padding: 12px 18px;
    border-right: 1px solid var(--ln);
    flex: none;
}

.rp-kpis__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    flex: 1 1 560px;
}

.rp-kpi {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 16px;
    border: 0;
    border-right: 1px solid var(--ln);
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
}

.rp-kpi:last-child { border-right: 0; }
a.rp-kpi:hover,
button.rp-kpi:hover { background: var(--s2); color: inherit; }

.rp-kpi__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink3);
}

.rp-kpi__value { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rp-kpi__sub { font-size: 11px; color: var(--ink2); }

/* Bară de progres subțire. Lățimea se setează din JS (data-progress), nu inline. */
.rp-progress {
    position: relative;
    display: block;
    height: 3px;
    background: var(--ln2);
    flex: 1 1 auto;
}

.rp-progress--md { height: 4px; }
.rp-meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.rp-meter__val { width: 34px; font-family: var(--font-mono); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }

.rp-progress__bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    transform-origin: left;
    animation: rpGrow .6s ease-out;
}

.rp-progress__bar--ok { background: var(--ok); }
.rp-progress__bar--crit { background: var(--crit); }

/* ───────────────────────────── Tabele ───────────────────────────── */
.rp-table-wrap {
    border: 1px solid var(--ln);
    border-radius: var(--r6);
    background: var(--s1);
    overflow: auto;
}

.rp-card > .rp-table-wrap { border: 0; border-radius: 0; }
.rp-table-wrap > .rp-table { min-width: 720px; }

.rp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.rp-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 14px;
    border-bottom: 1px solid var(--ln2);
    background: var(--s1);
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: .1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.rp-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ln);
    vertical-align: middle;
}

.rp-table tbody tr:last-child td { border-bottom: 0; }
.rp-table tbody tr:hover td { background: var(--s2); }
.rp-table .num { text-align: right; font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.rp-table .cell-title { display: flex; flex-direction: column; min-width: 0; }
.rp-table .cell-title > :first-child { font-weight: 500; }
.rp-table .cell-title > :last-child { font-size: 11px; color: var(--ink3); }

.rp-sort {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* Listă de evenimente (feed). */
.rp-feed { display: flex; flex-direction: column; }

.rp-feed__item {
    display: grid;
    grid-template-columns: 42px 6px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 8px 14px;
    border-bottom: 1px solid var(--ln);
    font-size: 12px;
}

.rp-feed__item:last-child { border-bottom: 0; }
.rp-feed__time { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink3); }
.rp-feed__item .rp-dot { align-self: center; }

/* ───────────────────────────── Shell aplicație ───────────────────────────── */
.rp-shell {
    display: grid;
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
    height: 100vh;
    overflow: hidden;
}

.rp-shell.is-mini { grid-template-columns: var(--nav-w-mini) minmax(0, 1fr); }

.rp-nav {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid var(--ln);
    background: var(--s1);
}

.rp-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: var(--header-h);
    padding: 0 12px;
    border-bottom: 1px solid var(--ln);
    flex: none;
}

.rp-nav__logo { display: block; height: 30px; width: auto; object-fit: contain; }

.rp-nav__toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: transparent;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 11px;
    flex: none;
}

.rp-nav__toggle:hover { color: var(--ink); }

.rp-nav__icon-btn {
    display: none;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.rp-nav__icon-btn img { display: block; width: 32px; height: 32px; }

.rp-nav__body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    padding: 10px 8px;
    overflow: auto;
}

.rp-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--r4);
    background: transparent;
    color: var(--ink2);
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    flex: none;
}

.rp-nav__item:hover { background: var(--s2); color: var(--ink); }
.rp-nav__item.is-current { color: var(--ink); }
.rp-nav__item.is-active { background: var(--s3); color: var(--ink); }

.rp-nav__num {
    width: 16px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 10px;
    flex: none;
}

.rp-nav__item.is-current .rp-nav__num { color: var(--accent); }

.rp-nav__label {
    flex: 1;
    overflow: hidden;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rp-nav__badge { color: var(--ink3); font-family: var(--font-mono); font-size: 10px; }
.rp-nav__badge--accent { color: var(--accent); }
.rp-nav__badge--crit { color: var(--crit); }

.rp-nav__chev {
    width: 10px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 11px;
    text-align: center;
}

.rp-nav__chev::before { content: '+'; }
.rp-nav__group.is-open > .rp-nav__item .rp-nav__chev::before { content: '−'; }

.rp-nav__kids {
    display: none;
    flex-direction: column;
    gap: 1px;
    margin: 2px 0 6px 17px;
    padding-left: 9px;
    border-left: 1px solid var(--ln);
}

.rp-nav__group.is-open > .rp-nav__kids { display: flex; animation: rpIn .2s ease-out; }

.rp-nav__kid {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 0 8px;
    border-radius: var(--r4);
    color: var(--ink2);
    font-size: 12px;
    text-decoration: none;
}

.rp-nav__kid::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ln2);
    flex: none;
}

.rp-nav__kid:hover { background: var(--s2); color: var(--ink); }
.rp-nav__kid.is-active { background: var(--s3); color: var(--ink); }
.rp-nav__kid.is-active::before { background: var(--accent); }

.rp-nav__foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid var(--ln);
    flex: none;
}

.rp-sysstat { display: flex; flex-direction: column; gap: 8px; }
.rp-sysstat__head { display: flex; align-items: center; justify-content: space-between; }

.rp-sysstat__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 6px;
}

.rp-sysstat__svc {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--ink2);
    font-family: var(--font-mono);
    font-size: 9.5px;
}

.rp-user { display: flex; align-items: center; gap: 10px; }

.rp-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--r4);
    background: var(--s3);
    font-size: 11px;
    font-weight: 600;
    flex: none;
}

.rp-user__meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rp-user__name { font-size: 12px; font-weight: 500; }
.rp-user__role { font-size: 11px; color: var(--ink3); }

.rp-user__logout {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink3);
    font-size: 11px;
}

.rp-user__logout:hover { color: var(--crit); }

.rp-session {
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.6;
}

/* Mod mini: doar numerele / iconițele. */
.rp-shell.is-mini .rp-nav__label,
.rp-shell.is-mini .rp-nav__badge,
.rp-shell.is-mini .rp-nav__chev,
.rp-shell.is-mini .rp-nav__kids,
.rp-shell.is-mini .rp-nav__logo,
.rp-shell.is-mini .rp-nav__toggle,
.rp-shell.is-mini .rp-sysstat,
.rp-shell.is-mini .rp-user__meta,
.rp-shell.is-mini .rp-user__logout,
.rp-shell.is-mini .rp-session { display: none; }
.rp-shell.is-mini .rp-nav__icon-btn { display: block; }
.rp-shell.is-mini .rp-nav__item { justify-content: center; padding: 0; }
.rp-shell.is-mini .rp-nav__num { width: auto; }
.rp-shell.is-mini .rp-user { justify-content: center; }

.rp-frame {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.rp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--header-h);
    padding: 0 16px 0 20px;
    border-bottom: 1px solid var(--ln);
    background: var(--bg);
    flex: none;
}

.rp-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rp-crumbs a { color: inherit; }
.rp-crumbs a:hover { color: var(--ink2); }
.rp-crumbs [aria-current=page] { color: var(--ink); }
.rp-spacer { flex: 1; }

.rp-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(340px, 28vw);
    min-width: 44px;
    height: 32px;
    padding: 0 6px 0 12px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: var(--s1);
    color: var(--ink3);
    font-size: 12px;
}

.rp-search:hover { border-color: var(--ink3); color: var(--ink2); }
.rp-search__prompt { color: var(--accent); font-family: var(--font-mono); }

.rp-search__text {
    flex: 1;
    overflow: hidden;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rp-main {
    flex: 1;
    min-height: 0;
    padding: 16px 20px 56px;
    overflow: auto;
}

.rp-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: rpIn .4s ease-out;
}

.rp-page__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.rp-page__title { display: flex; flex-direction: column; gap: 4px; }
.rp-page__title h1 { font-size: 22px; font-weight: 500; }
.rp-page__title p { font-size: 12px; color: var(--ink2); }
.rp-page__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ───────────────────────────── Drawer ───────────────────────────── */
.rp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    border-left: 1px solid var(--ln2);
    background: var(--s1);
    box-shadow: var(--sh-drawer);
    animation: rpSlide .28s var(--ease-drawer);
}

.rp-drawer--wide { width: min(560px, 100vw); }

.rp-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--header-h);
    padding: 0 16px;
    border-bottom: 1px solid var(--ln);
    flex: none;
}

.rp-drawer__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-drawer__note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ln);
    color: var(--ink2);
    font-size: 11px;
}

.rp-drawer__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    padding: 18px 16px;
    overflow: auto;
}

.rp-drawer__body--flush { gap: 0; padding: 0; }

.rp-drawer__foot {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--ln);
    flex: none;
}

/* Alerte (centrul de alerte). */
.rp-alert {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid var(--ln);
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
}

a.rp-alert:hover,
button.rp-alert:hover { background: var(--s2); color: inherit; }

.rp-alert__sev {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 2px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .1em;
}

.rp-alert__sev::before { content: ''; width: 6px; height: 6px; background: currentColor; }
.rp-alert__sev--crit { color: var(--crit); }
.rp-alert__sev--warn { color: var(--accent); }
.rp-alert__sev--ok { color: var(--ok); }
.rp-alert__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-alert__title { font-size: 12.5px; font-weight: 500; }
.rp-alert__sub { font-size: 11px; color: var(--ink2); }
.rp-alert__mod { font-size: 10.5px; color: var(--ink3); }
.rp-alert__time { color: var(--ink3); font-family: var(--font-mono); font-size: 10px; }

.rp-notif {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--ln);
    font-size: 12px;
}

.rp-notif__body { display: flex; flex-direction: column; gap: 2px; }
.rp-notif__kind { color: var(--ort); font-size: 11px; }

.rp-section-label {
    padding: 14px 16px 6px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Asistent (Ask). */
.rp-ask__suggest {
    padding: 10px 12px;
    border: 1px solid var(--ln);
    border-radius: var(--r4);
    background: transparent;
    color: var(--ink);
    font-size: 12.5px;
    text-align: left;
}

.rp-ask__suggest:hover { border-color: var(--accent); }
.rp-ask__msg { display: flex; flex-direction: column; gap: 6px; animation: rpIn .3s ease-out; }

.rp-ask__q {
    align-self: flex-end;
    max-width: 85%;
    padding: 9px 12px;
    border-radius: var(--r4);
    background: var(--s3);
    font-size: 12.5px;
}

.rp-ask__state {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 10px;
}

/* ───────────────────────────── Paletă de comenzi ───────────────────────────── */
.rp-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: rgba(0, 0, 0, .55);
    animation: rpFade .15s ease-out;
}

.rp-palette {
    width: min(640px, 100%);
    border: 1px solid var(--ln2);
    border-radius: var(--r8);
    background: var(--s1);
    box-shadow: var(--sh-modal);
    overflow: hidden;
    animation: rpIn .2s ease-out;
}

.rp-palette__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 54px;
    padding: 0 16px;
    border-bottom: 1px solid var(--ln);
}

.rp-palette__prompt { color: var(--accent); font-family: var(--font-mono); font-size: 16px; }

.rp-palette__input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 15px;
    outline: none;
}

.rp-palette__input:focus-visible { outline: none; }
.rp-palette__input::placeholder { color: var(--ink3); }

.rp-palette__mode {
    padding: 3px 6px;
    border: 1px solid var(--ln2);
    border-radius: var(--r3);
    color: var(--ort);
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .14em;
}

.rp-palette__list {
    max-height: min(440px, 60vh);
    padding: 6px 0;
    overflow: auto;
}

.rp-palette__group {
    padding: 8px 16px 4px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.rp-palette__item {
    display: grid;
    grid-template-columns: 3px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 7px 16px 7px 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.rp-palette__item::before { content: ''; align-self: stretch; background: transparent; }
.rp-palette__item.is-active { background: var(--s3); }
.rp-palette__item.is-active::before { background: var(--accent); }
.rp-palette__text { display: flex; flex-direction: column; min-width: 0; }

.rp-palette__label {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rp-palette__label mark { background: transparent; color: var(--ort); font-weight: 600; }
.rp-palette__pre { color: var(--ort); font-family: var(--font-mono); }

.rp-palette__sub {
    overflow: hidden;
    color: var(--ink3);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rp-palette__empty { padding: 24px 16px; color: var(--ink2); font-size: 12.5px; }

.rp-palette__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 9px 16px;
    border-top: 1px solid var(--ln);
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 10px;
}

/* ───────────────────────────── Toast ───────────────────────────── */
.rp-toasts {
    position: fixed;
    bottom: 20px;
    left: 50%;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
}

.rp-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: var(--s1);
    box-shadow: var(--sh-popover);
    font-size: 12.5px;
    animation: rpIn .25s ease-out;
    pointer-events: auto;
}

.rp-toast::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.rp-toast--error::before { background: var(--crit); }
.rp-toast--warning::before { background: var(--accent); }
.rp-toast--info::before { background: var(--ink3); }

/* ───────────────────────────── Ecrane de autentificare ───────────────────────────── */
.rp-auth {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 64px 24px;
    overflow: hidden;
}

.rp-auth__net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.rp-auth__net .l { stroke: var(--ln2); stroke-width: 1; }
.rp-auth__net .n { fill: var(--ink3); }

.rp-auth__net .f {
    stroke: var(--accent);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 10 410;
    animation: rpFlowL 4.5s linear infinite;
}

.rp-auth__net .h { fill: var(--accent); animation: rpPulse 3s ease-in-out infinite; }

.rp-auth__veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 460px 420px at 50% 50%, var(--bg) 40%, transparent 100%);
    pointer-events: none;
}

.rp-auth__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    max-width: 340px;
    animation: rpIn .5s ease-out;
}

.rp-auth__card--wide { max-width: 440px; }
.rp-auth__intro { display: flex; flex-direction: column; gap: 6px; }
.rp-auth__intro h1 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.rp-auth__intro p { color: var(--ink2); }
.rp-auth__fields { display: flex; flex-direction: column; gap: 14px; }
.rp-auth__fields > .rp-btn--cta { margin-top: 6px; }
.rp-auth__actions { display: flex; gap: 10px; }
.rp-auth__actions > :first-child { flex: 1; }
.rp-auth__actions > :last-child { flex: 2; }

.rp-auth__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
}

.rp-auth__foot {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 11px;
}

.rp-auth__alert {
    padding: 10px 12px;
    border: 1px solid var(--crit);
    border-radius: var(--r4);
    background: rgba(240, 82, 79, .08);
    color: var(--ink);
    font-size: 12.5px;
}

.rp-auth__alert--ok { border-color: var(--ok); background: rgba(62, 207, 142, .08); }
.rp-auth__link { align-self: flex-end; color: var(--ink2); font-size: 12px; }
.rp-auth__link:hover { color: var(--ink); }
.rp-auth__links { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.rp-auth__links a { color: var(--ink2); }
.rp-auth__links a:hover { color: var(--ink); }

/* Configurare 2FA: cod QR (fundal alb pentru scanare și în tema întunecată), secret, coduri de recuperare. */
.rp-qr { display: block; width: 180px; height: 180px; padding: 10px; border-radius: var(--r4); background: #fff; align-self: center; }
.rp-secret { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; word-break: break-all; color: var(--ink2); text-align: center; }
.rp-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 12px 14px; border: 1px solid var(--ln); border-radius: var(--r4); background: var(--s2); font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; list-style: none; margin: 0; }
.rp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 12.5px; }
.rp-dl dt { color: var(--ink3); }
.rp-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rp-inline-form { display: inline; }

/* Logo-ul: varianta potrivită temei. */
.rp-logo { display: block; height: 64px; width: auto; object-fit: contain; align-self: flex-start; }
.rp-logo--center { align-self: center; }
[data-theme=dark] .rp-logo--light,
[data-theme=light] .rp-logo--dark { display: none; }

/* Aprobare push 2FA. */
.rp-push {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: var(--s1);
    color: var(--ink);
    text-align: left;
}

.rp-push:hover { border-color: var(--accent); }
.rp-push__text { display: flex; flex-direction: column; gap: 2px; }
.rp-push__sub { font-size: 12px; color: var(--ink2); }

/* Ecranul de inițializare. */
.rp-boot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 100vh;
    padding: 24px;
}

.rp-boot__graph { width: min(560px, 90vw); height: auto; }
.rp-boot__graph .ring { stroke: var(--ln2); stroke-width: 1; stroke-dasharray: 300; stroke-dashoffset: 300; animation: rpDraw .5s ease-out forwards; }
.rp-boot__graph .link { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 300; stroke-dashoffset: 300; animation: rpDraw .45s ease-out forwards; }
.rp-boot__graph .node { opacity: 0; animation: rpFade .3s ease-out forwards; }
.rp-boot__graph .node circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.rp-boot__graph .node text { fill: var(--ink2); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; }
.rp-boot__graph .core { fill: var(--accent); }
.rp-boot__graph .pulse { fill: none; stroke: var(--accent); stroke-width: 1; transform-origin: 280px 150px; animation: rpRing 1.6s ease-out infinite; }
.rp-boot__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; animation: rpFade .4s ease-out 1s forwards; }

.rp-boot__line {
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-align: center;
}

.rp-boot__bar { width: min(280px, 70vw); height: 2px; background: var(--ln2); overflow: hidden; }
.rp-boot__bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: rpGrow 2s ease-out forwards; }

/* ───────────────────────────── Pagina de eroare ───────────────────────────── */
.rp-error__code {
    color: var(--ort);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.rp-error__trace {
    max-height: 40vh;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--ln);
    border-radius: var(--r4);
    background: var(--s1);
    color: var(--ink2);
    font-family: var(--font-mono);
    font-size: 11px;
    white-space: pre;
    overflow: auto;
}

/* ───────────────────────────── Responsive ───────────────────────────── */
@media (max-width: 999px) {
    .rp-search { width: 44px; padding: 0; justify-content: center; }
    .rp-search__text,
    .rp-search .rp-kbd { display: none; }
    .rp-header .rp-hide-sm { display: none; }
}

@media (max-width: 640px) {
    .rp-main { padding: 12px 12px 48px; }
    .rp-header { padding: 0 12px; }
    .rp-crumbs { display: none; }
    .rp-auth__foot { position: static; margin-top: 24px; }
}

/* ───────────────────────────── Administrare: utilizatori ───────────────────────────── */
.rp-mono { font-family: var(--font-mono); font-size: .92em; }
.rp-muted { color: var(--ink3); }
.rp-warn { color: var(--ort); }
.rp-crit { color: var(--crit); }
.rp-req { color: var(--ort); }
.rp-sep { color: var(--ink3); }
.rp-link-quiet { color: inherit; text-decoration: none; }
.rp-link-quiet:hover { color: var(--ink); }

.rp-filter .rp-input { width: min(300px, 100%); }

/* Antet de coloană sortabil (prototip: PROIECT ↑). */
.rp-th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.rp-th-sort:hover,
.rp-th-sort.is-active { color: var(--ink); }
.rp-table th.num .rp-th-sort { display: inline-block; }

/* Persoană: avatar + nume / detalii. */
.rp-person { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
a.rp-person:hover .cell-title > :first-child { color: var(--ort); }
.rp-person--head { gap: 14px; align-items: flex-end; }
.rp-avatar--accent { background: var(--orbg); color: var(--ort); }
.rp-avatar--lg { width: 52px; height: 52px; border-radius: var(--r6); font-size: 17px; font-weight: 500; letter-spacing: .04em; }
.rp-table--users .rp-avatar { width: 28px; height: 28px; font-size: 10.5px; }
.rp-row-link td { cursor: default; }

.rp-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rp-tag {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border: 1px solid var(--ln2);
    border-radius: var(--r2);
    color: var(--ink2);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: .06em;
    white-space: nowrap;
    vertical-align: middle;
}
.rp-tag--accent { border-color: transparent; background: var(--orbg); color: var(--ort); }
.rp-cell-note { display: block; margin-top: 3px; color: var(--ort); font-size: 10.5px; }

a.rp-chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
a.rp-chip:hover { color: var(--ink); border-color: var(--ink3); }
.rp-chip__count { color: var(--ink3); font-family: var(--font-mono); font-size: 10.5px; }
.rp-chip.is-active .rp-chip__count { color: var(--ort); }

.rp-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-pager__info { color: var(--ink3); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.rp-pager__links { display: flex; gap: 8px; }
.rp-empty-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink2); }

.rp-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-sudo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--ln);
    border-radius: var(--r4);
    color: var(--ok);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.rp-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--ln);
    border-left: 2px solid var(--accent);
    border-radius: var(--r6);
    background: var(--s1);
    color: var(--ink2);
    font-size: 12px;
}
.rp-banner a { color: var(--ort); }

.rp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-inline-row { display: flex; gap: 8px; align-items: center; }
.rp-inline-row .rp-select { flex: 1; min-width: 0; }

.rp-list { display: flex; flex-direction: column; }
.rp-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--ln);
    font-size: 12px;
}
.rp-list__item:hover { background: var(--s2); }
.rp-list__item .cell-title { display: flex; flex-direction: column; min-width: 0; }
.rp-list__item .cell-title > :first-child { font-weight: 500; }
.rp-list__item .cell-title > :last-child { color: var(--ink3); font-size: 11px; }
.rp-list__empty { padding: 14px; color: var(--ink3); font-size: 12px; }
.rp-feed__item--wide { grid-template-columns: 118px 6px minmax(0, 1fr); }

.rp-card--danger .rp-card__head .eyebrow { color: var(--crit); }
.rp-btn--start { justify-content: flex-start; }
.rp-btn--danger-solid { border: 0; background: var(--crit); color: #fff; font-weight: 600; }
.rp-btn--danger-solid:hover { filter: brightness(1.08); color: #fff; }

/* Formulare în drawer. */
.rp-drawer__form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rp-fieldset { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.rp-fieldset > .rp-section-label { padding: 0 0 2px; }
.rp-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.rp-input--mono { font-family: var(--font-mono); font-size: 12.5px; }
.rp-readonly { display: flex; align-items: center; height: 38px; padding: 0 12px; border: 1px dashed var(--ln2); border-radius: var(--r4); color: var(--ink2); }
.rp-confirm__text { color: var(--ink2); font-size: 12.5px; line-height: 1.55; }

.rp-checklist { display: flex; flex-direction: column; border: 1px solid var(--ln); border-radius: var(--r4); }
.rp-check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--ln); font-size: 12.5px; cursor: pointer; }
.rp-check:last-child { border-bottom: 0; }
.rp-check:hover { background: var(--s2); }
.rp-check input { accent-color: var(--accent); }
.rp-check__text { display: flex; flex-direction: column; gap: 1px; }
.rp-check__sub { color: var(--ink3); font-family: var(--font-mono); font-size: 10.5px; }

.rp-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.rp-choice__opt {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    cursor: pointer;
}
.rp-choice__opt:hover { border-color: var(--ink3); }
.rp-choice__opt:has(input:checked) { border-color: var(--accent); background: var(--orbg); }
.rp-choice__opt input { margin-top: 2px; accent-color: var(--accent); }
.rp-choice__body { display: flex; flex-direction: column; gap: 3px; }
.rp-choice__title { font-size: 12.5px; font-weight: 500; }
.rp-choice__hint { color: var(--ink2); font-size: 11px; line-height: 1.45; }

.rp-secretbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    background: var(--bg);
}
.rp-secretbox__value { flex: 1; font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; color: var(--ink); overflow-wrap: anywhere; user-select: all; }

@media (max-width: 640px) {
    .rp-person--head { align-items: center; }
    .rp-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
    .rp-feed__item--wide { grid-template-columns: 1fr; }
    .rp-feed__item--wide .rp-dot { display: none; }
}

/* Notă în card (ex. motivul pentru care o acțiune nu este disponibilă). */
.rp-note { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--ln); border-radius: var(--r4); background: var(--s2); color: var(--ink2); font-size: 11.5px; line-height: 1.5; }
.rp-note--warn { border-left: 2px solid var(--accent); }
.rp-note__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding-left: 16px; color: var(--ink); }
.rp-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ───────────────────────────── Administrare: grupuri și permisiuni ───────────────────────────── */
.rp-avatar--group { border-radius: 50%; }
.rp-perm-meter { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.rp-perm-meter .rp-progress { flex: 1; }

.rp-perms__module { border-top: 1px solid var(--ln); }
.rp-perms__module > .rp-section-label { padding: 12px 14px 4px; }
.rp-perms__row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 8px 14px;
}
.rp-perms__row + .rp-perms__row { border-top: 1px dashed var(--ln); }
.rp-perms__resource { padding-top: 6px; color: var(--ink2); font-size: 12px; font-weight: 500; }
.rp-perms__items { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-perm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--ln2);
    border-radius: var(--r4);
    color: var(--ink2);
    font-size: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.rp-perm:hover { border-color: var(--ink3); color: var(--ink); }
.rp-perm input { accent-color: var(--accent); margin: 0; }
.rp-perm:has(input:checked) { border-color: var(--accent); background: var(--orbg); color: var(--ink); }
.rp-perm.is-locked { cursor: not-allowed; opacity: .55; }
.rp-perm.is-locked:hover { border-color: var(--ln2); color: var(--ink2); }
.rp-perm__flag {
    padding: 1px 4px;
    border-radius: var(--r2);
    background: var(--s3);
    color: var(--ort);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .08em;
}
@media (max-width: 640px) {
    .rp-perms__row { grid-template-columns: 1fr; gap: 6px; }
    .rp-perms__resource { padding-top: 0; }
}

/* ───────────────────────────── Administrare: catalogul de permisiuni ───────────────────────────── */
.rp-avatar--key { border-radius: var(--r6); }
.rp-avatar--key svg { width: 18px; height: 18px; }
.rp-tag.is-muted { opacity: .55; text-decoration: line-through; }
.rp-tag--warn { border-color: transparent; background: var(--orbg); color: var(--ort); }
a.rp-seg__btn { display: inline-flex; align-items: center; text-decoration: none; }
.rp-table tr.rp-matrix__section td {
    padding: 10px 14px 6px;
    background: var(--s1);
    color: var(--ink3);
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.rp-table tbody tr.rp-matrix__section:hover td { background: var(--s1); }
.rp-matrix-wrap { max-height: calc(100vh - 220px); }
.rp-matrix { min-width: 0; }
.rp-matrix th.rp-matrix__perm,
.rp-matrix td.rp-matrix__perm { position: sticky; left: 0; z-index: 2; min-width: 280px; background: var(--s1); }
.rp-matrix thead th.rp-matrix__perm { z-index: 3; }
.rp-matrix tbody tr:hover td.rp-matrix__perm { background: var(--s2); }
.rp-matrix__res { color: var(--ink3); }
.rp-matrix__group { min-width: 96px; text-align: center !important; }
.rp-matrix__group a { color: inherit; text-decoration: none; }
.rp-matrix__group a:hover { color: var(--ort); }
.rp-matrix__group.is-inactive { opacity: .55; }
.rp-matrix__cell { text-align: center; }
.rp-matrix__dot { color: var(--accent); font-size: 11px; }
.rp-matrix__dot.is-inactive { color: var(--ink3); }
.rp-filter .rp-select { flex: none; width: auto; min-width: 160px; }

/* ───────────────────────────── Administrare: audit și loguri ───────────────────────────── */
.rp-nowrap { white-space: nowrap; }
.rp-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--ln); }
.rp-filterbar .rp-input, .rp-filterbar .rp-select { width: auto; min-width: 130px; flex: 0 1 auto; }
.rp-filterbar .rp-filterbar__wide { flex: 1 1 220px; }
.rp-filterbar__date { display: inline-flex; align-items: center; gap: 6px; color: var(--ink3); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.rp-filterbar__date .rp-input { min-width: 0; width: 142px; color-scheme: dark light; }
:root[data-theme=light] .rp-filterbar__date .rp-input { color-scheme: light; }
.rp-logfile > .rp-mono { white-space: nowrap; }
.rp-table td.rp-time { font-family: var(--font-mono); font-size: 11px; color: var(--ink2); white-space: nowrap; }
.rp-audit-action { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
a.rp-audit-action:hover .cell-title > :first-child { color: var(--ort); }
.rp-ua { font-size: 11.5px; color: var(--ink2); }
.rp-diff td { vertical-align: top; overflow-wrap: anywhere; }
.rp-diff__old { color: var(--ink3); }
.rp-diff__new { color: var(--ink); }
.rp-diff__old:not(:empty) { background: rgba(240, 82, 79, .06); }
.rp-diff__new:not(:empty) { background: rgba(76, 195, 138, .06); }
.rp-feed__item--link { color: inherit; text-decoration: none; }
.rp-feed__item--link:hover { background: var(--s2); }
.rp-feed__item--link.is-current { background: var(--orbg); }

.rp-logs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-logs__files { position: sticky; top: 0; }
.rp-logfile { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--ln); color: inherit; font-size: 12px; text-decoration: none; }
.rp-logfile .cell-title { display: flex; flex-direction: column; min-width: 0; }
.rp-logfile .cell-title > :first-child { font-weight: 500; }
.rp-logfile .cell-title > :last-child { color: var(--ink3); font-size: 10.5px; }
.rp-logfile:hover { background: var(--s2); }
.rp-logfile.is-active { background: var(--orbg); }
.rp-logfile.is-active .cell-title > :first-child { color: var(--ort); }
.rp-logs__note { margin: 10px 14px; }
.rp-loglist { display: flex; flex-direction: column; font-size: 12px; }
.rp-logline { border-bottom: 1px solid var(--ln); border-left: 2px solid transparent; }
.rp-logline--crit { border-left-color: var(--crit); }
.rp-logline--warn { border-left-color: var(--accent); }
.rp-logline summary { display: grid; grid-template-columns: 118px 74px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 14px; cursor: pointer; list-style: none; }
.rp-logline summary::-webkit-details-marker { display: none; }
.rp-logline summary:hover { background: var(--s2); }
.rp-logline[open] summary { background: var(--s2); }
.rp-logline__time { color: var(--ink3); font-family: var(--font-mono); font-size: 10.5px; }
.rp-logline__level { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; color: var(--ink2); }
.rp-logline--crit .rp-logline__level { color: var(--crit); }
.rp-logline--warn .rp-logline__level { color: var(--ort); }
.rp-logline--run .rp-logline__level { color: var(--ok); }
.rp-logline__msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-logline[open] .rp-logline__msg { white-space: normal; }
.rp-logline__rid { color: var(--ink3); font-size: 10px; }
.rp-logline__body { display: flex; flex-direction: column; gap: 10px; padding: 8px 14px 12px 142px; }
.rp-logline__ctx { margin: 0; padding: 10px 12px; max-height: 360px; overflow: auto; border: 1px solid var(--ln); border-radius: var(--r4); background: var(--bg); color: var(--ink2); font-family: var(--font-mono); font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 999px) {
    .rp-logs { grid-template-columns: 1fr; }
    .rp-logs__files { position: static; }
}
@media (max-width: 640px) {
    .rp-logline summary { grid-template-columns: 1fr auto; }
    .rp-logline__time { grid-column: 1 / -1; }
    .rp-logline__body { padding-left: 14px; }
}

/* ─── Sarcini programate (/admin/sarcini) ─── */
.rp-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.rp-detail-grid > .rp-stack { display: flex; flex-direction: column; gap: 14px; }
.rp-table--tasks td { vertical-align: top; }
.rp-table--tasks tr.is-muted td { color: var(--ink3); }
.rp-table--tasks tr.is-muted .cell-title > :first-child { color: var(--ink2); }
.rp-table--tasks .rp-actions { justify-content: flex-end; flex-wrap: nowrap; }
.rp-card__head .rp-inline-form, .rp-card__head .rp-seg { margin-left: auto; }
.rp-logline__body .rp-actions { padding-top: 2px; }
.rp-table--tasks .rp-cell-note { color: var(--ink3); }
.rp-table--tasks .rp-cell-note.rp-crit { color: var(--crit); }
.rp-table--tasks .rp-cell-note.rp-note-accent { color: var(--ort); }
.rp-upcoming { list-style: none; margin: 0; padding: 4px 0; }
.rp-upcoming li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; border-bottom: 1px solid var(--ln); font-size: 12px; }
.rp-upcoming li:last-child { border-bottom: 0; }
@media (max-width: 999px) {
    .rp-detail-grid { grid-template-columns: 1fr; }
    .rp-table--tasks .rp-actions { flex-wrap: wrap; }
}
.rp-table--tasks .rp-cell-note.rp-mono { white-space: nowrap; }

/* ─── Template-uri email (/admin/template-uri-email) ─── */
.rp-note--actions { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.rp-note--actions > span:first-child { flex: 1 1 320px; }
.rp-btn--xs { height: 24px; padding: 0 8px; font-size: 11px; }
.rp-textarea--code { font-family: var(--font-mono); font-size: 12px; line-height: 1.55; tab-size: 4; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.rp-tpl-preview { display: block; width: 100%; height: 620px; border: 0; background: #f4f4f2; }
.rp-cell-tags { display: inline-flex; gap: 4px; margin-left: 18px; margin-top: 4px; }
.rp-locales { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.rp-locale { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border: 1px solid var(--ln2); border-radius: var(--r4); color: var(--ink2); font-family: var(--font-mono); font-size: 10.5px; text-decoration: none; }
.rp-locale:hover { color: var(--ink); border-color: var(--ink3); }
.rp-locale.is-off { opacity: .5; text-decoration: line-through; }
.rp-locale__mark { color: var(--ort); font-size: 7px; }
.rp-vars, .rp-versions { list-style: none; margin: 0; padding: 4px 0; }
.rp-vars__item, .rp-versions__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--ln); }
.rp-vars__item:last-child, .rp-versions__item:last-child { border-bottom: 0; }
.rp-vars__item--child { padding-left: 28px; }
.rp-vars__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-vars__main code { font-size: 11.5px; color: var(--ink); }
.rp-vars__desc { font-size: 11px; color: var(--ink2); }
.rp-vars__ex { font-size: 10.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-versions__item.is-current { background: var(--orbg); }
.rp-syntax dd { font-size: 11px; overflow-wrap: anywhere; }
.rp-linediff { margin: 0; padding: 8px 0; max-height: 420px; overflow: auto; border: 1px solid var(--ln); border-radius: var(--r4); background: var(--bg); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; }
.rp-linediff__line { display: block; padding: 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink2); }
.rp-linediff__line--add { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ink); }
.rp-linediff__line--del { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--ink); }
.rp-linediff__op { display: inline-block; width: 16px; color: var(--ink3); user-select: none; }
.rp-detail-grid > .rp-stack { min-width: 0; }
.rp-versions .cell-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-versions .cell-title > :first-child { overflow-wrap: anywhere; }
.rp-versions .cell-title > :last-child { color: var(--ink3); font-size: 11px; }
.rp-table--templates td { vertical-align: top; }
.rp-table--templates .rp-cell-note { color: var(--ink3); }
.rp-table--templates .rp-cell-note.rp-crit { color: var(--crit); }

/* ─── Setări (/admin/setari) ─── */
.rp-settings { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-settings > .rp-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rp-settings__form { display: flex; flex-direction: column; gap: 0; padding-top: 4px; padding-bottom: 4px; }
.rp-setting { display: grid; grid-template-columns: minmax(180px, 34%) minmax(0, 1fr); gap: 8px 20px; padding: 14px 0; border-bottom: 1px solid var(--ln); }
.rp-setting:last-of-type { border-bottom: 0; }
.rp-setting.is-invalid .rp-setting__label label { color: var(--crit); }
.rp-setting__label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rp-setting__label label { font-size: 13px; color: var(--ink); }
.rp-setting__key { font-size: 10.5px; color: var(--ink3); overflow-wrap: anywhere; }
.rp-setting__control { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rp-setting__control .rp-input, .rp-setting__control .rp-select, .rp-setting__control .rp-textarea { width: 100%; max-width: 520px; }
.rp-setting__meta { color: var(--ink3); font-size: 10.5px; font-family: var(--font-mono); }
.rp-setting__secret { display: flex; flex-direction: column; gap: 6px; }
.rp-check--inline { padding: 4px 0; border: 0; align-self: flex-start; }
.rp-check--inline:hover { background: transparent; }
.rp-settings__actions { padding-top: 14px; border-top: 1px solid var(--ln); }
@media (max-width: 999px) {
    .rp-settings { grid-template-columns: 1fr; }
    .rp-setting { grid-template-columns: 1fr; }
}

/* ─── Module (/admin/module) ─── */
.rp-table--modules td { vertical-align: top; }
.rp-table--modules .rp-cell-note { color: var(--ink3); }
.rp-table--modules .rp-cell-note.rp-crit { color: var(--crit); }
.rp-table--modules .rp-cell-note.rp-note-accent { color: var(--ort); }
.rp-table--modules .rp-actions { justify-content: flex-end; }
.rp-module-desc { margin: -6px 0 0; font-size: 12.5px; }

/* ─── Actualizări (/admin/actualizari) ─── */
.rp-updline { margin: 6px 0; font-family: var(--font-mono); font-size: 12px; }
.rp-updfiles { margin-top: 6px; }
.rp-updfiles summary { cursor: pointer; color: var(--ink2); font-size: 12px; }
.rp-updfiles[open] summary { margin-bottom: 6px; }
.rp-updnotes { max-height: 320px; }
.rp-updinstall { width: 100%; }
.rp-updinstall .rp-check { align-items: flex-start; }
.rp-updlog { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; color: var(--ink); }

/* Istoricul notificărilor (/notificari) */
.rp-alert__sev--info { color: var(--ink3); }
.rp-notif-filters { align-items: center; }
.rp-notif-filters__sep { width: 1px; height: 18px; margin: 0 4px; background: var(--ln); }
.rp-table tr.is-unread td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.rp-table tr.is-unread .cell-title > :first-child { font-weight: 600; }
.rp-drawer__foot--split { justify-content: space-between; align-items: center; }
.rp-drawer__foot--split form { margin: 0; }
