:root {
    --ecc-primary: #1e4ed8;
    --ecc-primary-strong: #183ca8;
    --ecc-primary-soft: rgba(30, 78, 216, 0.10);
    --ecc-success: #0f766e;
    --ecc-warning: #b45309;
    --ecc-danger: #b42318;
    --ecc-text: #172033;
    --ecc-text-soft: #667085;
    --ecc-border: #dbe2ea;
    --ecc-border-strong: #c9d2de;
    --ecc-bg: #edf2f7;
    --ecc-bg-soft: #f7f9fc;
    --ecc-surface: #ffffff;
    --ecc-surface-alt: #f8fafc;
    --ecc-sidebar: #ffffff;
    --ecc-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --ecc-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    --ecc-radius-xl: 24px;
    --ecc-radius-lg: 18px;
    --ecc-radius-md: 14px;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ecc-text);
    background:
        radial-gradient(circle at top left, rgba(30, 78, 216, 0.06), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--ecc-bg) 100%);
}

.app-body,
.auth-body {
    margin: 0;
}

.min-w-0 {
    min-width: 0;
}

.crm-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.crm-sidebar {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
}

.crm-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--ecc-sidebar);
    border: 1px solid var(--ecc-border);
    border-radius: 28px;
    box-shadow: var(--ecc-shadow-soft);
    padding: 1.1rem;
}

.crm-brand-link,
.app-brand-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
}

.crm-brand-logo,
.app-brand-logo {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--ecc-primary), #0f6ddf);
    box-shadow: 0 14px 28px rgba(30, 78, 216, 0.18);
}

.crm-brand-title,
.app-brand-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.crm-brand-subtitle,
.app-brand-subtitle {
    display: block;
    color: var(--ecc-text-soft);
    font-size: 0.88rem;
    margin-top: 0.18rem;
}

.crm-side-note {
    background: linear-gradient(180deg, #f8fbff, #f4f8ff);
    border: 1px solid #d9e5ff;
    border-radius: 18px;
    padding: 0.95rem 1rem;
}

.crm-side-note-label,
.crm-nav-caption,
.app-sidebar-caption,
.app-page-kicker,
.crm-workspace-kicker {
    color: #7c8799;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.crm-side-note-text {
    margin-top: 0.45rem;
    color: var(--ecc-text-soft);
    line-height: 1.55;
    font-size: 0.9rem;
}

.crm-nav-wrap,
.app-sidebar-section {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.app-nav {
    gap: 0.35rem;
    overflow: auto;
    padding-right: 0.1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-nav::-webkit-scrollbar,
.notification-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.app-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--ecc-text);
    text-decoration: none;
    border-radius: 18px;
    padding: 0.85rem 0.95rem;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.app-nav-link:hover {
    color: var(--ecc-primary);
    background: #f3f7ff;
    border-color: #dae5ff;
}

.app-nav-link.is-active {
    color: var(--ecc-primary);
    background: linear-gradient(90deg, rgba(30, 78, 216, 0.11), rgba(30, 78, 216, 0.03));
    border-color: #d4e0ff;
}

.app-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8rem;
    bottom: 0.8rem;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--ecc-primary), #5b8cff);
}

.app-nav-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fb;
    color: #4a5c7d;
    font-size: 1rem;
    transition: inherit;
}

.app-nav-link:hover .app-nav-icon,
.app-nav-link.is-active .app-nav-icon {
    background: linear-gradient(135deg, var(--ecc-primary), #0f6ddf);
    color: #fff;
}

.app-nav-text {
    font-size: 0.95rem;
    font-weight: 700;
}

.crm-user-card,
.app-sidebar-footer {
    border-top: 1px solid var(--ecc-border);
    padding-top: 1rem;
}

.app-user-mini,
.app-profile-chip {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.app-user-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--ecc-primary), #0f6ddf);
    box-shadow: 0 10px 22px rgba(30, 78, 216, 0.18);
}

.app-user-name {
    font-size: 0.94rem;
    font-weight: 800;
}

.app-user-role,
.text-secondary,
.text-muted,
.form-text,
.small-muted {
    color: var(--ecc-text-soft) !important;
}

.crm-main,
.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.crm-topbar,
.app-topbar {
    position: sticky;
    top: 1rem;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    border: 1px solid var(--ecc-border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: var(--ecc-shadow-soft);
}

.app-page-title {
    font-size: clamp(1.2rem, 1rem + 0.8vw, 1.8rem);
    font-weight: 800;
    color: var(--ecc-text);
}

.crm-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

.crm-topbar-chip,
.crm-workspace-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--ecc-border);
    background: var(--ecc-surface-alt);
    color: var(--ecc-text-soft);
    padding: 0.62rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.btn-app-ghost {
    border: 1px solid var(--ecc-border);
    background: var(--ecc-surface);
    color: var(--ecc-text);
    border-radius: 14px;
    padding: 0.7rem 0.95rem;
    font-weight: 700;
}

.btn-app-ghost:hover {
    background: #f8fbff;
    border-color: #d4e0ff;
    color: var(--ecc-primary);
}

.notification-trigger {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    padding: 0;
}

.notification-dropdown {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -0.28rem;
    right: -0.18rem;
    min-width: 1.35rem;
}

.notification-menu {
    width: min(27rem, 92vw);
    max-height: 34rem;
    border: 1px solid var(--ecc-border);
    border-radius: 20px;
    background: rgba(255,255,255,0.98);
    box-shadow: var(--ecc-shadow);
}

.notification-list {
    max-height: 24rem;
    overflow-y: auto;
}

.notification-item {
    transition: background-color .18s ease;
}

.notification-item:not(.is-read) {
    background: rgba(30, 78, 216, 0.04);
}

.notification-item:hover {
    background: rgba(30, 78, 216, 0.08);
}

.app-profile-chip {
    padding: 0.45rem 0.7rem;
    border-radius: 16px;
    border: 1px solid var(--ecc-border);
    background: #fff;
}

.crm-workspace-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    border: 1px solid var(--ecc-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--ecc-shadow-soft);
}

.crm-workspace-text {
    margin-top: 0.35rem;
    color: var(--ecc-text-soft);
    font-size: 0.95rem;
}

.crm-workspace-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.crm-content,
.app-content {
    min-width: 0;
}

.card {
    border: 1px solid var(--ecc-border);
    border-radius: 22px;
    background: var(--ecc-surface);
    box-shadow: var(--ecc-shadow-soft);
    overflow: hidden;
}

.card.border-0 {
    border: 1px solid var(--ecc-border) !important;
}

.card .card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--ecc-border);
}

.card .card-body {
    padding: 1.3rem;
}

.stat-card {
    position: relative;
    border: 1px solid var(--ecc-border);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 1.25rem;
    box-shadow: var(--ecc-shadow-soft);
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, #84a9ff, var(--ecc-primary));
}

.stat-card .stat-label {
    display: block;
    color: #78859a;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    display: block;
    font-size: clamp(1.7rem, 1.35rem + 0.9vw, 2.05rem);
    line-height: 1;
    font-weight: 800;
    color: var(--ecc-text);
}

.table-responsive {
    border-radius: 18px;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f7faff;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
    padding: 0.95rem 0.9rem;
    border-bottom-color: #edf1f5;
}

.table thead th {
    color: #7c8799;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #f8fafc;
}

.form-label {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select,
.input-group-text,
.form-control:focus,
.form-select:focus {
    border-radius: 14px;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 48px;
    border-color: var(--ecc-border-strong);
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(30, 78, 216, 0.28);
    box-shadow: 0 0 0 0.25rem rgba(30, 78, 216, 0.10);
}

textarea.form-control {
    min-height: 120px;
}

.form-control-shell .input-group-text {
    background: #f8fafc;
    color: var(--ecc-text-soft);
}

.btn {
    border-radius: 14px;
    font-weight: 700;
    padding: 0.76rem 1rem;
}

.btn-sm {
    border-radius: 12px;
    padding: 0.54rem 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ecc-primary), var(--ecc-primary-strong));
    border-color: var(--ecc-primary);
    box-shadow: 0 12px 24px rgba(30, 78, 216, 0.15);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #2459ef, #173da8);
    border-color: #1a45bd;
}

.btn-outline-primary {
    color: var(--ecc-primary);
    border-color: #d4e0ff;
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background: var(--ecc-primary);
    border-color: var(--ecc-primary);
}

.btn-outline-secondary {
    background: #fff;
}

.badge {
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.alert {
    border: 1px solid transparent;
    border-radius: 18px;
    box-shadow: var(--ecc-shadow-soft);
}

.display-6,
.h3,
.h4,
.h5,
.h6 {
    font-weight: 800;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 1.25rem 0;
}

.auth-container {
    max-width: 1280px;
}

.crm-auth-showcase {
    border-radius: 30px;
    border: 1px solid #d9e5ff;
    background:
        radial-gradient(circle at top left, rgba(30, 78, 216, 0.18), transparent 30%),
        linear-gradient(180deg, #0f172a 0%, #111b31 100%);
    color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--ecc-shadow);
}

.crm-auth-showcase .app-page-kicker,
.crm-auth-showcase .auth-showcase-text {
    color: rgba(255,255,255,0.72) !important;
}

.auth-showcase-title {
    font-size: clamp(2rem, 1.7rem + 1vw, 3.1rem);
    line-height: 1.1;
    font-weight: 800;
    margin: 0.8rem 0 1rem;
}

.auth-showcase-text {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 34rem;
}

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

.crm-auth-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.07);
    padding: 1rem;
    font-weight: 700;
}

.crm-auth-feature i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.14);
}

.crm-auth-card-wrap,
.auth-card-wrap {
    min-height: 100%;
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    border-radius: 28px;
    border: 1px solid var(--ecc-border);
    background: rgba(255,255,255,0.95);
    box-shadow: var(--ecc-shadow);
    padding: 2rem;
}

.auth-card-title {
    font-size: clamp(1.7rem, 1.4rem + 0.5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.auth-card-text {
    color: var(--ecc-text-soft);
    line-height: 1.7;
}

.crm-login-support {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.crm-login-support-item,
.auth-help-box {
    border-radius: 16px;
    border: 1px solid var(--ecc-border);
    background: #f8fafc;
    padding: 0.9rem 1rem;
}

.crm-login-support-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ecc-text-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.crm-login-support-item i {
    color: var(--ecc-primary);
}

.auth-help-box {
    color: var(--ecc-text-soft);
}

.auth-help-box a {
    color: var(--ecc-primary);
    font-weight: 700;
}

.system-error-live-banner,
.system-error-entry {
    border-radius: 18px;
}

@media (max-width: 1199.98px) {
    .crm-shell {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.85rem;
    }

    .crm-topbar,
    .crm-workspace-bar {
        top: 0.85rem;
    }
}

@media (max-width: 991.98px) {
    .crm-topbar,
    .crm-workspace-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-topbar-actions,
    .crm-workspace-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .offcanvas.app-mobile-nav {
        max-width: 320px;
    }
}

@media (max-width: 767.98px) {
    .crm-shell {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .crm-topbar,
    .crm-workspace-bar,
    .card .card-body,
    .auth-card {
        padding: 1rem;
    }

    .crm-login-support {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .btn,
    .btn-app-ghost {
        width: auto;
    }
}


/* ===== CRM Command Center Variant ===== */

:root {
    --crm2-bg: #eef2f7;
    --crm2-surface: #ffffff;
    --crm2-surface-2: #f8fafc;
    --crm2-surface-3: #f2f5fa;
    --crm2-text: #162033;
    --crm2-text-soft: #6a7587;
    --crm2-border: #dbe3ef;
    --crm2-primary: #2457f5;
    --crm2-primary-soft: rgba(36, 87, 245, 0.1);
    --crm2-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

body.app-body,
body.auth-body {
    background: linear-gradient(180deg, #f7f9fc 0%, var(--crm2-bg) 100%);
    color: var(--crm2-text);
}

.crm2-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.25rem;
    min-height: 100vh;
}

.crm2-sidebar {
    position: sticky;
    top: 1.25rem;
    height: calc(100vh - 2.5rem);
}

.crm2-sidebar-card,
.crm2-block,
.crm2-login-card,
.crm2-auth-showcase,
.crm2-command-card,
.crm2-hero,
.crm2-metric-card,
.crm2-topbar,
.crm2-mobile-sidebar .offcanvas-body {
    background: var(--crm2-surface);
    border: 1px solid var(--crm2-border);
    box-shadow: var(--crm2-shadow);
}

.crm2-sidebar-card {
    height: 100%;
    border-radius: 28px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm2-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
}

.crm2-brand-mark {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--crm2-primary), #0e8ee8);
}

.crm2-brand-title {
    display: block;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.crm2-brand-subtitle,
.crm2-user-role,
.crm2-command-text,
.crm2-hero-text,
.crm2-board-card p,
.crm2-process-item p,
.crm2-side-note-text,
.crm2-auth-text,
.crm2-login-text,
.crm2-sidebar-note,
.crm2-side-meta {
    color: var(--crm2-text-soft);
}

.crm2-section-label,
.crm2-page-kicker,
.crm2-command-label,
.crm2-metric-label,
.crm2-board-step {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    font-size: .72rem;
    color: #7f8898;
}

.crm2-rail-panel,
.crm2-nav-panel,
.crm2-user-panel {
    border: 1px solid var(--crm2-border);
    background: var(--crm2-surface-2);
    border-radius: 22px;
    padding: .95rem;
}

.crm2-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-top: .8rem;
}

.crm2-quick-link {
    text-decoration: none;
    color: var(--crm2-text);
    background: #fff;
    border: 1px solid var(--crm2-border);
    border-radius: 18px;
    padding: .85rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-height: 92px;
    transition: .18s ease;
}

.crm2-quick-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--crm2-surface-3);
    color: #51607b;
}

.crm2-quick-link span {
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.35;
}

.crm2-quick-link:hover,
.crm2-quick-link.is-active {
    transform: translateY(-1px);
    border-color: #bfd0ff;
    background: linear-gradient(180deg, #fff, #f3f7ff);
    color: var(--crm2-primary);
}

.crm2-nav {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-top: .8rem;
    overflow: auto;
    scrollbar-width: none;
}

.crm2-nav::-webkit-scrollbar { width: 0; height: 0; }

.crm2-nav-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .82rem .9rem;
    border-radius: 18px;
    border: 1px solid transparent;
    color: var(--crm2-text);
    text-decoration: none;
    transition: .18s ease;
}

.crm2-nav-link:hover {
    background: #fff;
    border-color: #d6e0f0;
    color: var(--crm2-primary);
}

.crm2-nav-link.is-active {
    background: linear-gradient(90deg, rgba(36, 87, 245, 0.12), rgba(36, 87, 245, 0.04));
    border-color: #bfd0ff;
    color: var(--crm2-primary);
}

.crm2-nav-icon,
.crm2-icon-btn,
.crm2-top-pill,
.crm2-user-avatar,
.crm2-process-no,
.crm2-mini-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.crm2-nav-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--crm2-border);
    color: #4f5d76;
}

.crm2-nav-link.is-active .crm2-nav-icon,
.crm2-nav-link:hover .crm2-nav-icon {
    background: linear-gradient(135deg, var(--crm2-primary), #0e8ee8);
    color: #fff;
    border-color: transparent;
}

.crm2-nav-text { font-weight: 700; font-size: .95rem; }

.crm2-user-row,
.crm2-profile,
.crm2-topbar-left,
.crm2-topbar-right,
.crm2-block-head,
.crm2-process-item,
.crm2-login-tags,
.crm2-auth-grid {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.crm2-user-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--crm2-primary), #0e8ee8);
}

.crm2-user-name { font-weight: 800; font-size: .94rem; }

.crm2-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm2-topbar {
    border-radius: 24px;
    padding: 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.crm2-page-title {
    margin: .2rem 0 0;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 800;
}

.crm2-topbar-right { flex-wrap: wrap; justify-content: flex-end; }

.crm2-top-pill,
.crm2-icon-btn {
    height: 46px;
    border-radius: 15px;
    border: 1px solid var(--crm2-border);
    background: var(--crm2-surface-2);
    color: var(--crm2-text);
    gap: .5rem;
    padding: 0 .95rem;
}

.crm2-icon-btn:hover,
.crm2-top-pill:hover { border-color: #bfd0ff; color: var(--crm2-primary); background: #fff; }

.crm2-command-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.crm2-command-card {
    border-radius: 22px;
    padding: 1rem 1.05rem;
}

.crm2-command-card.is-primary {
    background: linear-gradient(135deg, #1f4df0, #0e8ee8);
    border-color: transparent;
    color: #fff;
}

.crm2-command-card.is-primary .crm2-command-label,
.crm2-command-card.is-primary .crm2-command-text { color: rgba(255,255,255,.78); }

.crm2-command-value,
.crm2-hero-title,
.crm2-block-title,
.crm2-login-title,
.crm2-auth-title { font-weight: 800; }

.crm2-command-value { font-size: 1.25rem; margin: .35rem 0; }

.crm2-content { min-width: 0; }

.crm2-hero {
    border-radius: 26px;
    padding: 1.2rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.crm2-hero-title { font-size: clamp(1.3rem, 2vw, 1.9rem); margin: .25rem 0 .4rem; }

.crm2-hero-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.crm2-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.crm2-metric-card {
    border-radius: 22px;
    padding: 1rem 1.05rem;
}

.crm2-metric-card.is-strong {
    background: linear-gradient(180deg, #f8fbff, #eef4ff);
    border-color: #c6d7ff;
}

.crm2-metric-value {
    display: block;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 800;
    margin-top: .4rem;
}

.crm2-metric-value small { font-size: .95rem; color: var(--crm2-text-soft); }

.crm2-block {
    border-radius: 26px;
    padding: 1.15rem;
    height: 100%;
}

.crm2-block-head {
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

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

.crm2-board-card {
    border: 1px solid var(--crm2-border);
    background: var(--crm2-surface-2);
    border-radius: 22px;
    padding: 1rem;
}

.crm2-board-card h4,
.crm2-process-item h4,
.crm2-side-note-title { font-size: 1.02rem; font-weight: 800; margin: .55rem 0 .4rem; }

.crm2-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

.crm2-inline-links a,
.crm2-list-link {
    text-decoration: none;
    color: var(--crm2-text);
}

.crm2-inline-links a {
    border: 1px solid var(--crm2-border);
    background: #fff;
    border-radius: 999px;
    padding: .55rem .85rem;
    font-weight: 700;
}

.crm2-quick-stack { display: grid; gap: .75rem; }

.crm2-list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--crm2-border);
    background: var(--crm2-surface-2);
    border-radius: 18px;
    padding: .95rem 1rem;
    font-weight: 700;
    transition: .18s ease;
}

.crm2-list-link:hover,
.crm2-inline-links a:hover {
    color: var(--crm2-primary);
    border-color: #bfd0ff;
    background: #fff;
}

.crm2-side-note-box {
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fbff, #f2f6ff);
    border: 1px solid #d5e1ff;
    padding: 1rem;
}

.crm2-process-list { display: grid; gap: .95rem; }

.crm2-process-item {
    align-items: flex-start;
    border: 1px solid var(--crm2-border);
    background: var(--crm2-surface-2);
    border-radius: 20px;
    padding: 1rem;
}

.crm2-process-no {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--crm2-primary), #0e8ee8);
}

.crm2-side-stat {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: .4rem;
}

.crm2-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.crm2-auth-showcase,
.crm2-login-card {
    border-radius: 30px;
}

.crm2-auth-showcase {
    padding: 2.2rem;
    background: radial-gradient(circle at top left, rgba(36,87,245,.18), transparent 40%), #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
}

.crm2-auth-title { font-size: clamp(2rem, 3vw, 3rem); line-height: 1.12; margin: .55rem 0 .85rem; }

.crm2-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.crm2-auth-feature {
    border: 1px solid var(--crm2-border);
    border-radius: 20px;
    padding: 1rem;
    background: var(--crm2-surface-2);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    font-weight: 700;
}

.crm2-auth-feature i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--crm2-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--crm2-primary);
}

.crm2-auth-card-wrap { display: flex; align-items: center; min-height: 100%; }

.crm2-login-card {
    width: 100%;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--crm2-border);
    box-shadow: var(--crm2-shadow);
}

.crm2-login-title { font-size: clamp(1.55rem, 2.2vw, 2rem); margin: .35rem 0 .45rem; }

.crm2-input-shell .input-group-text,
.crm2-input-shell .form-control {
    border-color: var(--crm2-border);
    background: var(--crm2-surface-2);
}

.crm2-input-shell .form-control {
    box-shadow: none;
}

.crm2-input-shell .form-control:focus {
    background: #fff;
    border-color: #bfd0ff;
}

.crm2-login-tags {
    flex-wrap: wrap;
}

.crm2-mini-tag {
    gap: .45rem;
    border: 1px solid var(--crm2-border);
    border-radius: 999px;
    padding: .55rem .85rem;
    background: var(--crm2-surface-2);
    font-size: .88rem;
    font-weight: 700;
}

.card,
.stat-card,
.notification-menu,
.auth-card,
.auth-card-wrap,
.auth-help-box,
.form-control-shell {
    border-radius: 22px !important;
}

.card,
.table,
.form-control,
.form-select,
.input-group-text,
.alert,
.badge.text-bg-light.border {
    border-color: var(--crm2-border) !important;
}

.card,
.stat-card,
.auth-card,
.auth-help-box {
    box-shadow: none;
}

.table {
    --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
    padding: .95rem .85rem;
    border-bottom-color: var(--crm2-border);
}

.table thead th {
    color: #768196;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.stat-card {
    background: var(--crm2-surface) !important;
    border: 1px solid var(--crm2-border) !important;
    padding: 1rem 1.05rem !important;
}

.stat-label { color: #7f8898 !important; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem !important; font-weight: 800 !important; }
.stat-value { color: var(--crm2-text) !important; }

.notification-menu { min-width: 360px; border: 1px solid var(--crm2-border); }
.notification-list { max-height: 360px; overflow: auto; }

@media (max-width: 1399.98px) {
    .crm2-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
    .crm2-shell { grid-template-columns: 1fr; }
    .crm2-command-strip { grid-template-columns: 1fr; }
    .crm2-auth-showcase { min-height: 320px; }
}

@media (max-width: 991.98px) {
    .crm2-shell { padding: 1rem; }
    .crm2-topbar,
    .crm2-login-card,
    .crm2-hero,
    .crm2-block,
    .crm2-command-card { border-radius: 22px; }
    .crm2-board-grid,
    .crm2-auth-grid { grid-template-columns: 1fr; }
    .crm2-topbar-right { justify-content: flex-start; }
}

@media (max-width: 767.98px) {
    .crm2-shell { padding: .85rem; gap: .85rem; }
    .crm2-hero,
    .crm2-topbar,
    .crm2-block,
    .crm2-login-card,
    .crm2-command-card,
    .crm2-metric-card { padding: .95rem; }
    .crm2-metric-grid { grid-template-columns: 1fr; }
    .crm2-topbar-right { width: 100%; }
    .notification-menu { min-width: 300px; }
}
