/* Source of truth: admin UI styles are maintained in this file and served directly from /assets/admin/css/app.css. */
:root {
    --sidebar-width: 244px;
    --sidebar-collapsed-width: 68px;
    --header-height: 56px;

    --admin-bg: #f4f6f9;
    --admin-surface: #ffffff;
    --admin-surface-muted: #fafbfc;
    --admin-border: #e4e7ec;
    --admin-border-soft: #eef0f4;
    --admin-border-strong: #d6d9e0;

    --admin-text: #0f1729;
    --admin-text-strong: #0a0f1c;
    --admin-text-muted: #5b6373;
    --admin-text-subtle: #8a90a0;
    --admin-text-faint: #aab0bd;

    --admin-accent: #3b5bdb;
    --admin-accent-hover: #2f4ac0;
    --admin-accent-soft: #eef0fb;
    --admin-accent-soft-strong: #d8def5;
    --sidebar-active-bg: #f2f6ff;
    --sidebar-active-border: #032876;
    --sidebar-active-text: #2f5fd8;

    --tone-positive: #047a55;
    --tone-positive-bg: #e8f6f0;
    --tone-warning: #946000;
    --tone-warning-bg: #fdf3e1;
    --tone-critical: #b1322c;
    --tone-critical-bg: #fdeaea;
    --tone-neutral: #475467;
    --tone-neutral-bg: #f1f3f7;

    --shadow-card: 0 1px 0 rgba(15, 23, 41, 0.02), 0 1px 2px rgba(15, 23, 41, 0.04);
    --shadow-elevated: 0 4px 12px rgba(15, 23, 41, 0.06), 0 1px 2px rgba(15, 23, 41, 0.04);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    /* Typography scale */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

    --fs-body: 14px;
    --fs-table: 13px;
    --fs-small: 12.5px;
    --fs-tiny: 11.5px;
    --fs-h1: 22px;
    --fs-h2: 16px;
    --fs-h3: 15px;
    --fs-metric: 24px;

    --lh-base: 1.55;
    --lh-tight: 1.25;
    --lh-flat: 1.1;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-base);
    color: var(--admin-text);
    background-color: var(--admin-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--admin-text-strong);
    letter-spacing: -0.01em;
}

a {
    color: var(--admin-accent);
    text-decoration: none;
}

a:hover {
    color: var(--admin-accent-hover);
}

code {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    color: var(--admin-text);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

/* Layout shell */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.18s ease;
    display: flex;
    flex-direction: column;
}

.admin-shell.is-sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-collapsed-width);
}

.admin-content {
    padding: 24px 28px 32px;
    flex: 1;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--admin-surface);
    border-right: 1px solid var(--admin-border-soft);
    display: flex;
    flex-direction: column;
    transition: width 0.18s ease, transform 0.2s ease;
    z-index: 1030;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-collapsed-width);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--header-height);
    padding: 0 18px;
    border-bottom: 1px solid var(--admin-border-soft);
    color: var(--admin-text-strong);
    text-decoration: none;
    font-weight: 600;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-height: 24px;
    width: auto;
    display: block;
}

.brand-logo-icon {
    display: none;
}

.brand-logo-icon img {
    max-height: 22px;
}

.logo-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder.small {
    width: 22px;
    height: 22px;
    font-size: 11px;
    border-radius: 6px;
}

.brand-meta {
    margin-left: auto;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--admin-text-subtle);
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    padding: 2px 7px;
    border-radius: 999px;
}

.admin-shell.is-sidebar-collapsed .brand {
    justify-content: center;
    padding: 0;
}

.admin-shell.is-sidebar-collapsed .brand-logo-full,
.admin-shell.is-sidebar-collapsed .brand-meta {
    display: none;
}

.admin-shell.is-sidebar-collapsed .brand-logo-icon {
    display: inline-flex;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--admin-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px 4px;
}

.admin-shell.is-sidebar-collapsed .sidebar-section-label {
    visibility: hidden;
    height: 4px;
    padding: 0;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 38px;
    padding: 9px 13px;
    margin: 1px 2px;
    border-radius: var(--radius-lg);
    color: #4f5a72;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
    white-space: nowrap;
}

.sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #66708a;
    transition: color 0.14s ease;
}

.sidebar-link:hover {
    background: #f7f9fd;
    color: var(--admin-text-strong);
}

.sidebar-link:hover i {
    color: var(--admin-text);
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(63, 110, 232, 0.06);
}

.sidebar-link.active i {
    color: var(--sidebar-active-text);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 7px;
    bottom: 7px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--sidebar-active-border);
}

.sidebar-link.disabled-link {
    cursor: not-allowed;
    color: var(--admin-text-faint);
}

.sidebar-link.disabled-link:hover {
    background: transparent;
    color: var(--admin-text-faint);
}

.sidebar-tag {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: var(--admin-text-subtle);
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    padding: 1px 6px;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
}

.admin-shell.is-sidebar-collapsed .sidebar-link {
    justify-content: center;
    min-height: 40px;
    padding: 9px 0;
}

.admin-shell.is-sidebar-collapsed .sidebar-link span:not(.sidebar-tag),
.admin-shell.is-sidebar-collapsed .sidebar-tag {
    display: none;
}

.admin-shell.is-sidebar-collapsed .sidebar-link.active::before {
    display: none;
}

.sidebar-footer {
    border-top: 1px solid var(--admin-border-soft);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.sidebar-footer-label {
    color: var(--admin-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sidebar-footer-value {
    color: var(--admin-text-muted);
    font-weight: 500;
    font-feature-settings: 'tnum';
}

.admin-shell.is-sidebar-collapsed .sidebar-footer {
    display: none;
}

/* Header */
.admin-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 22px;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border-soft);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--admin-text-muted);
}

.btn-icon:hover {
    background: var(--admin-surface-muted);
    color: var(--admin-text-strong);
}

.header-logo img {
    max-height: 22px;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border-soft);
    padding: 0 10px;
    border-radius: var(--radius-md);
    min-width: 320px;
    max-width: 440px;
    height: 34px;
    color: var(--admin-text-subtle);
    flex: 1;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.header-search:focus-within {
    background: var(--admin-surface);
    border-color: var(--admin-accent-soft-strong);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.header-search i {
    font-size: 14px;
}

.header-search input {
    border: 0;
    outline: none;
    background: transparent;
    flex: 1;
    color: var(--admin-text-strong);
    font-size: 13px;
}

.header-search input::placeholder {
    color: var(--admin-text-subtle);
}

.header-search-kbd {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--admin-text-subtle);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    padding: 1px 5px;
    box-shadow: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-alert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tone-warning);
    box-shadow: 0 0 0 3px rgba(244, 162, 35, 0.18);
    display: inline-block;
}

.env-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--tone-neutral-bg);
    color: var(--tone-neutral);
    border: 1px solid var(--admin-border-soft);
}

.env-badge.env-local {
    background: var(--tone-warning-bg);
    color: var(--tone-warning);
    border-color: rgba(148, 96, 0, 0.18);
}

.user-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--admin-text-strong);
    font-weight: 500;
    font-size: 13px;
}

.user-button:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-soft);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--admin-accent-soft);
    color: var(--admin-accent-hover);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.user-name {
    font-weight: 600;
    color: var(--admin-text-strong);
    font-size: 12.5px;
}

.user-role {
    font-size: 10.5px;
    color: var(--admin-text-subtle);
    font-weight: 500;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--admin-border-soft);
}

.page-header-text {
    min-width: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-header h1 {
    margin: 0 0 4px;
    font-size: var(--fs-h1);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: var(--lh-tight);
    color: var(--admin-text-strong);
}

.page-header p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-body);
    max-width: 640px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 13px;
    padding: 6px 12px;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12.5px;
}

.btn-primary {
    background: var(--admin-text-strong);
    border-color: var(--admin-text-strong);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
}

.btn-light {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    color: var(--admin-text-strong);
}

.btn-light:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
    color: var(--admin-text-strong);
}

/* Self-contained ghost button — works with or without Bootstrap .btn.
   Provides its own height, padding, radius, font so removing .btn
   from the markup never produces an unstyled native <button>. */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-strong);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-ghost.btn-sm,
.btn-ghost-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 12.5px;
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
    color: var(--admin-text-strong);
}

.btn-outline-primary {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    color: var(--admin-text-strong);
}

.btn-outline-primary:hover {
    background: var(--admin-accent-soft);
    border-color: var(--admin-accent-soft-strong);
    color: var(--admin-accent-hover);
}

.btn-outline-secondary,
.btn-outline-danger {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text-strong);
}

.btn-outline-danger {
    color: var(--tone-critical);
}

.btn-outline-danger:hover {
    background: var(--tone-critical-bg);
    border-color: var(--tone-critical-bg);
    color: var(--tone-critical);
}

/* Eyebrow */
.eyebrow {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--admin-text-subtle);
    margin-bottom: 6px;
}

/* Summary cards — fixed column layout per breakpoint, no widget chaos */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 1199.98px) {
    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 419.98px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-lg);
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background-color 0.12s ease, border-color 0.12s ease;
    position: relative;
}

.summary-card:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
}

.summary-label {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--admin-text-muted);
    letter-spacing: 0;
}

.summary-value {
    font-size: var(--fs-metric);
    font-weight: 600;
    color: var(--admin-text-strong);
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum';
    line-height: var(--lh-flat);
    margin-top: 2px;
}

.summary-delta {
    font-size: var(--fs-tiny);
    font-weight: 500;
    color: var(--admin-text-subtle);
}

.summary-card.tone-positive .summary-delta {
    color: var(--tone-positive);
}

.summary-card.tone-warning .summary-delta {
    color: var(--tone-warning);
}

.summary-card.tone-critical .summary-delta {
    color: var(--tone-critical);
}

/* Operations panel */
.ops-panel {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-lg);
    padding: 18px 20px 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.ops-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.ops-panel-head h2 {
    margin: 0 0 2px;
    font-size: var(--fs-h3);
    font-weight: 600;
    color: var(--admin-text-strong);
    letter-spacing: -0.01em;
}

.ops-panel-head p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.ops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0 -20px;
    border-top: 1px solid var(--admin-border-soft);
}

@media (max-width: 991.98px) {
    .ops-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .ops-grid {
        grid-template-columns: 1fr;
    }
}

.ops-item {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--admin-surface);
    position: relative;
}

.ops-grid > .ops-item:not(:nth-child(3n)) {
    border-right: 1px solid var(--admin-border-soft);
}

.ops-grid > .ops-item:nth-child(n + 4) {
    border-top: 1px solid var(--admin-border-soft);
}

@media (max-width: 991.98px) {
    .ops-grid > .ops-item:not(:nth-child(3n)) {
        border-right: 0;
    }

    .ops-grid > .ops-item:not(:nth-child(2n)) {
        border-right: 1px solid var(--admin-border-soft);
    }

    .ops-grid > .ops-item:nth-child(n + 4) {
        border-top: 0;
    }

    .ops-grid > .ops-item:nth-child(n + 3) {
        border-top: 1px solid var(--admin-border-soft);
    }
}

@media (max-width: 575.98px) {
    .ops-grid > .ops-item {
        border-right: 0 !important;
    }

    .ops-grid > .ops-item + .ops-item {
        border-top: 1px solid var(--admin-border-soft);
    }
}

.ops-item::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 20px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-text-faint);
}

.ops-item.tone-positive::before {
    background: var(--tone-positive);
}

.ops-item.tone-warning::before {
    background: var(--tone-warning);
}

.ops-item.tone-critical::before {
    background: var(--tone-critical);
}

.ops-label {
    font-size: 11px;
    color: var(--admin-text-subtle);
    margin-left: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ops-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-strong);
    margin-left: 14px;
    letter-spacing: -0.005em;
    font-feature-settings: 'tnum';
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
}

@media (max-width: 1199.98px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border-soft);
    min-height: 56px;
}

.panel-header h2 {
    margin: 0 0 2px;
    font-size: var(--fs-h3);
    font-weight: 600;
    color: var(--admin-text-strong);
    letter-spacing: -0.01em;
}

.panel-header p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.45;
}

/* Filter panel — flat row, sits above the data panel without competing */
.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 0 12px;
    margin-bottom: 12px;
    box-shadow: none;
}

.filter-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-control label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--admin-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 991.98px) {
    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .filter-panel {
        grid-template-columns: 1fr;
    }
}

/* Form controls */
.form-control,
.form-select {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    color: var(--admin-text-strong);
    font-size: 13px;
    padding: 6px 10px;
    height: 34px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-control::placeholder {
    color: var(--admin-text-subtle);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--admin-accent-soft-strong);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
    outline: none;
}

/* ==========================================================
   Data table — universal admin table system
   ========================================================== */

.admin-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.admin-table thead th {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--admin-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: transparent;
    border-bottom: 1px solid var(--admin-border);
    border-top: 0;
    padding: 0 14px;
    height: 36px;
    white-space: nowrap;
    line-height: 1;
    vertical-align: middle;
}

.admin-table tbody td {
    height: 56px;
    padding: 0 14px;
    border-top: 1px solid var(--admin-border-soft);
    border-bottom: 0;
    color: var(--admin-text);
    font-size: var(--fs-table);
    line-height: 1.35;
    vertical-align: middle;
    background: var(--admin-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table tbody tr:first-child td {
    border-top: 0;
}

.admin-table tbody tr {
    transition: background-color 0.12s ease;
}

.admin-table tbody tr:hover td {
    background: var(--admin-surface-muted);
}

.admin-table tbody tr:hover .table-title,
.admin-table tbody tr:hover .customer-name {
    color: var(--admin-accent-hover);
}

.admin-table .nowrap {
    white-space: nowrap;
}

/* Standard column widths (use with <colgroup>) */
.admin-table colgroup .col-customer { width: 24%; }
.admin-table colgroup .col-slug { width: 13%; }
.admin-table colgroup .col-pill { width: 9%; }
.admin-table colgroup .col-status { width: 11%; }
.admin-table colgroup .col-time { width: 11%; }
.admin-table colgroup .col-mono { width: 12%; }
/* Action column widths must hold the buttons + td padding (14px each
   side). "Detay" (~60px) + 4px gap + 28px icon button + 28px padding
   = ~120px. Add ~12px breathing room. col-actions-sm holds a single
   "Detay" button (~60px) + 28px padding = ~88px; bump to 100px. */
.admin-table colgroup .col-actions { width: 132px; }
.admin-table colgroup .col-actions-sm { width: 100px; }
.admin-table colgroup .col-num { width: 8%; }

/* Title link inside any table cell */
.table-title {
    display: inline-block;
    font-weight: 600;
    color: var(--admin-text-strong);
    text-decoration: none;
    transition: color 0.12s ease;
    font-size: 13px;
}

.table-title:hover {
    color: var(--admin-accent-hover);
}

.table-subtle {
    display: block;
    font-size: 11.5px;
    color: var(--admin-text-subtle);
    font-weight: 400;
    margin-top: 2px;
}

/* Customer / monogram cell — used in any table */
.customer-cell,
.tenant-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tenant-monogram {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent-hover);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--admin-accent-soft-strong);
    text-transform: uppercase;
    line-height: 1;
}

.customer-meta,
.tenant-cell > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.25;
}

.customer-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--admin-text-strong);
    text-decoration: none;
    transition: color 0.12s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-name:hover {
    color: var(--admin-accent-hover);
}

.customer-domain {
    font-size: 11.5px;
    color: var(--admin-text-subtle);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Slug chip — replaces raw <code> in tables */
.tenant-slug {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    font-family: var(--font-mono);
    font-size: var(--fs-tiny);
    color: var(--admin-text-muted);
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Plan / categorical pill */
.plan-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text-strong);
    line-height: 1;
}

/* Time cell — tabular figures, muted */
.admin-table .cell-time {
    color: var(--admin-text-muted);
    font-size: 12.5px;
    font-feature-settings: 'tnum';
}

/* Mono cell (codes / IPs) */
.admin-table .cell-mono {
    font-family: var(--font-mono);
    font-size: var(--fs-tiny);
    color: var(--admin-text-muted);
}

/* Status / health badges — legacy compatibility.
   Prefer .ubadge for new UI; this block stays for existing views. */
.admin-table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    min-width: 78px;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-transform: capitalize;
    letter-spacing: 0;
    white-space: nowrap;
}

.admin-table .status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
    flex-shrink: 0;
}

/* Number cell — right aligned tabular figures */
.admin-table .cell-num {
    font-feature-settings: 'tnum';
    color: var(--admin-text-strong);
    font-weight: 600;
}

/* Status badges — legacy palette aligned with .ubadge tones */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
    text-transform: none;
    white-space: nowrap;
    border: 1px solid var(--admin-border-soft);
    line-height: 1;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
    flex-shrink: 0;
}

.status-badge.active,
.status-badge.healthy {
    background: var(--tone-positive-bg);
    color: var(--tone-positive);
    border-color: var(--admin-border-soft);
}

.status-badge.warning {
    background: var(--tone-warning-bg);
    color: var(--tone-warning);
    border-color: var(--admin-border-soft);
}

.status-badge.critical,
.status-badge.failed {
    background: var(--tone-critical-bg);
    color: var(--tone-critical);
    border-color: var(--admin-border-soft);
}

.status-badge.suspended,
.status-badge.unknown {
    background: var(--tone-neutral-bg);
    color: var(--tone-neutral);
    border-color: var(--admin-border-soft);
}

/* ==========================================================
   Row actions — universal action group for any data table
   ========================================================== */

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.row-actions > .dropdown {
    display: inline-flex;
    align-items: center;
}

.btn-row,
.btn-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    border-radius: 6px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    color: var(--admin-text-strong);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    padding: 0;
    box-shadow: none;
    text-decoration: none;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.btn-row {
    padding: 0 12px;
}

.btn-row-icon {
    width: 28px;
    color: var(--admin-text-muted);
    flex-shrink: 0;
}

.btn-row-icon i {
    font-size: 14px;
    line-height: 1;
}

.btn-row:hover,
.btn-row-icon:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
    color: var(--admin-text-strong);
}

.btn-row:focus-visible,
.btn-row-icon:focus-visible {
    outline: none;
    border-color: var(--admin-accent-soft-strong);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.btn-row-icon[aria-expanded="true"] {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
    color: var(--admin-text-strong);
}

.row-actions .dropdown-menu {
    min-width: 200px;
    margin-top: 4px;
}

.row-actions .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    font-size: 12.5px;
}

.row-actions .dropdown-item i {
    font-size: 13px;
    color: var(--admin-text-muted);
    width: 14px;
    text-align: center;
}

.row-actions .dropdown-item.text-danger i {
    color: var(--tone-critical);
}

/* Legacy .table-actions kept as alias of .row-actions */
.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Stack list (audit) — sade operasyon listesi, pseudo-table değil */
.stack-list {
    display: flex;
    flex-direction: column;
    padding: 6px;
}

.stack-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.1s ease;
    width: 100%;
}

.stack-item:hover {
    background: var(--admin-surface-muted);
}

.stack-item:focus-visible {
    outline: none;
    background: var(--admin-surface-muted);
    box-shadow: 0 0 0 2px var(--admin-accent-soft);
}

.stack-item > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.stack-item strong {
    font-weight: 600;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    line-height: 1.3;
}

.stack-item small {
    font-size: var(--fs-tiny);
    color: var(--admin-text-subtle);
    line-height: 1.3;
}

.stack-item em {
    font-style: normal;
    font-size: var(--fs-tiny);
    color: var(--admin-text-subtle);
    white-space: nowrap;
    font-feature-settings: 'tnum';
}

/* Offcanvas */
.admin-offcanvas {
    width: 420px !important;
    border-left: 1px solid var(--admin-border) !important;
    box-shadow: -8px 0 24px rgba(15, 23, 41, 0.06);
}

.admin-offcanvas .offcanvas-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--admin-border-soft);
    align-items: flex-start;
    gap: 12px;
}

.offcanvas-heading {
    flex: 1;
    min-width: 0;
}

.offcanvas-eyebrow {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--admin-text-subtle);
    margin-bottom: 4px;
}

.offcanvas-title {
    margin: 0;
    font-size: var(--fs-h2);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--admin-text-strong);
}

.offcanvas-subtitle {
    margin: 4px 0 0;
    font-size: var(--fs-small);
    color: var(--admin-text-subtle);
}

.admin-offcanvas .offcanvas-body {
    padding: 18px 22px 22px;
}

/* Offcanvas detail panel — base is sans-serif for normal/operation
   detail. Triggers opt-in to monospace by setting data-detail-mode
   to "tech" / "json" / "log". Prose/normal mode keeps the default. */
.detail-panel {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--admin-text);
    font-family: var(--font-sans);
    font-size: var(--fs-small);
    line-height: 1.65;
    word-break: break-word;
}

.detail-panel-label {
    margin-bottom: 5px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.detail-panel--prose,
.detail-panel--normal {
    color: var(--admin-text);
    font-family: var(--font-sans);
}

.detail-panel--tech,
.detail-panel--json,
.detail-panel--log {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-soft);
    color: var(--admin-text-strong);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.detail-panel--log {
    max-height: 360px;
    overflow-y: auto;
}

.recovery-help-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recovery-help-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recovery-help-section span,
.recovery-help-grid span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.recovery-help-section p {
    margin: 0;
    color: var(--admin-text);
    font-size: var(--fs-small);
    line-height: 1.6;
}

.recovery-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.recovery-help-grid div {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.recovery-help-grid strong {
    display: block;
    margin-top: 2px;
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
}

.recovery-help-note {
    margin: 0;
}

.recovery-help-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Detail page (tenant show) */
.detail-summary {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 14px;
}

.detail-summary h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--admin-text-strong);
}

.tenant-workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tenant-hero-v2 {
    position: sticky;
    top: calc(var(--header-height) + 10px);
    z-index: 20;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
}

.tenant-hero-v2-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.tenant-identity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.tenant-identity-copy {
    min-width: 0;
}

.tenant-identity-copy h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--admin-text-strong);
}

.tenant-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.tenant-hero-note {
    margin: 8px 0 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.45;
}

.tenant-hero-score {
    min-width: 96px;
    text-align: right;
}

.tenant-hero-score strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    color: var(--admin-text-strong);
    font-feature-settings: 'tnum';
}

.tenant-hero-score span {
    display: block;
    margin-top: 4px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
}

.tenant-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border-soft);
}

.tenant-hero-actions .state-inline {
    margin: 0;
}

.tenant-tabbar {
    width: fit-content;
    max-width: 100%;
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-lg);
    padding: 5px;
    overflow-x: auto;
    box-shadow: inset 0 1px 1px rgba(15, 23, 41, 0.03);
    scrollbar-width: thin;
}

.tenant-tabbar .nav-tabs {
    flex-wrap: nowrap;
    min-width: max-content;
    gap: 2px;
    margin-bottom: 0;
    border-bottom: 0;
}

.tenant-tabbar .nav-tabs .nav-link {
    height: 32px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 0 16px;
    color: var(--admin-text-muted);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 30px;
    white-space: nowrap;
    box-shadow: none;
}

.tenant-tabbar .nav-tabs .nav-link:hover {
    background: var(--admin-surface);
    color: var(--admin-text-strong);
}

.tenant-tabbar .nav-tabs .nav-link.active {
    background: var(--admin-surface);
    border-color: var(--admin-border-soft);
    color: var(--admin-text-strong);
    box-shadow: 0 1px 2px rgba(15, 23, 41, 0.06);
}

.tenant-tab-content {
    margin-top: -4px;
}

.tenant-section {
    margin-bottom: 10px;
}

.tenant-section:last-child {
    margin-bottom: 0;
}

.tenant-panel-body {
    padding: 16px 20px 18px;
}

.tenant-panel-body--flush-top {
    padding-top: 0;
}

.tenant-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
    gap: 10px;
}

.tenant-overview-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tenant-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tenant-summary-card {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tenant-summary-card span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tenant-summary-card strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.tenant-action-card {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tenant-action-card i {
    color: var(--admin-accent);
    font-size: 17px;
    margin-top: 1px;
}

.tenant-action-card strong {
    display: block;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    margin-bottom: 2px;
}

.tenant-action-card p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.tenant-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1199.98px) {
    .tenant-hero-v2 {
        position: static;
    }

    .tenant-overview-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .tenant-hero-v2-main,
    .tenant-summary-grid,
    .tenant-placeholder-grid {
        grid-template-columns: 1fr;
    }

    .tenant-hero-score {
        text-align: left;
    }
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--admin-text-subtle);
    font-size: 12.5px;
    margin-top: 8px;
}

.detail-meta span strong {
    color: var(--admin-text-strong);
    font-weight: 600;
    margin-right: 4px;
}

/* Confirm modal */
.modal-content {
    border-radius: var(--radius-xl);
    border: 1px solid var(--admin-border);
    box-shadow: var(--shadow-elevated);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border-soft);
}

.modal-title {
    font-size: var(--fs-h3);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--admin-text-strong);
}

.modal-body {
    padding: 16px 20px;
    color: var(--admin-text-muted);
    font-size: var(--fs-body);
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--admin-border-soft);
    gap: 8px;
}

.modal-footer > * {
    margin: 0;
}

.admin-confirm .modal-body {
    color: var(--admin-text);
    line-height: 1.55;
}

.admin-confirm .modal-title {
    font-size: 15px;
}

.admin-confirm .btn-close {
    opacity: 0.55;
}

.admin-confirm .btn-close:hover {
    opacity: 1;
}

/* Auth (login) */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-bg);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-elevated);
}

.auth-card h1 {
    margin: 12px 0 4px;
    font-size: var(--fs-h1);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: var(--lh-tight);
}

.auth-card p {
    margin: 0 0 18px;
    color: var(--admin-text-muted);
    font-size: var(--fs-body);
}

.auth-env {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--tone-warning-bg);
    color: var(--tone-warning);
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    padding: 6px;
    min-width: 180px;
    font-size: 13px;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    color: var(--admin-text);
    font-size: 13px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--admin-surface-muted);
    color: var(--admin-text-strong);
}

.dropdown-item.text-danger:hover {
    background: var(--tone-critical-bg);
    color: var(--tone-critical);
}

.dropdown-divider {
    margin: 4px 0;
    border-color: var(--admin-border-soft);
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid var(--admin-border-soft);
    margin-bottom: 14px;
    gap: 2px;
}

.nav-tabs .nav-link {
    border: 0;
    color: var(--admin-text-muted);
    font-weight: 500;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-tabs .nav-link:hover {
    background: var(--admin-surface-muted);
    color: var(--admin-text-strong);
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--admin-text-strong);
    box-shadow: inset 0 -2px 0 var(--admin-accent);
}

/* Mobile */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-shell.is-sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-elevated);
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .header-search {
        display: none !important;
    }
}

/* Misc helpers */
.text-end {
    text-align: right;
}

.nowrap {
    white-space: nowrap;
}

/* Fallback: secondary span after .table-title gets subtle styling */
.admin-table tbody td .table-title + span {
    display: block;
    font-size: 11.5px;
    color: var(--admin-text-subtle);
    font-weight: 400;
    margin-top: 2px;
}

/* Tenant detail (show) */
.tenant-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tenant-hero h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: var(--lh-tight);
    color: var(--admin-text-strong);
}

.tenant-hero p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-body);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.plain-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    font-size: 11px;
    font-weight: 500;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--tone-neutral-bg);
    color: var(--admin-text-muted);
    border: 1px solid var(--admin-border-soft);
    line-height: 1;
    white-space: nowrap;
}

.admin-tabs {
    padding: 0 20px;
    margin-bottom: 0;
}

.admin-tabs.nav-tabs {
    margin-bottom: 0;
    border-bottom: 1px solid var(--admin-border-soft);
}

.tab-content {
    padding: 20px 24px 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-grid > div {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-grid--flat {
    gap: 0;
    border-top: 1px solid var(--admin-border-soft);
}

.detail-grid--flat > div {
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--admin-border-soft);
    padding: 11px 14px 11px 0;
}

.notice-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-left: 3px solid var(--tone-warning);
    border-radius: var(--radius-md);
    background: var(--tone-warning-bg);
}

.notice-banner-icon {
    flex-shrink: 0;
    font-size: 15px;
    color: var(--tone-warning);
    margin-top: 1px;
}

.notice-banner-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tone-warning);
    margin-bottom: 2px;
}

.notice-banner-text {
    margin: 0;
    font-size: 12.5px;
    color: var(--admin-text-muted);
    line-height: 1.55;
}

.notice-banner--critical {
    border-left-color: var(--tone-critical);
    background: var(--tone-critical-bg);
}

.notice-banner--critical .notice-banner-icon {
    color: var(--tone-critical);
}

.notice-banner--critical .notice-banner-title {
    color: var(--tone-critical);
}

.detail-grid > div span {
    font-size: 11px;
    color: var(--admin-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.detail-grid > div strong {
    font-size: 13.5px;
    color: var(--admin-text-strong);
    font-weight: 600;
}

.team-workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-hero {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
}

.team-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.team-identity {
    min-width: 0;
}

.team-identity h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--admin-text-strong);
}

.team-identity p {
    margin: 8px 0 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.45;
}

.team-hero-meta,
.team-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.team-hero-meta {
    margin-top: 8px;
}

.team-hero-actions {
    justify-content: flex-end;
}

.team-section {
    margin-bottom: 0;
}

.team-panel-body {
    padding: 16px 20px 18px;
}

.team-summary-grid,
.team-role-grid,
.team-member-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.team-summary-card,
.team-role-card,
.team-member-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
    color: inherit;
    text-decoration: none;
}

.team-summary-card {
    flex-direction: column;
    gap: 5px;
}

.team-role-card:hover,
.team-member-card:hover {
    border-color: var(--admin-border);
    background: var(--admin-surface);
}

.team-role-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--admin-surface);
    color: var(--admin-text-muted);
}

.team-summary-card span,
.team-role-card span,
.team-member-card span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.team-summary-card span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.team-summary-card strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.team-role-card strong,
.team-member-card strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--admin-text-strong);
}

.team-role-card small,
.team-member-card small {
    font-size: var(--fs-small);
    color: var(--admin-text-muted);
}

.team-role-card em,
.team-member-card em {
    margin-left: auto;
    font-style: normal;
    font-size: var(--fs-tiny);
    color: var(--admin-text-subtle);
    white-space: nowrap;
}

.team-table-panel .table-responsive {
    border-top: 1px solid var(--admin-border-soft);
}

.team-table-panel .admin-table {
    margin-bottom: 0;
}

.team-table-panel .admin-table th {
    padding-top: 12px;
    padding-bottom: 10px;
}

.team-table-panel .admin-table td {
    padding-top: 14px;
    padding-bottom: 14px;
    vertical-align: middle;
}

.team-table-panel .plain-badge {
    margin: 2px 2px 2px 0;
}

.team-advanced .accordion-item {
    border-color: var(--admin-border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--admin-surface-muted);
}

.team-advanced .accordion-button {
    padding: 13px 16px;
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    font-weight: 600;
}

.team-advanced .accordion-button:not(.collapsed) {
    background: var(--admin-surface);
    color: var(--admin-text-strong);
    box-shadow: none;
}

.team-advanced .accordion-body {
    padding: 14px 16px 16px;
}

.team-permission-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.team-permission-group {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    overflow: hidden;
}

.team-permission-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--admin-border-soft);
    background: var(--admin-surface-muted);
}

.team-permission-group-head strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
}

.team-permission-list {
    display: flex;
    flex-direction: column;
}

.team-permission-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border-soft);
}

.team-permission-row:last-child {
    border-bottom: 0;
}

.team-permission-row > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-permission-row strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 600;
}

.team-permission-row small {
    color: var(--admin-text-faint);
    font-size: var(--fs-tiny);
}

.team-permission-row em {
    font-style: normal;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
}

.team-member-hero .team-hero-main {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
}

.team-member-hero-card {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
    padding: 12px 14px;
    min-width: 0;
}

.team-member-hero-card span,
.team-member-hero-card small {
    display: block;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
}

.team-member-hero-card span {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.team-member-hero-card strong {
    display: block;
    margin: 5px 0 4px;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.team-member-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.team-role-assignment {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
    overflow: hidden;
}

.team-role-assignment-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
}

.team-role-assignment-main > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.team-role-assignment strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
}

.team-role-assignment small {
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.team-role-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-role-remove,
.team-role-change {
    border-top: 1px solid var(--admin-border-soft);
    background: var(--admin-surface);
    padding: 12px 14px;
}

.team-role-remove form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.7fr) auto;
    gap: 8px;
    align-items: center;
}

.team-role-change {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.team-role-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .team-hero-main,
    .team-summary-grid,
    .team-role-grid,
    .team-member-grid {
        grid-template-columns: 1fr;
    }

    .team-hero-actions {
        justify-content: flex-start;
    }

    .team-member-hero .team-hero-main,
    .team-member-summary,
    .team-permission-groups {
        grid-template-columns: 1fr;
    }

    .team-role-assignment-main,
    .team-role-remove form {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

.empty-state {
    /* Legacy alias — matches .state-card.state-card--info */
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-style: dashed;
    border-radius: var(--radius-md);
    padding: 22px;
    text-align: left;
    color: var(--admin-text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.empty-state strong {
    font-size: 14px;
    color: var(--admin-text-strong);
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    font-size: 13px;
}

/* Login screen */
.login-body {
    background: var(--admin-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-shell {
    width: 100%;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-elevated);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.login-brand img {
    max-height: 26px;
    width: auto;
}

.login-copy h1 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: var(--lh-tight);
    color: var(--admin-text-strong);
}

.login-copy p {
    margin: 0 0 18px;
    color: var(--admin-text-muted);
    font-size: var(--fs-body);
}

.login-form .form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--admin-text-muted);
    margin-bottom: 4px;
}

.form-check-label {
    font-size: 12.5px;
    color: var(--admin-text-muted);
}

.form-check-input:checked {
    background-color: var(--admin-text-strong);
    border-color: var(--admin-text-strong);
}

.form-check-input:focus {
    border-color: var(--admin-accent-soft-strong);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.login-link {
    font-size: 12px;
    color: var(--admin-text-muted);
}

.login-link:hover {
    color: var(--admin-text-strong);
}

.login-note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: var(--admin-text-faint);
}

.login-form .login-note {
    margin: 2px 0 18px;
}

/* Bootstrap table reset */
.table {
    --bs-table-bg: var(--admin-surface);
    --bs-table-color: var(--admin-text);
    --bs-table-border-color: var(--admin-border-soft);
}

/* Row dropdown clipping fix (defense-in-depth)
   ---------------------------------------------------------------
   The JS portal in app.js moves .dropdown-menu to <body> on open,
   which is the primary fix. The CSS rules below guarantee the menu
   stays visible even when the portal cannot run (e.g. cached JS,
   small JS error, future regression). They neutralise every clip
   layer between the panel and the menu without breaking ellipsis
   on regular cell content. */
.panel > .table-responsive {
    overflow: visible;
}

@media (max-width: 1199.98px) {
    .panel > .table-responsive {
        overflow-x: auto;
        overflow-y: visible;
    }
}

/* Action cell: never clip its row dropdown. Only the action column
   uses .text-end on tbody td, so scoping to .row-actions guarantees
   we don't disable ellipsis on text columns. */
.admin-table tbody td:has(.row-actions),
.admin-table tbody td.text-end {
    overflow: visible;
}

.row-actions,
.row-actions > .dropdown {
    overflow: visible;
}

/* Dropdown menus inside data tables must float above row content,
   even when something happens to add a transform/contain to an
   ancestor (which would otherwise turn position:fixed into a local
   coordinate system). */
.dropdown-menu {
    z-index: 1080;
}

.panel-header-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Keep .admin-table from collapsing on narrow screens — horizontal scroll */
@media (max-width: 1199.98px) {
    .admin-table {
        min-width: 980px;
    }
}

/* ===================================================================
   Sprint C — Action / feedback / detail polish
   ------------------------------------------------------------------
   Refines:
   1. Button reset for header chrome (no Bootstrap .btn inheritance)
   2. Destructive confirm button bound to --tone-critical
   3. Sidebar active indicator + "Yakında" tag + scrollbar
   =================================================================== */

/* 1. Reset for elements that previously relied on Bootstrap .btn.
   We keep the visual styles defined further up, but ensure browser
   default <button> chrome doesn't bleed through (font, line-height,
   focus outline). */
.user-button,
.btn-icon,
.btn-row,
.btn-row-icon,
.btn-ghost,
.btn-confirm-danger,
.header-alert {
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

.user-button:focus-visible,
.btn-icon:focus-visible,
.header-alert:focus-visible {
    outline: none;
    border-color: var(--admin-accent-soft-strong);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

/* Header alert: small ghost pill, no Bootstrap .btn / .btn-sm. */
.header-alert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--admin-border-soft);
    color: var(--admin-text-strong);
    font-size: 12.5px;
    font-weight: 500;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.header-alert:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
}

.user-button {
    height: 36px;
    line-height: 1.1;
}

/* 2. Destructive confirm button — bound to project's --tone-critical
   token. Replaces Bootstrap .btn-danger so confirm modals match the
   rest of the SaaS palette. */
.btn-confirm-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    background: var(--tone-critical);
    border: 1px solid var(--tone-critical);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.005em;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.btn-confirm-danger:hover,
.btn-confirm-danger:focus {
    background: #962820;
    border-color: #962820;
    color: #fff;
}

.btn-confirm-danger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(177, 50, 44, 0.22);
}

/* Match modal "Vazgeç" ghost button height to confirm button. */
.admin-confirm .modal-footer .btn-ghost {
    height: 32px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 500;
}

/* 3. Sidebar active indicator: keep it inside the link, no negative
   inset, so it never collides with the sidebar edge or appears to
   slide on hover. */
.sidebar-link.active::before {
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
}

/* "Yakında" tag — quieter, type-only treatment. Removes pill chrome
   which read as visual noise next to actual nav items. */
.sidebar-tag {
    margin-left: auto;
    font-size: 10px;
    font-weight: 500;
    color: var(--admin-text-faint);
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Sidebar scrollbar — only visible when the user is interacting
   with the sidebar; otherwise blends into the surface. */
.sidebar-nav {
    scrollbar-color: transparent transparent;
}

.sidebar-nav:hover,
.sidebar-nav:focus-within {
    scrollbar-color: var(--admin-border) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.sidebar-nav:hover::-webkit-scrollbar-thumb,
.sidebar-nav:focus-within::-webkit-scrollbar-thumb {
    background: var(--admin-border);
}

/* ===================================================================
   Sprint D — Empty / loading / error / banner (operasyon dili)
   =================================================================== */

@keyframes state-skeleton-pulse {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 0.9;
    }
}

@media (prefers-reduced-motion: reduce) {
    @keyframes state-skeleton-pulse {
        0%,
        100% {
            opacity: 0.75;
        }
    }
}

.admin-content.has-page-banner .page-header {
    margin-bottom: 10px;
}

.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--admin-border-soft);
    background: var(--admin-surface-muted);
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--admin-text-strong);
}

.alert-banner--critical {
    border-color: rgba(177, 50, 44, 0.22);
    background: var(--tone-critical-bg);
    color: var(--tone-critical);
}

.alert-banner--warning {
    border-color: rgba(148, 96, 0, 0.2);
    background: var(--tone-warning-bg);
    color: var(--tone-warning);
}

.alert-banner--success {
    border-color: rgba(15, 118, 110, 0.22);
    background: var(--tone-positive-bg);
    color: var(--tone-positive);
}

.alert-banner--info {
    border-color: var(--admin-border);
    background: var(--admin-surface-muted);
    color: var(--admin-text);
}

.alert-banner-icon {
    flex: 0 0 auto;
    display: inline-flex;
    margin-top: 1px;
    font-size: 15px;
}

.alert-banner-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: inherit;
    font-weight: 500;
}

.alert-banner-actions {
    flex: 0 0 auto;
}

.alert-banner-dismiss {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-start;
    text-decoration: none;
    color: var(--admin-text-subtle);
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
}

.alert-banner-dismiss:hover {
    color: var(--admin-text-strong);
}

.alert-banner--critical .alert-banner-dismiss,
.alert-banner--warning .alert-banner-dismiss {
    color: inherit;
    opacity: 0.7;
}

.alert-banner--critical .alert-banner-dismiss:hover,
.alert-banner--warning .alert-banner-dismiss:hover {
    opacity: 1;
}

.state-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--admin-border-soft);
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.55;
    text-align: left;
}

.state-card--embed {
    border: 0;
    background: transparent;
    padding: 0;
    gap: 10px;
}

.state-card-icon {
    flex: 0 0 auto;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    font-size: 15px;
    color: var(--admin-text-subtle);
}

.state-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.state-card-title {
    display: block;
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--admin-text-strong);
    letter-spacing: -0.01em;
}

.state-card-text {
    margin: 0;
    font-size: var(--fs-small);
    color: var(--admin-text-muted);
    line-height: 1.5;
}

.state-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.state-card--empty .state-card-icon {
    color: var(--admin-text-faint);
}

.state-card--no-result {
    padding: 11px 13px;
    background: var(--admin-surface-muted);
    border-style: solid;
}

.state-card--no-result .state-card-title {
    font-size: 12.5px;
    font-weight: 600;
}

.state-card--no-result .state-card-text {
    font-size: 12px;
}

.state-card--warning {
    border-color: rgba(148, 96, 0, 0.2);
    background: var(--tone-warning-bg);
}

.state-card--warning .state-card-title,
.state-card--warning .state-card-text {
    color: var(--tone-warning);
}

.state-card--warning .state-card-icon {
    background: var(--admin-surface);
    border-color: rgba(148, 96, 0, 0.2);
    color: var(--tone-warning);
}

.state-card--error {
    border-color: rgba(177, 50, 44, 0.22);
    background: var(--tone-critical-bg);
}

.state-card--error .state-card-title,
.state-card--error .state-card-text {
    color: var(--tone-critical);
}

.state-card--error .state-card-icon {
    background: var(--admin-surface);
    border-color: rgba(177, 50, 44, 0.22);
    color: var(--tone-critical);
}

.state-card--info {
    border-style: dashed;
}

.state-card--empty {
    border-style: dashed;
}

.state-table-cell {
    padding: 36px 20px !important;
    vertical-align: middle !important;
    border-top-color: transparent !important;
    background: var(--admin-surface) !important;
}

.state-table-cell .state-card--embed {
    max-width: 520px;
}

.state-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.state-inline > i:first-child {
    font-size: 14px;
    margin-top: 1px;
    color: var(--admin-text-subtle);
}

.state-inline-actions {
    margin-left: auto;
}

.state-inline--muted {
    border-color: var(--admin-border-soft);
    background: var(--admin-bg);
    color: var(--admin-text-muted);
}

.state-inline--info {
    border-color: var(--admin-border-soft);
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
}

.state-inline--success {
    border-color: rgba(15, 118, 110, 0.2);
    background: var(--tone-positive-bg);
    color: var(--tone-positive);
}

.state-inline--warning {
    border-color: rgba(148, 96, 0, 0.2);
    background: var(--tone-warning-bg);
    color: var(--tone-warning);
}

.state-inline--critical {
    border-color: rgba(177, 50, 44, 0.22);
    background: var(--tone-critical-bg);
    color: var(--tone-critical);
}

.skeleton-line,
.skeleton-bar,
.skeleton-chip {
    display: inline-block;
    border-radius: 4px;
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    animation: state-skeleton-pulse 2.2s ease-in-out infinite;
}

.skeleton-row-static .skeleton-bar,
.skeleton-row-static .skeleton-chip,
.skeleton-metric-static .skeleton-line,
.skeleton-stack-static .skeleton-line,
.skeleton-ops-static .skeleton-line {
    animation: none;
    opacity: 0.74;
}

.skeleton-chip {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.skeleton-chip-action {
    width: 54px;
    height: 28px;
    border-radius: var(--radius-md);
}

.skeleton-bar {
    height: 9px;
    margin-right: 8px;
    vertical-align: middle;
}

.skeleton-bar-full {
    display: inline-block;
    width: calc(72% - 32px);
    min-width: 120px;
}

.skeleton-bar-md {
    width: 44%;
    min-width: 80px;
    display: inline-block;
    margin-top: 6px;
}

.skeleton-bar-sm {
    width: 104px;
}

.skeleton-bar-lg {
    width: 68%;
    min-width: 140px;
}

.skeleton-bar-xs {
    width: 48px;
}

.skeleton-bar-time {
    width: 112px;
}

.skeleton-bar-ip {
    width: 96px;
}

.summary-card.skeleton-metric {
    overflow: hidden;
}

.skeleton-line-label {
    display: inline-block;
    width: 70px;
    height: 10px;
    margin-bottom: 6px;
}

.skeleton-line-value {
    display: block;
    width: 112px;
    height: 18px;
    margin-bottom: 4px;
}

.skeleton-line-delta {
    display: inline-block;
    width: 88px;
    height: 9px;
}

.ops-item.skeleton-ops .skeleton-ops-label {
    width: 120px;
    height: 9px;
    margin-bottom: 6px;
    display: inline-block;
}

.ops-item.skeleton-ops .skeleton-ops-value {
    width: 72px;
    height: 14px;
    display: inline-block;
}

.stack-item.skeleton-stack {
    pointer-events: none;
}

.skeleton-stack {
    justify-content: space-between !important;
}

.skeleton-stack-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.skeleton-stack-title {
    height: 12px;
    width: min(380px, 66vw);
}

.skeleton-stack-sub {
    height: 10px;
    width: min(260px, 48vw);
}

.skeleton-stack-time {
    flex: 0 0 auto;
    width: 84px;
    height: 10px;
}

.skeleton-detail-label {
    width: 88px;
    height: 9px;
    margin-bottom: 8px;
    display: block;
}

.skeleton-detail-value {
    width: min(260px, 55vw);
    height: 14px;
    display: block;
    font-weight: 400 !important;
}

.state-card--compact {
    gap: 8px;
    padding: 8px 10px;
    margin-top: 10px;
    border-style: dotted;
}

.state-card--compact .state-card-title {
    font-size: 12px;
}

.state-card--compact .state-card-text {
    font-size: 11.5px;
}

/* ===================================================================
   Incident Center / Alert Management
   =================================================================== */

.incident-summary-grid {
    grid-template-columns: repeat(5, 1fr);
}

.incident-filter-panel {
    margin-bottom: 12px;
}

.incident-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 16px 20px 18px;
}

.incident-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.incident-filter-grid label span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.incident-filter-grid .form-control,
.incident-filter-grid .form-select {
    min-height: 32px;
    font-size: var(--fs-small);
}

.incident-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.incident-action-readiness {
    margin-bottom: 12px;
}

.incident-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.incident-empty-panel {
    padding: 34px 20px;
}

.incident-tenant-group {
    overflow: hidden;
}

.incident-tenant-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border-soft);
}

.incident-tenant-head h2 {
    margin: 0 0 2px;
    color: var(--admin-text-strong);
    font-size: var(--fs-h3);
    font-weight: 650;
}

.incident-tenant-head p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.incident-tenant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.incident-items {
    display: flex;
    flex-direction: column;
}

.incident-card {
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border-soft);
}

.incident-card:last-child {
    border-bottom: 0;
}

.incident-card--critical {
    border-left: 3px solid var(--tone-critical);
}

.incident-card--warning {
    border-left: 3px solid var(--tone-warning);
}

.incident-card--info {
    border-left: 3px solid var(--admin-accent-soft-strong);
}

.incident-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
    gap: 16px;
    align-items: start;
}

.incident-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.incident-card-copy h3 {
    margin: 0;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.incident-card-copy p,
.incident-card-action p {
    margin: 5px 0 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.5;
}

.incident-card-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.incident-card-facts div,
.incident-detail-grid div {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.incident-card-facts span,
.incident-detail-grid span {
    display: block;
    margin-bottom: 2px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.incident-card-facts strong,
.incident-detail-grid strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
}

.incident-card-action {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
}

.incident-card-action strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
}

.incident-card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.incident-card-buttons form {
    margin: 0;
}

.incident-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.incident-tech-panel {
    margin-top: 10px;
    max-height: 240px;
    overflow: auto;
}

/* ===================================================================
   Review Pipeline
   =================================================================== */

.review-summary-grid {
    grid-template-columns: repeat(5, 1fr);
}

.review-summary-time {
    font-size: 17px;
    line-height: 1.2;
}

.review-provider-panel {
    margin-bottom: 12px;
}

.low-rating-summary-grid {
    grid-template-columns: repeat(5, 1fr);
}

.low-rating-panel {
    margin-bottom: 12px;
}

.trend-panel {
    margin-bottom: 12px;
}

.trend-indicator-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 18px;
}

.trend-indicator-card {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-lg);
    background: var(--admin-surface);
    padding: 14px;
}

.trend-indicator-card--positive {
    border-left: 3px solid var(--tone-positive);
}

.trend-indicator-card--warning {
    border-left: 3px solid var(--tone-warning);
}

.trend-indicator-card--neutral {
    border-left: 3px solid var(--admin-border-strong);
}

.trend-indicator-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.trend-indicator-head span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.trend-indicator-head strong {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--admin-surface-muted);
    color: var(--admin-text-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.trend-indicator-card p {
    margin: 0;
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
    line-height: 1.45;
}

.trend-indicator-card small {
    display: block;
    margin-top: 6px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
}

.low-rating-filter-row {
    display: flex;
    gap: 8px;
    padding: 14px 20px 0;
}

.low-rating-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 18px;
}

.low-rating-card {
    border: 1px solid var(--admin-border-soft);
    border-left: 3px solid var(--tone-warning);
    border-radius: var(--radius-lg);
    background: var(--admin-surface);
    padding: 14px;
}

.low-rating-main {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.low-rating-main h3 {
    margin: 0;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.low-rating-main p {
    margin: 6px 0 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.5;
}

.low-rating-score {
    min-width: 84px;
    text-align: right;
}

.low-rating-score strong {
    display: block;
    color: var(--tone-warning);
    font-size: 18px;
    font-weight: 700;
}

.low-rating-score span {
    display: block;
    color: var(--tone-warning);
    font-size: var(--fs-tiny);
    letter-spacing: 0.03em;
}

.low-rating-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-small);
}

.review-provider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 18px;
}

.review-provider-card {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    padding: 14px;
}

.review-provider-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.review-provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--admin-border-soft);
    border-radius: 999px;
    background: var(--admin-surface-muted);
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
    padding: 4px 10px;
    white-space: nowrap;
}

.review-provider-facts,
.review-run-facts,
.review-run-meta {
    display: grid;
    gap: 8px;
}

.review-provider-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-run-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px 18px 16px;
}

.review-run-card {
    border: 1px solid var(--admin-border-soft);
    border-left: 3px solid var(--admin-border-strong);
    border-radius: var(--radius-lg);
    background: var(--admin-surface);
    padding: 12px 14px;
}

.review-run-card--positive {
    border-left-color: var(--tone-positive);
}

.review-run-card--warning {
    border-left-color: var(--tone-warning);
}

.review-run-card--critical {
    border-left-color: var(--tone-critical);
}

.review-run-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.review-run-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.review-run-title h3 {
    margin: 0;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-run-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.review-run-compact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-small);
}

.review-run-compact-meta span + span::before {
    content: "·";
    margin-right: 6px;
    color: var(--admin-border-strong);
}

.review-provider-facts div,
.review-run-facts div {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 9px 11px;
    min-width: 0;
}

.review-provider-facts span,
.review-run-facts span {
    display: block;
    margin-bottom: 2px;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.review-provider-facts strong,
.review-run-facts strong {
    display: block;
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-time-context {
    display: block;
    margin-top: 2px;
    color: var(--admin-text-subtle);
    font-size: 11px;
    line-height: 1.25;
}

.review-run-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.review-run-inline-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 9px;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.review-run-inline-metrics span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.review-run-inline-metrics strong {
    color: var(--admin-text-strong);
    font-size: 15px;
    font-weight: 750;
}

.review-run-hint,
.review-run-error {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    font-weight: 600;
}

.review-run-error {
    display: flex;
    align-items: flex-start;
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--tone-critical-bg);
    color: var(--tone-critical);
    padding: 8px 10px;
}

.review-run-error span {
    color: var(--admin-text-muted);
    font-weight: 500;
}

.review-run-card .technical-collapse-toggle {
    margin-top: 9px;
}

.review-json-panel {
    margin-top: 10px;
    max-height: 220px;
    overflow: auto;
    font-size: 11.5px;
    line-height: 1.5;
    padding: 10px 12px;
}

@media (max-width: 1199.98px) {
    .review-summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .low-rating-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .trend-indicator-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-provider-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .review-run-head {
        flex-direction: column;
        gap: 8px;
    }

    .review-run-badges {
        justify-content: flex-start;
    }

    .review-run-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .review-summary-grid,
    .low-rating-summary-grid,
    .review-provider-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-run-list,
    .trend-indicator-grid,
    .low-rating-list,
    .review-provider-grid {
        padding: 12px;
    }

    .low-rating-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479.98px) {
    .review-summary-grid,
    .low-rating-summary-grid,
    .trend-indicator-grid,
    .review-provider-grid,
    .review-provider-facts,
    .review-run-facts {
        grid-template-columns: 1fr;
    }

    .low-rating-main {
        flex-direction: column;
    }

    .low-rating-score {
        text-align: left;
    }

    .review-run-title,
    .review-run-compact-meta,
    .review-run-inline-metrics {
        align-items: flex-start;
        flex-direction: column;
    }

    .review-run-compact-meta span + span::before {
        content: none;
        margin-right: 0;
    }
}

/* ===================================================================
   Automation Center
   =================================================================== */

.automation-summary-grid {
    grid-template-columns: repeat(5, 1fr);
}

.automation-filter-panel,
.automation-readiness-card,
.automation-section {
    margin-bottom: 12px;
}

.automation-filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 360px) auto;
    gap: 10px;
    align-items: end;
    padding: 16px 20px 18px;
}

.automation-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.automation-filter-grid label span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.automation-filter-actions {
    display: flex;
    gap: 8px;
}

.automation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
    gap: 12px;
}

.automation-panel-body {
    padding: 16px 20px 18px;
}

.automation-tenant-list,
.automation-side-stack,
.automation-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 18px;
}

.automation-side-stack {
    padding: 0;
}

.automation-tenant-card,
.automation-log-item {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    padding: 14px;
}

.automation-tenant-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.automation-tenant-main h3 {
    margin: 0 0 2px;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.automation-tenant-main p,
.automation-log-item span,
.automation-log-item p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.automation-fact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.automation-fact-grid div {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
    padding: 9px 10px;
}

.automation-fact-grid span {
    display: block;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.automation-fact-grid strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
}

.automation-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.automation-log-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.automation-log-item > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.automation-log-item strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
}

.automation-tech-panel {
    max-height: 220px;
    overflow: auto;
}

@media (max-width: 1199.98px) {
    .automation-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .automation-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .automation-summary-grid,
    .automation-filter-grid,
    .automation-fact-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   Integration Health
   =================================================================== */

.integration-summary-grid {
    grid-template-columns: repeat(5, 1fr);
}

.integration-filter-panel,
.integration-readiness-card,
.integration-section {
    margin-bottom: 12px;
}

.integration-filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 360px) auto;
    gap: 10px;
    align-items: end;
    padding: 16px 20px 18px;
}

.integration-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.integration-filter-grid label span {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.integration-filter-actions {
    display: flex;
    gap: 8px;
}

.integration-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
    gap: 12px;
}

.integration-panel-body {
    padding: 16px 20px 18px;
}

.integration-tenant-list,
.integration-side-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 18px;
}

.integration-side-stack {
    padding: 0;
}

.integration-tenant-card {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    padding: 14px;
}

.integration-tenant-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.integration-tenant-main h3 {
    margin: 0 0 2px;
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
}

.integration-tenant-main p,
.integration-group-grid p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.integration-group-grid,
.integration-fact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.integration-fact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 8px;
}

.integration-group-grid > div,
.integration-fact-grid > div {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface-muted);
    padding: 9px 10px;
}

.integration-group-grid span:first-child,
.integration-fact-grid span {
    display: block;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.integration-group-grid strong,
.integration-fact-grid strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
}

.integration-group-grid strong {
    display: block;
    margin: 4px 0;
}

.integration-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.integration-tech-panel {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (max-width: 1199.98px) {
    .integration-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .integration-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .integration-summary-grid,
    .integration-filter-grid,
    .integration-group-grid,
    .integration-fact-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   Package & Billing
   =================================================================== */

.billing-summary-grid {
    grid-template-columns: repeat(4, 1fr);
}

.billing-readiness-card {
    margin-bottom: 12px;
}

/* ===================================================================
   Operations Overview
   =================================================================== */

.ops-overview-summary,
.ops-overview-hero,
.ops-center-panel,
.ops-status-panel {
    margin-bottom: 12px;
}

.ops-priority-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 18px;
}

.ops-priority-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--admin-border-soft);
    border-left: 3px solid var(--admin-border);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.ops-priority-card:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
}

.ops-priority-card--critical { border-left-color: var(--tone-critical); }
.ops-priority-card--warning  { border-left-color: var(--tone-warning); }
.ops-priority-card--info     { border-left-color: var(--admin-accent); }
.ops-priority-card--positive { border-left-color: var(--tone-positive); }

.ops-priority-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
}

.ops-priority-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ops-priority-label {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ops-priority-copy strong {
    color: var(--admin-text-strong);
    font-size: var(--fs-body);
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ops-priority-copy small,
.ops-priority-card em {
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    font-style: normal;
}

.ops-priority-action {
    color: var(--admin-accent-strong);
    font-size: var(--fs-tiny);
    font-weight: 650;
}

.ops-priority-card em {
    white-space: nowrap;
}

.ops-center-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 18px;
}

.ops-center-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    padding: 12px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.ops-center-card:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border-strong);
}

.ops-center-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.ops-center-card strong {
    display: block;
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    font-weight: 650;
}

.ops-center-card small {
    display: block;
    margin-top: 2px;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    line-height: 1.4;
}

.ops-overview-empty {
    padding: 16px 20px 18px;
}

@media (max-width: 1199.98px) {
    .billing-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ops-center-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .billing-summary-grid,
    .ops-priority-list,
    .ops-center-grid {
        grid-template-columns: 1fr;
    }

    .ops-priority-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ops-priority-card em {
        grid-column: 2;
    }
}

@media (max-width: 1199.98px) {
    .incident-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .incident-filter-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .incident-summary-grid,
    .incident-card-main,
    .incident-card-facts,
    .incident-detail-grid {
        grid-template-columns: 1fr;
    }

    .incident-filter-grid {
        grid-template-columns: 1fr;
    }

    .incident-tenant-head {
        flex-direction: column;
    }
}

/* ===================================================================
   UX-1 — Unified Badge System
   =================================================================== */

.ubadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
    letter-spacing: 0.01em;
}

.ubadge-dot {
    width: 5.5px;
    height: 5.5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.ubadge-positive { background: var(--tone-positive-bg); border-color: color-mix(in srgb, var(--tone-positive) 18%, transparent); color: var(--tone-positive); }
.ubadge-critical { background: var(--tone-critical-bg); border-color: color-mix(in srgb, var(--tone-critical) 18%, transparent); color: var(--tone-critical); }
.ubadge-warning  { background: var(--tone-warning-bg); border-color: color-mix(in srgb, var(--tone-warning) 18%, transparent); color: var(--tone-warning); }
.ubadge-accent   { background: var(--admin-accent-soft); border-color: var(--admin-accent-soft-strong); color: var(--admin-accent); }
.ubadge-neutral  { background: var(--tone-neutral-bg); border-color: var(--admin-border-soft); color: var(--admin-text-muted); }
.ubadge-muted    { background: var(--tone-neutral-bg); border-color: var(--admin-border-soft); color: var(--admin-text-subtle); }
.ubadge-info     { background: var(--admin-accent-soft); border-color: var(--admin-accent-soft-strong); color: var(--admin-accent); }
.ubadge-plain    { background: var(--tone-neutral-bg); border-color: var(--admin-border-soft); color: var(--admin-text-muted); font-weight: 500; }

.ubadge-accent .ubadge-dot { animation: state-skeleton-pulse 1.6s ease-in-out infinite; }

/* ===================================================================
   UX-1 — Provisioning Run Detail Layout
   =================================================================== */

/* --- Hero --- */
.provision-run-hero.tenant-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 24px;
    align-items: start;
    padding: 22px 24px 20px;
    margin-bottom: 0;
}

.provision-run-hero h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 2px;
}

.provision-run-hero .hero-info {
    margin: 0;
    font-size: var(--fs-small);
    color: var(--admin-text-muted);
    line-height: 1.5;
}

.provision-run-hero .hero-info .tenant-slug {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--admin-surface-muted);
    padding: 1px 5px;
    border-radius: 3px;
}

.provision-run-hero .hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.provision-run-hero .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
}

.provision-run-hero .hero-progress {
    width: 160px;
    height: 4px;
    background: var(--admin-border-soft);
    border-radius: 2px;
    overflow: hidden;
}

.provision-run-hero .hero-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--tone-positive);
    transition: width 0.4s ease;
}

.provision-run-hero .hero-progress-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--admin-text-subtle);
    text-align: right;
    margin-top: 1px;
}

@media (max-width: 767.98px) {
    .provision-run-hero.tenant-hero {
        grid-template-columns: 1fr;
    }
    .provision-run-hero .hero-right {
        align-items: flex-start;
    }
    .provision-run-hero .hero-badges {
        justify-content: flex-start;
    }
    .provision-run-hero .hero-progress {
        width: 100%;
    }
}

/* --- Section spacing --- */
.prov-section {
    margin-bottom: 14px;
}

.prov-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 8px;
}

.prov-section-header .eyebrow {
    margin-bottom: 0;
}

.prov-section-header p {
    margin: 0;
    font-size: 11px;
    color: var(--admin-text-faint);
}

.prov-section-body {
    padding: 0 18px 14px;
}

/* --- Provisioning Timeline --- */
.ptimeline {
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
}

.ptimeline-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0;
    align-items: stretch;
    position: relative;
}

.ptimeline-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 18px;
}

.ptimeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2.5px solid var(--admin-border);
    background: var(--admin-surface);
    flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 0 0 3px var(--admin-surface);
}

.ptimeline-dot-positive  { background: var(--tone-positive); border-color: var(--tone-positive); box-shadow: 0 0 0 3px var(--admin-surface), 0 0 0 5px var(--tone-positive-bg); }
.ptimeline-dot-critical  { background: var(--tone-critical); border-color: var(--tone-critical); box-shadow: 0 0 0 3px var(--admin-surface), 0 0 0 5px var(--tone-critical-bg); }
.ptimeline-dot-warning   { background: var(--tone-warning); border-color: var(--tone-warning); box-shadow: 0 0 0 3px var(--admin-surface), 0 0 0 5px var(--tone-warning-bg); }
.ptimeline-dot-accent    { background: var(--admin-accent); border-color: var(--admin-accent); box-shadow: 0 0 0 3px var(--admin-surface), 0 0 0 5px var(--admin-accent-soft); animation: ptimeline-pulse 2s ease-in-out infinite; }
.ptimeline-dot-neutral   { background: var(--admin-border); border-color: var(--admin-border); }

@keyframes ptimeline-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--admin-surface), 0 0 0 5px var(--admin-accent-soft); }
    50%      { box-shadow: 0 0 0 3px var(--admin-surface), 0 0 0 7px var(--admin-accent-soft); }
}

.ptimeline-connector {
    width: 2px;
    flex: 1;
    background: var(--admin-border-soft);
    margin-top: 4px;
}

.ptimeline-item:last-child .ptimeline-connector {
    background: transparent;
}

/* card container for each step */
.ptimeline-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    margin: 6px 0;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ptimeline-card:hover {
    border-color: var(--admin-border);
}

.ptimeline-item--succeeded .ptimeline-card {
    border-left: 3px solid var(--tone-positive);
}

.ptimeline-item--failed .ptimeline-card {
    border-left: 3px solid var(--tone-critical);
    background: color-mix(in srgb, var(--tone-critical-bg) 30%, var(--admin-surface));
}

.ptimeline-item--running .ptimeline-card {
    border-left: 3px solid var(--admin-accent);
    box-shadow: 0 0 0 1px var(--admin-accent-soft);
}

.ptimeline-item--waiting .ptimeline-card {
    border-left: 3px solid var(--tone-warning);
}

.ptimeline-item--pending .ptimeline-card {
    opacity: 0.55;
    border-left: 3px solid var(--admin-border-soft);
}

.ptimeline-item--pending .ptimeline-card:hover {
    opacity: 0.75;
}

.ptimeline-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.ptimeline-card-content {
    flex: 1;
    min-width: 0;
}

.ptimeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-strong);
    line-height: 1.35;
    margin: 0;
}

.ptimeline-item--pending .ptimeline-title {
    color: var(--admin-text-subtle);
    font-weight: 500;
}

.ptimeline-summary {
    margin-top: 3px;
    font-size: 11px;
    color: var(--admin-text-subtle);
    line-height: 1.4;
    font-feature-settings: 'tnum';
}

.ptimeline-summary code {
    font-family: var(--font-mono);
    font-size: 10px;
    background: var(--admin-surface-muted);
    padding: 1px 4px;
    border-radius: 3px;
}

.ptimeline-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 1px;
}

.ptimeline-duration {
    font-size: 11px;
    font-weight: 500;
    color: var(--admin-text-subtle);
    font-feature-settings: 'tnum';
    font-family: var(--font-mono);
}

.ptimeline-embed {
    padding: 0 14px 12px;
    border-top: 1px solid var(--admin-border-soft);
}

.ptimeline-embed .state-card,
.ptimeline-embed .state-inline {
    margin-top: 10px;
}

/* action row inside embed */
.ptimeline-action-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.ptimeline-action-row .btn-ghost {
    font-size: 11px;
    padding: 4px 10px;
}

.ptimeline-action-row .btn-confirm-danger {
    font-size: 11px;
    padding: 4px 10px;
}

.ptimeline-action-row .form-control-sm {
    height: 28px;
    font-size: 11px;
    max-width: 160px;
}

.ptimeline-action-row form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Alert density control --- */
.prov-alert-strip {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

.prov-alert-strip .state-inline {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

.prov-alert-strip .state-inline:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-top: 1px solid var(--admin-border-soft);
}

.prov-alert-strip .state-inline:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-bottom: 1px solid var(--admin-border-soft);
}

.prov-alert-strip .state-inline:only-child {
    border-radius: var(--radius-md);
    border: 1px solid var(--admin-border-soft);
}

/* --- Technical details collapse --- */
.technical-collapse-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--admin-border-soft);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: var(--fs-tiny);
    font-weight: 600;
    color: var(--admin-text-subtle);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.technical-collapse-toggle:hover {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border);
    color: var(--admin-text-muted);
}

.technical-collapse-toggle i {
    font-size: 11px;
    transition: transform 0.2s;
}

.technical-collapse-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
}

/* --- Responsive timeline --- */
@media (max-width: 767.98px) {
    .ptimeline-item {
        grid-template-columns: 28px 1fr;
    }
    .ptimeline-card-main {
        flex-direction: column;
        gap: 6px;
    }
    .ptimeline-card-right {
        flex-direction: row;
        align-items: center;
    }
    .ptimeline-action-row {
        flex-direction: column;
        align-items: stretch;
    }
    .ptimeline-action-row form {
        flex-wrap: wrap;
    }
    .ptimeline-action-row .form-control-sm {
        max-width: 100%;
    }
    .prov-section-body {
        padding: 0 12px 12px;
    }
    .prov-section-header {
        padding: 12px 12px 8px;
        flex-wrap: wrap;
    }
}

/* ===================================================================
   Sprint E1 — Provisioning Console (legacy, retained for compatibility)
   =================================================================== */

.run-state-pill,
.step-state-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--admin-border-soft);
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.run-state-pill .status-dot,
.step-state-pill .status-dot {
    background: currentColor;
}

.run-state-pill--completed,
.step-state-pill--succeeded {
    background: var(--tone-positive-bg);
    color: var(--tone-positive);
    border-color: rgba(15, 118, 110, 0.18);
}

.run-state-pill--failed,
.step-state-pill--failed {
    background: var(--tone-critical-bg);
    color: var(--tone-critical);
    border-color: rgba(177, 50, 44, 0.22);
}

.run-state-pill--waiting,
.run-state-pill--partially_failed,
.step-state-pill--waiting,
.step-state-pill--skipped,
.step-state-pill--rolled-back {
    background: var(--tone-warning-bg);
    color: var(--tone-warning);
    border-color: rgba(148, 96, 0, 0.2);
}

.run-state-pill--provisioning,
.run-state-pill--retrying,
.run-state-pill--validating,
.step-state-pill--running {
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
    border-color: var(--admin-accent-soft-strong);
}

.run-state-pill--draft,
.run-state-pill--ready,
.run-state-pill--archived,
.step-state-pill--pending {
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
}

.stack-item-meta,
.provision-step-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.stack-item-meta em,
.provision-step-meta em {
    font-style: normal;
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
}

.provision-console-panel {
    margin-bottom: 16px;
}

.provision-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: start;
}

.onboarding-wizard-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: start;
}

.onboarding-steps,
.provision-summary {
    position: sticky;
    top: calc(var(--header-height) + 14px);
}

.onboarding-step-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.onboarding-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
}

.onboarding-step > span {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
    font-size: var(--fs-tiny);
    font-weight: 700;
}

.onboarding-step strong {
    display: block;
    color: var(--admin-text-strong);
    font-size: var(--fs-small);
    line-height: 1.25;
}

.onboarding-step small {
    color: var(--admin-text-subtle);
    font-size: var(--fs-tiny);
}

.onboarding-step.is-current {
    border-color: var(--admin-accent-soft-strong);
    background: var(--admin-accent-soft);
}

.onboarding-step.is-current > span {
    background: var(--admin-surface);
    color: var(--admin-accent);
}

.onboarding-step.is-optional {
    border-style: dashed;
}

.onboarding-main {
    overflow: hidden;
}

.onboarding-card-stack {
    display: flex;
    flex-direction: column;
}

.onboarding-step-card {
    padding: 18px 20px;
    border-top: 1px solid var(--admin-border-soft);
}

.onboarding-step-card:first-child {
    border-top: 0;
}

.onboarding-step-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.onboarding-step-card-head h2 {
    margin: 0 0 2px;
    color: var(--admin-text-strong);
    font-size: var(--fs-h3);
    font-weight: 650;
}

.onboarding-step-card-head p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.onboarding-technical-details {
    margin-top: 14px;
}

.onboarding-technical-details .provision-field-grid {
    margin-top: 12px;
}

.onboarding-passive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1399.98px) {
    .onboarding-wizard-grid {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .onboarding-wizard-grid .provision-summary {
        grid-column: 2;
        position: static;
    }
}

@media (max-width: 1199.98px) {
    .provision-form-grid,
    .onboarding-wizard-grid {
        grid-template-columns: 1fr;
    }

    .onboarding-steps,
    .onboarding-wizard-grid .provision-summary {
        grid-column: auto;
        position: static;
    }
}

@media (max-width: 767.98px) {
    .onboarding-passive-grid {
        grid-template-columns: 1fr;
    }
}

.provision-form-main,
.provision-validation-panel {
    overflow: hidden;
}

.provision-form-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.provision-form-section {
    padding: 16px 18px;
    border-top: 1px solid var(--admin-border-soft);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.provision-form-section:first-child {
    border-top: 0;
}

.provision-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 991.98px) {
    .provision-field-grid {
        grid-template-columns: 1fr;
    }
}

.provision-field-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.provision-field-grid label > span {
    color: var(--admin-text-muted);
    font-size: 11px;
    font-weight: 600;
}

.provision-field-grid label > .form-hint {
    font-size: 10.5px;
    color: var(--admin-text-faint);
    font-weight: 400;
    margin-top: -2px;
}

.provision-run-hero {
    margin-bottom: 16px;
}

.provision-step-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.provision-step-toolbar p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
}

.provision-step-list {
    padding: 0;
    gap: 6px;
}

.provision-step-row {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--admin-surface);
    overflow: hidden;
}

.provision-step-row--failed {
    border-color: rgba(177, 50, 44, 0.22);
}

.provision-step-row--waiting {
    border-color: rgba(148, 96, 0, 0.2);
}

.provision-step-row--running {
    border-color: var(--admin-accent-soft-strong);
}

.provision-step-main {
    width: 100%;
    border-radius: 0;
    padding: 11px 12px;
}

.provision-step-embed {
    padding: 0 12px 12px;
}

.provision-step-embed .state-inline,
.provision-step-embed .state-card {
    margin-top: 0;
}

.provision-step-row--running .provision-step-main strong::after,
.run-state-pill--provisioning::after,
.run-state-pill--retrying::after,
.step-state-pill--running::after {
    content: '';
    width: 5px;
    height: 5px;
    margin-left: 2px;
    border-radius: 50%;
    background: currentColor;
    animation: state-skeleton-pulse 1.6s ease-in-out infinite;
}

.provision-advanced-section {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--admin-radius);
    padding: 12px 14px;
}

.provision-advanced-section summary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--admin-text-sub);
}

.provision-advanced-section[open] summary {
    margin-bottom: 4px;
}

.provision-validation-panel .stack-list {
    gap: 8px;
}

.provision-validation-panel .state-card {
    margin-top: 4px;
}

.provision-summary-list {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provision-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.provision-summary-row dt {
    color: var(--admin-text-faint);
    font-weight: 500;
    white-space: nowrap;
}

.provision-summary-row dd {
    margin: 0;
    color: var(--admin-text-strong);
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

.provision-summary-row dd:empty::after {
    content: '—';
    color: var(--admin-text-faint);
    font-weight: 400;
}

.provision-summary-divider {
    border: 0;
    border-top: 1px solid var(--admin-border-soft);
    margin: 4px 0;
}

/* CTA bar */
.provision-cta {
    padding: 14px 16px;
    border-top: 1px solid var(--admin-border-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.provision-cta .btn {
    width: 100%;
    justify-content: center;
}

.provision-cta .btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* form field 2-col variant */
.provision-field-grid--2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 991.98px) {
    .provision-field-grid--2col {
        grid-template-columns: 1fr;
    }
}

/* form section eyebrow with description */
.provision-section-intro {
    margin-bottom: 2px;
}

.provision-section-intro .eyebrow {
    margin-bottom: 2px;
}

.provision-section-intro p {
    margin: 0;
    font-size: 11px;
    color: var(--admin-text-faint);
}

@media (max-width: 1199.98px) {
    .provision-summary {
        position: static;
    }
}

/* ===================================================================
   UX-1D — Layout Stabilization & Visual Hierarchy
   =================================================================== */

/* --- Hub grid: equal weight columns --- */
.prov-hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

@media (max-width: 1199.98px) {
    .prov-hub-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Borderless panel variant for hub --- */
.panel--flush > .prov-section-header {
    padding: 16px 18px 8px;
}

/* --- Run card row --- */
.prov-run-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}

.prov-run-card + .prov-run-card {
    border-top: 1px solid var(--admin-border-soft);
}

.prov-run-card:hover {
    background: var(--tone-neutral-bg);
}

.prov-run-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.prov-run-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-strong);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prov-run-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--admin-text-faint);
    line-height: 1.3;
}

.prov-run-card-meta .tenant-slug {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--admin-text-subtle);
}

.prov-run-card-meta .sep {
    color: var(--admin-border);
    font-size: 8px;
}

.prov-run-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.prov-inline-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.prov-run-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.prov-run-card-progress {
    width: 56px;
    height: 3px;
    background: var(--admin-border-soft);
    border-radius: 2px;
    overflow: hidden;
}

.prov-run-card-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--tone-positive);
    transition: width 0.3s;
}

.prov-run-card-progress-fill--active { background: var(--admin-accent); }
.prov-run-card-progress-fill--failed { background: var(--tone-critical); }

.prov-run-card-duration {
    font-size: 10.5px;
    color: var(--admin-text-faint);
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    min-width: 48px;
    text-align: right;
}

/* --- Attention item (compact incident row) --- */
.prov-attention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}

.prov-attention-item + .prov-attention-item {
    border-top: 1px solid var(--admin-border-soft);
}

.prov-attention-item:hover {
    background: var(--tone-neutral-bg);
}

.prov-attention-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.prov-attention-dot--failed  { background: var(--tone-critical); }
.prov-attention-dot--waiting { background: var(--tone-warning); }
.prov-attention-dot--partial { background: var(--tone-warning); }

.prov-attention-body {
    flex: 1;
    min-width: 0;
}

.prov-attention-body strong {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--admin-text-strong);
    line-height: 1.3;
}

.prov-attention-body small {
    font-size: 10.5px;
    color: var(--admin-text-faint);
}

.prov-attention-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.prov-attention-right em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--admin-text-faint);
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
}

/* --- Queue item (compact step row) --- */
.prov-queue-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    cursor: pointer;
    border: 0;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.1s;
}

.prov-queue-item + .prov-queue-item {
    border-top: 1px solid var(--admin-border-soft);
}

.prov-queue-item:hover {
    background: var(--tone-neutral-bg);
}

.prov-queue-item-body {
    flex: 1;
    min-width: 0;
}

.prov-queue-item-body strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text-strong);
}

.prov-queue-item-body small {
    font-size: 10.5px;
    color: var(--admin-text-faint);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════ */
/*  Launch Readiness Checklist               */
/* ═══════════════════════════════════════════ */

.launch-checklist {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.launch-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}
.launch-check:hover { background: var(--tone-neutral-bg); }

.launch-check-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.launch-check--ok .launch-check-icon    { color: var(--tone-positive); }
.launch-check--warn .launch-check-icon  { color: var(--tone-warning); }
.launch-check--manual .launch-check-icon { color: var(--tone-warning); }
.launch-check--fail .launch-check-icon  { color: var(--tone-critical); }
.launch-check--pending .launch-check-icon { color: var(--tone-neutral); }

.launch-check-label {
    font-weight: 500;
    color: var(--admin-text);
}
.launch-check--pending .launch-check-label { color: var(--admin-text-subtle); }

.launch-check-detail {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--admin-text-subtle);
    text-align: right;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════ */
/*  Automation Next Steps                    */
/* ═══════════════════════════════════════════ */

.automation-next-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.automation-next-item {
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--tone-neutral-bg);
}

.automation-next-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.automation-next-icon {
    color: var(--tone-neutral);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.automation-next-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--admin-text);
    flex: 1;
}

.automation-next-header .btn-ghost {
    font-size: 0.75rem;
    opacity: 0.6;
}

.automation-next-reason {
    margin: 4px 0 0 30px;
    font-size: 0.78rem;
    color: var(--admin-text-subtle);
}

.automation-cta-area {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0 0;
    border-top: 1px solid var(--admin-border);
}

.automation-cta-hint {
    font-size: 0.8rem;
    color: var(--admin-text-subtle);
    margin: 0;
}

.launch-tech-note {
    padding: 10px 14px;
    margin-top: 6px;
    background: var(--tone-neutral-bg);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--admin-text-subtle);
    line-height: 1.5;
}
.launch-tech-note code {
    font-size: 0.78rem;
    background: color-mix(in srgb, var(--admin-text) 8%, transparent);
    padding: 1px 5px;
    border-radius: 3px;
}

/* --- Responsive --- */
@media (max-width: 767.98px) {
    .prov-run-card {
        flex-wrap: wrap;
    }
    .prov-run-card-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .prov-run-card-progress {
        flex: 1;
        width: auto;
    }
    .prov-attention-item {
        flex-wrap: wrap;
    }
    .prov-attention-right {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        padding-top: 4px;
    }
    .launch-check { flex-wrap: wrap; }
    .launch-check-detail { margin-left: 30px; width: 100%; text-align: left; }
    .automation-cta-area { flex-direction: column; align-items: flex-start; }
}

/* ===================================================================
   Health / Observability — responsive grid overrides
   =================================================================== */

@media (max-width: 1199.98px) {
    .summary-grid[style*="repeat(6"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767.98px) {
    .summary-grid[style*="repeat(6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .detail-grid[style*="repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.health-subsystem-card:hover {
    box-shadow: var(--shadow-card);
}

/* ===================================================================
   Entitlement Management — Premium SaaS UX
   =================================================================== */

.ent-summary-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 991.98px) {
    .ent-summary-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575.98px) {
    .ent-summary-strip { grid-template-columns: repeat(2, 1fr); }
}

.ent-metric {
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ent-metric-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--admin-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ent-metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text-strong);
    font-feature-settings: 'tnum';
    line-height: 1.3;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.ent-metric-value small {
    font-size: 11px;
    font-weight: 500;
    color: var(--admin-text-faint);
}

.ent-metric-sub {
    font-size: 10.5px;
    color: var(--admin-text-faint);
    font-weight: 500;
}

.ent-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.ent-filter-bar .form-control,
.ent-filter-bar .form-select {
    height: 30px;
    font-size: 12px;
    padding: 0 10px;
}

.ent-filter-bar .form-select {
    padding-right: 28px;
    max-width: 160px;
}

.ent-group {
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
}

.ent-group:last-child {
    margin-bottom: 0;
}

.ent-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--admin-surface-muted);
    border-bottom: 1px solid var(--admin-border-soft);
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}

.ent-group-header:hover {
    background: var(--admin-bg);
}

.ent-group-header > i:first-child {
    font-size: 11px;
    color: var(--admin-text-faint);
    transition: transform 0.2s;
}

.ent-group.is-collapsed .ent-group-header > i:first-child {
    transform: rotate(-90deg);
}

.ent-group.is-collapsed .ent-group-body {
    display: none;
}

.ent-group-count {
    font-size: 10.5px;
    color: var(--admin-text-faint);
    font-weight: 500;
    margin-left: auto;
    font-feature-settings: 'tnum';
}

.ent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--admin-border-soft);
    transition: background 0.1s;
}

.ent-group-body > .ent-item:last-of-type {
    border-bottom: 0;
}

.ent-item:hover {
    background: #f7f9fc;
}

.ent-item--override {
    background: color-mix(in srgb, var(--tone-warning-bg) 35%, var(--admin-surface));
    border-left: 3px solid var(--tone-warning);
    padding-left: 11px;
}

.ent-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ent-item-dot--on {
    background: var(--tone-positive);
    box-shadow: 0 0 0 3px var(--tone-positive-bg);
}

.ent-item-dot--off {
    background: var(--admin-border);
}

.ent-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ent-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-strong);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ent-item-key {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--admin-text-faint);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ent-item-reason {
    font-size: 10.5px;
    color: var(--tone-warning);
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ent-item-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    min-width: 52px;
    text-align: right;
    flex-shrink: 0;
}

.ent-item-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-text-strong);
    font-feature-settings: 'tnum';
    line-height: 1.3;
}

.ent-item-unit {
    font-size: 10px;
    color: var(--admin-text-faint);
    text-transform: lowercase;
}

.ent-item-source {
    flex-shrink: 0;
}

.ent-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.ent-override-panel {
    padding: 10px 14px;
    background: var(--admin-bg);
    border-bottom: 1px solid var(--admin-border-soft);
}

@media (max-width: 767.98px) {
    .ent-item {
        flex-wrap: wrap;
        gap: 6px 10px;
    }
    .ent-item-info {
        flex-basis: calc(100% - 30px);
    }
    .ent-item-value,
    .ent-item-source,
    .ent-item-actions {
        flex-basis: auto;
    }
}

/* ==========================================================
   Yeni Müşteri — editorial kanvas, kart yok, wizard yok
   ========================================================== */

/* Opt-in içerik kanvası: page-header ve form aynı hizada kalır. */
.admin-content--canvas {
    max-width: 1008px;
}

.customer-form {
    max-width: 960px;
}

.customer-section {
    padding: 22px 0;
    border-top: 1px solid var(--admin-border-soft);
}

.customer-section:first-of-type {
    padding-top: 4px;
    border-top: 0;
}

.customer-section-title {
    margin: 0 0 16px;
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--admin-text-strong);
}

/* Desktop'ta iki eşit kolon; kısa alanlar tüm satırı kaplamaz. */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.customer-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--admin-text);
}

.customer-field .form-control {
    width: 100%;
    height: 38px;
    font-size: var(--fs-body);
}

.customer-field-optional {
    margin-left: 4px;
    font-weight: 400;
    color: var(--admin-text-subtle);
}

.customer-field-error {
    margin: 6px 0 0;
    font-size: var(--fs-small);
    line-height: 1.45;
    color: var(--tone-critical);
}

.form-control.is-invalid,
.customer-code-input.is-invalid {
    border-color: var(--tone-critical);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--tone-critical-bg);
}

/* ── Firma bloğu: logo solda, alanlar sağda ── */

.customer-company {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.customer-logo {
    display: grid;
    /* Track açıkça 64px: `auto` track kutu genişliğine kilitlenmeyip en geniş
       item'ın max-content'ine açılıyor ve içerik sağdaki alanların üzerine taşıyordu. */
    grid-template-columns: 64px;
    gap: 8px;
    justify-items: center;
    width: 64px;
}

/* Native file input görünmez ama klavyeyle erişilebilir kalır. */
.customer-logo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.customer-logo-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0;
    border: 1px dashed var(--admin-border-strong);
    border-radius: var(--radius-lg);
    background: var(--admin-surface);
    background-size: cover;
    background-position: center;
    color: var(--admin-text-subtle);
    font-size: var(--fs-h2);
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.customer-logo-tile:hover {
    border-color: var(--admin-text-subtle);
    background-color: var(--admin-surface-muted);
}

.customer-logo-tile.has-image {
    border-style: solid;
    border-color: var(--admin-border);
}

.customer-logo-tile.has-image span {
    display: none;
}

.customer-logo-input:focus-visible + .customer-logo-tile {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.customer-logo-meta {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    max-width: none;
    min-width: 0;
}

.customer-logo-action,
.customer-logo-remove {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--admin-accent);
    font-size: var(--fs-small);
    font-weight: 500;
    cursor: pointer;
}

.customer-logo-remove {
    color: var(--admin-text-subtle);
}

.customer-logo-action:hover,
.customer-logo-remove:hover {
    text-decoration: underline;
}

/* Kısıt metni sağ içerik alanında; 64px logo kolonuna sığmıyordu. */
.customer-logo-hint {
    width: auto;
    max-width: none;
    margin: 8px 0 0;
    font-size: var(--fs-tiny);
    line-height: 1.4;
    color: var(--admin-text-faint);
    text-align: left;
}

.customer-company-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Müşteri kodu: ikincil, teknik input hissi vermez ── */

.customer-code {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding-top: 2px;
}

/* Etiket ve açıklama kendi satırlarında; değer + Düzenle aradaki satırda kalır. */
.customer-code-label {
    flex-basis: 100%;
    margin: 0;
    font-size: var(--fs-small);
    color: var(--admin-text-muted);
}

.customer-code-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: var(--fs-tiny);
    line-height: 1.4;
    color: var(--admin-text-faint);
}

.customer-code-input {
    flex: 0 1 auto;
    min-width: 180px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--admin-text-strong);
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.customer-code-input::placeholder {
    font-family: var(--font-sans);
    color: var(--admin-text-faint);
}

.customer-code-input:hover {
    border-color: var(--admin-border);
}

.customer-code-input:focus {
    border-color: var(--admin-accent-soft-strong);
    background: var(--admin-surface);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
    outline: none;
}

.customer-code-edit {
    padding: 0;
    border: 0;
    background: none;
    color: var(--admin-accent);
    font-size: var(--fs-small);
    cursor: pointer;
}

.customer-code-edit:hover {
    text-decoration: underline;
}

.customer-code:focus-within .customer-code-edit {
    visibility: hidden;
}

.customer-code .customer-field-error {
    flex-basis: 100%;
    margin-top: 2px;
}

/* ── Plan: segmented control, kart değil ── */

.plan-segment {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    background: var(--admin-surface-muted);
}

.plan-segment-option {
    margin: 0;
}

.plan-segment-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.plan-segment-option span {
    display: block;
    min-width: 108px;
    padding: 7px 18px;
    border-radius: var(--radius-md);
    color: var(--admin-text-muted);
    font-size: var(--fs-small);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.plan-segment-option span:hover {
    color: var(--admin-text-strong);
}

.plan-segment-option input:checked + span {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    padding: 6px 17px;
    color: var(--admin-text-strong);
    font-weight: 600;
    box-shadow: var(--shadow-card);
}

.plan-segment-option input:focus-visible + span {
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.plan-description {
    margin: 10px 0 0;
    font-size: var(--fs-small);
    line-height: 1.45;
    color: var(--admin-text-muted);
    min-height: 1.45em;
}

/* ── Durum satırı ── */

.customer-form-status {
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--radius-md);
    background: var(--tone-neutral-bg);
}

.customer-form-status p {
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.45;
    color: var(--tone-neutral);
}

.customer-form-status[data-tone="positive"] { background: var(--tone-positive-bg); border-color: transparent; }
.customer-form-status[data-tone="positive"] p { color: var(--tone-positive); }
.customer-form-status[data-tone="warning"] { background: var(--tone-warning-bg); border-color: transparent; }
.customer-form-status[data-tone="warning"] p { color: var(--tone-warning); }
.customer-form-status[data-tone="critical"] { background: var(--tone-critical-bg); border-color: transparent; }
.customer-form-status[data-tone="critical"] p { color: var(--tone-critical); }

/* ── CTA ── */

.customer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 4px;
    padding: 20px 0 4px;
    border-top: 1px solid var(--admin-border-soft);
}

.customer-actions-note {
    margin: 0;
    max-width: 46ch;
    font-size: var(--fs-small);
    line-height: 1.45;
    color: var(--admin-text-subtle);
}

.customer-actions-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.customer-actions-buttons .btn,
.customer-actions-buttons .btn-ghost {
    height: 34px;
}

/* ── Mobile: tek kolon ── */

@media (max-width: 767.98px) {
    .customer-grid {
        grid-template-columns: 1fr;
    }

    .customer-company {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .customer-logo {
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: start;
        align-items: center;
        width: 100%;
        gap: 12px;
    }

    .customer-logo-meta {
        grid-column: 2;
        align-items: flex-start;
        max-width: none;
    }

    .customer-logo-hint {
        text-align: left;
    }

    .plan-segment {
        display: flex;
        width: 100%;
    }

    .plan-segment-option {
        flex: 1;
    }

    .plan-segment-option span {
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .customer-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .customer-actions-buttons {
        justify-content: flex-end;
    }
}

/* ==========================================================
   Kurulum ilerlemesi — salt okuma, sahte yüzde/animasyon yok
   ========================================================== */

.customer-progress {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-progress-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
}

/* Firma logosu ya da baş harf; ilerleme ve final ekranında kullanılır. */
.customer-logo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    background: var(--admin-surface-muted);
    background-size: cover;
    background-position: center;
    color: var(--admin-text-subtle);
    font-size: var(--fs-h2);
    font-weight: 600;
    overflow: hidden;
}

.customer-logo-preview.has-image {
    border-color: var(--admin-border-soft);
    background-color: var(--admin-surface);
}

.customer-progress-identity h2 {
    margin: 0 0 2px;
    font-size: var(--fs-h2);
    font-weight: 600;
}

.customer-progress-identity p {
    margin: 0;
    font-size: var(--fs-small);
    color: var(--admin-text-muted);
}

.customer-progress-body {
    padding: 18px 20px;
}

.customer-phase-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.customer-phase {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 0 18px;
    position: relative;
}

.customer-phase:last-child {
    padding-bottom: 0;
}

/* Fazları birbirine bağlayan dikey çizgi */
.customer-phase:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: 2px;
    width: 1px;
    background: var(--admin-border);
}

.customer-phase-marker {
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    margin-top: 4px;
    border-radius: 50%;
    border: 1.5px solid var(--admin-border-strong);
    background: var(--admin-surface);
    position: relative;
    z-index: 1;
}

.customer-phase-text strong {
    display: block;
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--admin-text-subtle);
    line-height: 1.35;
}

.customer-phase-text small {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-small);
    color: var(--admin-text-faint);
}

.customer-phase-text small:empty {
    display: none;
}

.customer-phase[data-state="active"] .customer-phase-marker {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.customer-phase[data-state="active"] .customer-phase-text strong {
    color: var(--admin-text-strong);
    font-weight: 600;
}

.customer-phase[data-state="done"] .customer-phase-marker {
    border-color: var(--tone-positive);
    background: var(--tone-positive);
}

.customer-phase[data-state="done"] .customer-phase-text strong {
    color: var(--admin-text);
}

.customer-phase[data-state="blocked"] .customer-phase-marker {
    border-color: var(--tone-warning);
    background: var(--tone-warning);
}

.customer-phase[data-state="blocked"] .customer-phase-text strong {
    color: var(--tone-warning);
    font-weight: 600;
}

.customer-progress-foot {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border-soft);
    font-size: var(--fs-small);
    line-height: 1.45;
    color: var(--admin-text-subtle);
}

.customer-ready {
    padding: 18px 20px;
}

.customer-ready-list {
    margin: 0;
}

.customer-ready-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid var(--admin-border-soft);
}

.customer-ready-list > div:last-child {
    border-bottom: 0;
}

.customer-ready-list dt {
    font-size: var(--fs-small);
    font-weight: 400;
    color: var(--admin-text-muted);
}

.customer-ready-list dd {
    margin: 0;
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--admin-text-strong);
    text-align: right;
    word-break: break-word;
}

.customer-ready-note {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border-soft);
    font-size: var(--fs-small);
    line-height: 1.45;
    color: var(--admin-text-subtle);
}

.customer-progress-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ------------------------------------------------------------------
   Provisioning progress screen
   Built on the existing tokens and the ubadge/panel primitives; the only
   new idea here is the step list's three-way completed/running/pending
   reading, which the phase list could not express.
   ------------------------------------------------------------------ */

.prov-progress { display: flex; flex-direction: column; gap: 14px; }

.prov-pg-hero {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; padding: 16px 18px;
}
.prov-pg-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.prov-pg-identity { min-width: 0; }
.prov-pg-identity h2 {
    margin: 0; font-size: 17px; font-weight: 650; color: var(--admin-text-strong);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prov-pg-meta {
    margin: 3px 0 0; display: flex; flex-wrap: wrap; gap: 8px;
    font-size: 12px; color: var(--admin-text-muted);
}
.prov-pg-meta span + span::before { content: '·'; margin-right: 8px; color: var(--admin-text-faint); }

.prov-pg-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 190px; }
.prov-pg-bar {
    width: 190px; height: 5px; border-radius: 999px;
    background: var(--admin-border-soft); overflow: hidden;
}
.prov-pg-bar-fill {
    display: block; height: 100%; border-radius: 999px;
    background: var(--admin-accent); transition: width 400ms ease;
}
.prov-pg-count { margin: 0; font-size: 12px; color: var(--admin-text-muted); font-variant-numeric: tabular-nums; }

.prov-pg-status {
    margin: 0; padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 13px; color: var(--admin-text-muted);
    background: var(--admin-surface-muted); border: 1px solid var(--admin-border-soft);
}
.prov-pg-status[data-mode="working"] {
    color: var(--admin-accent); background: var(--admin-accent-soft);
    border-color: var(--admin-accent-soft-strong);
}
.prov-pg-status[data-mode="stalled"] {
    color: var(--tone-warning); background: var(--tone-warning-bg); border-color: var(--tone-warning-bg);
}
.prov-pg-leave { margin: -4px 0 0; padding: 0 2px; font-size: 12px; color: var(--admin-text-muted); }

.prov-pg-steps, .prov-pg-log, .prov-pg-ready { padding: 14px 18px 16px; }
.prov-pg-steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.prov-pg-steps-head h3 { margin: 0; font-size: 13px; font-weight: 650; color: var(--admin-text); }
.prov-pg-refresh { font-size: 11px; color: var(--admin-text-muted); }

.prov-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.prov-step {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    border: 1px solid transparent;
}
.prov-step-dot {
    flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
    background: var(--admin-border-strong); box-shadow: 0 0 0 3px var(--admin-surface);
}
.prov-step-text { display: flex; align-items: baseline; gap: 9px; min-width: 0; flex: 1 1 auto; }
.prov-step-text strong { font-size: 13px; font-weight: 550; color: var(--admin-text); }
.prov-step-text code { font-size: 11px; color: var(--admin-text-muted); }
.prov-step-state { font-size: 11.5px; color: var(--admin-text-muted); white-space: nowrap; }

/* pending: present but quiet */
.prov-step[data-state="pending"] .prov-step-text strong,
.prov-step[data-state="pending"] .prov-step-text code { color: var(--admin-text-muted); }

/* completed: settled, calm green */
.prov-step[data-state="succeeded"] .prov-step-dot,
.prov-step[data-state="skipped"] .prov-step-dot { background: var(--tone-positive); }
.prov-step[data-state="succeeded"] .prov-step-state,
.prov-step[data-state="skipped"] .prov-step-state { color: var(--tone-positive); }

/* running: the one place the screen is allowed to be emphatic */
.prov-step[data-state="running"] {
    background: var(--admin-accent-soft); border-color: var(--admin-accent-soft-strong);
}
.prov-step[data-state="running"] .prov-step-dot { background: var(--admin-accent); animation: prov-step-pulse 1.8s ease-in-out infinite; }
.prov-step[data-state="running"] .prov-step-text strong { color: var(--admin-accent); font-weight: 650; }
.prov-step[data-state="running"] .prov-step-state { color: var(--admin-accent); }

.prov-step[data-state="failed"] { background: var(--tone-critical-bg); border-color: var(--tone-critical-bg); }
.prov-step[data-state="failed"] .prov-step-dot { background: var(--tone-critical); }
.prov-step[data-state="failed"] .prov-step-state { color: var(--tone-critical); }
.prov-step[data-state="waiting"] .prov-step-dot { background: var(--tone-warning); }
.prov-step[data-state="waiting"] .prov-step-state { color: var(--tone-warning); }

@keyframes prov-step-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--admin-accent-soft); }
    50% { box-shadow: 0 0 0 6px rgba(59, 91, 219, 0.14); }
}
@media (prefers-reduced-motion: reduce) {
    .prov-step[data-state="running"] .prov-step-dot { animation: none; }
    .prov-pg-bar-fill { transition: none; }
}

.prov-more { margin-top: 6px; }
.prov-more > summary {
    cursor: pointer; list-style: none; display: inline-flex; align-items: center;
    padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: 12px; color: var(--admin-text-muted);
    border: 1px dashed var(--admin-border);
}
.prov-more > summary::-webkit-details-marker { display: none; }
.prov-more > summary:hover { color: var(--admin-text); border-color: var(--admin-border-strong); }
.prov-more > summary:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: 2px; }
.prov-steps--rest { margin-top: 6px; }

.prov-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prov-log-item { display: flex; gap: 10px; align-items: flex-start; }
.prov-log-dot {
    flex: 0 0 auto; margin-top: 6px; width: 6px; height: 6px; border-radius: 50%;
    background: var(--admin-border-strong);
}
.prov-log-item[data-level="error"] .prov-log-dot { background: var(--tone-critical); }
.prov-log-item[data-level="warning"] .prov-log-dot { background: var(--tone-warning); }
.prov-log-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.prov-log-body strong { font-size: 12.5px; font-weight: 500; color: var(--admin-text); }
.prov-log-body small { font-size: 11px; color: var(--admin-text-muted); }

.prov-tech { border: 1px solid var(--admin-border); border-radius: var(--radius-sm); background: var(--admin-surface); }
.prov-tech > summary {
    cursor: pointer; padding: 11px 16px; font-size: 12.5px;
    font-weight: 550; color: var(--admin-text-muted);
}
.prov-tech > summary:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: -2px; }
.prov-tech[open] > summary { border-bottom: 1px solid var(--admin-border-soft); }
.prov-tech-list { margin: 0; padding: 12px 16px; display: grid; gap: 8px; }
.prov-tech-list > div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.prov-tech-list dt { color: var(--admin-text-muted); }
.prov-tech-list dd { margin: 0; color: var(--admin-text); }
.prov-tech > .btn-ghost { margin: 0 16px 14px; }

@media (max-width: 720px) {
    .prov-pg-hero-side { align-items: flex-start; width: 100%; }
    .prov-pg-bar { width: 100%; }
}

/* Provisioning hub - the plain list of runs (prov-runs).
   Reuses the prov-run-card vocabulary; adds a progress line and a row action. */

.prov-runs { margin-bottom: 14px; }
.prov-run-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 11px 16px; border-top: 1px solid var(--admin-border-soft);
}
.prov-run-row:first-of-type { border-top: 0; }
.prov-run-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prov-run-row-progress { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.prov-run-row-bar {
    width: 104px; height: 4px; border-radius: 999px;
    background: var(--admin-border-soft); overflow: hidden;
}
.prov-run-row-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--admin-accent); }
.prov-run-row-count { font-size: 11.5px; color: var(--admin-text-muted); font-variant-numeric: tabular-nums; }
.prov-run-row-next { font-size: 12px; color: var(--admin-text-muted); }
.prov-run-row-failure { color: var(--tone-critical); }
.prov-run-row-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

@media (max-width: 720px) {
    .prov-run-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .prov-run-row-side { width: 100%; justify-content: space-between; }
}

/* Provisioning completion - first-login credential handoff.
   Reuses the panel/dl vocabulary; the only new pieces are a small inline
   action button and the muted note states. */

.prov-copy {
    margin-left: 8px; padding: 2px 8px;
    font-size: 11px; font-family: inherit;
    color: var(--admin-text-muted); background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border); border-radius: var(--radius-sm);
    cursor: pointer;
}
.prov-copy:hover { color: var(--admin-text); border-color: var(--admin-border-strong); }
.prov-copy:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: 2px; }
.prov-copy[disabled] { opacity: .6; cursor: default; }
.prov-cred-show { color: var(--admin-accent); border-color: var(--admin-accent-soft-strong); background: var(--admin-accent-soft); }

.prov-cred-value { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .04em; }
.prov-cred-note { font-size: 12px; color: var(--admin-text-muted); }
.prov-cred-hint { margin: 4px 0 0; font-size: 11.5px; color: var(--admin-text-muted); }
.prov-cred-recovery code { font-size: 11px; }

/* Tenant detail - logo field.
   A field, not a drop target: the preview sits on the panel surface it lives
   on, sized so a wide wordmark and a square icon occupy the same space. */

.tenant-logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tenant-logo-preview {
    display: inline-flex; align-items: center; justify-content: center;
    width: 128px; height: 48px; padding: 4px;
    border: 1px solid var(--admin-border-soft); border-radius: var(--radius-sm);
    background: var(--admin-surface);
}
.tenant-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.tenant-logo-empty { font-size: 12.5px; color: var(--admin-text-muted); }
.tenant-logo-actions { display: flex; align-items: center; gap: 8px; }
.tenant-logo-form { display: inline-flex; align-items: center; margin: 0; }
.tenant-logo-form label { cursor: pointer; margin: 0; }
.tenant-logo-form label:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: 2px; }
.tenant-logo-remove { color: var(--tone-critical); }
.tenant-logo-remove:hover { border-color: var(--tone-critical); }
.tenant-logo-hint { margin: 10px 0 0; font-size: 11.5px; color: var(--admin-text-muted); }
.tenant-logo-preview--unavailable {
    border-style: dashed; font-size: 11px; color: var(--admin-text-muted);
}
