:root {
    --x-primary: #2563eb;
    --x-bg: #f6f8fb;
    --x-text: #0f172a;
    --x-muted: #64748b;
    --x-border: #e2e8f0;
    --x-sidebar: #0f172a;
}

body {
    margin: 0;
    background: var(--x-bg);
    color: var(--x-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.x-topbar {
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    z-index: 1030;
    min-height: 64px;
    background: #ffffff !important;
    border-bottom: 1px solid var(--x-border);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .03);
}

.x-topbar .navbar-brand,
.x-topbar .x-top-user,
.x-topbar button {
    color: #0f172a !important;
}

.x-brand-admin {
    color: var(--x-primary);
    font-size: 11px;
    letter-spacing: .08em;
}

.x-top-user {
    font-size: 13px;
    font-weight: 600;
}

.x-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    z-index: 1040;
    padding: 20px 14px;
    background: var(--x-sidebar);
    color: #fff;
}

.x-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 22px;
}

.x-sidebar-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #2563eb;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .25);
}

.x-sidebar-brand strong,
.x-sidebar-brand small {
    display: block;
}

.x-sidebar-brand small {
    color: #94a3b8;
    font-size: 11px;
}

.x-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.x-nav-title {
    padding: 18px 12px 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.x-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 11px 12px;
    color: #cbd5e1;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease;
}

.x-sidebar-nav a:hover,
.x-sidebar-nav a.active {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.x-sidebar-nav a.active {
    background: #2563eb;
}

.x-app-main {
    margin-left: 250px;
    padding: 88px 22px 30px;
    min-height: 100vh;
}

.x-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.x-page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.x-page-header p {
    margin: 4px 0 0;
    color: var(--x-muted);
    font-size: 13px;
}

.x-panel,
.x-stat-card,
.x-reminder-card {
    border: 1px solid var(--x-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .035);
}

.x-panel {
    overflow: hidden;
}

.x-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--x-border);
}

.x-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.x-panel-header p {
    margin: 4px 0 0;
    color: var(--x-muted);
    font-size: 11px;
}

.x-stat-card {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
}

.x-stat-label {
    color: var(--x-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.x-stat-card strong {
    display: block;
    margin-top: 7px;
    font-size: 26px;
    line-height: 1;
}

.x-stat-card small {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 11px;
}

.x-stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
}

.x-stat-icon.warning {
    background: #fff7ed;
    color: #ea580c;
}

.x-stat-icon.danger {
    background: #fef2f2;
    color: #dc2626;
}

.x-stat-icon.success {
    background: #ecfdf5;
    color: #059669;
}

.x-table {
    margin: 0;
}

.x-table thead th {
    border-top: none;
    border-bottom: 1px solid var(--x-border);
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.x-table td {
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
}

.x-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.x-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.x-badge.warning {
    background: #ffedd5;
    color: #c2410c;
}

.x-badge.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.x-badge.secondary {
    background: #e2e8f0;
    color: #475569;
}

.x-actions {
    white-space: nowrap;
}

.x-reminder-card {
    padding: 18px;
}

.x-reminder-card h4 {
    margin: 12px 0 2px;
    font-size: 16px;
    font-weight: 800;
}

.x-reminder-card p {
    margin: 0;
    color: var(--x-muted);
    font-size: 12px;
}

.x-reminder-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 21px;
}

.x-reminder-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
    padding: 13px;
    border-radius: 12px;
    background: #f8fafc;
}

.x-reminder-meta small,
.x-reminder-meta strong {
    display: block;
}

.x-reminder-meta small {
    color: var(--x-muted);
    font-size: 9px;
    text-transform: uppercase;
}

.x-reminder-meta strong {
    margin-top: 2px;
    font-size: 12px;
}

.x-modal {
    border: 0;
    border-radius: 15px;
    overflow: hidden;
}

.form-control {
    min-height: 42px;
    border-color: #dbe3ec;
    border-radius: 9px;
    font-size: 13px;
}

textarea.form-control {
    min-height: auto;
}

label {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.btn {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.dataTables_wrapper {
    padding: 15px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 6px 9px;
    background: #fff;
}

@media (max-width: 991.98px) {
    .x-sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    body.x-menu-open .x-sidebar {
        transform: translateX(0);
    }

    .x-topbar {
        left: 0;
    }

    .x-app-main {
        margin-left: 0;
        padding-left: 14px;
        padding-right: 14px;
    }

    .x-page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   LOGIN XPERTECH ADMIN
========================================================= */

.x-login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .13), transparent 30%),
        #f6f8fb;
}

.x-login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.x-login-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .10);
}

.x-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.x-login-logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #2563eb;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 10px 28px rgba(37, 99, 235, .24);
}

.x-login-brand h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.x-login-brand span {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.x-login-copy {
    margin-bottom: 22px;
}

.x-login-copy h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
}

.x-login-copy p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
}

.x-input-icon {
    position: relative;
}

.x-input-icon>i {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;
    color: #94a3b8;
    transform: translateY(-50%);
}

.x-input-icon .form-control {
    height: 46px;
    padding-left: 40px;
    padding-right: 42px;
}

.x-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    transform: translateY(-50%);
}

.x-login-button {
    height: 46px;
    margin-top: 8px;
}

.x-login-footer {
    margin-top: 24px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.x-login-alert {
    border-radius: 10px;
    font-size: 12px;
}


/* =========================================================
   USUARIOS
========================================================= */

.x-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.x-user-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 13px;
    font-weight: 800;
}

.x-user-cell strong {
    font-size: 12px;
}


/* =========================================================
   XPERTECH ADMIN PRO
========================================================= */

.x-eyebrow {
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.x-page-header-pro {
    margin-bottom: 22px;
}

.x-header-actions {
    display: flex;
    gap: 8px;
}

.x-kpi-card {
    height: 100%;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
}

.x-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.x-kpi-card>strong {
    display: block;
    margin-top: 14px;
    color: #0f172a;
    font-size: 27px;
    line-height: 1;
}

.x-kpi-card>small {
    display: block;
    margin-top: 9px;
    color: #94a3b8;
    font-size: 10px;
}

.x-kpi-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
}

.x-kpi-icon.primary {
    background: #eff6ff;
    color: #2563eb;
}

.x-kpi-icon.success {
    background: #ecfdf5;
    color: #059669;
}

.x-kpi-icon.warning {
    background: #fff7ed;
    color: #ea580c;
}

.x-kpi-icon.danger {
    background: #fef2f2;
    color: #dc2626;
}

.x-chart-wrap {
    position: relative;
    height: 310px;
    padding: 20px;
}

.x-chart-donut {
    height: 310px;
}

.x-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
}

.x-insight-card {
    height: 100%;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fff;
}

.x-insight-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.x-insight-value {
    margin: 8px 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
}

.x-insight-card small {
    color: #94a3b8;
    font-size: 10px;
}

.x-progress {
    height: 6px;
    margin: 11px 0 8px;
    border-radius: 99px;
    background: #e2e8f0;
}

.x-progress .progress-bar {
    border-radius: 99px;
    background: #2563eb;
}

.x-top-list {
    padding: 6px 18px 12px;
}

.x-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #f1f5f9;
}

.x-top-row:last-child {
    border-bottom: 0;
}

.x-rank {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex: 0 0 27px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}

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

.x-top-main strong,
.x-top-main small {
    display: block;
}

.x-top-main strong {
    overflow: hidden;
    color: #334155;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.x-top-main small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 9px;
}

.x-top-value {
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.x-mini-kpi {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
}

.x-mini-kpi span,
.x-mini-kpi strong,
.x-mini-kpi small {
    display: block;
}

.x-mini-kpi span {
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.x-mini-kpi strong {
    margin: 5px 0;
    font-size: 20px;
}

.x-mini-kpi small {
    color: #94a3b8;
    font-size: 9px;
}

.x-filter-row {
    border-bottom: 1px solid #f1f5f9;
}

.x-plan-label {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.x-reminder-pro {
    height: 100%;
}

.dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dt-buttons .dt-button {
    margin: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #475569 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

.dataTables_filter input {
    min-width: 220px;
}

@media (max-width: 767px) {
    .x-header-actions {
        width: 100%;
    }

    .x-header-actions .btn {
        flex: 1;
    }

    .x-chart-wrap,
    .x-chart-donut {
        height: 260px;
    }
}


/* =========================================================
   MENSAJES WHATSAPP
========================================================= */

.x-message-editor {
    min-height: 330px;
    resize: vertical;
    line-height: 1.65;
    font-family: inherit;
}

.x-template-vars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.x-template-vars code {
    padding: 7px 10px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   CLIENTES - KPI + DATATABLE + FORM PRO
========================================================= */

.x-client-kpi-grid {
    margin-bottom: 2px;
}

.x-client-kpi {
    width: 100%;
    min-height: 106px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fff;
    text-align: left;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .035);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    cursor: pointer;
}

.x-client-kpi:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .065);
}

.x-client-kpi.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.x-client-kpi-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 16px;
}

.x-client-kpi-icon.is-success {
    background: #ecfdf5;
    color: #059669;
}

.x-client-kpi-icon.is-warning {
    background: #fff7ed;
    color: #ea580c;
}

.x-client-kpi-icon.is-danger {
    background: #fef2f2;
    color: #dc2626;
}

.x-client-kpi-icon.is-muted {
    background: #f8fafc;
    color: #64748b;
}

.x-client-kpi-icon.is-primary {
    background: #eef2ff;
    color: #4f46e5;
}

.x-client-kpi-body {
    min-width: 0;
    display: block;
}

.x-client-kpi-body small,
.x-client-kpi-body strong,
.x-client-kpi-body em {
    display: block;
}

.x-client-kpi-body small {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.x-client-kpi-body strong {
    color: #0f172a;
    font-size: 22px;
    line-height: 1.05;
}

.x-client-kpi-body em {
    margin-top: 5px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 9px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.x-client-table-header {
    border-bottom: 1px solid #f1f5f9;
}

.x-client-name {
    min-width: 210px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.x-client-name>span:last-child {
    min-width: 0;
}

.x-client-name strong,
.x-client-name small {
    display: block;
}

.x-client-name strong {
    color: #334155;
    font-size: 11px;
}

.x-client-name small {
    max-width: 210px;
    margin-top: 2px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.x-client-avatar {
    width: 31px;
    height: 31px;
    display: grid !important;
    place-items: center;
    flex: 0 0 31px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
}

.x-phone-value,
.x-date-value,
.x-muted-value,
.x-plan-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.x-phone-value {
    color: #475569;
    font-size: 10px;
}

.x-phone-value i {
    color: #16a34a;
}

.x-muted-value {
    color: #94a3b8;
    font-size: 10px;
}

.x-date-value {
    color: #475569;
    font-size: 10px;
}

.x-date-value i {
    color: #94a3b8;
}

.x-plan-pill {
    padding: 5px 8px;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 9px;
    font-weight: 800;
}

.x-plan-pill i {
    color: #94a3b8;
}

.x-mrr-value {
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
}

.x-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 27px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.x-status-pill small {
    min-width: 20px;
    padding: 3px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    font-size: 8px;
    text-align: center;
}

.x-status-pill.success {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #047857;
}

.x-status-pill.warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.x-status-pill.danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.x-status-pill.neutral {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.x-migration-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
}

.x-migration-pill.yes {
    background: #eef2ff;
    color: #4f46e5;
}

.x-migration-pill.no {
    background: #f8fafc;
    color: #94a3b8;
}

.x-action-btn {
    width: 31px;
    height: 31px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: none;
}

.x-action-btn.whatsapp {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #16a34a;
}

.x-action-btn.whatsapp:hover {
    background: #16a34a;
    color: #fff;
}

.x-action-btn.edit {
    color: #64748b;
}

.x-action-btn.edit:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
}

.x-form-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 6px 0 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.x-form-section-title:not(:first-child) {
    margin-top: 18px;
}

.x-form-section-title i {
    color: #2563eb;
}

.x-input-icon {
    position: relative;
}

.x-input-icon>span {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 11px;
    pointer-events: none;
}

.x-input-icon .form-control {
    padding-left: 37px;
}

.x-input-icon select.form-control {
    padding-left: 37px;
}

.x-textarea-icon>span {
    top: 14px;
    transform: none;
}

.x-textarea-icon textarea.form-control {
    padding-left: 37px;
}

.x-modal .form-group label {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.x-modal .form-control {
    min-height: 39px;
    border-color: #e2e8f0;
    border-radius: 9px;
    color: #334155;
    font-size: 11px;
    box-shadow: none;
}

.x-modal .form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

@media (max-width: 1199px) {
    .x-client-kpi {
        min-height: 96px;
    }
}

@media (max-width: 767px) {
    .x-client-kpi {
        min-height: 88px;
    }

    .x-client-table-header {
        align-items: flex-start;
        gap: 10px;
    }
}

/* =========================================================
   SOLICITUDES
========================================================= */
.x-request-kpi {
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fff;
    text-align: left;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .035);
    cursor: pointer;
    transition: .16s ease
}

.x-request-kpi:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .065)
}

.x-request-kpi.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08)
}

.x-request-kpi small,
.x-request-kpi strong,
.x-request-kpi em {
    display: block
}

.x-request-kpi small {
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase
}

.x-request-kpi strong {
    margin: 3px 0;
    color: #0f172a;
    font-size: 22px
}

.x-request-kpi em {
    color: #94a3b8;
    font-size: 9px;
    font-style: normal
}

.x-request-kpi-icon {
    width: 41px;
    height: 41px;
    display: grid !important;
    place-items: center;
    flex: 0 0 41px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb
}

.x-request-kpi-icon.neutral {
    background: #f8fafc;
    color: #64748b
}

.x-request-kpi-icon.warning {
    background: #fff7ed;
    color: #ea580c
}

.x-request-kpi-icon.success {
    background: #ecfdf5;
    color: #059669
}

.x-request-kpi-icon.danger {
    background: #fef2f2;
    color: #dc2626
}

.x-request-title {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 10px
}

.x-request-title strong,
.x-request-title small {
    display: block
}

.x-request-title strong {
    color: #334155;
    font-size: 11px
}

.x-request-title small {
    max-width: 310px;
    margin-top: 3px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.x-request-type-icon {
    width: 31px;
    height: 31px;
    display: grid !important;
    place-items: center;
    flex: 0 0 31px;
    border-radius: 9px;
    background: #fff7ed;
    color: #ea580c
}

.x-request-client,
.x-request-date,
.x-request-user {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: 10px;
    white-space: nowrap
}

.x-request-client i,
.x-request-date i,
.x-request-user i {
    color: #94a3b8
}

.x-request-muted {
    color: #94a3b8;
    font-size: 10px
}

.x-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap
}

.x-type-pill i {
    color: #94a3b8
}

.x-priority-pill,
.x-request-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap
}

.x-priority-pill.low {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0
}

.x-priority-pill.medium {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe
}

.x-priority-pill.high {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa
}

.x-priority-pill.urgent {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca
}

.x-request-status.neutral {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0
}

.x-request-status.info {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc
}

.x-request-status.primary {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe
}

.x-request-status.warning {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa
}

.x-request-status.success {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0
}

.x-request-status.dark {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1
}


/* SOLICITUDES - ACCIONES WHATSAPP */
.x-request-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.x-request-actions .x-action-btn.whatsapp {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #16a34a;
}

.x-request-actions .x-action-btn.whatsapp:hover:not(.disabled) {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.x-request-actions .x-action-btn.whatsapp.disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #cbd5e1;
    cursor: not-allowed;
}


/* =========================================================
   SELECT2 XPERTECH - CLIENTES
========================================================= */

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 39px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    height: 37px;
    display: flex;
    align-items: center;
    padding-left: 37px !important;
    padding-right: 34px !important;
    color: #334155 !important;
    font-size: 11px !important;
    line-height: 37px !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 6px !important;
    right: 7px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 28px;
    top: 8px;
    color: #94a3b8;
    font-size: 15px;
}

.x-input-icon .select2-container+span,
.x-input-icon>span:first-child {
    z-index: 5;
}

.select2-dropdown {
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}

.select2-search--dropdown {
    padding: 9px !important;
    border-bottom: 1px solid #f1f5f9;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 36px;
    padding: 0 11px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    color: #334155;
    font-size: 11px;
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .07);
}

.select2-results__options {
    max-height: 250px !important;
    padding: 5px;
}

.select2-container--default .select2-results__option {
    margin: 2px 0;
    padding: 8px 10px !important;
    border-radius: 7px;
    color: #475569;
    font-size: 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #eff6ff !important;
    color: #2563eb !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: #2563eb !important;
    color: #fff !important;
}

/* =========================================================
   DASHBOARD - KPI SOLICITUDES
========================================================= */

.x-smart-kpi-link {
    display: block;
    color: inherit !important;
    text-decoration: none !important;
}

.x-smart-kpi-card {
    min-height: 100px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.x-smart-kpi-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.x-smart-kpi-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    border-radius: 12px;
    font-size: 16px;
}

.x-smart-kpi-icon.neutral {
    background: #f8fafc;
    color: #64748b;
}

.x-smart-kpi-icon.warning {
    background: #fff7ed;
    color: #ea580c;
}

.x-smart-kpi-content {
    min-width: 0;
    flex: 1;
}

.x-smart-kpi-content span,
.x-smart-kpi-content strong,
.x-smart-kpi-content small {
    display: block;
}

.x-smart-kpi-content span {
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.x-smart-kpi-content strong {
    margin: 4px 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
}

.x-smart-kpi-content small {
    color: #94a3b8;
    font-size: 9px;
}

.x-smart-kpi-arrow {
    color: #cbd5e1;
    font-size: 11px;
    transition: transform .16s ease, color .16s ease;
}

.x-smart-kpi-card:hover .x-smart-kpi-arrow {
    transform: translateX(3px);
    color: #2563eb;
}


/* =========================================================
   SELECT2 MODAL FIX
========================================================= */

.modal .select2-container {
    width: 100% !important;
    display: block;
}

.modal .select2-dropdown {
    z-index: 1065 !important;
}

.modal .select2-container--open {
    z-index: 1065 !important;
}

.modal .select2-search__field {
    width: 100% !important;
}

.x-input-icon .select2-container {
    position: relative;
    z-index: 2;
}

.x-input-icon>span:first-child {
    z-index: 4;
    pointer-events: none;
}


/* =========================================================
   SELECT2 SOLICITUDES - FIX POSICION / SCROLL
========================================================= */

#modalNuevaSolicitud .select2-container,
#modalEditarSolicitud .select2-container {
    width: 100% !important;
    display: block !important;
}

#modalNuevaSolicitud .select2-container--open,
#modalEditarSolicitud .select2-container--open {
    z-index: 1070 !important;
}

#modalNuevaSolicitud .select2-dropdown,
#modalEditarSolicitud .select2-dropdown {
    z-index: 1071 !important;
}

#modalNuevaSolicitud .select2-search--dropdown,
#modalEditarSolicitud .select2-search--dropdown {
    position: relative;
}

#modalNuevaSolicitud .select2-search__field,
#modalEditarSolicitud .select2-search__field {
    width: 100% !important;
}

body.modal-open {
    overflow: hidden;
}

/* El icono del input nunca debe capturar el click */
#modalNuevaSolicitud .x-input-icon>span:first-child,
#modalEditarSolicitud .x-input-icon>span:first-child {
    pointer-events: none !important;
}

/* =========================================================
   SELECT2 SOLICITUDES - FIX 3 (BODY OVERLAY)
========================================================= */

/* Select2 inserta el dropdown en body. Debe estar sobre Bootstrap modal (1050). */
body>.select2-container--open {
    z-index: 20000 !important;
}

body>.select2-container--open .select2-dropdown {
    z-index: 20000 !important;
    overflow: visible !important;
}

/* La selección visible sí permanece dentro del campo del modal. */
#modalNuevaSolicitud .select2-container,
#modalEditarSolicitud .select2-container {
    width: 100% !important;
    position: relative !important;
    z-index: auto !important;
}

#modalNuevaSolicitud .select2-selection,
#modalEditarSolicitud .select2-selection {
    cursor: pointer !important;
    pointer-events: auto !important;
}

#modalNuevaSolicitud .select2-selection__rendered,
#modalEditarSolicitud .select2-selection__rendered,
#modalNuevaSolicitud .select2-selection__arrow,
#modalEditarSolicitud .select2-selection__arrow {
    pointer-events: auto !important;
}


/* =========================================================
   DATATABLES - ESTILO XPERTECH MODERNO
========================================================= */

/* Contenedor inferior: info + paginación */
.dataTables_wrapper .row:last-child {
    align-items: center;
    margin-top: 18px !important;
    padding: 10px 4px 6px;
}

/* Texto: Mostrando registros... */
.dataTables_wrapper .dataTables_info {
    padding-top: 0 !important;
    color: #94a3b8 !important;
    font-size: 11px !important;
    font-weight: 500;
}

/* Contenedor paginación */
.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 0 !important;
}

/* Botones generales */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    margin: 0 3px !important;
    padding: 0 10px !important;

    border: none !important;
    border-radius: 9px !important;

    background: transparent !important;
    color: #475569 !important;

    font-size: 10px !important;
    font-weight: 700 !important;

    box-shadow: none !important;
    transition: all .18s ease;
}

/* Hover */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border: none !important;
    background: #f1f5f9 !important;
    color: #2563eb !important;
}

/* Página activa */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border: none !important;
    background: #2563eb !important;
    color: #ffffff !important;

    box-shadow: 0 5px 14px rgba(37, 99, 235, .25) !important;
}

/* Anterior / Siguiente */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    min-width: auto !important;
    padding: 0 9px !important;

    color: #64748b !important;
    font-size: 10px !important;
}

/* Anterior / siguiente hover */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.next:hover {
    background: transparent !important;
    color: #2563eb !important;
}

/* Deshabilitados */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: transparent !important;
    color: #cbd5e1 !important;
    cursor: default !important;
}

/* Puntos suspensivos */
.dataTables_wrapper .dataTables_paginate .ellipsis {
    padding: 0 5px;
    color: #cbd5e1;
    font-size: 11px;
}

/* =========================================================
   BUSCADOR
========================================================= */

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .dataTables_filter label {
    margin: 0;
    color: #64748b;
    font-size: 10px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 220px;
    height: 36px;

    margin-left: 8px !important;
    padding: 0 12px !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 9px !important;

    background: #ffffff !important;
    color: #334155 !important;

    font-size: 11px !important;
    outline: none !important;

    box-shadow: none !important;
    transition: all .18s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08) !important;
}

/* =========================================================
   SELECT "MOSTRAR X REGISTROS"
========================================================= */

.dataTables_wrapper .dataTables_length {
    color: #64748b;
    font-size: 10px;
}

.dataTables_wrapper .dataTables_length select {
    height: 34px;

    margin: 0 5px;
    padding: 0 28px 0 10px;

    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;

    background-color: #fff;
    color: #475569;

    font-size: 10px;
    font-weight: 600;

    box-shadow: none !important;
}

/* =========================================================
   TABLA
========================================================= */

table.dataTable {
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

table.dataTable thead th {
    padding: 12px 14px !important;

    border-top: none !important;
    border-bottom: 1px solid #e2e8f0 !important;

    background: #f8fafc;

    color: #64748b !important;

    font-size: 11px !important;
    font-weight: 800 !important;

    letter-spacing: .035em;
    text-transform: uppercase;
}

table.dataTable tbody td {
    padding: 11px 14px !important;

    border-top: none !important;
    border-bottom: 1px solid #f1f5f9 !important;

    color: #475569;

    font-size: 11px;
    vertical-align: middle;
}

/* Hover en fila */
table.dataTable tbody tr {
    transition: background .15s ease;
}

table.dataTable tbody tr:hover {
    background: #f8fafc !important;
}

/* Eliminar borde inferior feo de DataTables */
table.dataTable.no-footer {
    border-bottom: none !important;
}

/* =========================================================
   BOTONES EXPORTAR
========================================================= */

.dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dataTables_wrapper .dt-buttons .dt-button {
    height: 34px !important;

    margin: 0 !important;
    padding: 0 11px !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;

    background: #ffffff !important;
    color: #475569 !important;

    font-size: 10px !important;
    font-weight: 700 !important;

    box-shadow: none !important;

    transition: all .18s ease;
}

.dataTables_wrapper .dt-buttons .dt-button:hover {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
    color: #2563eb !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 767px) {

    .dataTables_wrapper .dataTables_filter {
        margin-top: 10px;
        text-align: left;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 0;
        margin-left: 0 !important;
        margin-top: 5px;
    }

    .dataTables_wrapper .dataTables_info {
        margin-bottom: 10px;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        min-width: 32px !important;
        height: 32px !important;
        margin: 0 1px !important;
    }

}