html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fb;
    color: #172033;
}

a {
    color: inherit;
}

.crm-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 28%), radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 24%), linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
}

.crm-shell {
    display: flex;
    min-height: 100vh;
}

.crm-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0b1220 0%, #121c31 100%);
    color: #fff;
    padding: 24px 18px;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.15);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.crm-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    padding: 6px 8px;
}

.crm-brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
}

.crm-brand-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
}

.crm-brand-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

.crm-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crm-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 14px;
    transition: 0.2s ease;
    font-weight: 700;
}

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

    .crm-nav-link.active {
        color: #fff;
        background: linear-gradient(135deg, rgba(59,130,246,0.28), rgba(6,182,212,0.20));
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    }

    .crm-nav-link i {
        font-size: 18px;
    }

.crm-sidebar-footer {
    margin-top: auto;
    padding-top: 22px;
}

.crm-sidebar-footer-card {
    border-radius: 18px;
    padding: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.crm-sidebar-footer-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.65);
    font-weight: 800;
    margin-bottom: 8px;
}

.crm-sidebar-footer-text {
    color: rgba(255,255,255,0.90);
    line-height: 1.5;
    font-size: 14px;
}

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

.crm-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 34px 12px 34px;
}

.crm-page-kicker {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.crm-page-title {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 4px;
}

.crm-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-topbar-btn {
    white-space: nowrap;
}

.crm-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #e9eef6;
    font-weight: 700;
}

.crm-content {
    padding: 16px 34px 34px 34px;
}

.crm-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid #e8edf5;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.crm-card-body {
    padding: 24px;
}

.crm-section-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 18px;
}

.crm-muted {
    color: #64748b;
}

.section-head {
    margin-bottom: 18px;
}

.section-kicker {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 22px;
    margin-bottom: 22px;
}

.dashboard-hero-content,
.dashboard-hero-side {
    border-radius: 28px;
    border: 1px solid #dfe8f3;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

.dashboard-hero-content {
    padding: 30px;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.20), transparent 35%), linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #06b6d4 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .dashboard-hero-content::after {
        content: "";
        position: absolute;
        right: -80px;
        top: -80px;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        background: rgba(255,255,255,0.09);
    }

.dashboard-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.dashboard-hero-title {
    font-size: 36px;
    line-height: 1.08;
    margin: 0 0 14px;
    font-weight: 800;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.dashboard-hero-text {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
    max-width: 700px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.dashboard-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.dashboard-hero-side {
    padding: 22px;
    background: rgba(255,255,255,0.78);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-mini-card {
    background: #fff;
    border: 1px solid #e9eef6;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.hero-mini-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-mini-value {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 12px;
}

.hero-mini-note {
    color: #64748b;
    font-size: 13px;
}

.hero-mini-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #edf3fa;
    overflow: hidden;
}

.hero-mini-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

    .hero-mini-progress-bar.is-success {
        background: linear-gradient(90deg, #10b981, #22c55e);
    }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 22px;
    border: 1px solid #e8edf5;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-total .stat-icon {
    background: rgba(37, 99, 235, 0.10);
    color: #2563eb;
}

.stat-card-active .stat-icon {
    background: rgba(6, 182, 212, 0.10);
    color: #0891b2;
}

.stat-card-closed .stat-icon {
    background: rgba(16, 185, 129, 0.10);
    color: #10b981;
}

.stat-card-today .stat-icon {
    background: rgba(124, 58, 237, 0.10);
    color: #7c3aed;
}

.stat-label {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 34px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-hint {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

.alerts-panel {
    margin-bottom: 22px;
}

.alerts-panel-head {
    margin-bottom: 16px;
}

.alerts-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.alert-summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 22px;
    border: 1px solid #e8edf5;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.alert-summary-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.alert-summary-label {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.alert-summary-value {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    color: #0f172a;
}

.alert-summary-text {
    font-size: 13px;
    color: #94a3b8;
}

.alert-summary-overdue .alert-summary-icon {
    background: #fef2f2;
    color: #dc2626;
}

.alert-summary-today .alert-summary-icon {
    background: #fff7ed;
    color: #ea580c;
}

.alert-summary-soon .alert-summary-icon {
    background: #eff6ff;
    color: #2563eb;
}

.alerts-list-card {
    overflow: hidden;
}

.task-alert-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-alert-link {
    text-decoration: none;
}

.task-alert-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid #edf2f7;
    background: #fbfdff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.task-alert-link:hover .task-alert-row {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
}

.task-alert-row.overdue {
    border-left: 5px solid #dc2626;
}

.task-alert-row.today {
    border-left: 5px solid #ea580c;
}

.task-alert-row.soon {
    border-left: 5px solid #2563eb;
}

.task-alert-row.planned {
    border-left: 5px solid #64748b;
}

.task-alert-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.task-alert-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

    .task-alert-icon.overdue {
        background: #fef2f2;
        color: #dc2626;
    }

    .task-alert-icon.today {
        background: #fff7ed;
        color: #ea580c;
    }

    .task-alert-icon.soon {
        background: #eff6ff;
        color: #2563eb;
    }

    .task-alert-icon.planned {
        background: #f1f5f9;
        color: #475569;
    }

.task-alert-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.task-alert-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-alert-name {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.task-alert-action {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
    font-weight: 600;
}

.task-alert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #64748b;
    font-size: 13px;
}

    .task-alert-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.task-alert-right {
    flex-shrink: 0;
    text-align: right;
}

.task-alert-badge {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

    .task-alert-badge.overdue {
        background: #fef2f2;
        color: #b91c1c;
    }

    .task-alert-badge.today {
        background: #fff7ed;
        color: #c2410c;
    }

    .task-alert-badge.soon {
        background: #eff6ff;
        color: #1d4ed8;
    }

    .task-alert-badge.planned {
        background: #f1f5f9;
        color: #475569;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

.pipeline-list,
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pipeline-row {
    background: #f8fbff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 16px;
}

.pipeline-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.pipeline-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pipeline-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #e0ecff;
    color: #1d4ed8;
}

.pipeline-count {
    min-width: 46px;
    text-align: center;
    padding: 7px 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e4eaf1;
    font-weight: 800;
}

.pipeline-percent {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}

.pipeline-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #eaf1f8;
    overflow: hidden;
}

.pipeline-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

    .pipeline-badge.is-primary,
    .status-pill.is-primary,
    .pipeline-progress-bar.is-primary {
        background: linear-gradient(90deg, #2563eb, #60a5fa);
        color: #fff;
    }

.pipeline-badge.is-info,
.status-pill.is-info {
    background: #e0f2fe;
    color: #0369a1;
}

.pipeline-progress-bar.is-info {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.pipeline-badge.is-warning,
.status-pill.is-warning {
    background: #fff7ed;
    color: #c2410c;
}

.pipeline-progress-bar.is-warning {
    background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.pipeline-badge.is-success,
.status-pill.is-success {
    background: #ecfdf5;
    color: #047857;
}

.pipeline-progress-bar.is-success {
    background: linear-gradient(90deg, #10b981, #22c55e);
}

.pipeline-badge.is-empty,
.status-pill.is-empty {
    background: #f1f5f9;
    color: #475569;
}

.pipeline-progress-bar.is-empty {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.recent-card-link {
    text-decoration: none;
}

.recent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.recent-row-card {
    background: #fbfdff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 16px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.recent-card-link:hover .recent-row-card {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
    border-color: #dbe7f3;
}

.recent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.recent-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.recent-name {
    font-weight: 800;
    color: #0f172a;
    font-size: 16px;
}

.recent-meta {
    font-size: 13px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

    .recent-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.recent-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.recent-date {
    font-size: 12px;
    color: #94a3b8;
}

.crm-empty-state {
    border: 1px dashed #d8e3ef;
    background: #fbfdff;
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
}

.crm-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: #eef4ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.crm-empty-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.crm-empty-text {
    color: #64748b;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

.crm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.crm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
    border: none;
}

.crm-btn-primary {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.24);
}

    .crm-btn-primary:hover {
        color: #fff;
        transform: translateY(-1px);
    }

.crm-btn-light {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e5ebf3;
}

    .crm-btn-light:hover {
        color: #0f172a;
        background: #eef4fa;
    }

.crm-table-wrap {
    overflow-x: auto;
}

.crm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .crm-table thead th {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #64748b;
        font-weight: 800;
        padding: 14px 16px;
        border-bottom: 1px solid #ebf0f6;
        background: #fbfcfe;
    }

    .crm-table tbody td {
        padding: 16px;
        border-bottom: 1px solid #eef3f8;
        vertical-align: middle;
    }

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

.crm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.crm-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border-radius: 12px;
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 700;
}

    .crm-action-link.view {
        background: #eef4ff;
        color: #1d4ed8;
    }

    .crm-action-link.edit {
        background: #ecfeff;
        color: #0f766e;
    }

    .crm-action-link.delete {
        background: #fef2f2;
        color: #dc2626;
    }

.crm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.crm-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .crm-form-group.full {
        grid-column: 1 / -1;
    }

.crm-label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.crm-input,
.crm-textarea {
    width: 100%;
    border: 1px solid #dbe4ef;
    background: #fff;
    border-radius: 16px;
    padding: 13px 14px;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    transition: 0.2s ease;
}

    .crm-input:focus,
    .crm-textarea:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 4px rgba(96,165,250,0.15);
    }

.crm-textarea {
    min-height: 120px;
    resize: vertical;
}

.crm-detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px 18px;
}

.crm-detail-label {
    font-weight: 800;
    color: #475569;
}

.crm-detail-value {
    color: #0f172a;
}

.validation-summary-errors,
.text-danger {
    color: #dc2626 !important;
    font-size: 13px;
}

.btn-outline {
    border: 1px solid #dbe7f3;
    color: #1d4ed8;
    background: #eef4ff;
}

.btn-danger-outline {
    border: 1px solid #fecaca;
    color: #dc2626;
    background: #fef2f2;
}

.crm-overdue {
    color: #dc2626;
    font-weight: 700;
}

@media (max-width: 1400px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }
}

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

    .alerts-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .crm-shell {
        flex-direction: column;
    }

    .crm-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .crm-topbar {
        padding: 20px 18px 10px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .crm-content {
        padding: 12px 18px 22px 18px;
    }

    .dashboard-hero-title {
        font-size: 30px;
    }
}

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

    .crm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-page-title {
        font-size: 24px;
    }

    .dashboard-hero-content,
    .dashboard-hero-side,
    .crm-card,
    .stat-card,
    .alert-summary-card {
        border-radius: 20px;
    }

    .dashboard-hero-content {
        padding: 22px;
    }

    .dashboard-hero-title {
        font-size: 26px;
    }

    .recent-row-card,
    .pipeline-row,
    .task-alert-row {
        padding: 14px;
    }

    .recent-row,
    .task-alert-row {
        flex-wrap: wrap;
    }

    .recent-right,
    .task-alert-right {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .pipeline-row-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .pipeline-row-right {
        width: 100%;
        justify-content: space-between;
    }

    .crm-topbar-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .crm-topbar-btn {
        width: 100%;
    }

    .task-alert-topline {
        flex-direction: column;
        align-items: flex-start;
    }
}
.crm-panel {
    background: rgba(20, 24, 34, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.crm-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.crm-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.crm-page-heading {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 0.35rem 0;
}

.crm-page-subtitle {
    color: rgba(255,255,255,0.72);
    margin: 0;
}

.crm-stat-card {
    background: linear-gradient(180deg, rgba(34,39,54,0.96), rgba(21,25,35,0.96));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.2rem;
    min-height: 120px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}

.crm-stat-title {
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.crm-stat-value {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.crm-table th {
    color: rgba(255,255,255,0.72);
    font-weight: 700;
    border-color: rgba(255,255,255,0.08) !important;
    background: transparent !important;
}

.crm-table td {
    color: #fff;
    border-color: rgba(255,255,255,0.08) !important;
    background: transparent !important;
}

.crm-empty-state {
    color: rgba(255,255,255,0.7);
    padding: 1rem 0;
}

.crm-detail-label {
    color: rgba(255,255,255,0.62);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.crm-detail-value {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    word-break: break-word;
}

.form-label {
    color: rgba(255,255,255,0.82);
    font-weight: 600;
}

.form-control,
.form-select,
textarea.form-control {
    background: rgba(255,255,255,0.06) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 12px !important;
}

    .form-control:focus,
    .form-select:focus,
    textarea.form-control:focus {
        background: rgba(255,255,255,0.09) !important;
        color: #fff !important;
        border-color: rgba(255,255,255,0.24) !important;
        box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.08) !important;
    }

    .form-control::placeholder,
    textarea.form-control::placeholder {
        color: rgba(255,255,255,0.45) !important;
    }

.text-light-emphasis {
    color: rgba(255,255,255,0.7) !important;
}
.premium-clients-hero-grid {
    grid-template-columns: minmax(0, 2fr) minmax(360px, 0.95fr);
}

.premium-hero-title-sm {
    font-size: 2.1rem;
}

.premium-import-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.premium-file-input {
    background: #f8fbff !important;
    color: #173055 !important;
    border: 1px solid #d8e2ef !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

    .premium-file-input:focus {
        border-color: #b7cae5 !important;
        box-shadow: 0 0 0 0.2rem rgba(66, 126, 232, 0.08) !important;
    }

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

.premium-btn-danger {
    background: #fff0f2;
    color: #c63c4e;
    border: 1px solid #f2ccd3;
}

    .premium-btn-danger:hover {
        color: #b33041;
        background: #ffe6ea;
    }

.premium-muted-text {
    color: #8a99af;
}

.premium-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.premium-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.16s ease;
    border: 1px solid transparent;
}

    .premium-icon-btn i {
        font-size: 0.95rem;
    }

.premium-icon-btn-soft {
    background: #f5f8fd;
    color: #314d77;
    border-color: #dde6f2;
}

    .premium-icon-btn-soft:hover {
        background: #edf3fb;
        color: #233e67;
    }

.premium-icon-btn-danger {
    background: #fff1f3;
    color: #c23c4b;
    border-color: #f1d4d9;
}

    .premium-icon-btn-danger:hover {
        background: #ffe8ec;
        color: #af2f3f;
    }

@media (max-width: 1400px) {
    .premium-clients-hero-grid {
        grid-template-columns: 1fr;
    }

    .premium-hero-title-sm {
        font-size: 1.75rem;
    }
}