/* =====================================================================
   Rediafile CMS — shared styles
   Complements Tailwind (loaded via CDN) with Markdown rendering, code
   blocks, tables, and small component fixes used across public pages.
   ===================================================================== */

:root {
  --rf-slate-950: #020617;
  --rf-slate-900: #0f172a;
  --rf-slate-800: #1e293b;
  --rf-slate-700: #334155;
  --rf-blue: #2563eb;
}

* { box-sizing: border-box; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f8fafc;
  color: #111827;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

/* ---- Markdown content rendering ---------------------------------- */
.md-content { color: #1f2937; line-height: 1.7; font-size: 0.95rem; }
.md-content h1.md-h1 { font-size: 1.75rem; font-weight: 800; margin: 1.6rem 0 0.9rem; color: #0f172a; border-bottom: 2px solid #e5e7eb; padding-bottom: 0.4rem; }
.md-content h2.md-h2 { font-size: 1.35rem; font-weight: 700; margin: 1.4rem 0 0.7rem; color: #0f172a; }
.md-content h3.md-h3 { font-size: 1.1rem; font-weight: 700; margin: 1.1rem 0 0.5rem; color: #1e293b; }
.md-content p.md-p  { margin: 0.7rem 0; }
.md-content ul.md-ul, .md-content ol.md-ol { margin: 0.7rem 0 0.7rem 1.5rem; padding-left: 0.4rem; }
.md-content ul.md-ul { list-style: disc; }
.md-content ol.md-ol { list-style: decimal; }
.md-content ul.md-ul li, .md-content ol.md-ol li { margin: 0.25rem 0; }
.md-content blockquote.md-quote { border-left: 4px solid #2563eb; background: #eff6ff; padding: 0.6rem 1rem; margin: 1rem 0; color: #1e3a8a; border-radius: 0 6px 6px 0; }
.md-content hr.md-hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.5rem 0; }
.md-content a.md-link { color: #2563eb; text-decoration: underline; }
.md-content img.md-img { max-width: 100%; border-radius: 6px; margin: 0.8rem 0; }
.md-content code.inline-code { background: #f1f5f9; color: #db2777; padding: 0.1rem 0.35rem; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; }
.md-content strong { font-weight: 700; color: #0f172a; }
.md-content em { font-style: italic; }

/* ---- Code blocks ------------------------------------------------- */
.code-container { background: var(--rf-slate-950); border: 1px solid #1e293b; border-radius: 8px; overflow: hidden; margin: 1rem 0; }
.code-container .code-header { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.8rem; background: #131c31; border-bottom: 1px solid #1e293b; }
.code-container .code-lang { font-family: ui-monospace, monospace; font-size: 0.7rem; font-weight: 700; color: #93c5fd; text-transform: uppercase; letter-spacing: 0.05em; }
.md-code, .rf-code { background: var(--rf-slate-950) !important; color: #e2e8f0; padding: 1rem; margin: 0; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.6; }
.md-code code, .rf-code code { background: transparent; color: inherit; font-family: inherit; }

/* ---- Markdown tables --------------------------------------------- */
.table-responsive { overflow-x: auto; margin: 1rem 0; }
table.md-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.md-table th { background: #f1f5f9; text-align: left; padding: 0.5rem 0.75rem; border: 1px solid #e2e8f0; font-weight: 700; color: #0f172a; }
table.md-table td { padding: 0.5rem 0.75rem; border: 1px solid #e2e8f0; vertical-align: top; }
table.md-table tr:nth-child(even) td { background: #f8fafc; }

/* ---- Docs sidebar ------------------------------------------------ */
.docs-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-sidebar { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 0.75rem; position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); overflow-y: auto; }
.docs-sidebar .ds-link { display: block; padding: 0.4rem 0.6rem; border-radius: 6px; font-size: 0.82rem; color: #374151; margin: 0.1rem 0; }
.docs-sidebar .ds-link:hover { background: #f1f5f9; color: #111827; }
.docs-sidebar .ds-link.active { background: #2563eb; color: #fff; font-weight: 700; }
.docs-sidebar .ds-link.child { padding-left: 1.6rem; }

/* ---- Admin layout ------------------------------------------------ */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 1.25rem; align-items: start; min-height: calc(100vh - 3.5rem); }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-nav { background: #0f172a; color: #cbd5e1; border-radius: 8px; padding: 0.75rem; position: sticky; top: 4rem; }
.admin-nav a { display: block; padding: 0.5rem 0.7rem; border-radius: 6px; font-size: 0.82rem; font-weight: 600; color: #cbd5e1; margin: 0.1rem 0; }
.admin-nav a:hover { background: #1e293b; color: #fff; }
.admin-nav a.active { background: #2563eb; color: #fff; }
.admin-nav .an-head { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; padding: 0.4rem 0.7rem; margin-top: 0.6rem; }

/* ---- Form controls (admin) --------------------------------------- */
.rf-input, .rf-select, .rf-textarea {
  width: 100%; padding: 0.5rem 0.65rem; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 0.85rem; background: #fff; color: #111827; font-family: inherit;
}
.rf-input:focus, .rf-select:focus, .rf-textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.rf-textarea { font-family: ui-monospace, monospace; font-size: 0.8rem; min-height: 140px; line-height: 1.5; }
.rf-label { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #374151; margin-bottom: 0.25rem; }
.rf-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem; border-radius: 6px; font-size: 0.82rem; font-weight: 700; border: none; cursor: pointer; transition: background .15s; }
.rf-btn-primary { background: #2563eb; color: #fff; }
.rf-btn-primary:hover { background: #1d4ed8; }
.rf-btn-danger { background: #dc2626; color: #fff; }
.rf-btn-danger:hover { background: #b91c1c; }
.rf-btn-ghost { background: #f1f5f9; color: #374151; }
.rf-btn-ghost:hover { background: #e2e8f0; }

/* ---- Tables (admin) ---------------------------------------------- */
table.rf-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.rf-table th { text-align: left; padding: 0.5rem 0.6rem; background: #f1f5f9; border-bottom: 2px solid #e2e8f0; font-weight: 700; color: #334155; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.rf-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid #eef2f7; color: #1f2937; vertical-align: middle; }
table.rf-table tr:hover td { background: #f8fafc; }

/* ---- Badges ------------------------------------------------------ */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-draft { background: #fef9c3; color: #854d0e; }
.badge-get { background: #d1fae5; color: #065f46; }
.badge-post { background: #dbeafe; color: #1e40af; }
.badge-301 { background: #ede9fe; color: #5b21b6; }
.badge-302 { background: #ffedd5; color: #9a3412; }

/* ---- Cards / panels ---------------------------------------------- */
.rf-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem; }
.rf-card-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; margin-bottom: 0.5rem; }

/* ---- Tabs (article/doc editor language tabs) --------------------- */
.lang-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid #e5e7eb; margin-bottom: 0.75rem; }
.lang-tabs button { padding: 0.4rem 0.8rem; font-size: 0.78rem; font-weight: 700; border: none; background: transparent; color: #6b7280; border-bottom: 2px solid transparent; cursor: pointer; }
.lang-tabs button.active { color: #2563eb; border-bottom-color: #2563eb; }

/* ---- Alert boxes ------------------------------------------------- */
.rf-alert { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.82rem; margin-bottom: 1rem; }
.rf-alert-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.rf-alert-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.rf-alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ---- Misc utilities ---------------------------------------------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ====================================================================
   ADMIN CHROME (sidebar control panel layout)
   ==================================================================== */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f1f5f9; }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } .admin-sidebar { display: none; } }

.admin-sidebar { background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 1rem 0.85rem; }
.admin-brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.3rem 1rem; border-bottom: 1px solid #1e293b; margin-bottom: 0.8rem; }
.admin-brand-logo { width: 34px; height: 34px; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 900; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; }
.admin-brand-title { font-weight: 800; color: #fff; font-size: 0.95rem; line-height: 1.1; }
.admin-brand-sub { font-size: 0.66rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }

.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.admin-nav-link { display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.65rem; border-radius: 7px; color: #cbd5e1; font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: background .14s, color .14s; }
.admin-nav-link:hover { background: #1e293b; color: #fff; }
.admin-nav-link.active { background: #2563eb; color: #fff; box-shadow: 0 1px 4px rgba(37,99,235,0.35); }
.admin-nav-icon { width: 18px; text-align: center; font-size: 0.9rem; opacity: 0.8; }
.admin-nav-label { flex: 1; }
.admin-nav-hint { font-size: 0.62rem; color: #64748b; font-weight: 500; }
.admin-nav-link.active .admin-nav-hint { color: #bfdbfe; }

.admin-sidebar-foot { margin-top: auto; padding-top: 0.8rem; border-top: 1px solid #1e293b; }
.admin-ext-link { display: block; color: #64748b; font-size: 0.72rem; text-decoration: none; padding: 0.4rem 0.3rem; }
.admin-ext-link:hover { color: #93c5fd; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.4rem; background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.admin-page-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin: 0; }
.admin-topbar-right { display: flex; align-items: center; gap: 0.85rem; }
.admin-user { display: flex; align-items: center; gap: 0.6rem; }
.admin-user-name { font-size: 0.82rem; font-weight: 700; color: #0f172a; line-height: 1.1; }
.admin-user-email { font-size: 0.66rem; color: #6b7280; }
.admin-role-badge { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.18rem 0.45rem; border-radius: 5px; background: #dbeafe; color: #1e40af; }
.admin-role-badge.superadmin { background: #ddd6fe; color: #5b21b6; }
.admin-role-badge.editor { background: #d1fae5; color: #065f46; }
.admin-logout { font-size: 0.75rem; font-weight: 700; color: #dc2626; text-decoration: none; padding: 0.35rem 0.6rem; border-radius: 6px; }
.admin-logout:hover { background: #fef2f2; }

.admin-content { padding: 1.4rem; flex: 1; }

/* ---- Admin flash toast -------------------------------------------- */
.rf-admin-flash { position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 90; background: #0f172a; color: #fff; padding: 0.7rem 1.1rem; border-radius: 10px; font-size: 0.82rem; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,0.25); border: 1px solid #334155; display: flex; align-items: center; gap: 0.5rem; transition: opacity .35s, transform .35s; }
.rf-admin-flash::before { content: "✓"; color: #34d399; font-weight: 900; }
.rf-admin-flash.hide { opacity: 0; transform: translateY(8px); }

/* ---- Pills / badges (status, type) -------------------------------- */
.rf-pill { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.rf-pill.published { background: #d1fae5; color: #065f46; }
.rf-pill.draft { background: #fef3c7; color: #92400e; }
.rf-pill.archived { background: #f3f4f6; color: #6b7280; }
.rf-pill.get { background: #dbeafe; color: #1e40af; }
.rf-pill.post { background: #ede9fe; color: #5b21b6; }
.rf-pill.301 { background: #fde68a; color: #92400e; }
.rf-pill.302 { background: #bfdbfe; color: #1e40af; }
.rf-pill.default { background: #f1f5f9; color: #475569; }
.rf-pill.active { background: #d1fae5; color: #065f46; }
.rf-pill.disabled { background: #e5e7eb; color: #6b7280; }

/* ---- Admin metric cards ------------------------------------------- */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.metric-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 9px; padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.metric-label { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; }
.metric-value { font-size: 1.7rem; font-weight: 900; color: #0f172a; line-height: 1.1; margin: 0.15rem 0; }
.metric-hint { font-size: 0.62rem; font-weight: 700; }
.metric-hint.green { color: #059669; }
.metric-hint.blue { color: #2563eb; }
.metric-hint.indigo { color: #4f46e5; }
.metric-hint.emerald { color: #10b981; }

/* ---- Admin section header (toolbar) ------------------------------- */
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; background: #fff; border: 1px solid #e5e7eb; border-radius: 9px; padding: 0.9rem 1.1rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.admin-toolbar h2 { font-size: 0.95rem; font-weight: 800; color: #0f172a; margin: 0; }
.admin-table-meta { font-size: 0.66rem; color: #6b7280; font-family: ui-monospace, monospace; }

/* ---- Admin panel (white card) ------------------------------------- */
.admin-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 1.2rem; }
.admin-panel-title { font-size: 0.95rem; font-weight: 800; color: #0f172a; margin: 0 0 0.2rem; }
.admin-panel-sub { font-size: 0.7rem; color: #6b7280; margin: 0 0 1rem; }

/* ---- Router health item (dashboard) ------------------------------- */
.router-item { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 7px; padding: 0.6rem 0.75rem; margin-bottom: 0.5rem; }
.router-item-head { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; color: #9ca3af; letter-spacing: 0.05em; }
.router-item-val { font-family: ui-monospace, monospace; font-size: 0.74rem; font-weight: 600; color: #047857; margin-top: 0.15rem; }
.router-item-val.neutral { color: #374151; }

/* ---- Admin form layout -------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-row { margin-bottom: 1rem; }
.form-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.lang-editor-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 1.1rem; margin-top: 0.8rem; }

/* ---- Inline list row (categories/redirects/languages) ------------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.8rem 1rem; }
.list-row + .list-row { border-top: 1px solid #f1f5f9; }
.list-row-title { font-size: 0.86rem; font-weight: 700; color: #0f172a; }
.list-row-sub { font-size: 0.68rem; color: #9ca3af; font-family: ui-monospace, monospace; }
.list-row-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ---- Icon action buttons ----------------------------------------- */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.8rem; background: #f1f5f9; color: #475569; text-decoration: none; }
.icon-btn:hover { background: #e2e8f0; }
.icon-btn.danger { background: #fef2f2; color: #dc2626; }
.icon-btn.danger:hover { background: #fee2e2; }

/* ---- Empty state -------------------------------------------------- */
.empty-state { text-align: center; padding: 2.2rem 1rem; color: #9ca3af; font-size: 0.85rem; }

/* ---- Search input inline ----------------------------------------- */
.search-inline { position: relative; }
.search-inline svg { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #94a3b8; }
.search-inline .rf-input { padding-left: 2rem; }

/* ---- Responsive table scroll ------------------------------------- */
.table-scroll { overflow-x: auto; }
/* ====================================================================
   ADMIN DASHBOARD STYLES
   ==================================================================== */

/* Metric cards */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}
.metric-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.metric-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}
.metric-value {
    font-size: 1.7rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin: 0.15rem 0;
}
.metric-hint {
    font-size: 0.62rem;
    font-weight: 700;
}
.metric-hint.green { color: #059669; }
.metric-hint.blue { color: #2563eb; }
.metric-hint.indigo { color: #4f46e5; }
.metric-hint.emerald { color: #10b981; }

/* Admin panels */
.admin-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.2rem;
}
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.admin-toolbar h2 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.admin-table-meta {
    font-size: 0.66rem;
    color: #6b7280;
    font-family: ui-monospace, monospace;
}

/* Buttons */
.rf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}
.rf-btn-primary {
    background: #2563eb;
    color: #fff;
}
.rf-btn-primary:hover {
    background: #1d4ed8;
}
.rf-btn-danger {
    background: #dc2626;
    color: #fff;
}
.rf-btn-danger:hover {
    background: #b91c1c;
}
.rf-btn-ghost {
    background: #f1f5f9;
    color: #374151;
}
.rf-btn-ghost:hover {
    background: #e2e8f0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.2rem 1rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Pills / badges */
.rf-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.rf-pill.published { background: #d1fae5; color: #065f46; }
.rf-pill.draft { background: #fef3c7; color: #92400e; }
.rf-pill.archived { background: #f3f4f6; color: #6b7280; }
.rf-pill.get { background: #dbeafe; color: #1e40af; }
.rf-pill.post { background: #ede9fe; color: #5b21b6; }
.rf-pill.301 { background: #fde68a; color: #92400e; }
.rf-pill.302 { background: #bfdbfe; color: #1e40af; }
.rf-pill.default { background: #f1f5f9; color: #475569; }
.rf-pill.active { background: #d1fae5; color: #065f46; }
.rf-pill.disabled { background: #e5e7eb; color: #6b7280; }

/* Router health items */
.router-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
}
.router-item-head {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.05em;
}
.router-item-val {
    font-family: ui-monospace, monospace;
    font-size: 0.74rem;
    font-weight: 600;
    color: #047857;
    margin-top: 0.15rem;
}
.router-item-val.neutral {
    color: #374151;
}

/* Admin tables */
.rf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.rf-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    background: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    color: #334155;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rf-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #eef2f7;
    color: #1f2937;
    vertical-align: middle;
}
.rf-table tr:hover td {
    background: #f8fafc;
}
.table-scroll {
    overflow-x: auto;
}

/* List rows */
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
}
.list-row + .list-row {
    border-top: 1px solid #f1f5f9;
}
.list-row-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
}
.list-row-sub {
    font-size: 0.68rem;
    color: #9ca3af;
    font-family: ui-monospace, monospace;
}
.list-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Icon buttons */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
}
.icon-btn:hover {
    background: #e2e8f0;
}
.icon-btn.danger {
    background: #fef2f2;
    color: #dc2626;
}
.icon-btn.danger:hover {
    background: #fee2e2;
}

/* Form elements */
.rf-input, .rf-select, .rf-textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    color: #111827;
    font-family: inherit;
}
.rf-input:focus, .rf-select:focus, .rf-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.rf-textarea {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    min-height: 140px;
    line-height: 1.5;
}
.rf-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    margin-bottom: 0.25rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.form-row {
    margin-bottom: 1rem;
}
.form-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Language tabs */
.lang-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}
.lang-tabs button {
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    border: none;
    background: transparent;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.lang-tabs button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.lang-editor-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.1rem;
    margin-top: 0.8rem;
}

/* Alerts */
.rf-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}
.rf-alert-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.rf-alert-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.rf-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Search inline */
.search-inline {
    position: relative;
}
.search-inline svg {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #94a3b8;
}
.search-inline .rf-input {
    padding-left: 2rem;
}

/* Text utilities */
.text-right {
    text-align: right;
}
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #475569; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
