:root {
    --crm-bg: #f0f4f8;
    --crm-surface: #ffffff;
    --crm-border: rgba(15, 23, 42, 0.08);
    --crm-text: #0f172a;
    --crm-muted: #64748b;
    --crm-brand: #0f766e;
    --crm-brand-dark: #0d5c56;
    --crm-accent: #14b8a6;
    --crm-live: #059669;
    --crm-radius: 14px;
    --crm-radius-lg: 20px;
    --crm-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --crm-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.1);
    --crm-sidebar-w: 260px;
    --login-bg: #eef2f6;
    --login-surface: #ffffff;
    --login-border: rgba(15, 23, 42, 0.1);
    --login-text: #0f172a;
    --login-muted: #64748b;
    --login-accent: #0f766e;
    --login-hero-bg: linear-gradient(155deg, #0f766e 0%, #134e4a 52%, #0f172a 100%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ——— Login ——— */
body.crm-body-login {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--login-bg);
    color: var(--login-text);
}

.crm-login-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(15, 118, 110, 0.08), transparent 55%),
        var(--login-bg);
}

.crm-login-panel {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    width: 100%;
    max-width: 900px;
    border-radius: var(--crm-radius-lg);
    overflow: hidden;
    border: 1px solid var(--login-border);
    box-shadow: var(--crm-shadow-lg);
    background: var(--login-surface);
}

.crm-login-hero {
    padding: 2.25rem 2rem;
    background: var(--login-hero-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 440px;
    color: #fff;
}

.crm-login-wordmark {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.1;
}

.crm-login-wordmark-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.crm-login-wordmark-sub {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.82;
}

.crm-login-wordmark-hero .crm-login-wordmark-name {
    font-size: 1.5rem;
}

.crm-login-wordmark-hero .crm-login-wordmark-sub {
    color: rgba(255, 255, 255, 0.75);
}

.crm-login-hero-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 0;
}

.crm-login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    width: fit-content;
}

.crm-login-hero h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem 0 0.65rem;
    letter-spacing: -0.02em;
}

.crm-login-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
    max-width: 28ch;
}

.crm-login-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 2rem;
}

.crm-login-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.crm-login-features li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 0.55rem;
}

.crm-login-features li i {
    color: #99f6e4;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.crm-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.crm-login-input-wrap > i.bi-person,
.crm-login-input-wrap > i.bi-lock {
    position: absolute;
    left: 0.85rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.crm-login-input-wrap .form-control {
    padding-left: 2.5rem;
}

.crm-login-input-wrap .form-control::placeholder {
    color: #94a3b8;
}

.crm-login-input-password .form-control {
    padding-right: 2.75rem;
}

.crm-login-pw-toggle {
    position: absolute;
    right: 0.35rem;
    border: none;
    background: transparent;
    color: var(--login-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.crm-login-pw-toggle:hover {
    color: var(--login-accent);
    background: rgba(15, 118, 110, 0.08);
}

.crm-login-alert {
    background: #fef2f2;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.crm-login-footnote {
    margin: 1.35rem 0 0;
    font-size: 0.72rem;
    color: var(--login-muted);
    line-height: 1.5;
}

.crm-login-stat strong {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--login-muted);
    margin-bottom: 0.2rem;
}

.crm-login-stat span {
    font-size: 0.85rem;
    font-weight: 600;
}

.crm-login-form-side {
    padding: 2.25rem 2rem;
    background: var(--login-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.crm-login-form-head {
    margin-bottom: 1.75rem;
}

.crm-login-wordmark-form .crm-login-wordmark-name {
    color: var(--login-text);
    font-size: 1.25rem;
}

.crm-login-wordmark-form .crm-login-wordmark-sub {
    color: var(--login-muted);
}

.crm-login-form-side .crm-brand-mark {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.crm-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--crm-brand), var(--crm-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.crm-login-form-side h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.crm-login-form-side .sub {
    font-size: 0.85rem;
    color: var(--login-muted);
    margin: 0.15rem 0 0;
}

body.crm-body-login .form-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--login-muted);
    margin-bottom: 0.4rem;
}

body.crm-body-login .form-control {
    background: #fff;
    border: 1px solid var(--login-border);
    color: var(--login-text);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
}

body.crm-body-login .crm-login-input-wrap .form-control {
    padding-left: 2.75rem;
}

body.crm-body-login .crm-login-input-password .form-control {
    padding-right: 2.75rem;
}

body.crm-body-login .form-control:focus {
    background: #fff;
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    color: var(--login-text);
}

.crm-btn-login {
    background: var(--crm-brand);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.72rem 1rem;
    border-radius: 10px;
    width: 100%;
    transition: background 0.15s, box-shadow 0.15s;
}

.crm-btn-login:hover {
    color: #fff;
    background: var(--crm-brand-dark);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.25);
}

@media (max-width: 767.98px) {
    .crm-login-panel { grid-template-columns: 1fr; }
    .crm-login-hero {
        min-height: auto;
        padding: 1.75rem 1.5rem;
        gap: 1rem;
    }
    .crm-login-hero-body { padding: 0.75rem 0; }
    .crm-login-stats { display: none; }
}

/* ——— App shell ——— */
body.crm-body-app {
    background: var(--crm-bg);
    color: var(--crm-text);
    margin: 0;
}

.crm-navbar {
    background: linear-gradient(90deg, #0f172a 0%, #134e4a 100%);
    padding: 0.65rem 0;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.12);
}

.crm-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.crm-navbar .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.88;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
}

.crm-navbar .nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.crm-navbar .btn-nav-primary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.crm-page-header {
    margin-bottom: 1.75rem;
}

.crm-page-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
}

.crm-page-header p {
    color: var(--crm-muted);
    margin: 0;
    font-size: 0.95rem;
}

.crm-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.crm-stat-grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.crm-mini-ticket {
    background: #f8fafc;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    color: var(--crm-text);
    transition: border-color 0.15s;
}

.crm-mini-ticket:hover {
    border-color: var(--crm-brand);
    color: var(--crm-brand-dark);
}

.crm-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-ticket-msg {
    background: #f8fafc;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.crm-ticket-msg-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.crm-ticket-thread-chat {
    gap: 1rem;
}

.crm-ticket-bubble {
    max-width: 92%;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.crm-ticket-bubble-customer {
    align-self: flex-start;
    background: #f1f5f9;
    border: 1px solid var(--crm-border);
}

.crm-ticket-bubble-operator {
    align-self: flex-end;
    margin-left: auto;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.crm-ticket-bubble-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    color: var(--crm-muted);
}

.crm-ticket-bubble-body {
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.crm-support-row-urgent {
    background: rgba(220, 38, 38, 0.04);
}

.crm-support-row-urgent td:first-child {
    box-shadow: inset 3px 0 0 #dc2626;
}

.crm-support-row-click {
    cursor: pointer;
}

.crm-support-row-click:hover {
    background: rgba(15, 118, 110, 0.04);
}

.crm-support-filters .form-label {
    font-weight: 600;
}

.crm-card-danger {
    border-color: rgba(220, 38, 38, 0.25);
}

.crm-btn-ghost.active {
    background: rgba(15, 118, 110, 0.1);
    border-color: var(--crm-brand);
    color: var(--crm-brand-dark);
}

@media (max-width: 1199.98px) {
    .crm-stat-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767.98px) {
    .crm-stat-grid, .crm-stat-grid-6 { grid-template-columns: 1fr; }
}

.crm-stat-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--crm-shadow);
}

.crm-stat-card .label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
}

.crm-stat-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.25rem;
}

.crm-tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.crm-tenant-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    box-shadow: var(--crm-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.crm-tenant-card:hover {
    box-shadow: var(--crm-shadow-lg);
    transform: translateY(-2px);
}

.crm-tenant-card-accent {
    height: 4px;
    background: var(--card-accent, var(--crm-brand));
}

.crm-tenant-card-body {
    padding: 1.25rem 1.35rem;
    flex: 1;
}

.crm-tenant-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
}

.crm-tenant-card-slug {
    font-size: 0.8rem;
    color: var(--crm-muted);
    font-family: ui-monospace, monospace;
}

.crm-tenant-domain {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--crm-brand-dark);
    text-decoration: none;
}

.crm-tenant-domain:hover {
    color: var(--crm-brand);
}

.crm-tenant-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.crm-tenant-card-footer {
    padding: 0.85rem 1.35rem;
    border-top: 1px solid var(--crm-border);
    background: #fafbfc;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-btn-site {
    background: var(--crm-brand);
    color: #fff !important;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.crm-btn-site:hover {
    background: var(--crm-brand-dark);
    color: #fff !important;
}

.crm-btn-ghost {
    background: transparent;
    border: 1px solid var(--crm-border);
    color: var(--crm-text);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
}

.crm-btn-ghost:hover {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.15);
    color: var(--crm-text);
}

.crm-info-bar {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.08), rgba(20, 184, 166, 0.05));
    border: 1px solid rgba(15, 118, 110, 0.15);
    border-radius: var(--crm-radius);
    padding: 1rem 1.25rem;
    margin-top: 1.75rem;
    font-size: 0.9rem;
}

.crm-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    box-shadow: var(--crm-shadow);
}

.crm-card .card-body { padding: 1.35rem; }

.crm-detail-hero {
    background: var(--crm-surface);
    color: var(--crm-text);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--crm-shadow);
}

.crm-detail-hero-pro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.crm-detail-hero-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 320px;
}

.crm-detail-hero-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ecfdf5, #f0fdfa);
    border: 1px solid rgba(15, 118, 110, 0.12);
    color: var(--crm-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.crm-detail-hero-copy {
    min-width: 0;
}

.crm-detail-hero h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.crm-detail-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.35rem 0 0.65rem;
    font-size: 0.82rem;
    color: var(--crm-muted);
}

.crm-detail-hero-slug {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--crm-muted);
}

.crm-detail-hero-meta-dot {
    opacity: 0.5;
}

.crm-detail-hero-domain {
    color: var(--crm-brand-dark);
    text-decoration: none;
    font-weight: 500;
}

.crm-detail-hero-domain:hover {
    text-decoration: underline;
}

.crm-detail-hero-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.crm-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.crm-hero-pill-success,
.crm-hero-pill-ready { background: #ecfdf5; color: #047857; border-color: rgba(5, 150, 105, 0.15); }
.crm-hero-pill-primary,
.crm-hero-pill-running { background: #eff6ff; color: #1d4ed8; border-color: rgba(59, 130, 246, 0.15); }
.crm-hero-pill-danger,
.crm-hero-pill-failed { background: #fef2f2; color: #b91c1c; border-color: rgba(220, 38, 38, 0.15); }
.crm-hero-pill-secondary { background: #f1f5f9; color: #475569; border-color: var(--crm-border); }
.crm-hero-pill-live { background: #fef2f2; color: #991b1b; border-color: rgba(220, 38, 38, 0.12); }
.crm-hero-pill-muted { background: #f8fafc; color: #64748b; border-color: var(--crm-border); }
.crm-hero-pill-warn { background: #fffbeb; color: #b45309; border-color: rgba(217, 119, 6, 0.15); }

.crm-detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.crm-detail-hero-actions .crm-btn-site {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
}

.crm-detail-hero-actions .crm-btn-ghost {
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
}

.crm-detail-hero .slug {
    opacity: 0.7;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

.crm-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.crm-detail-actions .crm-btn-site {
    padding: 0.55rem 1.1rem;
    font-size: 0.95rem;
}

.crm-detail-hero .crm-detail-actions .crm-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff !important;
}

.crm-detail-hero .crm-detail-actions .crm-btn-ghost:hover {
    background: #fff;
    border-color: #fff;
    color: var(--crm-brand-dark) !important;
}

.crm-detail-hero .crm-detail-actions .crm-btn-ghost.border-danger {
    border-color: rgba(248, 113, 113, 0.7) !important;
    color: #fecaca !important;
}

.crm-detail-hero .crm-detail-actions .crm-btn-ghost.border-danger:hover {
    background: #fef2f2;
    border-color: #f87171 !important;
    color: #b91c1c !important;
}

.crm-detail-hero .crm-detail-actions .crm-btn-ghost i {
    color: inherit;
}

.badge-live {
    background: var(--crm-live) !important;
}

.crm-back-link {
    color: var(--crm-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.crm-stat-ok .value { color: #059669; }
.crm-stat-warn .value { color: #d97706; }
.crm-stat-crit .value { color: #dc2626; }

.crm-alert-critical {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.12), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: var(--crm-radius);
    padding: 1rem 1.25rem;
    color: #991b1b;
}

.crm-status-pill {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.crm-status-ok { background: #d1fae5; color: #065f46; }
.crm-status-warning { background: #fef3c7; color: #92400e; }
.crm-status-critical { background: #fee2e2; color: #991b1b; }

.crm-tenant-card-critical {
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: 0 4px 24px rgba(220, 38, 38, 0.08);
}

.crm-tenant-card-warning {
    border-color: rgba(217, 119, 6, 0.3);
}

.crm-health-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    font-size: 0.8rem;
}

.crm-health-metric span {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crm-issue-list div {
    line-height: 1.3;
}

/* ——— Admin shell v3 ——— */
body.crm-body-app {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.crm-shell {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
}

.crm-sidebar {
    width: var(--crm-sidebar-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, #0f172a 0%, #134e4a 100%);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease;
}

.crm-sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.85rem 0.75rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-sidebar-brand strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.crm-sidebar-brand span {
    display: block;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0.1rem;
}

.crm-sidebar-nav {
    flex: 1;
    padding: 1rem 0.85rem;
    overflow-y: auto;
}

.crm-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 0.65rem;
    margin-bottom: 0.45rem;
}

.crm-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    transition: background 0.15s, color 0.15s;
}

.crm-nav-link i {
    font-size: 1.05rem;
    opacity: 0.85;
    width: 1.25rem;
    text-align: center;
}

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

.crm-nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.crm-nav-link-muted {
    color: rgba(255, 255, 255, 0.55);
}

.crm-nav-badge {
    margin-left: auto;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    min-width: 1.25rem;
    text-align: center;
}

.crm-sidebar-foot {
    padding: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-main {
    margin-left: var(--crm-sidebar-w);
    width: calc(100vw - var(--crm-sidebar-w));
    max-width: calc(100vw - var(--crm-sidebar-w));
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: var(--crm-bg);
}

.crm-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.75rem;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--crm-border);
}

.crm-topbar-toggle {
    border: 1px solid var(--crm-border);
    background: #fff;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--crm-text);
}

.crm-topbar-title {
    flex: 1;
    min-width: 0;
}

.crm-topbar-eyebrow {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--crm-muted);
}

.crm-topbar-title strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--crm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-topbar-actions {
    display: flex;
    gap: 0.45rem;
}

.crm-topbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--crm-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--crm-muted);
    text-decoration: none;
    transition: all 0.15s;
}

.crm-topbar-btn:hover {
    border-color: var(--crm-brand);
    color: var(--crm-brand);
    background: #f0fdfa;
}

.crm-topbar-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
    border: 2px solid #fff;
}

.crm-content {
    flex: 1;
    padding: 1.5rem 1.75rem 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.crm-footer {
    padding: 0.85rem 1.75rem 1.25rem;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.75rem;
    color: var(--crm-muted);
    border-top: 1px solid var(--crm-border);
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.crm-hero {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 50%, #134e4a 100%);
    border-radius: var(--crm-radius-lg);
    color: #fff;
    padding: 1.65rem 1.85rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 118, 110, 0.22);
}

.crm-hero::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.crm-hero-inner {
    position: relative;
    z-index: 1;
}

.crm-hero-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
}

.crm-hero-sub {
    font-size: 0.88rem;
    opacity: 0.88;
    max-width: 640px;
}

.crm-hero-actions .form-control {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
}

.crm-hero-actions .crm-btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.crm-hero-actions .crm-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.crm-hero-actions .crm-btn-site {
    background: #fff;
    color: var(--crm-brand-dark) !important;
}

.crm-hero-actions .crm-btn-site:hover {
    background: #f0fdfa;
}

.crm-panel {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    box-shadow: var(--crm-shadow);
    overflow: hidden;
}

.crm-panel-head {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--crm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: #fafbfc;
}

.crm-panel-head h2 {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--crm-muted);
    margin: 0;
}

.crm-panel-body {
    padding: 1.35rem;
}

.crm-stat-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.crm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--crm-shadow-lg);
}

.crm-stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.06);
    pointer-events: none;
}

.crm-table thead th {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    background: #f8fafc;
    border-bottom-width: 1px;
    padding: 0.85rem 1rem;
}

.crm-table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    font-size: 0.88rem;
}

.crm-table tbody tr:hover {
    background: rgba(15, 118, 110, 0.03);
}

.crm-filter-bar {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--crm-shadow);
    margin-bottom: 1.25rem;
}

.crm-filter-bar .form-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
}

.crm-deploy-log {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.15rem 1.25rem;
    max-height: 420px;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.5;
    border-radius: 0 0 var(--crm-radius) var(--crm-radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
}

.crm-deploy-log .crm-log-line {
    display: block;
}

.crm-deploy-log .crm-log-head {
    color: #93c5fd;
    font-weight: 600;
}

.crm-deploy-log .crm-log-ok {
    color: #86efac;
}

.crm-deploy-log .crm-log-warn {
    color: #fcd34d;
}

.crm-deploy-log .crm-log-err {
    color: #fca5a5;
    font-weight: 600;
}

.crm-backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: flex-start;
}

.crm-backup-restore-details {
    position: relative;
}

.crm-backup-restore-details > summary {
    list-style: none;
    cursor: pointer;
}

.crm-backup-restore-details > summary::-webkit-details-marker {
    display: none;
}

.crm-backup-restore-form {
    position: absolute;
    right: 0;
    z-index: 5;
    margin-top: 0.35rem;
    min-width: 240px;
    max-width: 280px;
    padding: 0.75rem;
    border-radius: var(--crm-radius);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.crm-stat-card-inline {
    padding: 0.85rem 1rem;
}

.crm-stat-card-inline .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
}

@media (max-width: 767.98px) {
    .crm-backup-restore-form {
        position: static;
        max-width: none;
        margin-top: 0.5rem;
    }
}

@media (max-width: 991.98px) {
    .crm-sidebar {
        transform: translateX(-100%);
    }

    .crm-sidebar.crm-sidebar-open {
        transform: translateX(0);
    }

    .crm-shell::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1035;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }

    .crm-shell:has(.crm-sidebar-open)::before {
        opacity: 1;
        pointer-events: auto;
    }

    .crm-main {
        margin-left: 0;
        width: 100vw;
        max-width: 100vw;
    }

    .crm-content {
        padding: 1rem;
    }

    .crm-topbar {
        padding: 0.75rem 1rem;
    }
}

/* Hide old top navbar if any remnant */
.crm-navbar { display: none !important; }

/* ——— Dashboard v2 ——— */
.crm-dash-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 0.75rem 1rem;
    box-shadow: var(--crm-shadow);
}

.crm-dash-search {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.crm-dash-search > i {
    position: absolute;
    left: 0.85rem;
    color: var(--crm-muted);
    pointer-events: none;
}

.crm-dash-search .form-control {
    padding-left: 2.35rem;
    border-radius: 10px;
    font-size: 0.88rem;
    border-color: var(--crm-border);
}

.crm-dash-sync {
    margin-left: auto;
}

.crm-dash-kpi {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.85rem;
}

.crm-kpi-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--crm-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.crm-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--crm-shadow-lg);
}

.crm-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f0fdfa;
    color: var(--crm-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.crm-kpi-ok .crm-kpi-icon { background: #d1fae5; color: #059669; }
.crm-kpi-warn .crm-kpi-icon { background: #fef3c7; color: #d97706; }
.crm-kpi-crit .crm-kpi-icon { background: #fee2e2; color: #dc2626; }
.crm-kpi-alert .crm-kpi-icon { background: #fef3c7; color: #d97706; }

.crm-kpi-val {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--crm-text);
}

.crm-kpi-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    margin-top: 0.15rem;
}

.crm-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--crm-text);
}

.crm-tenant-grid-dash {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.crm-tenant-card-v2 .crm-tenant-card-body {
    padding: 1.35rem 1.35rem 1rem;
}

.crm-tenant-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-health-metrics-v2 {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--crm-border);
}

.crm-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.crm-quick-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--crm-text);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s;
}

.crm-quick-link:hover {
    background: #f0fdfa;
    color: var(--crm-brand-dark);
}

.crm-quick-link > i:first-child {
    color: var(--crm-brand);
    font-size: 1.05rem;
}

.crm-quick-link > i:last-child {
    color: var(--crm-muted);
    font-size: 0.75rem;
}

.crm-dash-ticket {
    display: block;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: all 0.15s;
    margin-bottom: 0.35rem;
}

.crm-dash-ticket:hover {
    background: #f0fdfa;
    border-color: rgba(15, 118, 110, 0.15);
    color: inherit;
}

.crm-dash-ticket-id {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--crm-muted);
    display: block;
}

.crm-dash-ticket-subject {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--crm-text);
    display: block;
    margin: 0.1rem 0;
}

.crm-dash-ticket-tenant {
    font-size: 0.75rem;
    color: var(--crm-muted);
}

.crm-panel-muted {
    background: #f8fafc;
    border-style: dashed;
}

.crm-panel-muted .crm-panel-body {
    padding: 0.85rem 1.15rem;
}

@media (max-width: 1399.98px) {
    .crm-dash-kpi {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991.98px) {
    .crm-dash-kpi {
        grid-template-columns: repeat(2, 1fr);
    }

    .crm-dash-sync {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .crm-dash-kpi {
        grid-template-columns: 1fr;
    }
}

/* ——— v6: Analytics, tier badges, detail metrics, form sections ——— */

.crm-analytics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.crm-analytics-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--crm-shadow);
}

.crm-analytics-card-accent {
    background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
    border-color: rgba(15, 118, 110, 0.12);
}

.crm-analytics-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.crm-analytics-head h3 {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    margin: 0;
}

.crm-analytics-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--crm-muted);
}

.crm-health-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    margin-bottom: 0.75rem;
}

.crm-health-bar-seg {
    display: block;
    height: 100%;
    transition: width 0.4s ease;
}

.crm-health-bar-ok { background: #10b981; }
.crm-health-bar-warn { background: #f59e0b; }
.crm-health-bar-crit { background: #ef4444; }

.crm-analytics-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    font-size: 0.78rem;
    color: var(--crm-muted);
}

.crm-analytics-legend strong {
    color: var(--crm-text);
    font-weight: 800;
}

.crm-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.crm-dot-ok { background: #10b981; }
.crm-dot-warn { background: #f59e0b; }
.crm-dot-crit { background: #ef4444; }

.crm-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.crm-tier-stat {
    text-align: center;
    padding: 0.65rem 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--crm-border);
    background: #f8fafc;
}

.crm-tier-stat-val {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--crm-text);
}

.crm-tier-stat-lbl {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--crm-muted);
    margin-top: 0.2rem;
}

.crm-tier-stat-warn { border-color: rgba(245, 158, 11, 0.25); background: #fffbeb; }
.crm-tier-stat-soft { border-color: rgba(249, 115, 22, 0.25); background: #fff7ed; }
.crm-tier-stat-hard { border-color: rgba(239, 68, 68, 0.25); background: #fef2f2; }

.crm-analytics-foot { margin-top: 0.25rem; }

.crm-analytics-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--crm-brand);
    text-decoration: none;
}

.crm-analytics-link:hover { color: var(--crm-brand-dark); }

.crm-server-gauge {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crm-server-gauge-ring {
    --pct: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(var(--crm-brand) calc(var(--pct) * 1%), #e2e8f0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.crm-server-gauge-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #fff;
}

.crm-server-gauge-ring span {
    position: relative;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--crm-text);
}

.crm-server-gauge-title {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--crm-text);
}

.crm-server-gauge-sub {
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin-top: 0.1rem;
}

.crm-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    border-radius: 999px;
    white-space: nowrap;
}

.crm-tier-badge-sm { font-size: 0.68rem; padding: 0.2rem 0.55rem; }
.crm-tier-badge-md { font-size: 0.75rem; padding: 0.28rem 0.65rem; }

.crm-tier-off { background: #f1f5f9; color: #475569; }
.crm-tier-ok { background: #d1fae5; color: #047857; }
.crm-tier-warning { background: #fef3c7; color: #b45309; }
.crm-tier-soft { background: #ffedd5; color: #c2410c; }
.crm-tier-hard { background: #fee2e2; color: #b91c1c; }

.crm-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}

.crm-detail-metric {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: var(--crm-shadow);
}

.crm-detail-metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: #f0fdfa;
    color: var(--crm-brand);
}

.crm-detail-metric-ok { background: #d1fae5; color: #059669; }
.crm-detail-metric-warn { background: #fef3c7; color: #d97706; }
.crm-detail-metric-crit { background: #fee2e2; color: #dc2626; }
.crm-detail-metric-warning { background: #fef3c7; color: #d97706; }
.crm-detail-metric-tier { background: #f0fdfa; color: var(--crm-brand); }

.crm-detail-metric-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
}

.crm-detail-metric-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--crm-text);
    margin-top: 0.1rem;
}

.crm-license-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Horizontal license tier stepper (v11) */
.crm-lt-body-wrap {
    padding: 0 1.35rem 1.25rem;
}

.crm-lt-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    position: relative;
}

.crm-lt-step-h {
    position: relative;
    min-width: 0;
}

.crm-lt-step-h:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 26px;
    left: calc(50% + 28px);
    width: calc(100% - 56px + 1rem);
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
    border-radius: 999px;
}

.crm-lt-step-h.crm-lt-past:not(:last-child)::before,
.crm-lt-step-h.crm-lt-active:not(:last-child)::before {
    background: linear-gradient(90deg, var(--crm-brand), #99f6e4);
}

.crm-lt-node {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    border: 2px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.crm-lt-node-icon {
    font-size: 1rem;
    line-height: 1;
}

.crm-lt-node-num {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.65;
}

.crm-lt-step-card {
    background: #f8fafc;
    border: 1px solid var(--crm-border);
    border-radius: 12px;
    padding: 0.85rem 0.9rem;
    text-align: center;
    min-height: 118px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.crm-lt-step-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.crm-lt-kademe {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--crm-muted);
}

.crm-lt-now {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--crm-brand);
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}

.crm-lt-done {
    font-size: 0.62rem;
    font-weight: 700;
    color: #059669;
}

.crm-lt-step-h.crm-lt-active .crm-lt-step-card {
    background: #fff;
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12);
}

.crm-lt-step-h.crm-lt-past .crm-lt-step-card {
    background: #f0fdfa;
    border-color: rgba(15, 118, 110, 0.18);
}

.crm-lt-tone-warn.crm-lt-active .crm-lt-node {
    border-color: #f59e0b;
    color: #b45309;
    background: #fffbeb;
}

.crm-lt-tone-soft.crm-lt-active .crm-lt-node {
    border-color: #f97316;
    color: #c2410c;
    background: #fff7ed;
}

.crm-lt-tone-hard.crm-lt-active .crm-lt-node {
    border-color: #ef4444;
    color: #b91c1c;
    background: #fef2f2;
}

.crm-lt-step-h.crm-lt-past .crm-lt-node {
    border-color: var(--crm-brand);
    background: var(--crm-brand);
    color: #fff;
}

.crm-lt-step-h.crm-lt-future .crm-lt-node {
    color: #94a3b8;
    background: #f8fafc;
}

.crm-lt-step-h.crm-lt-active .crm-lt-title {
    color: var(--crm-brand-dark);
}

.crm-lt-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--crm-border);
}

.crm-lt-summary-item {
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.crm-lt-summary-wide {
    grid-column: span 2;
}

.crm-lt-summary-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    margin-bottom: 0.2rem;
}

.crm-lt-summary-item strong {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--crm-text);
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .crm-lt-track {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .crm-lt-step-h:not(:last-child)::before {
        display: none;
    }

    .crm-lt-node {
        margin-left: 0;
        margin-right: auto;
    }

    .crm-lt-step-card {
        text-align: left;
        min-height: 0;
    }

    .crm-lt-step-head {
        justify-content: flex-start;
    }

    .crm-lt-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-lt-summary-wide {
        grid-column: 1 / -1;
    }
}

.crm-lt-step {
    display: flex;
    gap: 0.85rem;
    padding: 0.65rem 0;
    position: relative;
}

.crm-lt-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 38px;
    bottom: -4px;
    width: 2px;
    background: #e2e8f0;
}

.crm-lt-past .crm-lt-marker { background: var(--crm-brand); color: #fff; border-color: var(--crm-brand); }
.crm-lt-active .crm-lt-marker { background: #fff; color: var(--crm-brand); border-color: var(--crm-brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
.crm-lt-active .crm-lt-title { color: var(--crm-brand-dark); }
.crm-lt-future .crm-lt-marker { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; }
.crm-lt-future .crm-lt-title { color: var(--crm-muted); }

.crm-lt-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
    z-index: 1;
    background: #fff;
}

.crm-lt-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--crm-text);
}

.crm-lt-desc {
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin-top: 0.1rem;
}

.crm-form-section {
    border-bottom: 1px solid var(--crm-border);
}

.crm-form-section:last-of-type {
    border-bottom: none;
}

.crm-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem 0;
}

.crm-form-section-head > i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f0fdfa;
    color: var(--crm-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.crm-form-section-head h2 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
    color: var(--crm-text);
}

.crm-form-section-head p {
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin: 0.15rem 0 0;
}

.crm-form-section-body {
    padding: 1rem 1.35rem 1.35rem;
}

.crm-form-actions {
    padding: 1rem 1.35rem 1.35rem;
    background: #f8fafc;
    border-top: 1px solid var(--crm-border);
}

@media (max-width: 1199.98px) {
    .crm-analytics-row {
        grid-template-columns: 1fr;
    }

    .crm-detail-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .crm-tier-grid {
        grid-template-columns: 1fr;
    }

    .crm-detail-metrics {
        grid-template-columns: 1fr;
    }
}

/* ——— v8: Tenant detail info rows ——— */

.crm-section-card {
    overflow: hidden;
}

.crm-section-card .crm-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--crm-border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.crm-section-head-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #f0fdfa;
    color: var(--crm-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.crm-section-head-text {
    flex: 1;
    min-width: 0;
}

.crm-section-head-text h2 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
    color: var(--crm-text);
}

.crm-section-head-text p {
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin: 0.15rem 0 0;
}

.crm-section-head-actions {
    flex-shrink: 0;
}

.crm-info-list {
    padding: 0.35rem 0;
}

.crm-info-list-compact {
    padding-top: 0;
}

.crm-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1.35rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background 0.15s;
}

.crm-info-row:last-child {
    border-bottom: none;
}

.crm-info-row:hover {
    background: #f8fafc;
}

.crm-info-row-sub {
    padding-top: 0;
    padding-left: 3.65rem;
    border-bottom: none;
}

.crm-info-row-sub:hover {
    background: transparent;
}

.crm-info-row-stack {
    align-items: flex-start;
}

.crm-info-row-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    color: var(--crm-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.crm-info-row-main {
    flex: 1;
    min-width: 0;
}

.crm-info-row-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    margin-bottom: 0.2rem;
}

.crm-info-row-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--crm-text);
    line-height: 1.45;
    word-break: break-word;
}

.crm-info-link {
    color: var(--crm-brand-dark);
    text-decoration: none;
    font-weight: 700;
}

.crm-info-link:hover {
    color: var(--crm-brand);
}

.crm-info-link i {
    font-size: 0.75rem;
    opacity: 0.75;
}

.crm-info-row-action {
    flex-shrink: 0;
    align-self: center;
}

.crm-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--crm-border);
    background: #fff;
    color: var(--crm-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s;
}

.crm-icon-btn:hover {
    border-color: var(--crm-brand);
    color: var(--crm-brand);
    background: #f0fdfa;
}

.crm-text-btn {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--crm-brand);
    text-decoration: none;
}

.crm-text-btn:hover {
    color: var(--crm-brand-dark);
}

.crm-code-inline {
    font-size: 0.8rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid var(--crm-border);
    color: #334155;
    word-break: break-all;
}

.crm-code-box {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
}

.crm-code-box-text {
    flex: 1;
    padding: 0.65rem 0.85rem;
    font-size: 0.75rem;
    color: #e2e8f0;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.crm-copy-btn {
    border: none;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    padding: 0 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.crm-copy-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.crm-info-hint {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--crm-muted);
    line-height: 1.45;
}

.crm-info-hint code {
    font-size: 0.68rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    background: #f1f5f9;
}

.crm-mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0 1.35rem;
}

.crm-mini-stat {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--crm-border);
}

.crm-mini-stat-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    margin-bottom: 0.35rem;
}

.crm-mini-stat-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--crm-text);
}

.crm-mini-stat-sub {
    display: block;
    font-size: 0.68rem;
    color: var(--crm-muted);
    margin-top: 0.15rem;
}

.crm-issue-panel {
    margin: 0 1.35rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.crm-issue-panel-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #92400e;
    line-height: 1.4;
}

.crm-issue-panel-item + .crm-issue-panel-item {
    margin-top: 0.35rem;
}

.crm-log-panel {
    margin: 0 1.35rem 1.25rem;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    overflow: hidden;
}

.crm-log-panel-head {
    padding: 0.55rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--crm-border);
}

.crm-log-panel-body {
    margin: 0;
    padding: 0.85rem;
    max-height: 240px;
    overflow: auto;
    font-size: 0.72rem;
    line-height: 1.45;
    background: #0f172a;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.crm-flag-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.35rem 1.35rem 1.25rem;
}

.crm-flag-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--crm-border);
    background: #f8fafc;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--crm-muted);
}

.crm-flag-item i {
    font-size: 1rem;
}

.crm-flag-item-on {
    background: #f0fdfa;
    border-color: rgba(15, 118, 110, 0.2);
    color: var(--crm-brand-dark);
}

.crm-flag-item-on i {
    color: #059669;
}

.crm-section-card > .crm-btn-ghost,
.crm-section-card > form,
.crm-section-card > a.crm-btn-ghost {
    margin-left: 1.35rem;
    margin-right: 1.35rem;
}

.crm-section-card > a.crm-btn-ghost:last-child {
    margin-bottom: 1.25rem;
}

@media (max-width: 767.98px) {
    .crm-mini-stat-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
    }

    .crm-info-row {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .crm-section-card .crm-section-head {
        padding: 1rem;
    }

    .crm-log-panel {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .crm-issue-panel {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* ——— v9: Full-width page grids (sidebar wrap fix) ——— */

.crm-page-grid,
.crm-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    align-items: start;
}

.crm-detail-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.crm-detail-side-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.crm-page-main,
.crm-detail-main,
.crm-page-aside,
.crm-detail-aside {
    min-width: 0;
    max-width: 100%;
}

.crm-page-aside,
.crm-detail-aside {
    position: sticky;
    top: 4.75rem;
}

.crm-detail-metrics {
    width: 100%;
}

@media (max-width: 1199.98px) {
    .crm-page-grid,
    .crm-detail-grid {
        grid-template-columns: 1fr;
    }

    .crm-detail-side-row {
        grid-template-columns: 1fr;
    }

    .crm-page-aside,
    .crm-detail-aside {
        position: static;
    }
}

/* ——— v13: Komuta merkezi tablo görünümü (50+ site) ——— */

.crm-tenant-panel .crm-section-head {
    padding: 1.15rem 1.35rem 0.75rem;
    border-bottom: none;
}

.crm-tenant-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0 1.35rem 1rem;
    border-bottom: 1px solid var(--crm-border);
}

.crm-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.crm-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--crm-muted);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.crm-filter-chip:hover {
    border-color: rgba(15, 118, 110, 0.35);
    color: var(--crm-brand-dark);
}

.crm-filter-chip.active {
    background: var(--crm-brand);
    border-color: var(--crm-brand);
    color: #fff;
}

.crm-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.68rem;
    font-weight: 800;
}

.crm-filter-chip.active .crm-filter-count {
    background: rgba(255, 255, 255, 0.22);
}

.crm-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--crm-muted);
    cursor: pointer;
    user-select: none;
}

.crm-view-toggle .crm-btn-ghost.active {
    background: var(--crm-brand);
    border-color: var(--crm-brand);
    color: #fff;
}

.crm-tenant-table-wrap {
    overflow-x: auto;
    padding: 0 0.5rem;
}

.crm-tenant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.crm-tenant-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.65rem 0.85rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--crm-border);
    white-space: nowrap;
}

.crm-tenant-table tbody tr {
    border-bottom: 1px solid var(--crm-border);
    transition: background 0.12s;
}

.crm-tenant-table tbody tr:hover {
    background: #f8fafc;
}

.crm-tenant-table tbody tr.crm-tenant-row-critical {
    box-shadow: inset 3px 0 0 #dc2626;
}

.crm-tenant-table tbody tr.crm-tenant-row-warning {
    box-shadow: inset 3px 0 0 #d97706;
}

.crm-tenant-table tbody tr.crm-tenant-row-ok {
    box-shadow: inset 3px 0 0 #059669;
}

.crm-tenant-table td {
    padding: 0.7rem 0.85rem;
    vertical-align: middle;
}

.crm-th-actions {
    width: 7rem;
    text-align: right;
}

.crm-tenant-table-site {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.crm-tenant-table-site:hover strong {
    color: var(--crm-brand);
}

.crm-tenant-table-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
}

.crm-tenant-table-names {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.crm-tenant-table-names strong {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-tenant-table-names span {
    font-size: 0.72rem;
    color: var(--crm-muted);
}

.crm-tenant-table-domain {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--crm-brand);
    text-decoration: none;
    white-space: nowrap;
}

.crm-tenant-table-domain:hover {
    text-decoration: underline;
}

.crm-table-metric {
    font-weight: 600;
    white-space: nowrap;
}

.crm-td-license {
    white-space: nowrap;
}

.crm-table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
}

.crm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 8px;
    border: 1px solid var(--crm-border);
    background: #fff;
    color: var(--crm-muted);
    text-decoration: none;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.crm-icon-btn:hover {
    background: var(--crm-brand);
    border-color: var(--crm-brand);
    color: #fff;
}

.crm-tenant-hidden {
    display: none !important;
}

.crm-tenant-grid-dash:not(.d-none) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 1.35rem;
}

.crm-tenant-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.85rem 1.35rem 1.15rem;
    border-top: 1px solid var(--crm-border);
}

.crm-tenant-pager-info {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--crm-muted);
    min-width: 8rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .crm-tenant-filters {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .crm-tenant-table-wrap {
        padding: 0;
    }

    .crm-tenant-table thead {
        display: none;
    }

    .crm-tenant-table tbody tr {
        display: block;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
        border: 1px solid var(--crm-border);
        border-radius: 10px;
    }

    .crm-tenant-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0;
        border: none;
    }

    .crm-tenant-table td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--crm-muted);
        margin-right: 0.75rem;
    }

    .crm-tenant-table td:first-child {
        display: block;
        padding-bottom: 0.5rem;
    }

    .crm-tenant-table td:first-child::before {
        display: none;
    }
}

/* ——— v14–16: Birweb Ajans logo marka ——— */

.crm-brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
}

.crm-brand-logo-frame {
    line-height: 0;
    width: auto;
    max-width: 100%;
}

.crm-brand-logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.crm-brand-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.crm-brand-logo-sidebar .crm-brand-logo-frame {
    max-width: 136px;
}

.crm-brand-logo-sidebar img {
    width: 136px;
    border-radius: 6px;
}

.crm-brand-logo-sidebar .crm-brand-logo-tag {
    display: block;
    margin-top: 0.5rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.25;
    text-align: center;
}

.crm-brand-logo-hero {
    margin-bottom: 1rem;
}

.crm-brand-logo-hero .crm-brand-logo-frame {
    max-width: 168px;
}

.crm-brand-logo-hero img {
    width: 168px;
    border-radius: 6px;
}

.crm-brand-logo-login {
    margin-bottom: 1.5rem;
}

.crm-brand-logo-login .crm-brand-logo-frame {
    max-width: 152px;
}

.crm-brand-logo-login img {
    width: 152px;
    border-radius: 6px;
}

.crm-brand-logo-login .crm-brand-logo-tag {
    margin-top: 0.65rem;
    padding-top: 0;
    border-top: none;
    width: auto;
    align-self: flex-start;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    color: var(--login-muted);
}

/* ——— v17: Ops merkezi ——— */

.crm-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--crm-radius);
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.crm-flash i { flex-shrink: 0; margin-top: 0.1rem; }

.crm-flash-info {
    background: #eff6ff;
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.crm-flash-success {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.crm-flash-warn {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.crm-flash-danger {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.22);
    color: #991b1b;
}

.crm-ops-action-block {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--crm-border);
}

.crm-ops-action-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.crm-ops-action-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--crm-text);
    margin-bottom: 0.35rem;
}

.crm-ops-action-hint {
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin-bottom: 0.65rem;
}

.crm-ops-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 1.35rem 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--crm-border);
    border-radius: calc(var(--crm-radius) - 2px);
    font-size: 0.82rem;
}

.crm-ops-meta > i {
    color: var(--crm-brand);
}

.crm-ops-meta-label {
    color: var(--crm-muted);
    font-weight: 600;
}

.crm-ops-meta-path {
    flex: 1 1 100%;
    font-size: 0.75rem;
    word-break: break-all;
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
}

@media (min-width: 768px) {
    .crm-ops-meta-path {
        flex: 1 1 auto;
    }
}

.crm-ops-tabs {
    padding: 0 1.35rem;
    border-bottom: 1px solid var(--crm-border);
    gap: 0.25rem;
}

.crm-ops-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--crm-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.65rem 0.85rem;
    margin-bottom: -1px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.crm-ops-tabs .nav-link:hover {
    color: var(--crm-brand);
    background: transparent;
}

.crm-ops-tabs .nav-link.active {
    color: var(--crm-brand-dark);
    border-bottom-color: var(--crm-brand);
    background: transparent;
}

.crm-ops-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--crm-brand);
}

.crm-ops-tab-content {
    padding: 0;
}

.crm-ops-log {
    max-height: 360px;
    border-radius: 0 0 var(--crm-radius) var(--crm-radius);
}

.crm-ops-log-compact {
    max-height: 240px;
}

.crm-ops-log-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 220px;
    padding: 2rem 1.5rem;
    color: var(--crm-muted);
}

.crm-ops-log-empty i {
    font-size: 1.75rem;
    opacity: 0.45;
    margin-bottom: 0.65rem;
}

.crm-ops-log-empty p {
    margin: 0;
    font-size: 0.88rem;
    max-width: 280px;
}

.crm-ops-verify-ok,
.crm-ops-verify-warn {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 1rem 1.35rem 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: calc(var(--crm-radius) - 2px);
    font-size: 0.88rem;
}

.crm-ops-verify-ok {
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.crm-ops-verify-warn {
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #92400e;
}

.crm-ops-verify-ok i,
.crm-ops-verify-warn i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.crm-ops-log-card .crm-section-head {
    margin-bottom: 0.75rem;
}

.crm-stat-grid-ops {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-ops-how {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.crm-ops-how-card {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--crm-border, #e2e8f0);
}

.crm-ops-how-auto {
    border-left: 3px solid #10b981;
}

.crm-ops-how-manual {
    border-left: 3px solid #f59e0b;
}

.crm-ops-how-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #059669;
    margin-bottom: 0.5rem;
}

.crm-ops-how-badge-manual {
    color: #d97706;
}

.crm-ops-how-list {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.crm-ops-how-list li + li {
    margin-top: 0.25rem;
}

.crm-ops-backup-toolbar {
    border-bottom: 1px solid var(--crm-border, #e2e8f0);
    margin-bottom: 0.25rem;
}

.crm-ops-backup-filters .btn.active {
    background: var(--crm-primary, #0f766e);
    border-color: var(--crm-primary, #0f766e);
    color: #fff;
}

.crm-ops-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.crm-ops-actions-card .crm-section-head {
    margin-bottom: 0;
}

.crm-ops-toolbar {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 1rem 1.25rem;
    padding: 1rem 1.35rem 1.25rem;
    align-items: end;
}

.crm-ops-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.crm-ops-inline-form .form-select {
    flex: 1 1 160px;
    min-width: 0;
    max-width: 100%;
}

.crm-ops-check-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin: 0;
    white-space: nowrap;
}

.crm-ops-check-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    .crm-stat-grid-ops {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-ops-how {
        grid-template-columns: 1fr;
    }

    .crm-ops-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .crm-stat-grid-ops {
        grid-template-columns: 1fr;
    }
}

.crm-ops-backup-table .crm-code-inline {
    font-size: 0.72rem;
    word-break: break-all;
}

.crm-ops-backup-row-missing td {
    background: rgba(245, 158, 11, 0.04);
}

.crm-backup-policy-bar {
    border: 1px solid var(--crm-border);
}

.crm-backup-policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem 1.25rem 0;
}

.crm-backup-policy-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.crm-backup-policy-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--crm-brand);
    flex-shrink: 0;
}

.crm-backup-policy-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    font-weight: 600;
}

.crm-backup-policy-value {
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

.crm-backup-policy-cron {
    padding: 0 1.25rem 1rem;
    border-top: 1px solid var(--crm-border);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.crm-backup-policy-cron-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.crm-checklist-card .crm-section-head {
    padding-bottom: 0.5rem;
}

.crm-checklist-summary {
    padding-top: 0 !important;
}

.crm-checklist-compact {
    display: grid;
    gap: 0.35rem;
}

@media (min-width: 768px) {
    .crm-checklist-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
    }
}

.crm-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.crm-checklist-item:last-child {
    border-bottom: 0;
}

.crm-checklist-item-icon {
    line-height: 1.2;
    font-size: 0.9rem;
}

.crm-checklist-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.crm-checklist-item-label {
    font-weight: 600;
    color: var(--crm-text);
}

.crm-checklist-item-hint {
    color: var(--crm-muted);
}

.crm-checklist-item-badge,
.crm-checklist-item-action {
    flex-shrink: 0;
    font-size: 0.72rem;
}

.crm-backup-policy-inline {
    border-bottom: 1px solid var(--crm-border);
}

.crm-backup-policy-inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.crm-backup-policy-dot {
    color: var(--crm-muted);
}

.crm-stat-grid-ops-compact {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.crm-backup-size-note {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--crm-muted);
    background: #f8fafc;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
}

.crm-backup-size-note code {
    font-size: 0.78rem;
}

.crm-ops-single-form {
    flex-direction: column;
    align-items: stretch;
}

@media (min-width: 768px) {
    .crm-ops-single-form {
        flex-direction: row;
        align-items: center;
    }
}

/* ——— v27: Tenant detay sekmeleri ——— */

.crm-tenant-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    font-size: 0.88rem;
    color: var(--crm-muted);
}

.crm-tenant-summary > i {
    color: var(--crm-brand);
}

.crm-tenant-summary-rev {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    background: #f1f5f9;
    border-radius: 6px;
}

.crm-tenant-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
}

.crm-tenant-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    color: var(--crm-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}

.crm-tenant-tab:hover {
    background: #f1f5f9;
    color: var(--crm-text);
}

.crm-tenant-tab.active {
    background: #ecfdf5;
    color: var(--crm-brand-dark);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.15);
}

.crm-tenant-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--crm-brand);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
}

.crm-tenant-tab-badge-warn {
    background: #d97706;
}

.crm-tenant-tab-pane[hidden] {
    display: none !important;
}

.crm-quick-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.crm-quick-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--crm-muted);
    border: 1px solid var(--crm-border);
}

.crm-quick-flag-on {
    background: #ecfdf5;
    color: var(--crm-brand-dark);
    border-color: rgba(15, 118, 110, 0.2);
}

.crm-verify-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.crm-verify-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
}

.crm-verify-error {
    background: #fef2f2;
    color: #b91c1c;
}

.crm-verify-warning {
    background: #fffbeb;
    color: #b45309;
}

.crm-lt-collapsed-wrap {
    overflow: hidden;
}

.crm-lt-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    background: transparent;
    padding: 1rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--crm-text);
    text-align: left;
}

.crm-lt-collapse-toggle:hover {
    background: #f8fafc;
}

.crm-lt-chevron {
    transition: transform 0.2s;
    color: var(--crm-muted);
}

.crm-lt-collapse-toggle[aria-expanded="true"] .crm-lt-chevron {
    transform: rotate(180deg);
}

.crm-detail-metrics {
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .crm-detail-hero-pro {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-detail-hero-actions {
        width: 100%;
    }

    .crm-detail-hero-actions .crm-btn-site {
        flex: 1;
    }

    .crm-tenant-tabs {
        flex-direction: column;
    }

    .crm-tenant-tab {
        width: 100%;
        justify-content: flex-start;
    }

    .crm-tenant-summary-rev {
        margin-left: 0;
    }
}

/* ——— v28: Yedek & log minimal ——— */

.crm-ops-minimal .crm-section-head {
    padding-bottom: 0.65rem;
}

.crm-ops-policy-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.crm-ops-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--crm-muted);
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--crm-border);
}

.crm-ops-chip-details {
    font-size: 0.78rem;
    color: var(--crm-muted);
}

.crm-ops-chip-details summary {
    cursor: pointer;
    list-style: none;
}

.crm-ops-chip-details summary::-webkit-details-marker {
    display: none;
}

.crm-ops-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
}

.crm-ops-kpi {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--crm-border);
    background: #fafbfc;
}

.crm-ops-kpi-ok {
    border-color: rgba(5, 150, 105, 0.2);
    background: #f0fdf4;
}

.crm-ops-kpi-warn {
    border-color: rgba(217, 119, 6, 0.2);
    background: #fffbeb;
}

.crm-ops-kpi-crit {
    border-color: rgba(220, 38, 38, 0.2);
    background: #fef2f2;
}

.crm-ops-kpi-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    margin-bottom: 0.15rem;
}

.crm-ops-kpi strong {
    font-size: 0.95rem;
    color: var(--crm-text);
}

.crm-ops-kpi-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--crm-muted);
    margin-top: 0.1rem;
}

.crm-ops-note {
    border-top: 1px solid var(--crm-border);
    font-size: 0.82rem;
    color: var(--crm-muted);
}

.crm-ops-note summary {
    cursor: pointer;
    list-style: none;
    padding: 0.35rem 0;
}

.crm-ops-note summary::-webkit-details-marker {
    display: none;
}

.crm-ops-split {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1rem;
    border-top: 1px solid var(--crm-border);
    padding-top: 1rem;
}

.crm-ops-panel {
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 1rem;
    background: #fff;
}

.crm-ops-panel-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.crm-ops-panel-hint {
    font-size: 0.8rem;
    color: var(--crm-muted);
    margin: 0 0 0.85rem;
}

.crm-ops-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    margin-bottom: 0.65rem;
}

.crm-ops-warn-line {
    font-size: 0.75rem;
    color: #b45309;
    margin: 0.75rem 0 0;
    line-height: 1.45;
}

.crm-ops-backup-table-min th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    border-bottom-width: 1px;
}

.crm-ops-backup-table-min td {
    vertical-align: middle;
    font-size: 0.88rem;
}

.crm-ops-logs-wrap {
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 0.75rem 1rem;
    background: #fafbfc;
}

.crm-ops-logs-toggle {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    list-style: none;
}

.crm-ops-logs-toggle::-webkit-details-marker {
    display: none;
}

.crm-ops-log-toolbar {
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--crm-border);
}

.crm-ops-log-empty-sm {
    padding: 1.25rem 0.5rem;
}

.crm-ops-log-empty-sm p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--crm-muted);
}

.crm-ops-kpi-inline {
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .crm-ops-split {
        grid-template-columns: 1fr;
    }
}

/* ——— v29: Tenant form (edit) ——— */

.crm-edit-hero {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--crm-shadow);
}

.crm-edit-hero .slug {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--crm-muted);
    margin-bottom: 0.2rem;
}

.crm-edit-hero h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.crm-edit-hero-sub {
    font-size: 0.85rem;
    color: var(--crm-muted);
}

.crm-tenant-form-panel {
    overflow: hidden;
}

.crm-tenant-form-edit .crm-form-tabs {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.crm-form-pane {
    padding: 0;
}

.crm-form-pane[hidden] {
    display: none !important;
}

.crm-form-block {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--crm-border);
}

.crm-form-block:last-child {
    border-bottom: none;
}

.crm-form-block-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--crm-text);
}

.crm-form-block-title i {
    color: var(--crm-brand);
}

.crm-form-block-hint {
    font-size: 0.82rem;
    color: var(--crm-muted);
    margin: -0.5rem 0 1rem;
}

.crm-form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    margin-bottom: 0.35rem;
}

.crm-form-check,
.crm-form-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    cursor: pointer;
    margin: 0;
}

.crm-form-radio input,
.crm-form-check input {
    margin: 0;
}

.crm-form-flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--crm-border);
}

.crm-form-details {
    font-size: 0.85rem;
    color: var(--crm-muted);
}

.crm-form-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--crm-brand-dark);
}

.crm-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.crm-module-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    margin: 0;
    transition: border-color 0.15s, background 0.15s;
}

.crm-module-chip:has(input:checked) {
    background: #fef2f2;
    border-color: rgba(220, 38, 38, 0.25);
    color: #991b1b;
}

.crm-module-chip input {
    margin: 0;
    flex-shrink: 0;
}

.crm-form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.85rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--crm-border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.crm-tenant-form:not(.crm-tenant-form-edit) .crm-form-pane + .crm-form-pane {
    border-top: 1px solid var(--crm-border);
}

/* ——— v31: Genel sekme ——— */

.crm-genel-check-ok {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(5, 150, 105, 0.18);
    border-radius: var(--crm-radius);
    background: #f0fdf4;
}

.crm-genel-check-ok-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #047857;
}

.crm-genel-check-ok-main i {
    font-size: 1rem;
}

.crm-genel-check-ok-meta {
    font-weight: 500;
    color: #059669;
    opacity: 0.85;
}

.crm-genel-check-list {
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(5, 150, 105, 0.12);
}

.crm-genel-connect {
    padding: 0;
    overflow: hidden;
}

.crm-genel-connect-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--crm-border);
}

.crm-genel-connect-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.crm-genel-connect-title i {
    color: var(--crm-brand);
}

.crm-genel-connect-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.crm-genel-field {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--crm-border);
}

.crm-genel-connect-grid .crm-genel-field:nth-child(odd) {
    border-right: 1px solid var(--crm-border);
}

.crm-genel-field-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    margin-bottom: 0.25rem;
}

.crm-genel-field-value {
    font-size: 0.88rem;
    color: var(--crm-text);
    word-break: break-word;
}

.crm-genel-token {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--crm-border);
    font-size: 0.85rem;
    color: var(--crm-muted);
}

.crm-genel-token summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--crm-brand-dark);
    list-style: none;
}

.crm-genel-token summary::-webkit-details-marker {
    display: none;
}

.crm-genel-foot {
    padding: 0.75rem 1.25rem;
    font-size: 0.82rem;
    color: var(--crm-muted);
    background: #f8fafc;
}

.crm-code-box-light {
    background: #f8fafc;
    border-color: var(--crm-border);
}

.crm-code-box-light .crm-code-box-text {
    color: #334155;
    font-size: 0.72rem;
}

.crm-copy-btn-light {
    background: #fff;
    border-left-color: var(--crm-border);
    color: var(--crm-muted);
}

.crm-copy-btn-light:hover {
    background: #f1f5f9;
    color: var(--crm-brand);
}

@media (max-width: 767.98px) {
    .crm-genel-connect-grid {
        grid-template-columns: 1fr;
    }

    .crm-genel-connect-grid .crm-genel-field:nth-child(odd) {
        border-right: none;
    }
}

/* ——— v32: Deploy merkezi ——— */

.crm-deploy-sync-warn {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: var(--crm-radius);
    background: #fffbeb;
    font-size: 0.88rem;
    color: #92400e;
}

.crm-deploy-sync-warn i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #d97706;
}

.crm-deploy-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    overflow: hidden;
    box-shadow: var(--crm-shadow);
}

.crm-deploy-metric {
    padding: 0.85rem 1.15rem;
    border-right: 1px solid var(--crm-border);
}

.crm-deploy-metric:last-child {
    border-right: none;
}

.crm-deploy-metric-wide {
    grid-column: span 1;
}

.crm-deploy-metric-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
    margin-bottom: 0.2rem;
}

.crm-deploy-metric-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--crm-text);
    line-height: 1.3;
}

.crm-deploy-metric-hint {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--crm-muted);
    margin-top: 0.15rem;
}

.crm-deploy-path-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-deploy-path-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.crm-deploy-path-num {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--crm-muted);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-deploy-path-code {
    font-size: 0.75rem;
    word-break: break-all;
    color: #334155;
    background: transparent;
    padding: 0;
}

.crm-deploy-path-tag {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crm-muted);
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    flex-shrink: 0;
}

.crm-deploy-path-foot {
    padding: 0.75rem 1.25rem;
    font-size: 0.78rem;
    color: var(--crm-muted);
    background: #f8fafc;
    border-top: 1px solid var(--crm-border);
}

.crm-deploy-log-card .crm-section-head {
    background: #fafbfc;
}

.crm-deploy-log-legend {
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid var(--crm-border);
    font-size: 0.82rem;
    color: var(--crm-muted);
}

.crm-deploy-log-legend summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--crm-brand-dark);
    list-style: none;
}

.crm-deploy-log-legend summary::-webkit-details-marker {
    display: none;
}

.crm-deploy-log-card .crm-deploy-log {
    border-radius: 0 0 var(--crm-radius) var(--crm-radius);
    max-height: 380px;
}

@media (max-width: 991.98px) {
    .crm-deploy-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-deploy-metric:nth-child(2) {
        border-right: none;
    }

    .crm-deploy-metric:nth-child(3),
    .crm-deploy-metric:nth-child(4) {
        border-top: 1px solid var(--crm-border);
    }

    .crm-deploy-metric:nth-child(3) {
        border-right: 1px solid var(--crm-border);
    }
}

@media (max-width: 575.98px) {
    .crm-deploy-metrics {
        grid-template-columns: 1fr;
    }

    .crm-deploy-metric {
        border-right: none;
        border-bottom: 1px solid var(--crm-border);
    }

    .crm-deploy-metric:last-child {
        border-bottom: none;
    }
}

/* ——— v33: Deploy süreci adimlari ——— */

.crm-deploy-progress .crm-section-head {
    background: #fafbfc;
}

.crm-deploy-progress-pct {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--crm-brand-dark);
    padding: 0.2rem 0.55rem;
    background: #ecfdf5;
    border-radius: 999px;
}

.crm-deploy-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
}

.crm-deploy-progress-bar .progress-bar {
    background: linear-gradient(90deg, #0d9488, #059669);
}

.crm-deploy-steps {
    padding: 0.75rem 1rem 1rem;
}

.crm-deploy-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    margin-bottom: 0.45rem;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
}

.crm-deploy-step:last-child {
    margin-bottom: 0;
}

.crm-deploy-step-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.crm-deploy-step-body {
    flex: 1;
    min-width: 0;
}

.crm-deploy-step-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--crm-text);
}

.crm-deploy-step-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--crm-muted);
    word-break: break-word;
}

.crm-deploy-step-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.crm-deploy-step-pending {
    opacity: 0.72;
}

.crm-deploy-step-pending .crm-deploy-step-icon {
    color: #94a3b8;
}

.crm-deploy-step-pending .crm-deploy-step-badge {
    background: #f1f5f9;
    color: #64748b;
}

.crm-deploy-step-active {
    border-color: rgba(59, 130, 246, 0.35);
    background: #eff6ff;
}

.crm-deploy-step-active .crm-deploy-step-icon {
    color: #2563eb;
}

.crm-deploy-step-active .crm-deploy-step-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.crm-deploy-step-ok {
    border-color: rgba(5, 150, 105, 0.2);
    background: #f0fdf4;
}

.crm-deploy-step-ok .crm-deploy-step-icon {
    color: #059669;
}

.crm-deploy-step-ok .crm-deploy-step-badge {
    background: #d1fae5;
    color: #047857;
}

.crm-deploy-step-failed {
    border-color: rgba(220, 38, 38, 0.25);
    background: #fef2f2;
}

.crm-deploy-step-failed .crm-deploy-step-icon {
    color: #dc2626;
}

.crm-deploy-step-failed .crm-deploy-step-badge {
    background: #fee2e2;
    color: #b91c1c;
}

.crm-deploy-step-skipped {
    opacity: 0.65;
}

.crm-deploy-step-skipped .crm-deploy-step-icon {
    color: #94a3b8;
}

.crm-deploy-step-skipped .crm-deploy-step-badge {
    background: #f1f5f9;
    color: #64748b;
}

.crm-deploy-spin {
    animation: crm-deploy-spin 1s linear infinite;
}

@keyframes crm-deploy-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ——— v34: Deploy operasyon konsolu ——— */

.crm-deploy-page {
    width: 100%;
    max-width: none;
}

.crm-deploy-hero .crm-detail-hero-meta code {
    font-size: 0.78rem;
    color: var(--crm-muted);
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.crm-deploy-live-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: var(--crm-radius);
    background: linear-gradient(90deg, #eff6ff, #f0fdfa);
}

.crm-deploy-live-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
    animation: crm-deploy-pulse 1.4s ease-in-out infinite;
}

@keyframes crm-deploy-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.crm-deploy-live-banner strong {
    font-size: 0.92rem;
}

.crm-deploy-live-pct {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--crm-brand-dark);
    font-variant-numeric: tabular-nums;
}

.crm-deploy-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.crm-deploy-workspace-side {
    position: sticky;
    top: 1rem;
}

.crm-deploy-side-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.crm-deploy-side-metric {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    text-align: center;
}

.crm-deploy-side-metric .label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--crm-muted);
}

.crm-deploy-side-metric .value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.crm-deploy-side-metric .unit {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--crm-muted);
}

.crm-deploy-progress {
    padding: 0;
    overflow: hidden;
}

.crm-deploy-progress-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--crm-border);
    background: #fafbfc;
}

.crm-deploy-progress-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.crm-deploy-progress-title i {
    color: var(--crm-brand);
}

.crm-deploy-progress-sub {
    font-size: 0.82rem;
    color: var(--crm-muted);
}

.crm-deploy-progress-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.crm-deploy-progress-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--crm-muted);
    font-variant-numeric: tabular-nums;
}

.crm-deploy-progress-bar-wrap {
    padding: 0.85rem 1.25rem 0;
}

.crm-deploy-stepper {
    padding: 0.75rem 1.25rem 1.1rem;
}

.crm-deploy-step {
    display: flex;
    gap: 0.85rem;
    position: relative;
    padding-bottom: 0.85rem;
}

.crm-deploy-step-last {
    padding-bottom: 0;
}

.crm-deploy-step-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 2rem;
}

.crm-deploy-step-rail::after {
    content: '';
    flex: 1;
    width: 2px;
    margin-top: 0.35rem;
    background: var(--crm-border);
    min-height: 0.75rem;
}

.crm-deploy-step-last .crm-deploy-step-rail::after {
    display: none;
}

.crm-deploy-step-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    border: 2px solid var(--crm-border);
    background: #fff;
    color: var(--crm-muted);
}

.crm-deploy-step-num {
    font-size: 0.72rem;
    font-weight: 700;
}

.crm-deploy-step-content {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.crm-deploy-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.crm-deploy-step-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--crm-text);
}

.crm-deploy-step-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--crm-muted);
    margin-top: 0.15rem;
    word-break: break-word;
}

.crm-deploy-step-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.crm-deploy-step-pending .crm-deploy-step-dot {
    background: #f8fafc;
}

.crm-deploy-step-pending .crm-deploy-step-badge {
    background: #f1f5f9;
    color: #64748b;
}

.crm-deploy-step-active .crm-deploy-step-dot {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
}

.crm-deploy-step-active .crm-deploy-step-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.crm-deploy-step-ok .crm-deploy-step-dot {
    border-color: #10b981;
    background: #ecfdf5;
    color: #059669;
}

.crm-deploy-step-ok .crm-deploy-step-rail::after {
    background: rgba(16, 185, 129, 0.35);
}

.crm-deploy-step-ok .crm-deploy-step-badge {
    background: #d1fae5;
    color: #047857;
}

.crm-deploy-step-failed .crm-deploy-step-dot {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

.crm-deploy-step-failed .crm-deploy-step-badge {
    background: #fee2e2;
    color: #b91c1c;
}

.crm-deploy-step-skipped {
    opacity: 0.55;
}

.crm-deploy-step-skipped .crm-deploy-step-dot {
    background: #f1f5f9;
}

.crm-deploy-collapse {
    overflow: hidden;
}

.crm-deploy-collapse-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    list-style: none;
    border-bottom: 1px solid transparent;
}

.crm-deploy-collapse-summary::-webkit-details-marker {
    display: none;
}

.crm-deploy-collapse[open] .crm-deploy-collapse-summary {
    border-bottom-color: var(--crm-border);
    background: #fafbfc;
}

.crm-deploy-collapse-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--crm-muted);
}

.crm-deploy-log-live {
    max-height: min(640px, 72vh);
    min-height: 360px;
}

@media (min-width: 1400px) {
    .crm-deploy-workspace {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: 1.5rem;
    }

    .crm-deploy-log-live {
        min-height: 420px;
    }
}

@media (max-width: 991.98px) {
    .crm-deploy-workspace {
        grid-template-columns: 1fr;
    }

    .crm-deploy-workspace-side {
        position: static;
    }

    .crm-deploy-log-live {
        min-height: 220px;
        max-height: 360px;
    }

    .crm-deploy-confirm-inner {
        flex-wrap: wrap;
    }

    .crm-deploy-confirm-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ——— v36: Deploy onay bandi ——— */

.crm-deploy-confirm {
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-radius: var(--crm-radius);
    background: linear-gradient(90deg, #f0fdfa, #ecfdf5);
    box-shadow: var(--crm-shadow);
    animation: crm-deploy-confirm-in 0.2s ease-out;
}

.crm-deploy-confirm[hidden] {
    display: none !important;
}

@keyframes crm-deploy-confirm-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.crm-deploy-confirm-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.crm-deploy-confirm-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(15, 118, 110, 0.15);
    color: var(--crm-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.crm-deploy-confirm-copy {
    flex: 1;
    min-width: 0;
}

.crm-deploy-confirm-copy strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
}

.crm-deploy-confirm-copy p {
    font-size: 0.84rem;
    color: var(--crm-muted);
}

.crm-deploy-confirm-copy code {
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.crm-deploy-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ——— v37: Deploy canli animasyon ——— */

.crm-deploy-progress--live {
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08), var(--crm-shadow);
    animation: crm-deploy-panel-glow 2s ease-in-out infinite;
}

@keyframes crm-deploy-panel-glow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08), var(--crm-shadow); }
    50% { box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.14), var(--crm-shadow); }
}

.crm-deploy-progress-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--crm-muted);
    font-variant-numeric: tabular-nums;
}

.crm-deploy-step-enter {
    animation: crm-deploy-step-in 0.35s ease-out;
}

@keyframes crm-deploy-step-in {
    from { opacity: 0.6; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

.crm-deploy-progress-bar .progress-bar {
    transition: width 0.6s ease;
}

/* E.15 Laravel shell + critical parity components (no remote asset dependency). */
.e15-body {
    margin: 0;
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(15, 118, 110, 0.06), transparent 55%),
        #eef2f6;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.e15-shell { display: flex; min-height: 100vh; }
.e15-sidebar {
    position: sticky;
    top: 0;
    width: 248px;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 0.9rem;
    background:
        radial-gradient(ellipse 90% 50% at 0% 0%, rgba(45, 212, 191, 0.14), transparent 55%),
        linear-gradient(180deg, #0f3d3a 0%, #134e4a 48%, #0f172a 100%);
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.e15-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .45rem .55rem 1.25rem;
    color: #fff;
    text-decoration: none;
}
.e15-brand strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.e15-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.e15-brand-mark img {
    display: block;
    width: 38px;
    height: 30px;
    object-fit: contain;
}
.e15-brand small, .e15-sidebar-foot small { display: block; color: rgba(204, 251, 241, 0.72); font-size: .7rem; margin-top: .15rem; }
.e15-nav { display: grid; gap: .2rem; padding: 0 .2rem; }
.e15-nav a {
    padding: .7rem .8rem;
    border-radius: 10px;
    color: rgba(226, 232, 240, 0.88);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.e15-nav a:hover, .e15-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.e15-nav a.active {
    background: rgba(45, 212, 191, 0.18);
    color: #fff;
    box-shadow: inset 3px 0 0 #2dd4bf;
}
.e15-sidebar-foot {
    display: grid;
    gap: .55rem;
    margin-top: auto;
    padding: 1rem .55rem .35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.e15-sidebar-foot strong { font-size: 0.88rem; }
.e15-sidebar-foot a { color: #99f6e4; text-decoration: none; font-size: 0.84rem; }
.e15-sidebar-foot a:hover { color: #fff; }
.e15-sidebar-foot .e7-btn.secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.e15-sidebar-foot .e7-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}
.e15-workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.e15-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
    padding: 0 1.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.e15-topbar strong {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.e15-topbar span { margin-left: .6rem; color: #64748b; font-size: .82rem; }
.e15-menu { display: none; }
.e15-footer { margin-top: auto; padding: 1rem 1.75rem; color: #64748b; font-size: .78rem; }

.e7-main { width: 100%; max-width: none; margin: 0; padding: 1.5rem 1.75rem 2rem; box-sizing: border-box; }
.e7-card { background: #fff; border: 1px solid #dbe2ea; border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.e7-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.e7-table { width: 100%; border-collapse: collapse; background: #fff; }
.e7-table th, .e7-table td { padding: .7rem; border-bottom: 1px solid #e5e9ef; text-align: left; vertical-align: top; }
.e7-table th { color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; }
.e7-table tr.priority-urgent { background: #fff1f2; }
.e7-form label { display: block; font-weight: 600; margin: .7rem 0 .25rem; }
.e7-form input, .e7-form select, .e7-form textarea, .e7-actions input, .e7-actions select {
    box-sizing: border-box;
    max-width: 100%;
    padding: .6rem;
    border: 1px solid #bdc8d5;
    border-radius: 6px;
    background: #fff;
}
.e7-form input, .e7-form select, .e7-form textarea { width: 100%; }
.e7-form input[readonly] { background: #eef2f6; color: #475569; }
.e7-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.e7-actions form { margin: 0; }
.e7-btn,
.crm-wizard-btn,
.crm-hero-btn,
.crm-ops-link,
.crm-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #0f766e;
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.e7-btn:hover:not(.secondary):not(.warn),
.e7-btn:focus-visible:not(.secondary):not(.warn),
.crm-wizard-btn:hover:not(.secondary),
.crm-hero-btn.is-primary:hover {
    background: #0b5d57;
    border-color: #0b5d57;
    color: #fff;
    text-decoration: none;
    filter: none;
}
.e7-btn.secondary,
.crm-wizard-btn.secondary,
.crm-hero-btn,
.crm-ops-link {
    background: #f0fdfa;
    border-color: rgba(15, 118, 110, 0.28);
    color: #0f766e;
    box-shadow: none;
}
.e7-btn.secondary:hover,
.e7-btn.secondary:focus-visible,
.crm-wizard-btn.secondary:hover,
.crm-hero-btn:hover,
.crm-ops-link:hover {
    background: #ccfbf1;
    border-color: rgba(15, 118, 110, 0.4);
    color: #0f766e;
}
.e7-btn.warn,
.crm-danger-btn.is-strong {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}
.e7-btn.warn:hover,
.e7-btn.warn:focus-visible,
.crm-danger-btn.is-strong:hover {
    background: #991b1b;
    border-color: #991b1b;
    color: #fff;
}
.crm-hero-btn.is-primary,
.crm-dash-cta {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}
.crm-hero-btn.is-ghost,
.crm-danger-btn.is-muted {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #475569;
    box-shadow: none;
}
.crm-hero-btn.is-ghost:hover,
.crm-danger-btn.is-muted:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.2);
    color: #334155;
}
.crm-danger-btn {
    background: #fff1f2;
    border-color: rgba(185, 28, 28, 0.28);
    color: #9f1239;
}
.crm-danger-btn:hover {
    background: #ffe4e6;
    border-color: rgba(185, 28, 28, 0.4);
    color: #9f1239;
    text-decoration: none;
}
.e7-muted { color: #64748b; }
.e7-status, .e7-warn, .e7-errors { padding: .75rem; border-radius: 6px; margin-bottom: 1rem; }
.e7-status { background: #dcfce7; }
.e7-warn { background: #fef3c7; }
.e7-errors { background: #fee2e2; }
.e7-badge { display: inline-block; padding: .15rem .45rem; border-radius: 999px; background: #e2e8f0; }
.e15-kpi strong { display: block; margin-top: .35rem; font-size: 1.45rem; }
.e15-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.e15-progress > span { display: block; height: 100%; background: #0f766e; }
.e15-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.e15-timeline > div { padding: .75rem; border: 1px solid #dbe2ea; border-radius: 8px; background: #fff; }
.e15-timeline > div.active { border-color: #0f766e; background: #ecfdf5; }
.e15-details summary { cursor: pointer; font-weight: 700; }
.e15-code { max-height: 16rem; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #f8fafc; padding: .75rem; border-radius: 6px; }

.crm-login-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #0f172a;
    background: #0b1220;
}

.crm-auth {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    overflow: hidden;
}

.crm-auth-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 18% 20%, rgba(45, 212, 191, 0.22), transparent 60%),
        radial-gradient(ellipse 45% 40% at 88% 78%, rgba(15, 118, 110, 0.2), transparent 55%),
        linear-gradient(160deg, #0b1220 0%, #10243e 48%, #0f172a 100%);
    z-index: 0;
}

.crm-auth-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
    animation: crm-auth-grid 18s linear infinite;
}

.crm-auth-bg::after {
    content: "";
    position: absolute;
    width: 28rem;
    height: 28rem;
    left: -6rem;
    top: -4rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.16), transparent 68%);
    animation: crm-auth-glow 8s ease-in-out infinite alternate;
}

@keyframes crm-auth-grid {
    from { transform: translateY(0); }
    to { transform: translateY(48px); }
}

@keyframes crm-auth-glow {
    from { transform: translate(0, 0) scale(1); opacity: 0.7; }
    to { transform: translate(2rem, 1.5rem) scale(1.08); opacity: 1; }
}

@keyframes crm-auth-in {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.crm-auth-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 920px);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(15, 118, 110, 0.12);
    backdrop-filter: blur(8px);
    animation: crm-auth-in 0.55s ease-out both;
}

.crm-auth-brand {
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
    color: #fff;
    background:
        linear-gradient(160deg, rgba(15, 61, 58, 0.92) 0%, rgba(19, 78, 74, 0.88) 45%, rgba(15, 23, 42, 0.95) 100%);
}

.crm-auth-logo {
    display: block;
    width: min(168px, 58%);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
    animation: crm-auth-in 0.65s ease-out 0.08s both;
}

.crm-auth-badge {
    display: inline-flex;
    margin: 0;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #ccfbf1;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: crm-auth-in 0.65s ease-out 0.12s both;
}

.crm-auth-title {
    margin: 1rem 0 0.75rem;
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
    animation: crm-auth-in 0.65s ease-out 0.16s both;
}

.crm-auth-lead {
    margin: 0;
    max-width: 34ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.86);
    animation: crm-auth-in 0.65s ease-out 0.2s both;
}

.crm-auth-features {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
    animation: crm-auth-in 0.65s ease-out 0.24s both;
}

.crm-auth-features li {
    position: relative;
    padding: 0.75rem 0.85rem 0.75rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.92);
}

.crm-auth-features li::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    top: 1.05rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}

.crm-auth-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
    background: #fff;
}

.crm-auth-form-head h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.crm-auth-form-head p {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.crm-auth-alert {
    margin: 1.15rem 0 0;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.crm-auth-alert-error {
    background: #fef2f2;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.crm-auth-alert-warn {
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #92400e;
}

.crm-auth-fields {
    margin-top: 1.35rem;
    display: grid;
    gap: 1rem;
}

.crm-auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.crm-auth-field input {
    box-sizing: border-box;
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.crm-auth-field input:hover {
    border-color: rgba(15, 23, 42, 0.2);
}

.crm-auth-field input:focus {
    outline: none;
    background: #fff;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.crm-auth-password {
    position: relative;
}

.crm-auth-password input {
    padding-right: 3rem;
}

.crm-auth-eye {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.crm-auth-eye svg {
    display: block;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.crm-auth-eye-off {
    position: absolute;
    opacity: 0;
    transform: scale(0.7) rotate(-12deg);
}

.crm-auth-eye-open {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.crm-auth-eye.is-visible .crm-auth-eye-open {
    opacity: 0;
    transform: scale(0.7) rotate(12deg);
}

.crm-auth-eye.is-visible .crm-auth-eye-off {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.crm-auth-eye:hover {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
}

.crm-auth-eye.is-pop {
    animation: crm-auth-eye-pop 0.35s ease;
}

@keyframes crm-auth-eye-pop {
    0% { transform: translateY(-50%) scale(1); }
    45% { transform: translateY(-50%) scale(1.18); }
    100% { transform: translateY(-50%) scale(1); }
}

.crm-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.15rem 0 0;
    cursor: pointer;
    user-select: none;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
}

.crm-auth-remember input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: #0f766e;
    cursor: pointer;
}

.crm-auth-remember span {
    transition: color 0.15s ease;
}

.crm-auth-remember:hover span {
    color: #0f766e;
}

.crm-auth-submit {
    margin-top: 0.35rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.crm-auth-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 32px rgba(15, 118, 110, 0.34);
    transform: translateY(-1px);
}

.crm-auth-submit:active {
    transform: translateY(0);
}

.crm-auth-footnote {
    margin: 1.25rem 0 0;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #94a3b8;
}

@media (max-width: 800px) {
    .e15-sidebar {
        position: fixed;
        z-index: 20;
        left: -260px;
        transition: left .2s ease;
    }
    .e15-sidebar.open { left: 0; }
    .e15-menu { display: inline-block; padding: .45rem .65rem; border: 1px solid #bdc8d5; border-radius: 6px; background: #fff; }
    .e15-topbar span { display: none; }
    .e7-main { width: 100%; padding: 1.25rem 1rem 1.75rem; }
    .crm-auth-panel { grid-template-columns: 1fr; }
    .crm-auth-brand { display: none; }
    .e15-timeline { grid-template-columns: 1fr; }
    .crm-dash-hero { flex-direction: column; align-items: flex-start; }
    .crm-dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crm-dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crm-dash-split { grid-template-columns: 1fr; }
}

/* ——— Dashboard ——— */
.crm-dash {
    display: grid;
    gap: 1.15rem;
}

.crm-dash-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.45rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(ellipse 55% 90% at 100% 0%, rgba(15, 118, 110, 0.14), transparent 55%),
        linear-gradient(135deg, #fff 0%, #f0fdfa 100%);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.crm-dash-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f766e;
}

.crm-dash-hero h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.crm-dash-lead {
    margin: 0.45rem 0 0;
    max-width: 48ch;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.crm-dash-cta {
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.crm-dash-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.crm-dash-kpi {
    position: relative;
    padding: 1.05rem 1.1rem 1.05rem 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crm-dash-kpi::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #94a3b8;
}

.crm-dash-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.crm-dash-kpi-dot {
    position: absolute;
    right: 0.95rem;
    top: 0.95rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18);
}

.crm-dash-kpi > span:not(.crm-dash-kpi-dot) {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
}

.crm-dash-kpi strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.crm-dash-kpi.tone-ok::before,
.crm-dash-kpi.tone-ok .crm-dash-kpi-dot { background: #059669; }
.crm-dash-kpi.tone-ok .crm-dash-kpi-dot { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.16); }
.crm-dash-kpi.tone-ok { background: linear-gradient(180deg, #fff 0%, #ecfdf5 100%); }

.crm-dash-kpi.tone-live::before,
.crm-dash-kpi.tone-live .crm-dash-kpi-dot { background: #0f766e; }
.crm-dash-kpi.tone-live .crm-dash-kpi-dot { box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16); }
.crm-dash-kpi.tone-live { background: linear-gradient(180deg, #fff 0%, #f0fdfa 100%); }

.crm-dash-kpi.tone-info::before,
.crm-dash-kpi.tone-info .crm-dash-kpi-dot { background: #0284c7; }
.crm-dash-kpi.tone-info .crm-dash-kpi-dot { box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.16); }
.crm-dash-kpi.tone-info { background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%); }

.crm-dash-kpi.tone-danger::before,
.crm-dash-kpi.tone-danger .crm-dash-kpi-dot { background: #dc2626; }
.crm-dash-kpi.tone-danger .crm-dash-kpi-dot { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16); }

.crm-dash-kpi.tone-slate::before,
.crm-dash-kpi.tone-slate .crm-dash-kpi-dot { background: #64748b; }

.crm-dash-kpi.is-warn {
    border-color: rgba(220, 38, 38, 0.2);
    background: linear-gradient(180deg, #fff 0%, #fff1f2 100%);
}

.crm-dash-kpi.is-warn strong { color: #b91c1c; }

.crm-dash-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.crm-dash-alert.is-danger {
    background: #fef2f2;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.crm-dash-alert.is-warn {
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #92400e;
}

.crm-dash-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
}

.crm-dash-panel {
    padding: 1.2rem 1.25rem 1.3rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.crm-dash-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.95rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.crm-dash-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.crm-dash-panel-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
}

.crm-dash-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.crm-dash-metrics-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-dash-metrics-backup {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-dash-metric {
    position: relative;
    padding: 0.9rem 0.95rem 0.9rem 1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.crm-dash-metric::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #94a3b8;
}

.crm-dash-metric.tone-ok { background: #ecfdf5; border-color: rgba(5, 150, 105, 0.14); }
.crm-dash-metric.tone-ok::before { background: #059669; }
.crm-dash-metric.tone-warn { background: #fffbeb; border-color: rgba(217, 119, 6, 0.16); }
.crm-dash-metric.tone-warn::before { background: #d97706; }
.crm-dash-metric.tone-danger { background: #fef2f2; border-color: rgba(220, 38, 38, 0.14); }
.crm-dash-metric.tone-danger::before { background: #dc2626; }
.crm-dash-metric.tone-live { background: #f0fdfa; border-color: rgba(15, 118, 110, 0.14); }
.crm-dash-metric.tone-live::before { background: #0f766e; }
.crm-dash-metric.tone-slate { background: #f8fafc; }
.crm-dash-metric.tone-slate::before { background: #64748b; }

.crm-dash-metric span {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
}

.crm-dash-metric strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

.crm-dash-metric small {
    display: block;
    margin-top: 0.35rem;
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.4;
}

.crm-dash-metric-wide,
.crm-dash-metric-span { grid-column: 1 / -1; }

.crm-dash-note {
    margin: 0.85rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
    word-break: break-word;
}

.crm-dash-storage {
    display: grid;
    gap: 0.65rem;
}

.crm-dash-storage-bar {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.crm-dash-storage-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.crm-dash-storage-meta p {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
}

.crm-dash-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    align-items: end;
    margin-bottom: 1rem;
}

.crm-dash-search {
    display: grid;
    gap: 0.35rem;
    flex: 1 1 240px;
}

.crm-dash-search span,
.crm-dash-check span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.crm-dash-search input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
}

.crm-dash-search input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.5);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    background: #fff;
}

.crm-dash-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding-bottom: 0.55rem;
    cursor: pointer;
    user-select: none;
}

.crm-dash-check input {
    accent-color: #0f766e;
}

.crm-dash-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.crm-dash-table {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
}

.crm-dash-table th {
    background: #f8fafc;
}

.crm-dash-table a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}

.crm-dash-table a:hover {
    text-decoration: underline;
}

.crm-dash-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.crm-dash-pill.tone-ok { background: #d1fae5; color: #047857; }
.crm-dash-pill.tone-warn { background: #fef3c7; color: #b45309; }
.crm-dash-pill.tone-danger { background: #fee2e2; color: #b91c1c; }
.crm-dash-pill.tone-info { background: #e0f2fe; color: #0369a1; }
.crm-dash-pill.tone-slate { background: #e2e8f0; color: #475569; }
.crm-dash-pill.tone-live { background: #ccfbf1; color: #0f766e; }

@media (max-width: 1100px) {
    .crm-dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .crm-dash-split { grid-template-columns: 1fr; }
    .crm-dash-metrics-backup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .crm-dash-kpis,
    .crm-dash-metrics,
    .crm-dash-metrics-2,
    .crm-dash-metrics-backup { grid-template-columns: 1fr; }
}

/* ——— Tenant form ——— */
.crm-form { display: grid; gap: 1.1rem; }
.crm-form-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(ellipse 55% 90% at 100% 0%, rgba(15, 118, 110, 0.12), transparent 55%),
        linear-gradient(135deg, #fff 0%, #f0fdfa 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}
.crm-form-eyebrow {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f766e;
}
.crm-form-hero h1 {
    margin: 0;
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}
.crm-form-lead {
    margin: 0.4rem 0 0;
    max-width: 58ch;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}
.crm-form-back {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}
.crm-form-back:hover { text-decoration: underline; }
.crm-form-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}
.crm-form-alert.is-warn {
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #92400e;
}
.crm-form-alert.is-ok {
    background: #ecfdf5;
    border: 1px solid rgba(15, 118, 110, 0.22);
    color: #0f766e;
}
.crm-form-body { display: grid; gap: 1rem; }
.crm-form-panel {
    padding: 1.2rem 1.25rem 1.3rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.crm-form-panel-head {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.crm-form-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.crm-form-panel-head p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
}
.crm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem 1.1rem;
}
.crm-form-field { display: grid; gap: 0.4rem; }
.crm-form-field-wide { grid-column: 1 / -1; }
.crm-form-field label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #475569;
}
.crm-form-field input,
.crm-form-field select,
.crm-form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
    color: #0f172a;
}
.crm-form-field input[type="color"] {
    padding: 0.25rem;
    height: 2.6rem;
}
.crm-form-field input:focus,
.crm-form-field select:focus,
.crm-form-field textarea:focus {
    outline: none;
    background: #fff;
    border-color: rgba(15, 118, 110, 0.5);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.crm-form-field input[readonly] {
    background: #eef2f6;
    color: #64748b;
}
.crm-form-hint {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.45;
}
.crm-form-features {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #f0fdfa 0%, #ecfdf5 100%);
    border: 1px solid rgba(15, 118, 110, 0.14);
}
.crm-form-features h3 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f766e;
}
.crm-form-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1rem;
}
.crm-form-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: #134e4a;
    line-height: 1.4;
}
.crm-form-feature-check {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    border-radius: 50%;
    background: #0f766e;
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #0f766e;
}
.crm-form-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}
.crm-form-module {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.crm-form-module:hover {
    border-color: rgba(15, 118, 110, 0.35);
    background: #f0fdfa;
}
.crm-form-module input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #0f766e;
}
.crm-form-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
}
.crm-form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}
.crm-form-check input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #0f766e;
}
.crm-form-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.25rem 0 0.5rem;
}
.crm-form-actions .e7-btn {
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}
.crm-form-actions a {
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
}
.crm-form-actions a:hover { color: #0f766e; }

@media (max-width: 900px) {
    .crm-form-grid,
    .crm-form-feature-list,
    .crm-form-modules { grid-template-columns: 1fr; }
    .crm-form-hero { flex-direction: column; align-items: flex-start; }
}

/* ——— Congress theme picker ——— */
.crm-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.crm-theme-card {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.crm-theme-card.is-selected {
    border-color: var(--theme-accent, #0f766e);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #0f766e) 18%, transparent);
}
.crm-theme-select {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.crm-theme-swatch {
    display: block;
    width: 72px;
    height: 56px;
    border-radius: 10px;
    background:
        linear-gradient(145deg, var(--theme-accent, #0f766e) 0%, color-mix(in srgb, var(--theme-accent, #0f766e) 55%, #0f172a) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.crm-theme-meta {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}
.crm-theme-meta strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}
.crm-theme-meta code {
    font-size: 0.75rem;
    color: #64748b;
}
.crm-theme-check {
    opacity: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--theme-accent, #0f766e);
}
.crm-theme-card.is-selected .crm-theme-check { opacity: 1; }
.crm-theme-preview-btn {
    justify-self: start;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.crm-theme-preview-btn:hover {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.35);
    background: #f0fdfa;
}
body.crm-theme-modal-open { overflow: hidden; }
.crm-theme-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.crm-theme-modal[hidden] { display: none !important; }
.crm-theme-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.crm-theme-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    padding: 1.25rem 1.3rem 1.2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
.crm-theme-modal-swatch {
    width: 100%;
    height: 88px;
    margin-bottom: 0.9rem;
    border-radius: 12px;
    background: #0f766e;
}
.crm-theme-modal-dialog h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}
.crm-theme-modal-slug {
    margin: 0.35rem 0 0.7rem;
    color: #64748b;
    font-size: 0.85rem;
}
.crm-theme-modal-dialog > p:not(.crm-theme-modal-slug) {
    margin: 0;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.5;
}
.crm-theme-modal-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin-top: 1.1rem;
}
.crm-theme-modal-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.crm-theme-modal-close:hover { color: #0f172a; }
@media (max-width: 800px) {
    .crm-theme-grid { grid-template-columns: 1fr; }
}

/* ——— Tenant wizard ——— */
.crm-wizard-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}
.crm-wizard-step {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #64748b;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.crm-wizard-step span {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
}
.crm-wizard-step.is-active {
    border-color: rgba(15, 118, 110, 0.35);
    background: #f0fdfa;
    color: #0f766e;
}
.crm-wizard-step.is-active span {
    background: #0f766e;
    color: #fff;
}
.crm-wizard-step.is-done span {
    background: #99f6e4;
    color: #0f766e;
}
.crm-wizard-progress {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
}
.crm-wizard-panel[hidden] { display: none !important; }
.crm-wizard-subhead {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}
.crm-wizard-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0 0.75rem;
}
.crm-wizard-nav-spacer { flex: 1; }
.crm-wizard-nav a {
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
}
.crm-wizard-nav a:hover { color: #0f766e; }
@media (max-width: 900px) {
    .crm-wizard-steps { grid-template-columns: 1fr 1fr; }
}

/* ——— Theme site preview frames ——— */
.crm-theme-select {
    grid-template-columns: 1fr;
    gap: 0.65rem;
}
.crm-theme-frame {
    display: block;
    width: 100%;
    height: 148px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #e2e8f0;
    pointer-events: none;
}
.crm-theme-frame iframe {
    width: 1280px;
    height: 800px;
    border: 0;
    transform: scale(0.28);
    transform-origin: 0 0;
}
.crm-theme-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}
.crm-theme-modal-dialog-lg {
    width: min(100%, 860px);
    padding: 1rem 1.1rem 1.1rem;
}
.crm-theme-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.crm-theme-modal-head h3 { margin: 0; }
.crm-theme-modal-frame {
    height: min(58vh, 420px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f1f5f9;
}
.crm-theme-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.crm-theme-modal-actions a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}
.crm-theme-modal-actions a:hover { text-decoration: underline; }

/* ——— Support ——— */
.crm-support { display: grid; gap: 1.1rem; }
.crm-support-count {
    align-self: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(15, 118, 110, 0.18);
}
.crm-support-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.crm-support-filters {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)) auto;
    gap: 0.75rem 0.85rem;
    align-items: end;
}
.crm-support-select {
    display: grid;
    gap: 0.35rem;
}
.crm-support-select span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}
.crm-support-select select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
}
.crm-support-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.15rem;
}
.crm-support-filter-actions a {
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
}
.crm-support-filter-actions a:hover { color: #0f766e; }
.crm-support-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}
.crm-support-site {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}
.crm-support-site:hover { text-decoration: underline; }
.crm-support-description {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
    color: #334155;
}
.crm-support-messages { display: grid; gap: 0.75rem; }
.crm-support-message {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}
.crm-support-message header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}
.crm-support-message header span {
    color: #94a3b8;
    font-size: 0.8rem;
}
.crm-support-message p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.5;
    color: #334155;
}
.crm-support-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.crm-support-reply {
    display: grid;
    gap: 0.45rem;
}
.crm-support-reply label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}
.crm-support-reply textarea,
.crm-support-reply select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
}
.crm-support-reply button { justify-self: start; margin-top: 0.35rem; }
.crm-support-danger summary {
    cursor: pointer;
    font-weight: 800;
    color: #991b1b;
}
.crm-support-danger form { margin-top: 0.75rem; }
.crm-support-checklist {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.45rem;
    color: #475569;
    line-height: 1.45;
}
@media (max-width: 1100px) {
    .crm-support-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .crm-support-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .crm-support-kpis,
    .crm-support-filters { grid-template-columns: 1fr; }
}

/* ——— Ops / Deploy center ——— */
.crm-ops { display: grid; gap: 1.1rem; }
.crm-ops-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    padding: 0 1.1rem 1.1rem;
}
.crm-ops-actions form {
    margin: 0;
}
.crm-ops-run-form {
    display: grid;
    gap: 0.4rem;
    flex: 1 1 320px;
}
.crm-ops-run-form label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}
.crm-ops-run-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.crm-ops-run-row input {
    flex: 1 1 160px;
    min-width: 140px;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
}
.crm-ops-status p {
    margin: 0 0 0.75rem;
    color: #334155;
}
.crm-ops-log {
    margin: 0.85rem 0 0;
    min-height: 5rem;
    max-height: 16rem;
    overflow: auto;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.crm-ops-deploy-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}
.crm-ops-deploy-meta > div {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
}
@media (max-width: 800px) {
    .crm-ops-deploy-meta { grid-template-columns: 1fr; }
}

/* ——— Audit ——— */
.crm-audit { display: grid; gap: 1.1rem; }
.crm-audit-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}
.crm-audit-filters .crm-support-select input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
}
.crm-audit-details {
    margin-top: 0.45rem;
}
.crm-audit-details summary {
    cursor: pointer;
    color: #0f766e;
    font-weight: 700;
    font-size: 0.84rem;
}
.crm-audit-details small {
    display: block;
    margin: 0.55rem 0 0.25rem;
    color: #64748b;
    font-weight: 700;
}
.crm-audit-code {
    max-height: 14rem;
    margin-top: 0.25rem;
}
@media (max-width: 900px) {
    .crm-audit-filters { grid-template-columns: 1fr 1fr; }
}

/* ——— Jobs ——— */
.crm-jobs { display: grid; gap: 1.1rem; }

/* ——— Tenants list ——— */
.crm-tenants { display: grid; gap: 1.1rem; }

.crm-tenants-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.crm-tenants-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.85rem 1.25rem;
    padding: 0 1.1rem 1rem;
}

.crm-tenants-table-wrap {
    overflow-x: auto;
}

.e7-table.crm-tenants-table {
    width: 100%;
    table-layout: auto;
}

.crm-tenants-table th,
.crm-tenants-table td {
    padding: 0.65rem 0.85rem;
    vertical-align: middle;
}

.crm-tenants-nowrap {
    white-space: nowrap;
}

.crm-tenants-slug {
    font-weight: 700;
    color: #0f766e;
    text-decoration: none;
}

.crm-tenants-slug:hover {
    text-decoration: underline;
}

.crm-tenants-actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.crm-tenants-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.crm-tenants-actions a {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.crm-tenants-actions a:hover {
    background: #ccfbf1;
}

.crm-tenants-actions a.is-muted {
    border-color: rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    color: #334155;
}

.crm-tenants-actions a.is-muted:hover {
    background: #f1f5f9;
}

@media (max-width: 1100px) {
    .crm-tenants-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .crm-tenants-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ——— Tenant show ——— */
.crm-tenant-show { display: grid; gap: 1.1rem; }

.crm-tenant-show-hero-aside {
    display: grid;
    gap: 0.75rem;
    justify-items: end;
}

.crm-tenant-show-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.crm-tenant-show-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

.crm-tenant-show-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.crm-tenant-show-kpi-text {
    font-size: 1rem !important;
    line-height: 1.25;
}

.crm-tenant-show-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
    margin: 0;
    padding: 0 1.1rem 1.1rem;
}

.crm-tenant-show-meta > div {
    display: grid;
    gap: 0.25rem;
}

.crm-tenant-show-meta > div.is-full {
    grid-column: 1 / -1;
}

.crm-tenant-show-meta dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.crm-tenant-show-meta dd {
    margin: 0;
    color: #0f172a;
    word-break: break-word;
}

.crm-tenant-show-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.crm-tenant-show-panel-body {
    padding: 0 1.1rem 1.1rem;
    display: grid;
    gap: 0.85rem;
}

.crm-tenant-show-gates {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.crm-tenant-show-gate {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f8fafc;
}

.crm-tenant-show-gate.is-done {
    border-color: rgba(15, 118, 110, 0.28);
    background: #f0fdfa;
}

.crm-tenant-show-gate header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.crm-tenant-show-timeline {
    margin: 0 1.1rem 1.1rem;
}

.crm-tenant-show-backup-latest {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
}

.crm-tenant-show-backup-latest .crm-form-hint {
    display: block;
    margin-bottom: 0.2rem;
}

.crm-tenant-show-danger-panel {
    border-color: rgba(185, 28, 28, 0.18);
    background: linear-gradient(180deg, #fffafa 0%, #fff 42%);
}

.crm-tenant-show-danger-panel .crm-dash-panel-head {
    border-bottom-color: rgba(185, 28, 28, 0.12);
}

.crm-tenant-show-danger-panel .crm-dash-panel-head h2 {
    color: #991b1b;
}

.crm-tenant-show-danger {
    display: grid;
    gap: 0.85rem;
    padding: 0 1.1rem 1.1rem;
}

.crm-tenant-show-danger-note {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #9f1239;
}

.crm-tenant-show-danger-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.crm-tenant-show-danger-actions form {
    margin: 0;
}

@media (max-width: 1100px) {
    .crm-tenant-show-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .crm-tenant-show-gates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .crm-tenant-show-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .crm-tenant-show-meta,
    .crm-tenant-show-backup-latest,
    .crm-tenant-show-gates {
        grid-template-columns: 1fr;
    }
    .crm-tenant-show-hero-aside {
        justify-items: stretch;
        width: 100%;
    }
    .crm-tenant-show-pills,
    .crm-tenant-show-actions {
        justify-content: flex-start;
    }
    .crm-tenant-show-actions .crm-hero-btn {
        flex: 1 1 auto;
    }
}

/* ——— Operators ——— */
.crm-operators { display: grid; gap: 1.1rem; }

.crm-operators-table-wrap {
    overflow-x: auto;
}

.e7-table.crm-operators-table {
    width: 100%;
    table-layout: auto;
}

.crm-operators-table th,
.crm-operators-table td {
    padding: 0.65rem 0.85rem;
    vertical-align: middle;
}

.crm-operators-table th:nth-child(4),
.crm-operators-table td:nth-child(4) {
    width: 4.5rem;
}

.crm-operators-table th:nth-child(7),
.crm-operators-table td:nth-child(7),
.crm-operators-actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.crm-operators-nowrap {
    white-space: nowrap;
}

.crm-operators-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.crm-operators-actions a {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.crm-operators-actions a:hover {
    background: #ccfbf1;
}

.crm-operators-actions .e7-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
}

.crm-operators-actions form {
    margin: 0;
}

/* ——— Deletion request ——— */
.crm-deletion,
.crm-password,
.crm-deletion-form,
.crm-password-form {
    display: grid;
    gap: 1.1rem;
}

.crm-deletion-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.crm-deletion-mode {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(185, 28, 28, 0.16);
    background: #fffafa;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.crm-deletion-mode input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.crm-deletion-mode strong {
    font-size: 0.95rem;
    color: #7f1d1d;
}

.crm-deletion-mode span {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #9f1239;
}

.crm-deletion-mode:hover {
    border-color: rgba(185, 28, 28, 0.35);
    background: #fff1f2;
}

.crm-deletion-mode.is-selected {
    border-color: rgba(185, 28, 28, 0.45);
    background: #fff1f2;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.crm-deletion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.crm-password-form .crm-auth-password input {
    padding-right: 3rem;
}

@media (max-width: 800px) {
    .crm-deletion-modes {
        grid-template-columns: 1fr;
    }
}

/* ——— Operator create/edit ——— */
.crm-operator-form { display: grid; gap: 1.1rem; }
.crm-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.crm-role-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.crm-role-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.crm-role-card strong {
    font-size: 0.95rem;
    color: #0f172a;
}
.crm-role-card span {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #64748b;
}
.crm-role-card:hover {
    border-color: rgba(15, 118, 110, 0.35);
    background: #f0fdfa;
}
.crm-role-card.is-selected {
    border-color: rgba(15, 118, 110, 0.45);
    background: #f0fdfa;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.crm-operator-form .crm-auth-password input {
    padding-right: 3rem;
}
@media (max-width: 900px) {
    .crm-role-grid { grid-template-columns: 1fr; }
}
