/* =============================================================
   Robeeta SSO — canonical theme
   Mirrors D:\svn\robeeta\robeeta-sso\markdown\theme.html verbatim.
   Identical copies live in:
     Robeeta.SSO.AdminConsole/wwwroot/css/site.css
     Robeeta.SSO.LoginConsole/wwwroot/css/site.css
     Robeeta.SSO.DemoConsole/wwwroot/css/site.css
   Keep the three in sync — never tweak one without the others.
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    color: #1a2332;
    background: #f0f2f5;
}

a { color: #206bc4; }

code, kbd, samp, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── App shell ─────────────────────────── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Brand (in topbar) ─────────────────── */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-icon {
    width: 30px;
    height: 30px;
    background: #206bc4;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.brand-icon i { font-size: 16px; line-height: 1; }
.brand-icon svg { width: 17px; height: 17px; }
.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.01em;
}

/* ── Main area ─────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ── Topbar ────────────────────────────── */
.topbar {
    min-height: 52px;
    background: #ffffff;
    border-bottom: 1px solid #e6e9ef;
    display: flex;
    align-items: center;
    gap: 0.5rem 1.5rem;
    flex-wrap: wrap;
    padding: 0.4rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

/* ── Top navigation (horizontal menu) ──── */
.topnav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.topnav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #5a6b80;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}
.topnav-item:hover { background: #f1f4f9; color: #1a2332; }
.topnav-item.active { background: #206bc4; color: #ffffff; }
.topnav-item i { flex-shrink: 0; font-size: 16px; opacity: 0.8; line-height: 1; }
.topnav-item.active i { opacity: 1; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #206bc4;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: #3d4a5c; }

/* ── User menu (dropdown) ─────────────── */
.user-menu-wrap { position: relative; }
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.45rem 0.2rem 0.2rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    color: #1a2332;
    transition: background 0.12s, border-color 0.12s;
}
.user-menu-trigger:hover { background: #f0f2f5; border-color: #e6e9ef; }
.user-menu-trigger:focus-visible { outline: 2px solid #206bc4; outline-offset: 1px; }
.user-menu-trigger .chevron {
    width: 14px; height: 14px; color: #6b7a90;
    transition: transform 0.12s ease;
}
.user-menu-wrap.open .user-menu-trigger .chevron { transform: rotate(180deg); }
.user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(26,35,50,0.12);
    padding: 0.3rem;
    display: none;
    z-index: 20;
}
.user-menu-wrap.open .user-menu { display: block; }
.user-menu-header {
    padding: 0.5rem 0.65rem 0.55rem;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 0.3rem;
}
.user-menu-header .name {
    font-size: 13px; font-weight: 700; color: #1a2332;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu-header .email {
    display: block; margin-top: 2px;
    font-size: 12px; color: #6b7a90;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.65rem;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    color: #3d4a5c;
    background: transparent;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}
.user-menu-item:hover { background: #f0f2f5; color: #1a2332; }
.user-menu-item i, .user-menu-item .icon {
    width: 15px; height: 15px;
    flex-shrink: 0;
    color: #6b7a90;
    font-size: 15px;
    line-height: 1;
}
.user-menu-item.danger { color: #b91c1c; }
.user-menu-item.danger:hover { background: #fff0f0; color: #991b1b; }
.user-menu-item.danger i, .user-menu-item.danger .icon { color: #d63939; }
.user-menu form { margin: 0; }

/* ── Content ───────────────────────────── */
.content { flex: 1; padding: 1.5rem; }

/* ── Page header ───────────────────────── */
.page-header { margin-bottom: 1.25rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-header-text h1 { font-size: 1.15rem; font-weight: 700; color: #1a2332; letter-spacing: -0.01em; margin: 0; }
.page-header-text p { font-size: 13px; color: #6b7a90; margin: 0.2rem 0 0; }
.page-header-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.9rem;
    height: 34px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    color: #fff;
    background: #206bc4;
    border: 1px solid #206bc4;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.btn-primary:hover { background: #1a5ba8; border-color: #1a5ba8; color: #fff; }
.btn-primary:disabled { background: #9aa5b4; border-color: #9aa5b4; cursor: not-allowed; }
.btn-primary i { font-size: 14px; line-height: 1; }

.btn-row {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0 0.7rem; height: 34px; font-size: 12px;
    font-family: inherit; font-weight: 600;
    color: #3d4a5c; background: #fff;
    border: 1px solid #ccd3dd; border-radius: 5px;
    text-decoration: none; cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-row:hover { background: #f0f2f5; border-color: #b0bac8; color: #1a2332; }
.btn-row.danger { color: #991b1b; border-color: #f5c2c2; }
.btn-row.danger:hover { background: #fff0f0; border-color: #d63939; color: #991b1b; }
.btn-row form { display: inline; margin: 0; }
.btn-row button { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.btn-row i { font-size: 14px; line-height: 1; }

/* Semantic action buttons — edit (amber), save (green), delete (red); uniform height, icon + text */
.btn-edit, .btn-save, .btn-delete {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0 0.9rem; height: 34px; font-size: 13px;
    font-family: inherit; font-weight: 600;
    border-radius: 6px; border: 1px solid transparent;
    color: #fff; text-decoration: none; cursor: pointer;
    transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.btn-edit i, .btn-save i, .btn-delete i { font-size: 14px; line-height: 1; }
.btn-edit { background: #f59f00; border-color: #f59f00; }
.btn-edit:hover { background: #e08e00; border-color: #e08e00; color: #fff; }
.btn-save { background: #2fb344; border-color: #2fb344; }
.btn-save:hover { background: #28a03c; border-color: #28a03c; color: #fff; }
.btn-delete { background: #d63939; border-color: #d63939; }
.btn-delete:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-edit:disabled, .btn-save:disabled, .btn-delete:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-danger {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0 0.9rem; height: 34px; font-size: 13px;
    font-family: inherit; font-weight: 600;
    color: #fff; background: #d63939;
    border: 1px solid #d63939; border-radius: 6px;
    text-decoration: none; cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-danger:disabled { background: #f5c2c2; border-color: #f5c2c2; cursor: not-allowed; }
.btn-danger i { font-size: 14px; line-height: 1; }

.btn-block { width: 100%; justify-content: center; }

/* ── Card ──────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(26,35,50,0.05);
    overflow: hidden;
}
.card + .card { margin-top: 1.25rem; }
.card-header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #e6e9ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.card-header h2 { font-size: 13.5px; font-weight: 700; color: #1a2332; margin: 0; }
.card-body { padding: 1.25rem; }

/* ── Table ─────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 0.55rem 1rem;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #6b7a90;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e6e9ef;
    white-space: nowrap;
    background: #f9fafb;
}
tbody td {
    padding: 0.7rem 1rem;
    font-size: 13.5px;
    color: #1a2332;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f9fafb; }
.row-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.cell-strong { font-weight: 600; color: #1a2332; }
.cell-sub { font-size: 11.5px; color: #6b7a90; }

/* ── Badges ────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-orange { background: #ffedd5; color: #9a3412; }

/* ── Form controls ─────────────────────── */
.form-input {
    padding: 0.45rem 0.65rem;
    font-size: 13.5px; font-family: inherit;
    color: #1a2332; background: #fff;
    border: 1px solid #ccd3dd; border-radius: 6px;
    outline: none; width: 100%;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.form-input:focus { border-color: #206bc4; box-shadow: 0 0 0 3px rgba(32,107,196,0.15); }
.form-input.error, .form-input.input-validation-error {
    border-color: #d63939;
    box-shadow: 0 0 0 3px rgba(214,57,57,0.12);
}
.form-input:disabled, .form-input[readonly] {
    background: #f9fafb; color: #6b7a90; cursor: not-allowed;
}
.form-textarea { resize: vertical; min-height: 72px; }
.form-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.form-label {
    display: block;
    font-size: 12px; font-weight: 600; color: #3d4a5c;
    margin-bottom: 0.35rem;
}
.field-help { display: block; font-size: 12px; color: #6b7a90; margin-top: 0.25rem; }
.field-validation-error { display: block; font-size: 12px; color: #d63939; margin-top: 0.25rem; }
.check-group { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; color: #3d4a5c; }
.check-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: #206bc4; cursor: pointer; }
.required-marker { color: #d63939; margin-left: 0.15rem; font-weight: 700; }

/* ── Form layout helpers (porting addition) ──── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}
.form-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .field-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; }
.form-actions {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f2f5;
}
.form-actions.no-divider { margin-top: 1rem; padding-top: 0; border-top: none; }
.form-actions .spacer { flex: 1; }

.toolbar-row {
    display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
}
.toolbar-row .form-group { flex: 0 0 auto; min-width: 180px; }
.toolbar-row .toolbar-actions { display: flex; gap: 0.4rem; align-items: center; padding-bottom: 1px; }

/* ── Flash messages ────────────────────── */
.alert-flash {
    border-radius: 6px; padding: 0.65rem 0.85rem; font-size: 13px;
    margin-bottom: 1rem;
}
.alert-flash:last-child { margin-bottom: 0; }
.alert-flash.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-flash.error   { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; }
.alert-flash.warning { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.alert-flash.info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.alert-flash i { margin-right: 0.35rem; }

/* ── Empty state ───────────────────────── */
.empty { text-align: center; padding: 3rem 1.5rem; color: #9aa5b4; }
.empty i, .empty svg { width: 40px; height: 40px; margin-bottom: 0.75rem; opacity: 0.4; font-size: 40px; line-height: 1; display: inline-block; }
.empty p { font-size: 14px; margin: 0; }
.empty .empty-cta { margin-top: 1rem; }

/* ── Pager ─────────────────────────────── */
.pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; padding: 0.75rem 1.25rem;
    border-top: 1px solid #e6e9ef; background: #f9fafb;
    font-size: 13px; color: #475569; flex-wrap: wrap;
}
.pager-info { color: #6b7280; }
.pager-info strong { color: #1a2332; font-weight: 600; }
.pager-controls { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.pager-btn {
    display: inline-flex; align-items: center;
    padding: 0.3rem 0.6rem;
    font-size: 12px; font-weight: 600;
    color: #3d4a5c; background: #fff; border: 1px solid #ccd3dd;
    border-radius: 5px; text-decoration: none; cursor: pointer;
}
.pager-btn:hover:not(.disabled) { background: #f0f2f5; border-color: #b0bac8; color: #1a2332; }
.pager-btn.current { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.pager-btn.disabled { color: #c0c8d4; cursor: default; background: #fafbfc; }
.pager-size { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.pager-size label { font-size: 12px; color: #6b7280; }
.pager-size select {
    padding: 0.25rem 0.4rem;
    font-size: 12px;
    border: 1px solid #ccd3dd;
    border-radius: 5px;
    background: #fff;
}

/* ── Delete confirm ────────────────────── */
.delete-confirm-row {
    display: flex; flex-direction: column; gap: 0.35rem;
    margin-bottom: 1rem;
}
.delete-confirm-row label {
    font-size: 12px; font-weight: 600; color: #3d4a5c;
}
.delete-confirm-row label code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; padding: 1px 5px;
    background: #fff0f0; color: #991b1b;
    border-radius: 3px; border: 1px solid #f5c2c2;
}
.delete-confirm-row input[type=text] {
    padding: 0.4rem 0.65rem;
    font-size: 13.5px; font-family: inherit;
    color: #1a2332; background: #fff;
    border: 1px solid #ccd3dd; border-radius: 6px;
    outline: none;
    max-width: 320px;
}
.delete-confirm-row input[type=text]:focus {
    border-color: #d63939; box-shadow: 0 0 0 3px rgba(214,57,57,0.15);
}
.delete-confirm-actions { display: flex; gap: 0.5rem; }

/* ── Module card grid ──────────────────── */
.module-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem;
}
.module-card {
    background: #fff; border: 1px solid #e6e9ef; border-radius: 10px;
    padding: 1.1rem 1.15rem; text-decoration: none; color: inherit;
    display: flex; align-items: center; gap: 0.9rem;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.module-card:hover { box-shadow: 0 4px 16px rgba(26,35,50,0.1); border-color: #b0bac8; transform: translateY(-1px); }
.module-icon { width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; }
.module-icon i { font-size: 20px; line-height: 1; }
.module-icon svg { width: 20px; height: 20px; }
.module-info { flex: 1; min-width: 0; }
.module-name { font-size: 13.5px; font-weight: 700; color: #1a2332; margin-bottom: .15rem; }
.module-desc { font-size: 12px; color: #6b7a90; line-height: 1.4; }
.module-arrow { color: #9aa5b4; flex-shrink: 0; transition: color .12s, transform .12s; font-size: 16px; }
.module-arrow i { font-size: 16px; line-height: 1; }
.module-card:hover .module-arrow { color: #206bc4; transform: translateX(3px); }

/* ── Meta grid (detail page) ───────────── */
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1rem 1.25rem; }
.meta-cell label { display: block; font-size: 11px; font-weight: 700; color: #6b7a90; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.meta-cell .value { font-size: 13.5px; color: #1a2332; font-weight: 600; word-break: break-word; }
.meta-cell .value .muted { color: #6b7a90; font-weight: 400; }
.meta-cell .value code { font-size: 12px; }

/* ── Definition list (key/value rows in cards) ── */
.def-list { display: grid; grid-template-columns: 160px 1fr; gap: 0.5rem 1rem; font-size: 13px; }
.def-list dt { color: #6b7a90; font-weight: 500; }
.def-list dd { color: #1a2332; font-weight: 500; margin: 0; word-break: break-word; }
.def-list dd code { font-size: 12px; }

/* ── Progress bar ──────────────────────── */
.progress-bar-wrap { display: flex; align-items: center; gap: 0.5rem; }
.progress-bar { flex: 1; height: 6px; background: #e6e9ef; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: #206bc4; border-radius: 3px; }
.progress-label { font-size: 11.5px; color: #6b7a90; white-space: nowrap; }

/* ── Auth pages (centered single card) ──── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #f0f2f5;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.75rem;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(26,35,50,0.05);
}
.auth-card.wide { max-width: 520px; }
.auth-brand {
    display: flex; align-items: center; justify-content: center;
    gap: 0.55rem; margin-bottom: 1.5rem;
    font-size: 15px; font-weight: 700;
    color: #1a2332; text-decoration: none;
    letter-spacing: -0.01em;
}
.auth-title {
    font-size: 1.15rem; font-weight: 700; color: #1a2332;
    letter-spacing: -0.01em; margin: 0 0 0.25rem;
    text-align: center;
}
.auth-sub {
    font-size: 13px; color: #6b7a90; text-align: center;
    margin: 0 0 1.5rem;
}
.auth-hero {
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 0.75rem; font-size: 2rem; line-height: 1;
    color: #206bc4;
}
.auth-hero.success { color: #166534; }
.auth-hero.danger  { color: #d63939; }
.auth-card .form-group + .form-group { margin-top: 1rem; }
.auth-card .form-actions { margin-top: 1.25rem; padding-top: 0; border-top: none; }
.auth-foot {
    margin-top: 1.5rem; text-align: center;
    font-size: 11.5px; color: #9aa5b4;
}
.auth-card .pw-wrap { position: relative; }
.auth-card .pw-toggle {
    position: absolute; right: 0.35rem; top: 50%;
    transform: translateY(-50%);
    background: transparent; border: none;
    padding: 0.3rem 0.45rem;
    color: #6b7a90; cursor: pointer; line-height: 1;
    border-radius: 4px; font-size: 14px;
}
.auth-card .pw-toggle:hover { background: #f0f2f5; color: #1a2332; }

/* ── Tenant context header (admin) ────── */
.tenant-context {
    margin-bottom: 1rem;
    padding: 0.85rem 1.1rem;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(26,35,50,0.05);
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; flex-wrap: wrap;
}
.tenant-context .crumb {
    font-size: 11px; color: #6b7a90;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 700;
    display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
}
.tenant-context .crumb a { color: #6b7a90; text-decoration: none; }
.tenant-context .crumb a:hover { color: #206bc4; }
.tenant-context .tenant-name {
    font-size: 1rem; font-weight: 700; color: #1a2332;
    margin-top: 0.1rem;
}
.tenant-context .tenant-slug {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; color: #6b7a90;
}
.tenant-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tenant-tabs .btn-row.active {
    background: #206bc4; border-color: #206bc4; color: #fff;
}

/* ── Metric tile (dashboard) ───────────── */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.metric-tile {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(26,35,50,0.05);
    padding: 1rem 1.1rem;
    display: flex; align-items: center; gap: 0.85rem;
}
.metric-icon {
    width: 40px; height: 40px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 18px;
}
.metric-label {
    font-size: 11px; font-weight: 700; color: #6b7a90;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.metric-value {
    font-size: 1.25rem; font-weight: 700; color: #1a2332;
    line-height: 1.1; margin-top: 0.1rem;
}
.metric-meta { font-size: 11.5px; color: #6b7a90; margin-top: 0.15rem; }

/* ── Misc utility helpers (porting addition) ── */
.text-muted { color: #6b7a90; }
.text-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    background: #f1f5f9;
    color: #1a2332;
    padding: 1px 5px; border-radius: 3px;
    border: 1px solid #e6e9ef;
}
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.cluster { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.spacer-1 { height: 1rem; }
.text-success { color: #166534; }
.text-danger { color: #d63939; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-1 { width: 1px; white-space: nowrap; }

/* ── Responsive ────────────────────────── */
@media (max-width: 768px) {
    .user-name { display: none; }
    .meta-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
    .def-list { grid-template-columns: minmax(0, 1fr); gap: 0.2rem 0; }
    .def-list dt { padding-top: 0.5rem; }
    .content { padding: 1rem; }
    .topbar { padding: 0.4rem 1rem; }
    .topbar-right { margin-left: auto; }
    .topnav { order: 2; flex-basis: 100%; }
}
