/* Variables y reset */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --accent: #3182ce;
    --success: #38a169;
    --danger: #e53e3e;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-600: #718096;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    --shadow: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-100);
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 40%, #3b82f6 100%);
}

.login-container {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    color: #1d4ed8;
    margin-bottom: 0.25rem;
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--gray-800);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--gray-800);
}
.btn-secondary:hover {
    background: var(--gray-600);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    filter: brightness(1.08);
}

.btn-block {
    width: 100%;
}

/* Layout con sidebar */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--primary);
    color: white;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 1.1rem;
}

.sidebar nav a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}
.sidebar nav a:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.sidebar nav a.active {
    background: rgba(255,255,255,0.18);
    border-left: 4px solid #fff;
    font-weight: 600;
    padding-left: calc(1.25rem - 4px);
}

.encuesta-sidebar .sidebar-section-label {
    padding: 0 1.25rem 0.5rem;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

.encuesta-sidebar nav .nav-form-code {
    display: inline-block;
    min-width: 2rem;
    margin-right: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.65);
}

.encuesta-sucursal-switcher {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 0.75rem;
}

.encuesta-sucursal-switcher label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.35rem;
}

.encuesta-sucursal-select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
}

.encuesta-sucursal-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.18);
}

.encuesta-sucursal-select option {
    color: var(--gray-900);
    background: #fff;
}

.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-x: auto;
}

/* Header de página */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-800);
}

tr:hover {
    background: var(--gray-100);
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
}

.alert-info {
    background: #bee3f8;
    color: #2b6cb0;
}

/* Survey form specific */
.survey-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    margin: -1.5rem -2rem 1.5rem -2rem;
}

.survey-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.survey-header-left h1 {
    font-size: 1.5rem;
    margin: 0;
}

.survey-header--identified {
    gap: 1rem;
    border-bottom: 4px solid var(--form-color, var(--primary));
}

.survey-header--identified .survey-header-left {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.form-code-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    height: 3.25rem;
    padding: 0 0.5rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.35);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.survey-header-titles {
    min-width: 0;
}

.survey-header-context {
    margin: 0 0 0.15rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

.survey-header--identified h1 {
    font-size: 1.65rem;
    line-height: 1.2;
}

.survey-header-desc {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    max-width: 42rem;
}

.form-identity-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: -1.5rem -1.5rem 1.25rem;
    padding: 0.85rem 1.25rem;
    background: var(--form-color-light, var(--gray-100));
    border-left: 5px solid var(--form-color, var(--primary));
    border-bottom: 1px solid var(--gray-200);
}

.form-identity-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2rem;
    padding: 0 0.45rem;
    border-radius: 4px;
    background: var(--form-color, var(--primary));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.form-identity-text {
    font-size: 0.95rem;
    color: var(--gray-800);
}

.form-identity-text strong {
    color: var(--gray-900);
}

.card--encuesta {
    border-top: 4px solid var(--form-color, var(--primary));
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

/* Plataforma de captura (rol responsable) */
.encuesta-page {
    --enc-accent: #2563eb;
    --enc-accent-dark: #1d4ed8;
}

.encuesta-page .encuesta-sidebar {
    background: linear-gradient(180deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
    box-shadow: 4px 0 24px rgba(37, 99, 235, 0.15);
}

.encuesta-page .encuesta-sidebar .sidebar-header {
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

.encuesta-page .encuesta-sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.encuesta-page .encuesta-sidebar nav a.active {
    background: rgba(255, 255, 255, 0.24);
    border-left: 4px solid #fde68a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.encuesta-page .encuesta-sidebar nav .nav-form-code {
    color: rgba(255, 255, 255, 0.85);
}

.encuesta-page .main-content {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 120px, #f1f5f9 100%);
}

.encuesta-page .survey-header--identified {
    background: linear-gradient(125deg, var(--form-color) 0%, var(--form-color-dark, var(--form-color)) 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
}

.encuesta-page .form-code-badge {
    background: #ffffff;
    color: var(--form-color);
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.encuesta-page .form-identity-banner {
    border-left-width: 6px;
    border-radius: 0 8px 8px 0;
}

.encuesta-page .form-identity-badge {
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.encuesta-page .card--encuesta .card-title {
    color: var(--form-color, var(--gray-900));
    border-bottom: 2px solid color-mix(in srgb, var(--form-color) 25%, transparent);
}

.encuesta-page .survey-form-section h3 {
    border-bottom-color: var(--form-color, var(--primary));
}

.encuesta-page .form-group input:focus,
.encuesta-page .form-group select:focus,
.encuesta-page .form-group textarea:focus {
    border-color: var(--form-color, var(--accent));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--form-color, #2563eb) 22%, transparent);
}

.encuesta-page .card--encuesta .btn-primary {
    background: linear-gradient(135deg, var(--form-color) 0%, var(--form-color-dark, var(--form-color)) 100%);
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--form-color) 35%, transparent);
    transition: filter 0.2s, transform 0.15s;
}

.encuesta-page .card--encuesta .btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.encuesta-page .radio-option input {
    accent-color: var(--form-color, var(--accent));
}

.encuesta-page--dealers { --form-color: #f97316; --form-color-dark: #ea580c; --form-color-light: #fff7ed; }
.encuesta-page--csi { --form-color: #2563eb; --form-color-dark: #1d4ed8; --form-color-light: #eff6ff; }
.encuesta-page--actualizacion { --form-color: #22c55e; --form-color-dark: #16a34a; --form-color-light: #f0fdf4; }
.encuesta-page--ssi-sales { --form-color: #9333ea; --form-color-dark: #7e22ce; --form-color-light: #f3e8ff; }
.encuesta-page--personalizado { --form-color: #6366f1; --form-color-dark: #4f46e5; --form-color-light: #eef2ff; }

.survey-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.survey-header-logout {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    text-decoration: none;
}

.survey-header-logout:hover {
    text-decoration: underline;
}

.survey-header-logo {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.survey-form-section {
    margin-bottom: 2rem;
}

.survey-form-section h3 {
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Radio options */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.radio-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.question-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.question-block label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Scale 0-10 */
.scale-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.scale-input input[type="number"],
.scale-input .scale-text {
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--gray-900);
    background: white;
}

.scale-input input[type="number"]:focus,
.scale-input .scale-text:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.scale-input input[type="number"] {
    width: 80px;
    flex-shrink: 0;
}

.scale-input .scale-text {
    flex: 1;
    min-width: 200px;
}

/* Logout link */
.logout-link {
    color: rgba(255,255,255,0.9);
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-decoration: none;
}

.table-link {
    font-weight: 600;
    color: var(--accent);
}
.table-link:hover {
    text-decoration: underline;
}

/* Modals (admin) */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 3rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-dialog--sucursal {
    max-width: 720px;
}

.modal-dialog--sucursal .modal-body textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.modal-dialog--sucursal .form-group input[type="text"],
.modal-dialog--sucursal .form-group textarea {
    width: 100%;
}

.modal-dialog--cliente {
    max-width: 760px;
}

.modal-dialog--cliente .form-group input[type="text"],
.modal-dialog--cliente .form-group input[type="date"],
.modal-dialog--cliente .form-group input[type="file"] {
    width: 100%;
}

.modal-dialog--cliente .modal-help-text {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .modal-dialog--sucursal .form-row,
    .modal-dialog--cliente .form-row {
        grid-template-columns: 1fr;
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin: 0;
}

.modal-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 400;
}

.modal-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--gray-200);
    color: var(--gray-800);
    border-radius: 6px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-close:hover {
    background: var(--gray-300);
}

.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.sucursales-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem 1rem;
    max-height: 160px;
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--gray-50);
}

.sucursal-check-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--gray-800);
    cursor: pointer;
    margin: 0;
}

.sucursal-check-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0.9rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-800);
}

.form-group .form-check {
    display: flex;
}

.form-check input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-label-hint {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray-600);
    margin-top: 0.15rem;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.table-action-form {
    display: inline;
    margin: 0;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-badge--active {
    background: #c6f6d5;
    color: #276749;
}

.status-badge--inactive {
    background: #fed7d7;
    color: #c53030;
}

@media (max-width: 640px) {
    .modal-overlay {
        padding: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Dashboard admin */
.dashboard-page {
    --dash-csi: #2563eb;
    --dash-act: #22c55e;
    --dash-ssi: #9333ea;
    --dash-dealers: #f97316;
    --dash-cyan: #06b6d4;
    --dash-indigo: #6366f1;
    --dash-line: #0ea5e9;
}

.dashboard-page .main-content {
    background: linear-gradient(180deg, #eef2f7 0%, var(--gray-100) 120px);
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.dashboard-hero h1 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--gray-900);
}

.dashboard-hero-sub {
    margin: 0.35rem 0 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.dashboard-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.dashboard-date {
    font-size: 0.88rem;
    color: var(--gray-600);
    padding: 0.4rem 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.25rem 1.35rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--dash-csi);
}

.kpi-card--primary {
    border-left-color: var(--dash-csi);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}
.kpi-card--accent {
    border-left-color: var(--dash-cyan);
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}
.kpi-card--today {
    border-left-color: var(--dash-act);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}
.kpi-card--clients {
    border-left-color: var(--dash-indigo);
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
}
.kpi-card--nps-good {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}
.kpi-card--nps-mid {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}
.kpi-card--nps-low {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.kpi-icon {
    font-size: 1.75rem;
    line-height: 1;
    opacity: 0.85;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
}

.kpi-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.15rem;
}

.dashboard-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: white;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
    border-top: 3px solid var(--gray-300);
}

a.form-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.form-pill--csi { border-top-color: var(--dash-csi); }
.form-pill--act { border-top-color: var(--dash-act); }
.form-pill--ssi { border-top-color: var(--dash-ssi); }
.form-pill--dealers { border-top-color: var(--dash-dealers); }

.dashboard-page .form-pill--csi .form-pill-count { color: var(--dash-csi); }
.dashboard-page .form-pill--act .form-pill-count { color: var(--dash-act); }
.dashboard-page .form-pill--ssi .form-pill-count { color: var(--dash-ssi); }
.dashboard-page .form-pill--dealers .form-pill-count { color: var(--dash-dealers); }

.dashboard-page .form-pill {
    border-top-width: 4px;
}

.form-pill-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.form-pill-label {
    font-size: 0.82rem;
    color: var(--gray-600);
    text-align: center;
}

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

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

.dashboard-chart-card {
    margin-bottom: 0;
}

.dashboard-chart-card--wide {
    min-height: 340px;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-title-row .card-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.card-hint {
    font-size: 0.82rem;
    color: var(--gray-600);
}

.chart-wrap {
    position: relative;
    height: 220px;
}

.chart-wrap--tall {
    height: 260px;
}

.chart-wrap--donut {
    height: 200px;
    max-width: 220px;
    margin: 0 auto;
}

.donut-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--gray-600);
}

.donut-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dashboard-insights .insights-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.insights-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.insights-list li:last-child {
    border-bottom: none;
}

.insights-label {
    flex: 1;
    font-size: 0.88rem;
    color: var(--gray-600);
    min-width: 120px;
}

.insights-value {
    font-weight: 700;
    color: var(--gray-900);
}

.insights-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.insights-badge--up {
    background: #c6f6d5;
    color: #276749;
}

.insights-badge--down {
    background: #fed7d7;
    color: #c53030;
}

.insights-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.insights-link:hover {
    text-decoration: underline;
}

.insights-subtitle {
    font-size: 0.9rem;
    color: var(--gray-800);
    margin: 0 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: grid;
    gap: 0.15rem;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    width: fit-content;
}

.activity-type--csi { background: #dbeafe; color: #1d4ed8; }
.activity-type--act { background: #dcfce7; color: #16a34a; }
.activity-type--ssi { background: #f3e8ff; color: #7e22ce; }
.activity-type--other { background: var(--gray-200); color: var(--gray-800); }

.activity-detail {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--gray-900);
}

.activity-meta {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.dashboard-table .table-zero {
    color: var(--gray-600);
}

.table-bar {
    background: var(--gray-200);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    min-width: 80px;
}

.table-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dash-csi), var(--dash-line));
    border-radius: 4px;
    transition: width 0.4s ease;
}

@media (max-width: 1100px) {
    .dashboard-kpi-grid,
    .dashboard-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 640px) {
    .dashboard-kpi-grid,
    .dashboard-form-grid {
        grid-template-columns: 1fr;
    }

    .kpi-value {
        font-size: 1.6rem;
    }
}

/* Reportes admin */
.reportes-page {
    --rep-csi: #2563eb;
    --rep-act: #22c55e;
    --rep-ssi: #9333ea;
    --rep-dealers: #f97316;
    --rep-active: var(--rep-csi);
}

.reportes-page--csi { --rep-active: var(--rep-csi); }
.reportes-page--actualizacion { --rep-active: var(--rep-act); }
.reportes-page--ssi_sales { --rep-active: var(--rep-ssi); }
.reportes-page--dealers { --rep-active: var(--rep-dealers); }

.reportes-page .main-content {
    background: linear-gradient(180deg, #eef2f7 0%, var(--gray-100) 140px);
}

.reportes-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
}

.reportes-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.report-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 118px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: white;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--gray-300);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.report-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.report-tab--csi { border-top-color: var(--rep-csi); }
.report-tab--actualizacion { border-top-color: var(--rep-act); }
.report-tab--ssi_sales { border-top-color: var(--rep-ssi); }
.report-tab--dealers { border-top-color: var(--rep-dealers); }

.report-tab--csi .report-tab-count { color: var(--rep-csi); }
.report-tab--actualizacion .report-tab-count { color: var(--rep-act); }
.report-tab--ssi_sales .report-tab-count { color: var(--rep-ssi); }
.report-tab--dealers .report-tab-count { color: var(--rep-dealers); }

.report-tab.is-active {
    background: linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--rep-active) 8%, white) 100%);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--rep-active) 25%, transparent);
    transform: translateY(-1px);
}

.report-tab-count {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.report-tab-label {
    font-size: 0.78rem;
    color: var(--gray-600);
    text-align: center;
    font-weight: 600;
}

.report-tab.is-active .report-tab-label {
    color: var(--gray-800);
}

.report-tab.has-data:not(.is-active) {
    font-weight: 600;
}

.report-tab--csi.has-data:not(.is-active) {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rep-csi) 40%, transparent);
}
.report-tab--actualizacion.has-data:not(.is-active) {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rep-act) 40%, transparent);
}
.report-tab--ssi_sales.has-data:not(.is-active) {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rep-ssi) 40%, transparent);
}
.report-tab--dealers.has-data:not(.is-active) {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rep-dealers) 40%, transparent);
}

.report-filter-hint {
    margin-bottom: 1rem;
}

.report-filter-hint-link {
    font-weight: 600;
    text-decoration: none;
}

.report-filter-hint-link--dealers { color: var(--rep-dealers); }
.report-filter-hint-link--csi { color: var(--rep-csi); }
.report-filter-hint-link--actualizacion { color: var(--rep-act); }
.report-filter-hint-link--ssi_sales { color: var(--rep-ssi); }

.report-filter-hint-link:hover {
    text-decoration: underline;
}

.reportes-search-form {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
}

.reportes-search-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.85rem 1rem;
    align-items: end;
}

.reportes-search-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reportes-search-field label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-600);
}

.reportes-search-field input[type="search"],
.reportes-search-field input[type="date"] {
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    font-size: 0.92rem;
    min-height: 42px;
}

.reportes-search-field--actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding-bottom: 0.1rem;
}

.reportes-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.reportes-list-summary {
    margin: 0;
    font-size: 0.92rem;
    color: var(--gray-600);
}

.reportes-per-page-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reportes-per-page-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
}

.reportes-per-page-form select {
    padding: 0.4rem 0.65rem;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    background: white;
}

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

    .reportes-search-field--wide {
        grid-column: 1 / -1;
    }

    .reportes-search-field--actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .reportes-search-grid {
        grid-template-columns: 1fr;
    }
}

.reportes-filter select {
    min-width: 200px;
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
}

.report-stat-card {
    border-left: 5px solid var(--rep-active);
    background: linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--rep-active) 10%, white) 100%);
    box-shadow: var(--shadow);
}

.report-stat-card .stat-value {
    color: var(--rep-active);
    font-weight: 800;
}

.report-chart-card {
    border-top: 3px solid var(--rep-active);
}

.report-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.report-chart-wrap {
    height: 260px;
    position: relative;
}

.report-list-card {
    border-top: 3px solid var(--rep-active);
}

.report-list-hint {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.report-table thead th {
    background: color-mix(in srgb, var(--rep-active) 12%, white);
    color: var(--gray-800);
}

.report-btn-detail {
    border-color: var(--rep-active);
    color: var(--rep-active);
}

.report-btn-detail:hover {
    background: var(--rep-active);
    color: white;
}

.report-detail-card {
    border-left: 5px solid var(--rep-active);
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

/* Formularios por sucursal — filtros y agrupación */
.formularios-list-card {
    overflow: hidden;
}

.formularios-list-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.formularios-list-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.formularios-sucursal-filter select {
    min-width: 220px;
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: white;
}

.form-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-filter-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 100px;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: white;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--tab-color, var(--gray-300));
    transition: transform 0.15s, box-shadow 0.15s;
}

.form-filter-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.form-filter-tab.is-active {
    background: linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--tab-color) 10%, white) 100%);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--tab-color) 22%, transparent);
}

.form-filter-tab-count {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tab-color, var(--gray-800));
    line-height: 1.1;
}

.form-filter-tab-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    text-align: center;
}

.form-group-block {
    margin-bottom: 1.75rem;
}

.form-group-block:last-child {
    margin-bottom: 0;
}

.form-group-block-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: color-mix(in srgb, var(--group-color) 8%, white);
    border-left: 4px solid var(--group-color);
    border-radius: 0 8px 8px 0;
}

.form-group-block-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-900);
    flex: 1;
}

.form-group-block-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--group-color);
    flex-shrink: 0;
}

.form-group-block-count {
    font-size: 0.82rem;
    color: var(--gray-600);
    font-weight: 500;
}

.formularios-table thead th {
    background: var(--gray-100);
    font-size: 0.85rem;
}

.form-type-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-800);
}

.form-type-badge--csi { background: #dbeafe; color: #1d4ed8; }
.form-type-badge--actualizacion_datos { background: #dcfce7; color: #15803d; }
.form-type-badge--ssi_sales { background: #f3e8ff; color: #7e22ce; }
.form-type-badge--dealers { background: #ffedd5; color: #c2410c; }
.form-type-badge--personalizado { background: #cffafe; color: #0e7490; }

.sucursal-codigo {
    font-size: 0.82rem;
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.btn-quitar {
    color: var(--danger) !important;
}

@media (max-width: 640px) {
    .form-filter-tab {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
    }

    .formularios-sucursal-filter {
        width: 100%;
    }

    .formularios-sucursal-filter select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .report-tabs {
        width: 100%;
    }

    .report-tab {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
    }

    .reportes-filter {
        width: 100%;
    }

    .reportes-filter select {
        width: 100%;
    }
}

/* Métricas — filtros */
.metricas-page .main-content {
    background: linear-gradient(180deg, #eef2f7 0%, var(--gray-100) 120px);
}

.metricas-hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.metricas-hero-text h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
}

.metricas-periodo {
    margin: 0;
    font-size: 0.92rem;
    color: var(--gray-600);
}

.metricas-filter-panel {
    margin-bottom: 0;
    padding: 1.15rem 1.35rem;
    border-top: 3px solid var(--primary);
}

.metricas-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.metricas-preset {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--gray-700);
    background: var(--gray-100);
    border: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.metricas-preset:hover {
    background: white;
    border-color: var(--gray-300);
    text-decoration: none;
}

.metricas-preset.is-active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

.metricas-preset--highlight.is-active {
    background: #fff7ed;
    border-color: #f97316;
    color: #c2410c;
}

.metricas-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.85rem 1rem;
}

.metricas-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 160px;
}

.metricas-filter-field label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--gray-600);
}

.metricas-filter-field select,
.metricas-filter-field input[type="date"] {
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    font-size: 0.92rem;
    min-height: 42px;
}

.metricas-filter-field select:focus,
.metricas-filter-field input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.metricas-filter-btn {
    min-height: 42px;
    align-self: flex-end;
}

.metricas-stats .metricas-stat-card {
    border-left: 5px solid #2563eb;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: var(--shadow);
}

.metricas-stats .metricas-stat-card .stat-value {
    color: #1d4ed8;
    font-weight: 800;
}

.metricas-stat-meta {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--gray-600);
}

.metricas-resumen-table .btn-sm {
    white-space: nowrap;
}

.metricas-resumen-empty {
    color: var(--gray-400);
}

@media (max-width: 640px) {
    .metricas-filter-field {
        flex: 1 1 100%;
        min-width: 0;
    }

    .metricas-filter-btn {
        width: 100%;
    }
}

/* Clientes — paginación */
.clientes-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
}

.clientes-table-summary {
    margin: 0;
    font-size: 0.92rem;
    color: var(--gray-600);
}

.clientes-per-page-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clientes-per-page-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
}

.clientes-per-page-form select {
    padding: 0.4rem 0.65rem;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

.clientes-empty {
    text-align: center;
    color: var(--gray-600);
    padding: 2rem !important;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary);
    background: white;
    border: 2px solid var(--gray-200);
    transition: background 0.15s, border-color 0.15s;
}

.pagination-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    text-decoration: none;
}

.pagination-btn.is-disabled {
    color: var(--gray-400);
    background: var(--gray-100);
    border-color: var(--gray-200);
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 0.45rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--gray-700);
    border: 2px solid transparent;
}

.pagination-page:hover {
    background: var(--gray-100);
    text-decoration: none;
}

.pagination-page.is-active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    color: var(--gray-500);
    font-weight: 600;
}

@media (max-width: 640px) {
    .pagination {
        flex-direction: column;
    }

    .pagination-pages {
        order: -1;
    }
}
