:root {
    --las-bg: #f6f8fb;
    --las-sidebar: #071324;
    --las-sidebar-soft: #10213a;
    --las-card: #ffffff;
    --las-border: #e5eaf2;
    --las-text: #101827;
    --las-muted: #667085;
    --las-primary: #2563eb;
    --las-primary-dark: #1d4ed8;
    --las-success: #16a34a;
    --las-danger: #dc2626;
    --las-warning-bg: #fff7ed;
    --las-warning-border: #fed7aa;
    --las-radius: 18px;
    --las-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

body:has(.las-app), body:has(.las-shell) {
    background: var(--las-bg) !important;
}

.las-app, .las-shell {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--las-text);
}

.las-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--las-bg);
    margin: -32px calc(50% - 50vw) 0;
}

.admin-bar .las-app {
    min-height: calc(100vh - 32px);
}

.las-sidebar {
    background: linear-gradient(180deg, #061121 0%, #0a1b31 100%);
    color: #fff;
    padding: 28px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-bar .las-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

.las-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 34px;
}

.las-brand span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
}

.las-sidebar nav {
    display: grid;
    gap: 8px;
}

.las-sidebar a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.las-sidebar a:hover, .las-sidebar a.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
}

.las-main {
    padding: 42px 48px;
    max-width: 1600px;
    width: 100%;
}

.las-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 26px;
}

.las-header h1 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.las-header p {
    margin: 0;
    color: var(--las-muted);
}

.las-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--las-border);
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.las-filters input, .las-form input {
    border: 1px solid var(--las-border) !important;
    border-radius: 12px !important;
    min-height: 42px;
    padding: 8px 12px !important;
    background: #fff;
    color: var(--las-text);
}

.las-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 12px;
    padding: 0 16px;
    border: 1px solid var(--las-border);
    background: #fff;
    color: var(--las-text);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.las-button-primary {
    background: var(--las-primary);
    border-color: var(--las-primary);
    color: #fff;
}

.las-button-primary:hover {
    background: var(--las-primary-dark);
    color: #fff;
}

.las-button-danger {
    color: var(--las-danger);
}

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

.las-kpi-card, .las-card {
    background: var(--las-card);
    border: 1px solid var(--las-border);
    border-radius: var(--las-radius);
    box-shadow: var(--las-shadow);
}

.las-kpi-card {
    padding: 22px;
}

.las-kpi-card span {
    display: block;
    color: var(--las-muted);
    font-weight: 700;
    margin-bottom: 12px;
}

.las-kpi-card strong {
    font-size: 38px;
    letter-spacing: -0.04em;
}

.las-card {
    padding: 22px;
    margin-bottom: 22px;
}

.las-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.las-card-title h2, .las-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.las-card-title h2 {
    margin-bottom: 0;
}

.las-table-scroll {
    overflow-x: auto;
}

.las-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.las-table th {
    background: #f8fafc;
    color: #475467;
    text-align: left;
    font-weight: 800;
    padding: 14px 16px;
    border-bottom: 1px solid var(--las-border);
}

.las-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--las-border);
    vertical-align: middle;
}

.las-table tbody tr:hover {
    background: #f8fbff;
}

.las-table tfoot th {
    background: #f1f5f9;
    color: var(--las-text);
    font-size: 16px;
}

.las-matrix-table th, .las-matrix-table td {
    white-space: nowrap;
}

.las-number, .las-total-cell {
    text-align: center !important;
    font-weight: 800;
}

.las-total-cell {
    background: #fef3c7;
    color: #111827;
}

.las-error-cell {
    color: var(--las-danger);
}

.las-site-link {
    color: var(--las-primary);
    text-decoration: none;
    font-weight: 800;
}

.las-group-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
    font-size: 12px;
}

.las-muted, .las-help {
    color: var(--las-muted);
    font-size: 12px;
    margin-top: 5px;
}

.las-alert, .las-success {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.las-alert {
    background: var(--las-warning-bg);
    border: 1px solid var(--las-warning-border);
    color: #9a3412;
}

.las-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.las-settings-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 22px;
}

.las-form {
    display: grid;
    gap: 10px;
}

.las-form label {
    font-weight: 800;
    margin-top: 8px;
}

.las-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.las-actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.las-actions-cell form {
    margin: 0;
}

.las-back-link {
    color: var(--las-primary);
    text-decoration: none;
    font-weight: 800;
}

.las-day-block {
    border: 1px solid var(--las-border);
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
}

.las-day-block h3 {
    margin: 0 0 12px;
}

.las-login-shell {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--las-bg);
    margin: -32px calc(50% - 50vw) 0;
}

.las-login-card {
    width: min(440px, 92vw);
    background: #fff;
    border: 1px solid var(--las-border);
    border-radius: 26px;
    box-shadow: var(--las-shadow);
    padding: 34px;
    text-align: center;
}

.las-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-weight: 900;
}

@media (max-width: 1100px) {
    .las-app {
        grid-template-columns: 1fr;
    }

    .las-sidebar {
        position: relative;
        height: auto;
        top: auto;
    }

    .las-main {
        padding: 26px 18px;
    }

    .las-header, .las-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .las-kpi-grid, .las-settings-grid {
        grid-template-columns: 1fr;
    }
}

.las-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
}


.las-number-badge-duplicate {
    background: #f59e0b;
    color: #111827;
}

.las-duplicate-row td {
    background: #fffbeb;
}

.las-duplicate-row:hover td {
    background: #fef3c7;
}

.las-time-cell {
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.las-kpi-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.las-small-kpi {
    font-size: 22px !important;
}

.las-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 18px;
    margin-bottom: 22px;
}

.las-mini-chart {
    height: 240px;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding-top: 18px;
}

.las-mini-chart-item {
    flex: 1;
    height: 100%;
    display: grid;
    grid-template-rows: 24px 1fr 24px;
    align-items: end;
    min-width: 34px;
}

.las-mini-chart-value {
    text-align: center;
    color: #64748b;
    font-weight: 800;
    font-size: 13px;
}

.las-mini-chart-bar-wrap {
    height: 160px;
    display: flex;
    align-items: flex-end;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.las-mini-chart-bar {
    width: 100%;
    min-height: 0;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-radius: 999px;
}

.las-mini-chart-label {
    text-align: center;
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
}

.las-email-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.las-email-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.las-email-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.las-email-row strong {
    color: #2563eb;
}


.las-email-row-hidden {
    display: none !important;
}

.las-email-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.las-email-more-button {
    min-width: 180px;
}

.las-subject-cell {
    font-weight: 700;
}

@media (max-width: 1100px) {
    .las-kpi-grid-four,
    .las-details-grid {
        grid-template-columns: 1fr;
    }
}

.las-leads-table th,
.las-leads-table td {
    font-size: 14px;
}

.las-lead-row {
    cursor: pointer;
}

.las-lead-row:hover td {
    background: #eef6ff;
}

.las-code-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 800;
    font-size: 12px;
    white-space: nowrap;
}

.las-lead-details-row {
    display: none;
}

.las-lead-details-row.is-open {
    display: table-row;
}

.las-lead-details-row td {
    background: #f8fafc;
    padding: 18px 16px;
}

.las-lead-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.las-lead-details div {
    background: #ffffff;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 0;
}

.las-lead-details span {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.las-lead-details strong {
    display: block;
    color: #101827;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.las-lead-details-wide {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .las-lead-details {
        grid-template-columns: 1fr;
    }
}

.las-search-wrap {
    min-width: min(440px, 100%);
}

.las-search-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--las-border) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    background: #fff;
    color: var(--las-text);
    font-weight: 600;
}

.las-course-cell {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.las-source-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 800;
    font-size: 12px;
    white-space: nowrap;
}

.las-lead-row.is-open td {
    background: #eef6ff;
}

.las-leads-table .las-duplicate-row td {
    background: #fffbeb;
}

.las-leads-table .las-duplicate-row:hover td,
.las-leads-table .las-duplicate-row.is-open td {
    background: #fef3c7;
}

@media (max-width: 900px) {
    .las-search-wrap {
        min-width: 100%;
    }

    .las-course-cell {
        max-width: 280px;
    }
}

/* Settings page: table-first layout with modal form */
.las-settings-header {
    align-items: flex-start;
}

.las-settings-header .las-button {
    white-space: nowrap;
}

.las-sites-card {
    width: 100%;
    overflow: hidden;
}

.las-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.las-card-title-row p {
    margin: 4px 0 0;
}

.las-sites-table {
    min-width: 980px;
}

.las-sites-table th:last-child,
.las-sites-table td:last-child {
    width: 210px;
}

.las-site-name {
    font-weight: 900;
    color: var(--las-text);
    margin-bottom: 4px;
}

.las-site-url {
    color: var(--las-muted);
    font-size: 13px;
    word-break: break-all;
}

.las-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.las-status-active {
    background: #ecfdf5;
    color: #047857;
}

.las-status-disabled {
    background: #f1f5f9;
    color: #64748b;
}

.las-empty-cell {
    color: var(--las-muted);
    text-align: center;
    padding: 36px 16px !important;
}

.las-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.las-modal.is-open {
    display: block;
}

.las-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
}

.las-modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--las-border);
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.28);
}

.las-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.las-modal-header h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.las-modal-header p {
    margin: 6px 0 0;
    color: var(--las-muted);
}

.las-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f1f5f9;
    color: var(--las-text);
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
}

.las-modal-form {
    gap: 9px;
}

.las-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.las-modal-is-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .las-settings-header {
        gap: 16px;
    }

    .las-settings-header .las-button {
        width: 100%;
    }

    .las-modal-panel {
        width: calc(100vw - 20px);
        padding: 18px;
        border-radius: 20px;
    }

    .las-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}


/* v0.2.7: clearer group colors in dashboard matrix */
.las-matrix-table tbody tr {
    transition: background-color .18s ease, box-shadow .18s ease;
}

.las-matrix-table tbody tr.las-group-row-medical td {
    background: #fff3c4;
}

.las-matrix-table tbody tr.las-group-row-teachers td {
    background: #eaf7e6;
}

.las-matrix-table tbody tr.las-group-row-courses td {
    background: #dceeff;
}

.las-matrix-table tbody tr.las-group-row-other td {
    background: #f8fafc;
}

.las-matrix-table tbody tr:hover td {
    filter: brightness(0.98);
}

.las-matrix-table .las-total-cell {
    background: #ffe8a3 !important;
    border-left: 1px solid #facc15;
}

.las-matrix-table tbody tr.las-group-row-medical .las-group-pill {
    background: #fde68a;
    color: #92400e;
}

.las-matrix-table tbody tr.las-group-row-teachers .las-group-pill {
    background: #bbf7d0;
    color: #166534;
}

.las-matrix-table tbody tr.las-group-row-courses .las-group-pill {
    background: #bfdbfe;
    color: #1e40af;
}

.las-matrix-table tbody tr.las-group-row-other .las-group-pill {
    background: #e2e8f0;
    color: #334155;
}

/* v0.2.7: readable daily chart instead of oversized pill graph */
.las-daily-chart {
    display: grid;
    gap: 14px;
    padding: 12px 0 4px;
}

.las-daily-chart-row {
    display: grid;
    grid-template-columns: 56px minmax(160px, 1fr) 46px;
    gap: 14px;
    align-items: center;
}

.las-daily-chart-label {
    color: #64748b;
    font-weight: 800;
    font-size: 13px;
}

.las-daily-chart-track {
    height: 18px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.las-daily-chart-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 999px;
    min-width: 0;
    transition: width .2s ease;
}

.las-daily-chart-value {
    color: #111827;
    font-weight: 900;
    text-align: right;
}

@media (max-width: 760px) {
    .las-daily-chart-row {
        grid-template-columns: 44px minmax(90px, 1fr) 36px;
        gap: 10px;
    }
}

/* v0.2.9: clients/leads page from central DB */
.las-kpi-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.las-client-filters {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.las-filter-field {
    display: grid;
    gap: 7px;
}

.las-filter-field label {
    color: var(--las-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.las-filter-field input,
.las-filter-field select {
    min-height: 42px;
    border: 1px solid var(--las-border) !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    background: #fff;
    color: var(--las-text);
}

.las-filter-actions {
    display: flex;
    gap: 8px;
}

.las-empty-state {
    display: grid;
    gap: 8px;
    padding: 44px 20px;
    text-align: center;
    color: var(--las-muted);
}

.las-empty-state strong {
    color: var(--las-text);
    font-size: 18px;
}

.las-clients-table th,
.las-clients-table td {
    white-space: nowrap;
}

.las-clients-table .las-course-cell {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.las-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 11px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1300px) {
    .las-client-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .las-filter-field-wide,
    .las-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .las-client-filters,
    .las-kpi-grid-three {
        grid-template-columns: 1fr;
    }

    .las-filter-actions {
        display: grid;
    }
}

/* v0.3.0: CRM lead card */
.las-notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 900;
    border: 1px solid #bbf7d0;
}

.las-client-filters-crm {
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(150px, 1fr)) auto;
}

.las-crm-table th,
.las-crm-table td {
    vertical-align: middle;
}

.las-crm-table .las-course-cell {
    max-width: 560px;
}

.las-user-card {
    display: grid;
    gap: 20px;
    padding: 22px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid var(--las-border);
}

.las-user-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.las-user-card-header h3,
.las-user-card-section h4,
.las-history-header h4 {
    margin: 0;
    color: var(--las-text);
}

.las-user-card-header p {
    margin: 4px 0 0;
    color: var(--las-muted);
    font-weight: 800;
}

.las-user-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.las-user-field {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--las-border);
}

.las-user-field span,
.las-user-field label {
    color: var(--las-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.las-user-field strong {
    color: var(--las-text);
    font-size: 15px;
    line-height: 1.35;
}

.las-user-field input,
.las-user-field select,
.las-user-field textarea,
.las-history-add-form select,
.las-history-add-form textarea {
    width: 100%;
    border: 1px solid var(--las-border) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    background: #fff;
    color: var(--las-text);
    font-weight: 700;
}

.las-user-field-wide,
.las-user-actions,
.las-user-card-section {
    grid-column: 1 / -1;
}

.las-copy-field {
    position: relative;
    padding-right: 136px;
}

.las-copy-button {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: #1d4ed8;
    background: #dbeafe;
    cursor: pointer;
    font-weight: 900;
}

.las-copy-button.is-copied {
    color: #047857;
    background: #dcfce7;
}

.las-history-block {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--las-border);
}

.las-history-list {
    display: grid;
    gap: 14px;
}

.las-history-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
    align-items: start;
}

.las-history-dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 5px #dbeafe;
}

.las-history-item strong {
    display: block;
    color: var(--las-text);
    font-weight: 900;
}

.las-history-item p {
    margin: 5px 0;
    color: #334155;
    line-height: 1.45;
}

.las-history-item span {
    color: var(--las-muted);
    font-size: 13px;
    font-weight: 700;
}

.las-history-add-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 2fr) auto;
    gap: 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--las-border);
}

@media (max-width: 1100px) {
    .las-client-filters-crm,
    .las-history-add-form {
        grid-template-columns: 1fr;
    }

    .las-user-card-grid {
        grid-template-columns: 1fr;
    }

    .las-copy-field {
        padding-right: 14px;
    }

    .las-copy-button {
        position: static;
        justify-self: start;
    }
}

/* v0.3.1: CRM status colors and history polish */
.las-status-row {
    transition: background-color .16s ease, box-shadow .16s ease;
}

.las-status-row-new {
    background: #fff;
}

.las-status-row-enrolled {
    background: #eff6ff;
}

.las-status-row-contract-sent {
    background: #f3f4f6;
}

.las-status-row-thinking {
    background: #fff7ed;
}

.las-status-row-client-refused,
.las-status-row-our-refused {
    background: #e5e7eb;
}

.las-status-row-docs-checked,
.las-status-row-paid {
    background: #ecfdf5;
}

.las-status-row-docs-missing {
    background: #fefce8;
}

.las-status-row-no-contact {
    background: #fff1f2;
}

.las-status-chip {
    border: 1px solid transparent;
}

.las-status-chip-new {
    background: #fff;
    color: #334155;
    border-color: #e2e8f0;
}

.las-status-chip-enrolled {
    background: #dbeafe;
    color: #1d4ed8;
}

.las-status-chip-contract-sent {
    background: #e5e7eb;
    color: #374151;
}

.las-status-chip-thinking {
    background: #fed7aa;
    color: #9a3412;
}

.las-status-chip-client-refused,
.las-status-chip-our-refused {
    background: #374151;
    color: #fff;
}

.las-status-chip-docs-checked,
.las-status-chip-paid {
    background: #dcfce7;
    color: #166534;
}

.las-status-chip-docs-missing {
    background: #fef3c7;
    color: #92400e;
}

.las-status-chip-no-contact {
    background: #ffe4e6;
    color: #be123c;
}

.las-user-status-field-new {
    background: #fff;
}

.las-user-status-field-enrolled {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.las-user-status-field-contract-sent {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.las-user-status-field-thinking {
    background: #fff7ed;
    border-color: #fed7aa;
}

.las-user-status-field-client-refused,
.las-user-status-field-our-refused {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.las-user-status-field-docs-checked,
.las-user-status-field-paid {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.las-user-status-field-docs-missing {
    background: #fefce8;
    border-color: #fde68a;
}

.las-user-status-field-no-contact {
    background: #fff1f2;
    border-color: #fecdd3;
}

.las-history-dot {
    background: #64748b;
    box-shadow: 0 0 0 5px #e2e8f0;
}

.las-history-item-new .las-history-dot {
    background: #2563eb;
    box-shadow: 0 0 0 5px #dbeafe;
}

.las-history-item-call .las-history-dot {
    background: #7c3aed;
    box-shadow: 0 0 0 5px #ede9fe;
}

.las-history-item-enrolled .las-history-dot {
    background: #1d4ed8;
    box-shadow: 0 0 0 5px #dbeafe;
}

.las-history-item-contract-sent .las-history-dot {
    background: #6b7280;
    box-shadow: 0 0 0 5px #e5e7eb;
}

.las-history-item-thinking .las-history-dot {
    background: #f97316;
    box-shadow: 0 0 0 5px #fed7aa;
}

.las-history-item-client-refused .las-history-dot,
.las-history-item-our-refused .las-history-dot {
    background: #374151;
    box-shadow: 0 0 0 5px #d1d5db;
}

.las-history-item-docs-checked .las-history-dot,
.las-history-item-paid .las-history-dot {
    background: #16a34a;
    box-shadow: 0 0 0 5px #bbf7d0;
}

.las-history-item-docs-missing .las-history-dot {
    background: #d97706;
    box-shadow: 0 0 0 5px #fde68a;
}

.las-history-item-no-contact .las-history-dot {
    background: #e11d48;
    box-shadow: 0 0 0 5px #fecdd3;
}

.las-history-user {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 900;
    font-size: 12px;
}

.las-history-add-form {
    grid-template-columns: minmax(260px, 380px) minmax(320px, 1fr);
    align-items: stretch;
}

.las-history-add-form .las-filter-field,
.las-history-add-form .las-filter-field-wide {
    display: grid;
    gap: 8px;
    grid-column: auto;
}

.las-history-add-form textarea {
    min-height: 52px;
    resize: vertical;
}

.las-history-add-form .las-button {
    grid-column: 1 / -1;
    justify-self: start;
}

@media (max-width: 1100px) {
    .las-history-add-form {
        grid-template-columns: 1fr;
    }
}

.las-form-message {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-left: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease;
}

.las-form-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.las-form-message.is-error {
    background: #fee2e2;
    color: #991b1b;
}

.las-user-card-grid.is-saving,
.las-history-add-form.is-saving {
    opacity: .78;
}

.las-history-item-new {
    animation: lasHistoryHighlight 1.4s ease;
}

@keyframes lasHistoryHighlight {
    0% { background: #fef3c7; transform: translateX(8px); }
    100% { background: transparent; transform: translateX(0); }
}

/* Site details page: stat-table style chart and table */
.las-stat-chart-box {
    height: 280px;
    padding: 10px 0 4px;
}

.las-stat-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}

.las-day-block {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    margin-top: 18px;
    background: #ffffff;
}

.las-day-block > h3 {
    margin: 0;
    padding: 18px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    font-size: 20px;
}

.las-table-scroll {
    overflow-x: auto;
}

.las-leads-table {
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
}

.las-leads-table thead th {
    background: #111827;
    color: #ffffff;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 900;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 0;
    white-space: nowrap;
}

.las-leads-table thead th:first-child {
    border-top-left-radius: 0;
}

.las-leads-table thead th:last-child {
    border-top-right-radius: 0;
}

.las-leads-table tbody td {
    padding: 15px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    vertical-align: middle;
    background: #ffffff;
}

.las-leads-table .las-lead-row:hover td,
.las-leads-table .las-lead-row.is-open td {
    background: #f8fafc;
}

.las-number-badge {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

.las-number-badge-duplicate {
    background: #f59e0b;
    color: #111827;
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.20);
}

.las-duplicate-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-size: 11px;
    font-weight: 900;
}

.las-type-pill,
.las-source-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.las-type-pp {
    background: #dbeafe;
    color: #1d4ed8;
}

.las-type-pk {
    background: #dcfce7;
    color: #15803d;
}

.las-type-other {
    background: #f3f4f6;
    color: #374151;
}

.las-source-yandex {
    background: #f3e8ff;
    color: #7e22ce;
}

.las-source-google {
    background: #dbeafe;
    color: #1d4ed8;
}

.las-source-ads {
    background: #fee2e2;
    color: #b91c1c;
}

.las-source-organic {
    background: #dcfce7;
    color: #15803d;
}

.las-source-telegram {
    background: #e0f2fe;
    color: #0369a1;
}

.las-source-vk {
    background: #dbeafe;
    color: #1e40af;
}

.las-source-referral {
    background: #eef2ff;
    color: #4338ca;
}

.las-source-direct {
    background: #e5e7eb;
    color: #111827;
}

.las-source-empty {
    background: #ffedd5;
    color: #c2410c;
}

.las-source-unknown {
    background: #fef9c3;
    color: #854d0e;
}

.las-lead-details-row.is-open {
    display: table-row;
}

.las-lead-details-row td {
    background: #f9fafb !important;
    padding: 18px !important;
}

.las-lead-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.las-lead-details div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 13px 14px;
}

.las-lead-details span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.las-lead-details strong {
    display: block;
    color: #111827;
    font-size: 14px;
    word-break: break-word;
}

.las-lead-details-wide {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .las-stat-chart-box {
        height: 220px;
    }

    .las-lead-details {
        grid-template-columns: 1fr;
    }
}

/* Site details: full-width chart and email grid */
.las-site-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 22px;
}

.las-site-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.las-site-date-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.las-button-dark {
    background: #111827;
    color: #ffffff;
}

.las-button-muted {
    background: #9ca3af;
    color: #ffffff;
}

.las-button-disabled {
    background: #cbd5e1;
    color: #ffffff;
    cursor: not-allowed;
    pointer-events: none;
}

.las-stat-chart-box-wide {
    height: 360px;
    width: 100%;
}

.las-stat-chart-box-wide canvas {
    width: 100% !important;
    height: 100% !important;
}

.las-email-list-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.las-email-list-columns .las-email-row {
    min-width: 0;
}

.las-email-list-columns .las-email-row strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    font-weight: 900;
}

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

@media (max-width: 800px) {
    .las-site-card-header {
        display: block;
    }

    .las-site-date-nav {
        justify-content: flex-start;
        margin-top: 14px;
    }

    .las-email-list-columns {
        grid-template-columns: 1fr;
    }

    .las-stat-chart-box-wide {
        height: 280px;
    }
}

.las-site-details-page.las-ajax-loading {
    position: relative;
    opacity: 0.72;
    pointer-events: none;
}

.las-site-details-page.las-ajax-loading::after {
    content: 'Обновляем данные…';
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 9999;
    padding: 14px 18px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.las-user-name-field strong {
    font-size: 17px;
}

.las-lead-code-field .las-code-pill-large {
    display: inline-flex;
    width: max-content;
    font-size: 14px;
    padding: 7px 12px;
}

.las-site-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--las-muted) !important;
}

.las-site-code-pill {
    background: var(--las-code-bg, #eef2ff);
    color: var(--las-code-text, #3730a3);
    border: 1px solid var(--las-code-border, #c7d2fe);
}

/* Sidebar compact mode and responsive fixes */
.las-app {
    grid-template-columns: 260px minmax(0, 1fr);
}

.las-main {
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.las-sidebar {
    box-sizing: border-box;
}

.las-sidebar-toggle {
    position: absolute;
    top: 18px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.las-sidebar-user {
    margin: -18px 0 28px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
    color: #cbd5e1;
}

.las-sidebar-user span {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.las-sidebar-user strong {
    display: block;
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.las-nav-icon {
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    font-size: 14px;
    font-weight: 900;
    flex-shrink: 0;
}

body.las-sidebar-collapsed .las-app {
    grid-template-columns: 86px minmax(0, 1fr);
}

body.las-sidebar-collapsed .las-sidebar {
    padding-left: 14px;
    padding-right: 14px;
}

body.las-sidebar-collapsed .las-brand {
    font-size: 0;
    justify-content: center;
    margin-top: 34px;
}

body.las-sidebar-collapsed .las-brand span {
    font-size: 16px;
}

body.las-sidebar-collapsed .las-sidebar-user {
    display: none;
}

body.las-sidebar-collapsed .las-sidebar nav a {
    padding: 10px;
    justify-content: center;
    font-size: 0;
    display: flex;
}

body.las-sidebar-collapsed .las-nav-icon {
    display: inline-flex;
    font-size: 14px;
}

body.las-sidebar-collapsed .las-sidebar nav a.active .las-nav-icon,
body.las-sidebar-collapsed .las-sidebar nav a:hover .las-nav-icon {
    background: transparent;
}

.las-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.las-client-filters,
.las-client-filters-crm,
.las-filters {
    flex-wrap: wrap;
}

@media (max-width: 1200px) {
    .las-main {
        padding: 32px 24px;
    }
}

@media (max-width: 760px) {
    .las-app,
    body.las-sidebar-collapsed .las-app {
        grid-template-columns: 1fr;
    }

    .las-sidebar {
        position: relative;
        height: auto;
        top: auto;
        padding: 18px;
    }

    .las-sidebar-toggle {
        display: none;
    }

    .las-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .las-main {
        padding: 22px 14px;
    }

    .las-table {
        min-width: 980px;
    }
}

/* v0.4.7: CRM table without horizontal scroll and date grouping */
.las-clients-table-wrap {
    overflow-x: visible;
}

.las-crm-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

.las-clients-table.las-crm-table th,
.las-clients-table.las-crm-table td {
    white-space: normal;
}

.las-crm-table th:nth-child(1),
.las-crm-table td:nth-child(1) {
    width: 118px;
}

.las-crm-table th:nth-child(2),
.las-crm-table td:nth-child(2) {
    width: 118px;
}

.las-crm-table th:nth-child(3),
.las-crm-table td:nth-child(3) {
    width: 138px;
}

.las-crm-table th:nth-child(4),
.las-crm-table td:nth-child(4) {
    width: 172px;
}

.las-crm-table th:nth-child(5),
.las-crm-table td:nth-child(5) {
    width: 220px;
}

.las-crm-table .las-course-cell {
    max-width: none;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
}

.las-date-separator-row td {
    padding: 18px 16px 10px !important;
    border-bottom: 0 !important;
    background: transparent !important;
}

.las-date-separator-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.las-date-separator-row span::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
}

.las-lead-date-chip {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .las-crm-table th:nth-child(3),
    .las-crm-table td:nth-child(3) {
        display: none;
    }

    .las-crm-table th:nth-child(5),
    .las-crm-table td:nth-child(5) {
        width: 190px;
    }
}

@media (max-width: 760px) {
    .las-crm-table thead {
        display: none;
    }

    .las-crm-table,
    .las-crm-table tbody,
    .las-crm-table tr,
    .las-crm-table td {
        display: block;
        width: 100% !important;
    }

    .las-crm-table .las-lead-row {
        padding: 14px;
        border-bottom: 1px solid var(--las-border);
    }

    .las-crm-table .las-lead-row td {
        border-bottom: 0;
        padding: 7px 0;
    }

    .las-crm-table .las-lead-row td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--las-muted);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .las-lead-details-row.is-open,
    .las-lead-details-row.is-open td {
        display: block;
        width: 100% !important;
    }
}

/* v0.5.2: configurable CRM table columns, stable table rows */
.las-crm-table col.las-col-number {
    width: var(--las-col-number, 128px);
}

.las-crm-table col.las-col-status {
    width: var(--las-col-status, 126px);
}

.las-crm-table col.las-col-organization {
    width: var(--las-col-organization, 155px);
}

.las-crm-table col.las-col-lead-code {
    width: var(--las-col-lead-code, 180px);
}

.las-crm-table col.las-col-fullname {
    width: var(--las-col-fullname, 260px);
}

.las-crm-table col.las-col-course {
    width: var(--las-col-course, auto);
}

.las-crm-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

.las-clients-table-wrap {
    overflow-x: visible;
}

.las-clients-table.las-crm-table th,
.las-clients-table.las-crm-table td {
    white-space: normal;
}

.las-crm-table .las-lead-row td {
    height: var(--las-crm-row-height, 96px);
    vertical-align: middle;
}

.las-crm-table th:nth-child(1),
.las-crm-table td:nth-child(1) {
    width: var(--las-col-number, 128px);
}

.las-crm-table th:nth-child(2),
.las-crm-table td:nth-child(2) {
    width: var(--las-col-status, 126px);
}

.las-crm-table th:nth-child(3),
.las-crm-table td:nth-child(3) {
    width: var(--las-col-organization, 155px);
}

.las-crm-table th:nth-child(4),
.las-crm-table td:nth-child(4) {
    width: var(--las-col-lead-code, 180px);
}

.las-crm-table th:nth-child(5),
.las-crm-table td:nth-child(5) {
    width: var(--las-col-fullname, 260px);
}

.las-crm-table th:nth-child(6),
.las-crm-table td:nth-child(6) {
    width: var(--las-col-course, auto);
}

.las-crm-table .las-fullname-cell,
.las-crm-table .las-course-cell {
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
}

.las-cell-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.las-fullname-clamp {
    -webkit-line-clamp: var(--las-fullname-lines, 2);
}

.las-course-clamp {
    -webkit-line-clamp: var(--las-course-lines, 2);
}

@media (max-width: 1100px) {
    .las-crm-table th:nth-child(3),
    .las-crm-table td:nth-child(3) {
        display: none;
    }

    .las-crm-table th:nth-child(5),
    .las-crm-table td:nth-child(5) {
        width: 190px;
    }
}

@media (max-width: 760px) {
    .las-crm-table thead {
        display: none;
    }

    .las-crm-table,
    .las-crm-table tbody,
    .las-crm-table tr,
    .las-crm-table td {
        display: block;
        width: 100% !important;
    }

    .las-crm-table .las-lead-row {
        padding: 14px;
        border-bottom: 1px solid var(--las-border);
    }

    .las-crm-table .las-lead-row td {
        height: auto;
        border-bottom: 0;
        padding: 7px 0;
    }

    .las-crm-table .las-lead-row td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--las-muted);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .las-date-separator-row td::before,
    .las-lead-details-row td::before {
        content: none !important;
    }

    .las-lead-details-row.is-open,
    .las-lead-details-row.is-open td {
        display: block;
        width: 100% !important;
    }
}

/* v0.6.2: CRM quick period filters */
.las-client-filters-crm-v2 {
    grid-template-columns: minmax(320px, 2fr) minmax(420px, 2fr) repeat(4, minmax(140px, 1fr)) auto;
}

.las-period-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
    align-self: end;
    padding-bottom: 1px;
}

.las-period-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.las-period-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid var(--las-border);
    background: #fff;
    color: var(--las-muted);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: .16s ease;
    white-space: nowrap;
}

.las-period-option:hover span {
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.las-period-option.is-active span,
.las-period-option input:checked + span {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
}

@media (max-width: 1280px) {
    .las-client-filters-crm-v2 {
        grid-template-columns: 1fr 1fr;
    }

    .las-filter-search-main,
    .las-period-switcher {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .las-client-filters-crm-v2 {
        grid-template-columns: 1fr;
    }

    .las-filter-search-main,
    .las-period-switcher {
        grid-column: auto;
    }
}

/* v0.6.4: CRM filters layout fix */
.las-client-filters-crm-v2 {
    grid-template-columns: repeat(4, minmax(170px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.las-client-filters-crm-v2 .las-filter-search-main {
    grid-column: 1 / -1;
    max-width: none;
}

.las-client-filters-crm-v2 .las-filter-search-main input {
    width: 100%;
}

.las-client-filters-crm-v2 .las-period-switcher {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0;
}

.las-client-filters-crm-v2 .las-period-switcher::before {
    content: "Быстрый период";
    width: 100%;
    color: var(--las-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: -2px;
}

.las-client-filters-crm-v2 .las-period-option span {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 13px;
}

.las-client-filters-crm-v2 .las-filter-actions {
    justify-content: flex-end;
    align-self: end;
    white-space: nowrap;
}

.las-client-filters-crm-v2 .las-filter-actions .las-button {
    min-height: 42px;
}

@media (max-width: 1500px) {
    .las-client-filters-crm-v2 {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .las-client-filters-crm-v2 .las-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .las-client-filters-crm-v2 {
        grid-template-columns: 1fr;
    }

    .las-client-filters-crm-v2 .las-filter-search-main,
    .las-client-filters-crm-v2 .las-period-switcher,
    .las-client-filters-crm-v2 .las-filter-actions {
        grid-column: auto;
    }

    .las-client-filters-crm-v2 .las-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.las-report-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    max-width: 760px;
}

.las-field-label {
    grid-column: 1 / -1;
    color: var(--las-muted);
    font-weight: 700;
}

.las-report-input {
    border: 1px solid var(--las-border) !important;
    border-radius: 12px !important;
    min-height: 48px;
    padding: 10px 14px !important;
    font-size: 16px;
}

.las-report-result {
    margin-top: 22px;
    display: grid;
    gap: 16px;
}

.las-report-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
}

.las-report-summary > div {
    border: 1px solid var(--las-border);
    border-radius: 14px;
    padding: 16px;
    background: #f8fbff;
}

.las-report-summary span {
    display: block;
    color: var(--las-muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.las-report-summary strong {
    font-size: 22px;
}

.las-report-export-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.las-empty-state {
    padding: 26px;
    text-align: center;
    color: var(--las-muted);
    background: #f8fafc;
    border-radius: 14px;
}

@media (max-width: 760px) {
    .las-report-search-form,
    .las-report-summary {
        grid-template-columns: 1fr;
    }
}


/* v0.7.0: CRM table polish, local time display and dark theme */
.las-crm-table .las-lead-row td {
    height: auto;
    min-height: var(--las-crm-row-height, 96px);
    vertical-align: top;
    padding-top: 24px;
    padding-bottom: 24px;
}

.las-crm-table .las-lead-row td > *:first-child {
    margin-top: 0;
}

.las-crm-table .las-fullname-cell,
.las-crm-table .las-course-cell {
    vertical-align: top;
}

.las-lead-date-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-top: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475467;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.las-date-separator-row td {
    padding-top: 18px !important;
    padding-bottom: 14px !important;
    background: transparent !important;
    height: auto !important;
}

.las-date-separator-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 14px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 900;
}

.las-date-separator-row span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #38bdf8;
}

.las-theme-toggle {
    width: 100%;
    margin: -12px 0 18px;
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    color: #e5edf8;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.las-theme-toggle:hover {
    background: rgba(255,255,255,0.14);
}

body.las-theme-dark {
    --las-bg: #0b1120;
    --las-sidebar: #020617;
    --las-sidebar-soft: #111827;
    --las-card: #111827;
    --las-border: #243244;
    --las-text: #e5e7eb;
    --las-muted: #9ca3af;
    --las-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    --las-warning-bg: #301c0a;
    --las-warning-border: #7c3f12;
    background: var(--las-bg) !important;
}

body.las-theme-dark:has(.las-app),
body.las-theme-dark:has(.las-shell) {
    background: var(--las-bg) !important;
}

body.las-theme-dark .las-app,
body.las-theme-dark .las-shell {
    background: var(--las-bg);
    color: var(--las-text);
}

body.las-theme-dark .las-card,
body.las-theme-dark .las-kpi-card,
body.las-theme-dark .las-user-card,
body.las-theme-dark .las-user-field,
body.las-theme-dark .las-lead-details div,
body.las-theme-dark .las-modal-content {
    background: #111827;
    border-color: var(--las-border);
    color: var(--las-text);
}

body.las-theme-dark .las-table th,
body.las-theme-dark .las-crm-table th,
body.las-theme-dark .las-table tfoot th {
    background: #0f172a;
    color: #cbd5e1;
    border-color: var(--las-border);
}

body.las-theme-dark .las-table td,
body.las-theme-dark .las-crm-table td,
body.las-theme-dark .las-lead-details-row td {
    border-color: var(--las-border);
    background: #111827;
    color: var(--las-text);
}

body.las-theme-dark .las-table tbody tr:hover td,
body.las-theme-dark .las-lead-row:hover td,
body.las-theme-dark .las-lead-row.is-open td {
    background: #172033;
}

body.las-theme-dark input,
body.las-theme-dark select,
body.las-theme-dark textarea,
body.las-theme-dark .las-search-input {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

body.las-theme-dark input::placeholder,
body.las-theme-dark textarea::placeholder {
    color: #64748b;
}

body.las-theme-dark .las-muted,
body.las-theme-dark .las-header p,
body.las-theme-dark .las-site-value {
    color: var(--las-muted) !important;
}

body.las-theme-dark .las-lead-date-chip {
    background: #1f2937;
    color: #cbd5e1;
}

body.las-theme-dark .las-date-separator-row span {
    background: #082f49;
    color: #bae6fd;
}

body.las-theme-dark .las-period-option span,
body.las-theme-dark .las-status-chip,
body.las-theme-dark .las-button:not(.las-button-primary) {
    background: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}

body.las-theme-dark .las-period-option.is-active span,
body.las-theme-dark .las-button-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
}

body.las-theme-dark .las-empty-state,
body.las-theme-dark .las-notice {
    background: #111827;
    border-color: var(--las-border);
    color: var(--las-text);
}

body.las-sidebar-collapsed .las-theme-toggle {
    font-size: 0;
    min-height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.las-sidebar-collapsed .las-theme-toggle::before {
    content: "◐";
    font-size: 18px;
}


/* v0.7.1: dark theme fixes and unified request status */
body.las-theme-dark .las-date-separator-row td,
body.las-theme-dark .las-date-separator-row {
    background: #111827 !important;
    color: #e5e7eb !important;
}

body.las-theme-dark .las-date-separator-row td::before {
    background: transparent !important;
}

body.las-theme-dark .las-history-block,
body.las-theme-dark .las-history-add-form,
body.las-theme-dark .las-lead-card,
body.las-theme-dark .las-user-details,
body.las-theme-dark .las-filter-panel,
body.las-theme-dark .las-filter-card,
body.las-theme-dark .las-filters,
body.las-theme-dark .las-period-filter {
    background: #111827 !important;
    border-color: #243244 !important;
    color: #e5e7eb !important;
}

body.las-theme-dark .las-history-block h4,
body.las-theme-dark .las-history-block label,
body.las-theme-dark .las-history-item strong,
body.las-theme-dark .las-history-item p,
body.las-theme-dark .las-history-item span {
    color: #e5e7eb !important;
}

body.las-theme-dark .las-history-item span,
body.las-theme-dark .las-history-user {
    color: #cbd5e1 !important;
    background: #1f2937 !important;
}

body.las-theme-dark .las-history-block hr,
body.las-theme-dark .las-history-add-form {
    border-color: #243244 !important;
}

body.las-theme-dark .las-date-filter,
body.las-theme-dark .las-period-bar,
body.las-theme-dark .las-filter-row,
body.las-theme-dark .las-filter-layout {
    background: #111827 !important;
    color: #e5e7eb !important;
}

body.las-theme-dark input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

body.las-theme-dark .las-status-chip-new::after {
    content: none;
}


/* v0.7.6: dashboard matrix readability, weekend columns and alignment */
.las-matrix-table {
    table-layout: fixed;
}

.las-matrix-table th,
.las-matrix-table td {
    vertical-align: middle;
}

.las-matrix-table th:nth-child(n+3),
.las-matrix-table td.las-number,
.las-matrix-table .las-total-cell {
    text-align: center !important;
}

.las-matrix-table td.las-number,
.las-matrix-table .las-total-cell,
.las-matrix-table tfoot th.las-number,
.las-matrix-table tfoot th:last-child {
    color: #111827 !important;
    font-weight: 900;
}

.las-matrix-table .las-weekend-col {
    background: #a9d18e !important;
    color: #102a10 !important;
}

.las-matrix-table thead .las-weekend-col,
.las-matrix-table tfoot .las-weekend-col {
    background: #93c47d !important;
    color: #102a10 !important;
}

body.las-theme-dark .las-matrix-table tbody td {
    color: #111827 !important;
}

body.las-theme-dark .las-matrix-table td.las-number,
body.las-theme-dark .las-matrix-table .las-total-cell,
body.las-theme-dark .las-matrix-table tfoot th.las-number,
body.las-theme-dark .las-matrix-table tfoot th:last-child {
    color: #111827 !important;
}

body.las-theme-dark .las-matrix-table .las-weekend-col {
    background: #a9d18e !important;
    color: #102a10 !important;
}

body.las-theme-dark .las-matrix-table thead .las-weekend-col,
body.las-theme-dark .las-matrix-table tfoot .las-weekend-col {
    background: #93c47d !important;
    color: #102a10 !important;
}

body.las-theme-dark .las-matrix-table .las-site-link {
    color: #2563eb !important;
}

/* v0.7.7: dashboard weekend readability and dark theme totals */
.las-matrix-table tbody tr:hover td.las-weekend-col,
.las-matrix-table tbody tr.is-active td.las-weekend-col,
.las-matrix-table tbody tr.is-selected td.las-weekend-col {
    background: #a9d18e !important;
    color: #102a10 !important;
    filter: none !important;
}

.las-matrix-table tbody tr:hover td.las-number,
.las-matrix-table tbody tr:hover td.las-total-cell,
.las-matrix-table tfoot th.las-number,
.las-matrix-table tfoot th:last-child {
    color: #111827 !important;
}

body.las-theme-dark .las-matrix-table tbody tr:hover td {
    filter: none !important;
}

body.las-theme-dark .las-matrix-table tbody tr:hover td:not(.las-weekend-col):not(.las-total-cell),
body.las-theme-dark .las-matrix-table tbody tr.is-active td:not(.las-weekend-col):not(.las-total-cell),
body.las-theme-dark .las-matrix-table tbody tr.is-selected td:not(.las-weekend-col):not(.las-total-cell) {
    background: #172033 !important;
    color: #f8fafc !important;
}

body.las-theme-dark .las-matrix-table tbody tr:hover td.las-weekend-col,
body.las-theme-dark .las-matrix-table tbody tr.is-active td.las-weekend-col,
body.las-theme-dark .las-matrix-table tbody tr.is-selected td.las-weekend-col,
body.las-theme-dark .las-matrix-table .las-weekend-col {
    background: #315c3a !important;
    color: #f0fdf4 !important;
}

body.las-theme-dark .las-matrix-table thead .las-weekend-col,
body.las-theme-dark .las-matrix-table tfoot .las-weekend-col {
    background: #3d7047 !important;
    color: #ffffff !important;
}

body.las-theme-dark .las-matrix-table td.las-number,
body.las-theme-dark .las-matrix-table .las-total-cell,
body.las-theme-dark .las-matrix-table tfoot th.las-number,
body.las-theme-dark .las-matrix-table tfoot th:last-child {
    color: #f8fafc !important;
}

body.las-theme-dark .las-matrix-table tbody td.las-total-cell {
    background: #8a6a1f !important;
    color: #ffffff !important;
}

body.las-theme-dark .las-matrix-table tbody tr:hover td.las-total-cell,
body.las-theme-dark .las-matrix-table tbody tr.is-active td.las-total-cell,
body.las-theme-dark .las-matrix-table tbody tr.is-selected td.las-total-cell {
    background: #9a7623 !important;
    color: #ffffff !important;
}

body.las-theme-dark .las-matrix-table tfoot th {
    color: #f8fafc !important;
}








.las-alert-success {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.08);
}

.las-alert-error {
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.08);
}


/* v0.7.9: dashboard charts and Word export */
.las-export-word-button {
    white-space: nowrap;
}

.las-dashboard-chart {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.las-dashboard-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.las-dashboard-chart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
}

.las-dashboard-chart-header span {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
}

.las-dashboard-chart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.las-dashboard-chart-row {
    display: grid;
    grid-template-columns: 190px minmax(160px, 1fr) 54px;
    gap: 12px;
    align-items: center;
}

.las-dashboard-chart-name {
    overflow: hidden;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.las-dashboard-chart-track {
    overflow: hidden;
    height: 14px;
    border-radius: 999px;
    background: #e5e7eb;
}

.las-dashboard-chart-bar {
    min-width: 0;
    height: 100%;
    border-radius: 999px;
    background: #2563eb;
}

.las-dashboard-chart-value {
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

body.las-theme-dark .las-dashboard-chart {
    border-top-color: #243044;
}

body.las-theme-dark .las-dashboard-chart-header h3,
body.las-theme-dark .las-dashboard-chart-value {
    color: #f8fafc;
}

body.las-theme-dark .las-dashboard-chart-header span,
body.las-theme-dark .las-dashboard-chart-name {
    color: #cbd5e1;
}

body.las-theme-dark .las-dashboard-chart-track {
    background: #1f2937;
}

body.las-theme-dark .las-dashboard-chart-bar {
    background: #60a5fa;
}

@media (max-width: 900px) {
    .las-dashboard-chart-row {
        grid-template-columns: 120px minmax(120px, 1fr) 44px;
    }
}

/* v0.7.10: common dashboard line chart */
.las-dashboard-line-card {
    margin-top: 24px;
}

.las-dashboard-line-title {
    align-items: flex-start;
}

.las-dashboard-line-title p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.las-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.las-chart-legend span {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.las-chart-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.las-chart-dot-leads {
    background: #5b9bd5;
}

.las-chart-dot-contracts {
    background: #ed7d31;
}

.las-line-chart-scroll {
    overflow-x: auto;
    padding: 8px 0 2px;
}

.las-line-chart {
    display: block;
    min-width: 920px;
    width: 100%;
    height: 340px;
}

.las-line-chart-grid {
    stroke: #d6dce5;
    stroke-width: 1;
}

.las-line-chart-axis-text,
.las-line-chart-date {
    fill: #475569;
    font-size: 12px;
    font-weight: 700;
}

.las-line-chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.las-line-chart-line-leads {
    stroke: #5b9bd5;
}

.las-line-chart-line-contracts {
    stroke: #ed7d31;
}

.las-line-chart-point {
    stroke: #ffffff;
    stroke-width: 2;
}

.las-line-chart-point-leads {
    fill: #5b9bd5;
}

.las-line-chart-point-contracts {
    fill: #ed7d31;
}

body.las-theme-dark .las-dashboard-line-title p,
body.las-theme-dark .las-chart-legend {
    color: #cbd5e1;
}

body.las-theme-dark .las-line-chart-grid {
    stroke: #334155;
}

body.las-theme-dark .las-line-chart-axis-text,
body.las-theme-dark .las-line-chart-date {
    fill: #cbd5e1;
}

body.las-theme-dark .las-line-chart-point {
    stroke: #0f172a;
}

@media (max-width: 900px) {
    .las-dashboard-line-title {
        flex-direction: column;
        gap: 12px;
    }
}







.las-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.las-status-pill-green {
    color: #166534;
    background: #dcfce7;
}

.las-status-pill-gray {
    color: #475569;
    background: #e2e8f0;
}






.las-button-danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff1f2;
}











@media (max-width: 900px) {


}





.las-debug-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}




@media (max-width: 900px) {
    .las-debug-grid {
        grid-template-columns: 1fr;
    }
}


/* v0.7.34: dark theme fixes for dashboard, requests, reports and site details */
body.las-theme-dark .las-matrix-table tbody td.las-number,
body.las-theme-dark .las-matrix-table tbody td.las-weekend-col,
body.las-theme-dark .las-matrix-table tbody td.las-total-cell {
    color: #0f172a !important;
    text-shadow: none !important;
}

body.las-theme-dark .las-matrix-table tbody td.las-total-cell {
    color: #ffffff !important;
}

body.las-theme-dark .las-matrix-table tfoot th,
body.las-theme-dark .las-matrix-table tfoot th.las-number,
body.las-theme-dark .las-matrix-table tfoot th:last-child {
    color: #f8fafc !important;
    background: #101827 !important;
}

body.las-theme-dark .las-lead-details-row,
body.las-theme-dark .las-lead-details-row.is-open,
body.las-theme-dark .las-lead-details-row td,
body.las-theme-dark .las-lead-details-row.is-open td {
    background: #0f172a !important;
    color: #e5e7eb !important;
    border-color: #243247 !important;
}

body.las-theme-dark .las-lead-details {
    background: #0f172a !important;
    border-color: #243247 !important;
    box-shadow: none !important;
}

body.las-theme-dark .las-lead-details div,
body.las-theme-dark .las-user-field,
body.las-theme-dark .las-user-card,
body.las-theme-dark .las-details-grid > div {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #243247 !important;
}

body.las-theme-dark .las-lead-details span,
body.las-theme-dark .las-user-field span,
body.las-theme-dark .las-details-grid span {
    color: #9ca3af !important;
}

body.las-theme-dark .las-lead-details strong,
body.las-theme-dark .las-user-field strong,
body.las-theme-dark .las-details-grid strong,
body.las-theme-dark .las-site-value {
    color: #f8fafc !important;
}

body.las-theme-dark .las-email-card,
body.las-theme-dark .las-email-list,
body.las-theme-dark .las-email-row {
    background: #111827 !important;
    border-color: #243247 !important;
}

body.las-theme-dark .las-email-row span {
    color: #e5e7eb !important;
}

body.las-theme-dark .las-email-row strong {
    color: #2563eb !important;
    background: #dbeafe !important;
}

body.las-theme-dark .las-report-summary > div,
body.las-theme-dark .las-report-result,
body.las-theme-dark .las-report-input {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

body.las-theme-dark .las-report-summary span,
body.las-theme-dark .las-report-export-form .las-muted {
    color: #9ca3af !important;
}

body.las-theme-dark .las-report-summary strong {
    color: #f8fafc !important;
}

/* v0.7.35: dark theme fix for site detail day blocks */
body.las-theme-dark .las-day-block,
body.las-theme-dark .las-day-block > h3,
body.las-theme-dark .las-table-scroll {
    background: #0f172a !important;
    color: #e5e7eb !important;
    border-color: #243247 !important;
}

body.las-theme-dark .las-day-block > h3 {
    border-bottom-color: #243247 !important;
    color: #f8fafc !important;
}

body.las-theme-dark .las-leads-table,
body.las-theme-dark .las-leads-table tbody,
body.las-theme-dark .las-leads-table tr {
    background: #0f172a !important;
}

body.las-theme-dark .las-leads-table thead th {
    background: #0b1220 !important;
    color: #cbd5e1 !important;
    border-color: #243247 !important;
}

body.las-theme-dark .las-leads-table tbody td {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #243247 !important;
}

body.las-theme-dark .las-leads-table .las-lead-row:nth-child(4n+1) td {
    background: #162033 !important;
}

body.las-theme-dark .las-leads-table .las-lead-row:hover td,
body.las-theme-dark .las-leads-table .las-lead-row.is-open td {
    background: #1e293b !important;
}

/* Leads Analytics home page */
.las-home-shell {
    min-height: 100vh;
    margin: -32px calc(50% - 50vw) 0;
    padding: 42px;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.18), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.14), transparent 30%),
        var(--las-bg);
    overflow: hidden;
}

.admin-bar .las-home-shell {
    min-height: calc(100vh - 32px);
}

.las-home-hero,
.las-home-section {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    border: 1px solid var(--las-border);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.las-home-hero {
    padding: 30px;
    min-height: 520px;
}

.las-home-section {
    margin-top: 24px;
    padding: 30px;
}

.las-home-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.45;
    pointer-events: none;
}

.las-home-glow-one {
    top: -160px;
    right: 12%;
    background: rgba(59, 130, 246, 0.34);
}

.las-home-glow-two {
    left: -150px;
    bottom: -170px;
    background: rgba(14, 165, 233, 0.26);
}

.las-home-topline {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.las-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.las-home-brand span {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.las-home-theme-toggle {
    width: auto;
    margin: 0;
    padding: 12px 16px;
    color: var(--las-text);
    background: rgba(255, 255, 255, 0.66);
    border-color: var(--las-border);
    text-align: center;
}

.las-home-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: center;
    gap: 42px;
    padding: 70px 18px 28px;
}

.las-home-kicker {
    display: inline-flex;
    margin: 0 0 18px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: var(--las-primary);
    font-weight: 900;
}

.las-home-copy h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(44px, 5vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.las-home-description {
    max-width: 660px;
    margin: 24px 0 0;
    color: var(--las-muted);
    font-size: 20px;
    line-height: 1.55;
}

.las-home-actions,
.las-home-user-card {
    margin-top: 32px;
}

.las-home-main-button {
    min-height: 58px;
    padding: 0 26px;
    border-radius: 18px;
    font-size: 18px;
}

.las-home-user-card {
    display: inline-grid;
    gap: 4px;
    min-width: 260px;
    padding: 16px 18px;
    border: 1px solid var(--las-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
}

.las-home-user-card span {
    color: var(--las-muted);
    font-weight: 800;
    font-size: 13px;
}

.las-home-user-card strong {
    font-size: 20px;
}

.las-home-preview {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 30px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    color: #e5e7eb;
    padding: 22px;
    transform: rotate(1.5deg);
}

.las-home-preview-header {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.las-home-preview-header span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #334155;
}

.las-home-preview-row,
.las-home-preview-metrics {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.las-home-preview-row strong {
    font-size: 24px;
}

.las-home-preview-row em {
    color: #86efac;
    font-style: normal;
    font-weight: 900;
}

.las-home-preview-chart {
    height: 220px;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 34px 0;
    padding: 18px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.42);
}

.las-home-preview-chart i {
    flex: 1;
    display: block;
    border-radius: 14px 14px 6px 6px;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.las-home-preview-metrics span {
    flex: 1;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.las-home-preview-metrics b {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.las-home-section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

.las-home-section-title h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.las-home-section-title p {
    margin: 0;
    color: var(--las-muted);
}

.las-home-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.las-home-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: 132px;
    padding: 22px;
    border: 1px solid var(--las-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--las-text);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.las-home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
    color: var(--las-text);
}

.las-home-card-disabled {
    pointer-events: none;
    opacity: 0.78;
}

.las-home-card-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 26px;
    background: #eff6ff;
}

.las-home-card-body {
    display: grid;
    gap: 7px;
}

.las-home-card-body strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.las-home-card-body em {
    max-width: 470px;
    color: var(--las-muted);
    font-style: normal;
    line-height: 1.45;
}

.las-home-card-arrow {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f5f9;
    color: #2563eb;
    font-weight: 900;
}

.las-home-card-blue .las-home-card-icon { background: #dbeafe; }
.las-home-card-green .las-home-card-icon { background: #dcfce7; }
.las-home-card-violet .las-home-card-icon { background: #f3e8ff; }
.las-home-card-orange .las-home-card-icon { background: #ffedd5; }
.las-home-card-gray .las-home-card-icon { background: #f1f5f9; }

body.las-theme-dark .las-home-shell {
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.20), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.14), transparent 30%),
        var(--las-bg);
}

body.las-theme-dark .las-home-hero,
body.las-theme-dark .las-home-section {
    background: rgba(17, 24, 39, 0.82);
    border-color: var(--las-border);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

body.las-theme-dark .las-home-theme-toggle,
body.las-theme-dark .las-home-user-card,
body.las-theme-dark .las-home-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: var(--las-border);
    color: var(--las-text);
}

body.las-theme-dark .las-home-card:hover {
    color: var(--las-text);
    border-color: rgba(59, 130, 246, 0.48);
}

body.las-theme-dark .las-home-card-arrow {
    background: #1e293b;
    color: #93c5fd;
}

body.las-theme-dark .las-home-card-icon {
    background: #172033;
}

@media (max-width: 980px) {
    .las-home-shell {
        padding: 22px;
    }

    .las-home-content,
    .las-home-card-grid {
        grid-template-columns: 1fr;
    }

    .las-home-content {
        padding-top: 42px;
    }

    .las-home-preview {
        transform: none;
    }
}

@media (max-width: 640px) {
    .las-home-shell {
        padding: 14px;
        margin-top: -24px;
    }

    .las-home-hero,
    .las-home-section {
        border-radius: 24px;
        padding: 20px;
    }

    .las-home-topline,
    .las-home-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .las-home-theme-toggle {
        width: 100%;
    }

    .las-home-copy h1 {
        font-size: 40px;
    }

    .las-home-description {
        font-size: 17px;
    }

    .las-home-preview {
        display: none;
    }

    .las-home-card {
        grid-template-columns: auto 1fr;
    }

    .las-home-card-arrow {
        display: none;
    }
}

/* CRM 0.7.39: editable training fields and per-user column picker */
.las-clients-card-title {
    align-items: flex-start;
    gap: 20px;
}

.las-columns-picker {
    position: relative;
    margin-left: auto;
    z-index: 20;
}

.las-columns-picker > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.las-columns-picker > summary::-webkit-details-marker {
    display: none;
}

.las-columns-picker-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(340px, 86vw);
    padding: 18px;
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.las-columns-picker-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 14px 0 18px;
}

.las-columns-picker-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.las-columns-picker-list input {
    width: 18px;
    height: 18px;
}

.las-clients-table.las-crm-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.las-clients-table.las-crm-table th,
.las-clients-table.las-crm-table td {
    min-width: 120px;
}

.las-clients-table.las-crm-table th:first-child,
.las-clients-table.las-crm-table td:first-child {
    min-width: 118px;
}

.las-clients-table .las-col-course,
.las-clients-table .las-col-fullname {
    width: 250px;
}

body.las-theme-dark .las-columns-picker-panel {
    background: #101a2b;
    border-color: #2a3a52;
    color: #eef4ff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

@media (max-width: 760px) {
    .las-clients-card-title {
        flex-direction: column;
    }

    .las-columns-picker {
        width: 100%;
        margin-left: 0;
    }

    .las-columns-picker-panel {
        position: static;
        width: auto;
        margin-top: 10px;
    }

    .las-columns-picker-list {
        grid-template-columns: 1fr;
    }
}


/* CRM 0.7.41: stable, readable dynamic-column table */
@media (min-width: 761px) {
    .las-clients-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
    }

    .las-clients-table.las-crm-table {
        width: max(100%, var(--las-table-min-width, 1180px));
        min-width: var(--las-table-min-width, 1180px);
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
    }

    .las-clients-table.las-crm-table col.las-col-number { width: 132px; }
    .las-clients-table.las-crm-table col.las-col-status { width: 132px; }
    .las-clients-table.las-crm-table col.las-col-organization { width: 170px; }
    .las-clients-table.las-crm-table col.las-col-lead-code { width: 190px; }
    .las-clients-table.las-crm-table col.las-col-fullname { width: 250px; }
    .las-clients-table.las-crm-table col.las-col-course { width: 360px; }
    .las-clients-table.las-crm-table col.las-col-region { width: 190px; }
    .las-clients-table.las-crm-table col.las-col-legal-entity { width: 220px; }
    .las-clients-table.las-crm-table col.las-col-amount { width: 150px; }
    .las-clients-table.las-crm-table col.las-col-type { width: 105px; }
    .las-clients-table.las-crm-table col.las-col-hours { width: 120px; }
    .las-clients-table.las-crm-table col.las-col-email { width: 250px; }
    .las-clients-table.las-crm-table col.las-col-phone { width: 170px; }

    .las-clients-table.las-crm-table th,
    .las-clients-table.las-crm-table td {
        min-width: 0 !important;
        box-sizing: border-box;
        padding: 15px 14px;
        vertical-align: middle;
    }

    .las-clients-table.las-crm-table th {
        white-space: normal;
        line-height: 1.25;
    }

    .las-clients-table.las-crm-table .las-lead-row > td {
        height: var(--las-crm-row-height, 118px);
    }

    .las-clients-table .las-course-cell,
    .las-clients-table .las-fullname-cell,
    .las-clients-table .las-column-email,
    .las-clients-table .las-column-legal-entity,
    .las-clients-table .las-column-region {
        overflow: hidden;
    }

    .las-clients-table .las-cell-clamp {
        width: 100%;
        max-width: 100%;
        line-height: 1.4;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .las-clients-table .las-course-clamp {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .las-clients-table .las-fullname-clamp {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .las-clients-table .las-lead-row,
    .las-clients-table .las-lead-row > td,
    .las-clients-table .las-date-separator-row > td,
    .las-clients-table .las-lead-details-row > td {
        background-clip: padding-box;
    }

    .las-clients-table .las-lead-row:hover > td,
    .las-clients-table .las-lead-row.is-open > td {
        background-color: #eaf3ff;
    }

    .las-clients-table .las-lead-details-row > td {
        width: auto !important;
        min-width: 0 !important;
    }

    /* Cancel old positional hiding/width rules: columns are user-configurable. */
    .las-crm-table th:nth-child(n),
    .las-crm-table td:nth-child(n) {
        display: table-cell;
    }
}

@media (min-width: 761px) and (max-width: 1450px) {
    .las-clients-table.las-crm-table {
        font-size: 13px;
    }

    .las-clients-table.las-crm-table th,
    .las-clients-table.las-crm-table td {
        padding-left: 10px;
        padding-right: 10px;
    }

    .las-clients-table.las-crm-table col.las-col-course { width: 320px; }
    .las-clients-table.las-crm-table col.las-col-fullname { width: 220px; }
}

body.las-theme-dark .las-clients-table .las-lead-row:hover > td,
body.las-theme-dark .las-clients-table .las-lead-row.is-open > td {
    background-color: #17243a;
}

/* CRM 0.7.42: prevent phantom horizontal overflow */
@media (min-width: 761px) {
    .las-main,
    .las-card,
    .las-table-card,
    .las-clients-table-wrap {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .las-clients-table-wrap {
        display: block;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-gutter: auto;
    }

    .las-clients-table.las-crm-table {
        width: 100%;
        min-width: var(--las-table-min-width, 980px);
        max-width: none;
        box-sizing: border-box;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
    }

    .las-clients-table.las-crm-table col,
    .las-clients-table.las-crm-table th,
    .las-clients-table.las-crm-table td {
        box-sizing: border-box;
    }
}


/* Leads pagination */
.las-leads-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 12px 8px;
}
.las-leads-pagination-summary {
    color: var(--las-muted, #64748b);
    font-weight: 700;
}
@media (max-width: 680px) {
    .las-leads-pagination {
        flex-direction: column;
    }
    .las-leads-pagination .las-button {
        width: 100%;
        text-align: center;
    }
}

/* CRM AJAX pagination — 0.7.45 */
.las-leads-pagination-message {
    min-height: 20px;
    font-size: 13px;
    color: var(--las-muted, #64748b);
}
.las-leads-pagination-message.is-error { color: #dc2626; }
.las-leads-pagination.is-loading { opacity: .88; }
.las-lead-row.las-lead-row-new {
    animation: las-new-lead-highlight 2.8s ease-out;
}
@keyframes las-new-lead-highlight {
    0%, 35% { box-shadow: inset 0 0 0 9999px rgba(59, 130, 246, .16); }
    100% { box-shadow: inset 0 0 0 9999px rgba(59, 130, 246, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .las-lead-row.las-lead-row-new { animation: none; }
}

/* CRM 0.7.46: sticky navigation and polished AJAX loading */
@media (min-width: 761px) {
    .las-clients-table.las-crm-table thead th {
        position: sticky;
        top: 0;
        z-index: 12;
        background: #f8fafc;
        box-shadow: inset 0 -1px 0 #dbe3ef;
    }

    .las-clients-table.las-crm-table thead th[data-column="number"] {
        left: 0;
        z-index: 16;
    }

    .las-clients-table.las-crm-table .las-lead-row > td[data-column="number"] {
        position: sticky;
        left: 0;
        z-index: 8;
        background-color: #ffffff;
        box-shadow: inset -1px 0 0 #e2e8f0;
    }

    .las-clients-table.las-crm-table .las-lead-row:hover > td[data-column="number"],
    .las-clients-table.las-crm-table .las-lead-row.is-open > td[data-column="number"] {
        background-color: #eaf3ff;
    }
}

body.las-theme-dark .las-clients-table.las-crm-table thead th {
    background: #101a2b;
    box-shadow: inset 0 -1px 0 #2a3a52;
}

body.las-theme-dark .las-clients-table.las-crm-table .las-lead-row > td[data-column="number"] {
    background-color: #0f1828;
    box-shadow: inset -1px 0 0 #26364d;
}

body.las-theme-dark .las-clients-table.las-crm-table .las-lead-row:hover > td[data-column="number"],
body.las-theme-dark .las-clients-table.las-crm-table .las-lead-row.is-open > td[data-column="number"] {
    background-color: #17243a;
}

.las-auto-load-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 4px;
    color: var(--las-muted, #64748b);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.las-auto-load-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2563eb;
}

[data-las-load-more].is-loading {
    position: relative;
    padding-left: 42px;
}

[data-las-load-more].is-loading::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: las-button-spinner .7s linear infinite;
}

.las-lead-row.las-lead-row-new > td {
    animation: las-new-lead-cell-highlight 3s ease-out;
}

@keyframes las-new-lead-cell-highlight {
    0%, 30% { background-color: #dbeafe; }
    100% { background-color: transparent; }
}

@keyframes las-button-spinner {
    to { transform: rotate(360deg); }
}

body.las-theme-dark .las-lead-row.las-lead-row-new > td {
    animation-name: las-new-lead-cell-highlight-dark;
}

@keyframes las-new-lead-cell-highlight-dark {
    0%, 30% { background-color: #1d3a63; }
    100% { background-color: transparent; }
}

@media (max-width: 680px) {
    .las-auto-load-toggle {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-las-load-more].is-loading::before,
    .las-lead-row.las-lead-row-new > td {
        animation: none;
    }
}

/* CRM 0.7.46.1: floating header for page-level scrolling with a horizontal table scroller. */
.las-crm-floating-header {
    position: fixed;
    z-index: 9990;
    display: none;
    overflow: hidden;
    pointer-events: none;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ef;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.las-crm-floating-header.is-visible {
    display: block;
}

.las-crm-floating-header-table {
    margin: 0;
    table-layout: fixed !important;
    border-collapse: separate;
    border-spacing: 0;
    will-change: transform;
}

.las-crm-floating-header-table thead th {
    position: static !important;
    top: auto !important;
    height: auto;
    box-sizing: border-box;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 #dbe3ef;
}

.las-crm-floating-header-table thead th:first-child {
    position: relative !important;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset -1px 0 0 #dbe3ef, inset 0 -1px 0 #dbe3ef;
}

body.las-theme-dark .las-crm-floating-header {
    background: #101a2b;
    border-bottom-color: #2a3a52;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

body.las-theme-dark .las-crm-floating-header-table thead th,
body.las-theme-dark .las-crm-floating-header-table thead th:first-child {
    background: #101a2b;
    color: #eef4ff;
    box-shadow: inset 0 -1px 0 #2a3a52;
}

body.las-theme-dark .las-crm-floating-header-table thead th:first-child {
    box-shadow: inset -1px 0 0 #2a3a52, inset 0 -1px 0 #2a3a52;
}

@media (max-width: 760px) {
    .las-crm-floating-header {
        display: none !important;
    }
}


/* CRM 0.7.47: trash, permanent deletion and spam review */
.las-lead-removal-panel{margin-top:18px;padding:16px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.las-trash-actions{display:flex;gap:10px;flex-wrap:wrap}.las-trash-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:#64748b}.las-spam-warning{padding:8px 12px;border-radius:999px;background:#fff7ed;color:#c2410c;font-weight:700}.las-button-danger{background:#dc2626!important;color:#fff!important;border-color:#dc2626!important}.las-button-outline{background:transparent!important;color:#dc2626!important}.las-trash-message{font-weight:700}.las-history-item-default strong:has(+ p){max-width:100%}@media(max-width:720px){.las-lead-removal-panel{align-items:stretch}.las-trash-actions,.las-trash-actions .las-button,.las-lead-removal-panel>.las-button{width:100%}}
body.las-dark-mode .las-lead-removal-panel{background:#111827;border-color:#334155}.las-trash-row{opacity:.86}

/* 0.7.47.1 — actions and trash UX */
.las-user-actions{display:flex!important;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.las-user-actions-left,.las-user-actions-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.las-user-actions-right{margin-left:auto}
.las-user-actions .las-trash-message{flex-basis:100%;min-height:20px}
.las-trash-message.is-error{color:#dc2626}
.las-trash-message.is-success{color:#15803d}
.las-button-danger{background:#dc2626!important;color:#fff!important;border:1px solid #dc2626!important;box-shadow:0 8px 18px rgba(220,38,38,.18)}
.las-button-danger:hover{background:#b91c1c!important;border-color:#b91c1c!important}
.las-button.is-loading{opacity:.72;cursor:wait}
.las-row-removing{opacity:.35;transition:opacity .3s ease}
@media(max-width:720px){.las-user-actions-left,.las-user-actions-right{width:100%}.las-user-actions-right{margin-left:0}.las-user-actions-left .las-button,.las-user-actions-right .las-button{width:100%}}

/* 0.7.47.2 — inline trash reason */
.las-trash-reason-field{display:flex;align-items:center;margin:0}
.las-trash-reason{height:46px;min-width:190px;padding:0 40px 0 14px;border:1px solid #cbd5e1;border-radius:12px;background-color:#fff;color:#0f172a;font:inherit;font-weight:700;cursor:pointer}
.las-trash-reason:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.las-theme-dark .las-trash-reason{background:#162235;border-color:#334155;color:#f8fafc}
@media(max-width:720px){.las-trash-reason-field,.las-trash-reason{width:100%}}

/* v0.7.48: Leads Analytics Design System */
:root {
    --las-space-1: 4px;
    --las-space-2: 8px;
    --las-space-3: 12px;
    --las-space-4: 16px;
    --las-space-5: 20px;
    --las-space-6: 24px;
    --las-space-8: 32px;
    --las-space-10: 40px;
    --las-radius-sm: 10px;
    --las-radius-md: 14px;
    --las-radius-lg: 18px;
    --las-radius-xl: 24px;
    --las-control-height: 44px;
    --las-focus-ring: 0 0 0 3px rgba(37, 99, 235, .16);
    --las-shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
    --las-shadow-md: 0 14px 36px rgba(15, 23, 42, .09);
    --las-transition: 160ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { max-width: 100%; }

.las-app {
    margin: -32px 0 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.las-main,
.las-card,
.las-table-card,
.las-table-scroll,
.las-clients-table-wrap {
    min-width: 0;
    max-width: 100%;
}

.las-main { box-sizing: border-box; }

.las-card,
.las-kpi-card {
    border-radius: var(--las-radius-lg);
    box-shadow: var(--las-shadow-sm);
    transition: border-color var(--las-transition), box-shadow var(--las-transition), transform var(--las-transition);
}

.las-card:hover,
.las-kpi-card:hover {
    border-color: #d7deea;
    box-shadow: var(--las-shadow-md);
}

.las-button,
.las-filter-field input,
.las-filter-field select,
.las-form input,
.las-form select,
.las-form textarea,
.las-filters input,
.las-filters select {
    min-height: var(--las-control-height);
    border-radius: var(--las-radius-md) !important;
    transition: border-color var(--las-transition), box-shadow var(--las-transition), background var(--las-transition), color var(--las-transition), transform var(--las-transition);
}

.las-button {
    gap: var(--las-space-2);
    padding: 0 var(--las-space-4);
    font-size: 14px;
    line-height: 1;
    box-shadow: none;
}

.las-button:hover { transform: translateY(-1px); }
.las-button:active { transform: translateY(0); }
.las-button:focus-visible,
.las-filter-field input:focus,
.las-filter-field select:focus,
.las-form input:focus,
.las-form select:focus,
.las-form textarea:focus {
    outline: none;
    border-color: var(--las-primary) !important;
    box-shadow: var(--las-focus-ring) !important;
}

.las-button[disabled],
.las-button.is-loading {
    opacity: .62;
    cursor: wait;
    transform: none;
}

.las-button-primary { box-shadow: 0 8px 18px rgba(37, 99, 235, .18); }
.las-button-danger:hover { background: #fef2f2; border-color: #fecaca; }

.las-filter-field label {
    display: block;
    margin-bottom: var(--las-space-2);
    color: var(--las-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.las-filter-field input,
.las-filter-field select {
    width: 100%;
    border: 1px solid var(--las-border) !important;
    background: var(--las-card);
    color: var(--las-text);
    padding: 9px 12px !important;
}

.las-client-filters-crm-v2 {
    align-items: end;
    gap: var(--las-space-4);
}

.las-period-switcher {
    gap: var(--las-space-2);
    padding: 0;
}

.las-period-option span {
    min-height: var(--las-control-height);
    border-radius: var(--las-radius-md);
    padding: 8px 14px;
}

.las-period-option.is-loading span {
    opacity: .65;
    cursor: wait;
}

.las-client-filters.is-ajax-loading,
.las-table-card.is-ajax-loading,
.las-kpi-grid.is-ajax-loading {
    opacity: .55;
    pointer-events: none;
}

.las-client-filters { position: relative; }
.las-client-filters.is-ajax-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--las-radius-lg);
    background: rgba(255,255,255,.38);
}

.las-table th {
    font-size: 12px;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.las-table td,
.las-table th { transition: background var(--las-transition), color var(--las-transition); }

.las-status-chip,
.las-lead-date-chip,
.las-date-separator-row span {
    border-radius: 999px;
}

.las-crm-floating-header {
    max-width: 100vw;
    overflow: hidden;
}

body.las-theme-dark .las-client-filters.is-ajax-loading::after {
    background: rgba(7, 19, 36, .35);
}

@media (max-width: 782px) {
    .las-app { margin-top: -46px; }
}

/* Marketing leads — 0.7.49 */
.las-marketing-filter-card{margin-bottom:20px}.las-marketing-filters{display:grid;grid-template-columns:minmax(260px,2fr) repeat(6,minmax(140px,1fr)) auto;gap:12px;align-items:end}.las-field{display:flex;flex-direction:column;gap:7px}.las-field>span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--las-text-muted,#64748b)}.las-marketing-filter-actions{display:flex;gap:8px}.las-marketing-leads-table{min-width:1120px}.las-marketing-lead-row{cursor:pointer;transition:background .18s ease}.las-marketing-lead-row:hover,.las-marketing-lead-row.is-open{background:var(--las-primary-soft,#eff6ff)}.las-marketing-lead-row td:first-child strong,.las-marketing-lead-row td:first-child span{display:block}.las-marketing-lead-row td:first-child span{margin-top:4px;color:var(--las-text-muted,#64748b);font-size:12px}.las-marketing-course{max-width:430px}.las-source-badge,.las-status-badge{display:inline-flex;align-items:center;min-height:26px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}.las-source-badge{background:#eef2ff;color:#4338ca}.las-status-new{background:#e0f2fe;color:#0369a1}.las-status-waiting{background:#fef3c7;color:#92400e}.las-status-progress{background:#dbeafe;color:#1d4ed8}.las-status-warning{background:#ffedd5;color:#c2410c}.las-status-contract{background:#ede9fe;color:#6d28d9}.las-status-paid,.las-status-success{background:#dcfce7;color:#15803d}.las-status-danger{background:#fee2e2;color:#b91c1c}.las-status-muted{background:#e5e7eb;color:#475569}.las-marketing-detail-row td{padding:0!important;background:var(--las-surface-subtle,#f8fafc)}.las-marketing-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:18px}.las-marketing-detail-grid>div{display:flex;flex-direction:column;gap:6px;min-height:72px;padding:13px 15px;border:1px solid var(--las-border,#e2e8f0);border-radius:12px;background:var(--las-surface,#fff);overflow-wrap:anywhere}.las-marketing-detail-grid span:first-child{font-size:12px;font-weight:700;color:var(--las-text-muted,#64748b)}.las-marketing-detail-wide{grid-column:1/-1}.las-marketing-status-box{display:grid!important;grid-template-columns:1fr auto auto;align-items:center;min-height:auto!important}.las-marketing-status-box>a{font-weight:800;text-decoration:none}.las-empty-state{text-align:center!important;padding:42px!important;color:var(--las-text-muted,#64748b)}
@media(max-width:1250px){.las-marketing-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.las-field-wide{grid-column:1/-1}.las-marketing-filter-actions{grid-column:1/-1}.las-marketing-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.las-marketing-filters,.las-marketing-detail-grid{grid-template-columns:1fr}.las-field-wide,.las-marketing-filter-actions,.las-marketing-detail-wide{grid-column:auto}.las-marketing-status-box{display:flex!important;align-items:flex-start}.las-marketing-filter-actions{flex-wrap:wrap}}


/* Marketing leads contact actions — 0.7.50 */
.las-marketing-action-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.las-marketing-action-list > div { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--las-border, #dfe6ef); border-radius: 999px; background: var(--las-surface-muted, #f7f9fc); }
.las-marketing-action-list b { font-size: 12px; }
.las-marketing-action-list em { color: var(--las-text-muted, #667085); font-size: 12px; font-style: normal; }


/* Marketing leads linked action filters and CRM-first UTM recovery — 0.7.53 */
#las-marketing-action-value-filter:disabled { opacity: .62; cursor: not-allowed; background: var(--las-surface-subtle, #f8fafc); }
.las-marketing-detail-grid a { overflow-wrap: anywhere; }

/* v0.7.54 — unified Leads Analytics interface */
:root {
    --las-bg: #f3f6fb;
    --las-card: #ffffff;
    --las-surface: #ffffff;
    --las-surface-subtle: #f7f9fc;
    --las-surface-muted: #eef3f9;
    --las-border: #dfe6ef;
    --las-border-strong: #ccd6e4;
    --las-text: #172033;
    --las-text-muted: #697386;
    --las-muted: #697386;
    --las-primary: #2f6fed;
    --las-primary-dark: #245bd1;
    --las-primary-soft: #edf4ff;
    --las-danger: #d92d20;
    --las-success: #078f60;
    --las-warning: #d97706;
    --las-control-height: 46px;
    --las-radius-sm: 10px;
    --las-radius-md: 13px;
    --las-radius-lg: 18px;
    --las-radius-xl: 24px;
    --las-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --las-shadow-sm: 0 7px 22px rgba(29, 41, 57, .06);
    --las-shadow-md: 0 18px 44px rgba(29, 41, 57, .10);
    --las-focus-ring: 0 0 0 4px rgba(47, 111, 237, .14);
}

body.las-theme-dark {
    --las-bg: #08111f;
    --las-card: #111c2d;
    --las-surface: #111c2d;
    --las-surface-subtle: #0d1727;
    --las-surface-muted: #18263a;
    --las-border: #29394f;
    --las-border-strong: #3a4b63;
    --las-text: #eef4ff;
    --las-text-muted: #aab7ca;
    --las-muted: #aab7ca;
    --las-primary: #4c8dff;
    --las-primary-dark: #3274eb;
    --las-primary-soft: #142b4f;
    --las-shadow-xs: 0 1px 2px rgba(0, 0, 0, .20);
    --las-shadow-sm: 0 10px 26px rgba(0, 0, 0, .20);
    --las-shadow-md: 0 22px 52px rgba(0, 0, 0, .30);
}

body:has(.las-app),
body:has(.las-shell) {
    background: var(--las-bg) !important;
}

.las-app {
    background:
        radial-gradient(circle at 95% 0%, rgba(47, 111, 237, .07), transparent 28%),
        var(--las-bg);
}

.las-main {
    width: 100%;
    max-width: 1800px;
    padding: clamp(24px, 3vw, 46px) clamp(20px, 3.2vw, 56px);
}

.las-page-header {
    align-items: center;
    margin-bottom: 24px;
}

.las-page-header h1 {
    margin-bottom: 7px;
    font-size: clamp(28px, 2.2vw, 38px);
    font-weight: 850;
    letter-spacing: -.035em;
}

.las-page-header p {
    max-width: 760px;
    color: var(--las-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.las-card,
.las-kpi-card,
.ldl-card {
    background: var(--las-card);
    border: 1px solid var(--las-border);
    border-radius: var(--las-radius-lg);
    box-shadow: var(--las-shadow-sm);
}

.las-card {
    padding: clamp(18px, 1.6vw, 26px);
}

.las-card:hover,
.las-kpi-card:hover {
    border-color: var(--las-border-strong);
    box-shadow: var(--las-shadow-sm);
    transform: none;
}

.las-card-title {
    align-items: flex-start;
    margin-bottom: 18px;
}

.las-card-title h2,
.las-card h2 {
    color: var(--las-text);
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -.025em;
}

.las-card-title p,
.las-card-title .las-muted {
    margin: 5px 0 0;
    color: var(--las-text-muted);
    line-height: 1.45;
}

.las-card-title-toolbar {
    align-items: center;
}

.las-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.las-filter-card {
    padding: 18px;
}

.las-filter-panel {
    gap: 14px;
}

.las-page-header > .las-filter-panel,
.las-page-header > .las-filters {
    padding: 14px;
    border: 1px solid var(--las-border);
    border-radius: var(--las-radius-lg);
    background: var(--las-card);
    box-shadow: var(--las-shadow-xs);
}

.las-filter-panel-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 190px)) auto;
    align-items: end;
    gap: 12px;
}

.las-field,
.las-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.las-field > span,
.las-field > label,
.las-filter-field > label,
.las-field-label,
.ldl-field label {
    margin: 0;
    color: var(--las-text-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.las-app input[type="text"],
.las-app input[type="email"],
.las-app input[type="url"],
.las-app input[type="number"],
.las-app input[type="date"],
.las-app input[type="search"],
.las-app select,
.las-app textarea,
.ldl-wrap input,
.ldl-wrap select,
.ldl-wrap textarea {
    width: 100%;
    min-height: var(--las-control-height);
    margin: 0;
    border: 1px solid var(--las-border) !important;
    border-radius: var(--las-radius-md) !important;
    background-color: var(--las-surface);
    color: var(--las-text);
    padding: 10px 13px !important;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: var(--las-shadow-xs);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.las-app textarea,
.ldl-wrap textarea {
    min-height: 104px;
    resize: vertical;
}

.las-app input[type="search"],
.las-search-input {
    padding-left: 42px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23738396' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 18px 18px;
    background-position: 14px center;
}

.las-app input:focus,
.las-app select:focus,
.las-app textarea:focus,
.ldl-wrap input:focus,
.ldl-wrap select:focus,
.ldl-wrap textarea:focus {
    outline: none;
    border-color: var(--las-primary) !important;
    box-shadow: var(--las-focus-ring) !important;
}

.las-app input::placeholder,
.las-app textarea::placeholder,
.ldl-wrap input::placeholder,
.ldl-wrap textarea::placeholder {
    color: #8a95a8;
    opacity: 1;
}

.las-button,
.ldl-wrap .las-button {
    min-height: var(--las-control-height);
    padding: 0 17px;
    border: 1px solid var(--las-border);
    border-radius: var(--las-radius-md);
    background: var(--las-surface);
    color: var(--las-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: var(--las-shadow-xs);
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.las-button:hover,
.ldl-wrap .las-button:hover {
    border-color: var(--las-border-strong);
    background: var(--las-surface-subtle);
    color: var(--las-text);
    transform: translateY(-1px);
    box-shadow: var(--las-shadow-sm);
}

.las-button:active,
.ldl-wrap .las-button:active {
    transform: translateY(0);
}

.las-button-primary,
.ldl-wrap .las-button-primary {
    border-color: var(--las-primary) !important;
    background: linear-gradient(180deg, #3c7af2 0%, var(--las-primary) 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(47, 111, 237, .22);
}

.las-button-primary:hover,
.ldl-wrap .las-button-primary:hover {
    border-color: var(--las-primary-dark) !important;
    background: linear-gradient(180deg, #3473e8 0%, var(--las-primary-dark) 100%) !important;
    color: #fff !important;
}

.las-button-secondary,
.ldl-wrap .las-button-secondary {
    border-color: var(--las-border);
    background: var(--las-surface);
    color: #344054;
}

body.las-theme-dark .las-button-secondary,
body.las-theme-dark .ldl-wrap .las-button-secondary {
    color: var(--las-text);
}

.las-button-danger {
    border-color: #d92d20 !important;
    background: #d92d20 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(217, 45, 32, .18) !important;
}

.las-button-danger:hover {
    border-color: #b42318 !important;
    background: #b42318 !important;
    color: #fff !important;
}

.las-search-submit::before,
.las-search-reset::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.las-search-submit::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 1 0 4.73 13.32L20.9 22 22 20.9l-5.68-5.67A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 1 0 4.73 13.32L20.9 22 22 20.9l-5.68-5.67A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z'/%3E%3C/svg%3E");
}

.las-search-reset::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 1 1-7.45 5.08l1.86.73A6 6 0 1 0 8.1 7.37L10.7 10H3V2.3l2.2 2.2A7.96 7.96 0 0 1 12 4Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 1 1-7.45 5.08l1.86.73A6 6 0 1 0 8.1 7.37L10.7 10H3V2.3l2.2 2.2A7.96 7.96 0 0 1 12 4Z'/%3E%3C/svg%3E");
}

.las-search-actions,
.las-filter-actions,
.las-marketing-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.las-table-search {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.las-table-search .las-search-input {
    min-width: 0;
}

.las-kpi-grid {
    gap: 16px;
}

.las-kpi-card {
    position: relative;
    min-height: 128px;
    padding: 22px 24px;
    overflow: hidden;
}

.las-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--las-primary), #63b3ff);
    opacity: .9;
}

.las-kpi-card span {
    color: var(--las-text-muted);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .01em;
}

.las-kpi-card strong {
    color: var(--las-text);
    font-size: clamp(30px, 2.3vw, 38px);
    font-weight: 850;
}

.las-table-card > .las-table-scroll,
.las-sites-card > .las-table-scroll,
.las-day-block .las-table-scroll {
    border: 1px solid var(--las-border);
    border-radius: 15px;
    background: var(--las-surface);
}

.las-table {
    color: var(--las-text);
}

.las-table th {
    height: 48px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--las-border);
    background: var(--las-surface-subtle);
    color: #536176;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .055em;
}

body.las-theme-dark .las-table th {
    color: #b8c5d8;
}

.las-table td {
    padding: 15px;
    border-bottom-color: var(--las-border);
    color: var(--las-text);
}

.las-table tbody tr:last-child td {
    border-bottom: 0;
}

.las-table tbody tr:hover td {
    background-color: var(--las-primary-soft);
}

.las-day-block {
    padding: 12px;
    border-color: var(--las-border);
    background: var(--las-surface-subtle);
}

.las-day-block > h3 {
    padding: 7px 8px 12px;
    color: var(--las-text);
    font-size: 18px;
    font-weight: 850;
}

.las-user-card,
.las-history-block,
.las-marketing-detail-grid > div,
.las-lead-details div,
.las-user-field {
    border-color: var(--las-border);
    background: var(--las-surface);
    box-shadow: var(--las-shadow-xs);
}

.las-user-card {
    background: var(--las-surface-subtle);
}

.las-marketing-detail-row td,
.las-lead-details-row td {
    background: var(--las-surface-subtle) !important;
}

.las-marketing-detail-grid {
    gap: 12px;
    padding: 20px;
}

.las-marketing-detail-grid > div {
    min-height: 76px;
    padding: 14px 16px;
    border-radius: var(--las-radius-md);
}

.las-marketing-detail-grid span:first-child {
    color: var(--las-text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.las-marketing-detail-grid strong,
.las-marketing-detail-grid a {
    color: var(--las-text);
    font-weight: 750;
}

.las-period-switcher {
    gap: 8px !important;
}

.las-period-option span {
    min-height: 38px !important;
    padding: 7px 14px !important;
    border-radius: 999px !important;
    background: var(--las-surface);
    color: var(--las-text-muted);
    box-shadow: var(--las-shadow-xs);
}

.las-period-option:hover span {
    border-color: #9ebcf6;
    background: var(--las-primary-soft);
    color: var(--las-primary-dark);
}

.las-period-option.is-active span,
.las-period-option input:checked + span {
    background: var(--las-primary) !important;
    border-color: var(--las-primary) !important;
    color: #fff !important;
}

.las-client-filters-crm-v2,
.las-marketing-filters {
    gap: 14px;
}

.las-client-filters-crm-v2 .las-filter-actions,
.las-marketing-filter-actions {
    justify-content: flex-end;
}

.las-report-search-form {
    grid-template-columns: minmax(280px, 1fr) auto;
    max-width: 900px;
    align-items: end;
}

.las-report-search-form .las-field-wide {
    grid-column: auto;
}

.las-report-summary > div {
    border-color: var(--las-border);
    background: var(--las-surface-subtle);
}

.las-sites-table .las-actions-cell {
    flex-wrap: nowrap;
}

.las-settings-header .las-button-primary {
    min-width: 154px;
}

.las-modal-panel {
    border-color: var(--las-border);
    background: var(--las-card);
    color: var(--las-text);
}

.las-modal-close {
    background: var(--las-surface-muted);
    color: var(--las-text);
}

.las-sidebar {
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 12px 0 34px rgba(3, 10, 20, .08);
}

.las-sidebar a {
    border: 1px solid transparent;
}

.las-sidebar a:hover {
    border-color: rgba(255,255,255,.08);
    background: rgba(47,111,237,.20);
}

.las-sidebar a.active {
    border-color: rgba(255,255,255,.10);
    background: linear-gradient(135deg, #2f6fed, #3f82f5);
    box-shadow: 0 10px 24px rgba(47,111,237,.22);
}

/* Direct module adopts the shared visual system. */
.las-direct-main .ldl-wrap {
    max-width: none;
    color: var(--las-text);
}

.las-direct-main .ldl-card {
    max-width: none;
    margin: 0 0 22px;
    padding: 24px;
}

.las-direct-main .ldl-card h1 {
    margin: 0 0 8px;
    color: var(--las-text);
    font-size: clamp(28px, 2.2vw, 38px);
    letter-spacing: -.035em;
}

.las-direct-main .ldl-card h2,
.las-direct-main .ldl-card h3 {
    color: var(--las-text);
}

.las-direct-main .ldl-front-stats-form {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--las-border);
    border-radius: var(--las-radius-lg);
    background: var(--las-surface-subtle);
}

.las-direct-main .ldl-stats-form-grid {
    gap: 14px;
}

.las-direct-main .ldl-field {
    margin: 0;
}

.las-direct-main .ldl-actions {
    gap: 9px;
    margin-top: 14px;
}

.las-direct-main .ldl-summary-item,
.las-direct-main .ldl-balance-box {
    border-color: var(--las-border);
    background: var(--las-surface-subtle);
    color: var(--las-text);
}

.las-direct-main .ldl-table {
    border: 1px solid var(--las-border);
    border-radius: 14px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.las-direct-main .ldl-table th,
.las-direct-main .ldl-table td {
    border: 0;
    border-bottom: 1px solid var(--las-border);
    padding: 13px 14px;
    color: var(--las-text);
}

.las-direct-main .ldl-table th {
    background: var(--las-surface-subtle);
    color: var(--las-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.las-direct-main .ldl-table tr:last-child td {
    border-bottom: 0;
}

.las-direct-main .ldl-muted {
    color: var(--las-text-muted);
}

body.las-theme-dark .las-app input[type="search"],
body.las-theme-dark .las-search-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab7ca' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}

body.las-theme-dark .las-card,
body.las-theme-dark .las-kpi-card,
body.las-theme-dark .ldl-card,
body.las-theme-dark .las-modal-panel,
body.las-theme-dark .las-page-header > .las-filter-panel,
body.las-theme-dark .las-page-header > .las-filters {
    border-color: var(--las-border);
    background: var(--las-card);
}

body.las-theme-dark .las-table-card > .las-table-scroll,
body.las-theme-dark .las-sites-card > .las-table-scroll,
body.las-theme-dark .las-day-block .las-table-scroll {
    border-color: var(--las-border);
    background: var(--las-surface);
}

body.las-theme-dark .las-table tbody tr:hover td,
body.las-theme-dark .las-marketing-lead-row:hover td,
body.las-theme-dark .las-marketing-lead-row.is-open td {
    background: var(--las-primary-soft) !important;
}

@media (max-width: 1380px) {
    .las-page-header {
        align-items: flex-start;
    }

    .las-page-header > .las-filter-panel,
    .las-page-header > .las-filters {
        width: 100%;
    }

    .las-card-title-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .las-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .las-filter-panel-inline,
    .las-report-search-form {
        grid-template-columns: 1fr;
    }

    .las-table-search {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .las-card-actions {
        align-items: stretch;
    }

    .las-client-filters-crm-v2 .las-filter-actions,
    .las-marketing-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .las-main {
        padding: 20px 14px;
    }

    .las-card,
    .las-kpi-card,
    .las-direct-main .ldl-card {
        border-radius: 15px;
    }

    .las-table-search {
        grid-template-columns: 1fr 1fr;
    }

    .las-table-search .las-search-input {
        grid-column: 1 / -1;
    }

    .las-table-search .las-button,
    .las-search-actions .las-button {
        width: 100%;
    }

    .las-search-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .las-card-actions > .las-button {
        width: 100%;
    }

    .las-kpi-card {
        min-height: 112px;
    }
}

/* v0.7.55 — marketing leads columns and CRM-consistent table style */
.las-marketing-leads-card .las-card-title {
    align-items: flex-start;
    gap: 20px;
}

.las-marketing-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.las-marketing-leads-table {
    width: max-content;
    min-width: max(100%, var(--las-marketing-table-min-width, 1120px));
    table-layout: auto;
}

.las-marketing-leads-table th,
.las-marketing-leads-table td {
    min-width: 120px;
    vertical-align: middle;
}

.las-marketing-leads-table .las-marketing-lead-row > td {
    height: 82px;
    padding-top: 17px;
    padding-bottom: 17px;
}

.las-marketing-leads-table th[data-column="sent_date"],
.las-marketing-leads-table td[data-column="sent_date"] { min-width: 170px; }
.las-marketing-leads-table th[data-column="lead_code"],
.las-marketing-leads-table td[data-column="lead_code"] { min-width: 180px; }
.las-marketing-leads-table th[data-column="fullname"],
.las-marketing-leads-table td[data-column="fullname"] { min-width: 250px; }
.las-marketing-leads-table th[data-column="email"],
.las-marketing-leads-table td[data-column="email"],
.las-marketing-leads-table th[data-column="recipient_email"],
.las-marketing-leads-table td[data-column="recipient_email"] { min-width: 240px; }
.las-marketing-leads-table th[data-column="phone"],
.las-marketing-leads-table td[data-column="phone"] { min-width: 170px; }
.las-marketing-leads-table th[data-column="course"],
.las-marketing-leads-table td[data-column="course"] { min-width: 360px; max-width: 440px; }
.las-marketing-leads-table th[data-column="site"],
.las-marketing-leads-table td[data-column="site"] { min-width: 190px; }
.las-marketing-leads-table th[data-column="utm_campaign"],
.las-marketing-leads-table td[data-column="utm_campaign"] { min-width: 250px; }
.las-marketing-leads-table th[data-column="utm_term"],
.las-marketing-leads-table td[data-column="utm_term"] { min-width: 290px; }
.las-marketing-leads-table th[data-column="landing_page"],
.las-marketing-leads-table td[data-column="landing_page"],
.las-marketing-leads-table th[data-column="page_referrer"],
.las-marketing-leads-table td[data-column="page_referrer"],
.las-marketing-leads-table th[data-column="subject"],
.las-marketing-leads-table td[data-column="subject"] { min-width: 340px; max-width: 420px; }

.las-marketing-column-sent-date strong,
.las-marketing-column-sent-date span {
    display: block;
}

.las-marketing-column-sent-date span {
    margin-top: 4px;
    color: var(--las-text-muted);
    font-size: 12px;
}

.las-marketing-table-link {
    display: block;
    max-width: 390px;
    overflow: hidden;
    color: var(--las-primary-dark);
    font-weight: 750;
    text-decoration: underline;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.las-marketing-columns-picker .las-columns-picker-panel {
    width: min(560px, 90vw);
}

.las-marketing-columns-picker .las-columns-picker-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(520px, 62vh);
    overflow-y: auto;
    padding-right: 4px;
}

.las-history-add-form .las-button-primary {
    min-width: 180px;
}

body.las-theme-dark .las-history-add-form .las-button-primary {
    border-color: var(--las-primary) !important;
    background: linear-gradient(180deg, #5b98ff 0%, var(--las-primary) 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(76, 141, 255, .24) !important;
}

@media (max-width: 1100px) {
    .las-marketing-columns-picker .las-columns-picker-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .las-marketing-columns-picker .las-columns-picker-panel {
        width: auto;
    }

    .las-marketing-columns-picker .las-columns-picker-list {
        grid-template-columns: 1fr;
        max-height: none;
    }
}

/* v0.7.56 — marketing leads use the CRM table and three-row filter pattern */
.las-marketing-filters-v2 {
    grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.las-marketing-filters-v2 .las-filter-search-main,
.las-marketing-filters-v2 .las-period-switcher {
    grid-column: 1 / -1;
}

.las-marketing-filters-v2 .las-filter-search-main input {
    width: 100%;
}

.las-marketing-filters-v2 .las-filter-actions {
    align-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.las-marketing-filters-v2 .las-filter-actions .las-button {
    min-height: 42px;
}

.las-marketing-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

.las-marketing-export-form {
    display: flex;
    margin: 0;
}

.las-export-button::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v10.17l3.59-3.58L18 11l-6 6-6-6 1.41-1.41L11 13.17V3ZM5 19h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v10.17l3.59-3.58L18 11l-6 6-6-6 1.41-1.41L11 13.17V3ZM5 19h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (min-width: 761px) {
    .las-marketing-leads-table.las-crm-table {
        width: max(100%, var(--las-marketing-table-min-width, 1180px));
        min-width: var(--las-marketing-table-min-width, 1180px);
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
    }

    .las-marketing-leads-table.las-crm-table th,
    .las-marketing-leads-table.las-crm-table td {
        min-width: 0 !important;
        box-sizing: border-box;
        padding: 15px 14px;
        vertical-align: middle;
    }

    .las-marketing-leads-table.las-crm-table .las-marketing-lead-row > td {
        height: var(--las-crm-row-height, 118px);
        min-height: var(--las-crm-row-height, 118px);
        padding-top: 24px;
        padding-bottom: 24px;
        vertical-align: middle;
    }

    .las-marketing-leads-table col.las-marketing-col-sent-date { width: 170px; }
    .las-marketing-leads-table col.las-marketing-col-lead-code { width: 190px; }
    .las-marketing-leads-table col.las-marketing-col-fullname { width: 250px; }
    .las-marketing-leads-table col.las-marketing-col-email { width: 250px; }
    .las-marketing-leads-table col.las-marketing-col-phone { width: 170px; }
    .las-marketing-leads-table col.las-marketing-col-course { width: 380px; }
    .las-marketing-leads-table col.las-marketing-col-organization { width: 170px; }
    .las-marketing-leads-table col.las-marketing-col-type { width: 105px; }
    .las-marketing-leads-table col.las-marketing-col-site { width: 190px; }
    .las-marketing-leads-table col.las-marketing-col-recipient-email { width: 250px; }
    .las-marketing-leads-table col.las-marketing-col-source { width: 150px; }
    .las-marketing-leads-table col.las-marketing-col-status { width: 170px; }
    .las-marketing-leads-table col.las-marketing-col-utm-source,
    .las-marketing-leads-table col.las-marketing-col-utm-medium { width: 180px; }
    .las-marketing-leads-table col.las-marketing-col-utm-campaign { width: 260px; }
    .las-marketing-leads-table col.las-marketing-col-utm-term { width: 300px; }
    .las-marketing-leads-table col.las-marketing-col-utm-content { width: 220px; }
    .las-marketing-leads-table col.las-marketing-col-landing-page,
    .las-marketing-leads-table col.las-marketing-col-subject { width: 360px; }
    .las-marketing-leads-table col.las-marketing-col-page-referrer { width: 320px; }
    .las-marketing-leads-table col.las-marketing-col-primary-call,
    .las-marketing-leads-table col.las-marketing-col-repeat-call { width: 190px; }
}

.las-marketing-leads-table .las-marketing-column-fullname,
.las-marketing-leads-table .las-marketing-column-course,
.las-marketing-leads-table .las-marketing-column-subject,
.las-marketing-leads-table .las-marketing-column-utm-campaign,
.las-marketing-leads-table .las-marketing-column-utm-term {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.las-marketing-lead-row .las-code-pill {
    max-width: 100%;
}

.las-marketing-lead-row:focus-visible {
    outline: 3px solid rgba(47, 111, 237, .25);
    outline-offset: -3px;
}

body.las-theme-dark .las-marketing-lead-row.las-status-row-new { background: #101a2b; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-enrolled { background: #10213a; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-contract-sent { background: #182234; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-thinking { background: #2b2117; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-client-refused,
body.las-theme-dark .las-marketing-lead-row.las-status-row-our-refused { background: #242b36; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-docs-checked,
body.las-theme-dark .las-marketing-lead-row.las-status-row-paid { background: #102b25; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-docs-missing { background: #2b2815; }
body.las-theme-dark .las-marketing-lead-row.las-status-row-no-contact { background: #2b1b22; }

@media (max-width: 1280px) {
    .las-marketing-filters-v2 {
        grid-template-columns: repeat(3, minmax(190px, 1fr));
    }

    .las-marketing-filters-v2 .las-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .las-marketing-filters-v2 {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .las-marketing-card-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .las-marketing-filters-v2 {
        grid-template-columns: 1fr;
    }

    .las-marketing-filters-v2 .las-filter-search-main,
    .las-marketing-filters-v2 .las-period-switcher,
    .las-marketing-filters-v2 .las-filter-actions {
        grid-column: auto;
    }

    .las-marketing-filters-v2 .las-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .las-marketing-card-actions,
    .las-marketing-export-form,
    .las-marketing-card-actions .las-button,
    .las-marketing-card-actions .las-columns-picker {
        width: 100%;
    }
}
