/* --- SISTEMA DE DISEÑO PREMIUM --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@400;700;800;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --primary: #E63946;
    --primary-hover: #d90429;
    --dark: #0f172a;
    --dark-medium: #1e293b;
    --dark-light: #334155;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.01);
    --shadow-premium: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.02);
    --border-radius: 12px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.5;
}

/* --- LOGIN SCREEN --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #060b13;
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 168, 232, 0.12) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(230, 57, 70, 0.08) 0, transparent 50%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    left: -100px;
    animation: floatBlob 12s infinite alternate ease-in-out;
    pointer-events: none;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.08) 0%, rgba(0,0,0,0) 70%);
    bottom: -200px;
    right: -100px;
    animation: floatBlob2 18s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, 80px) scale(1.15); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-100px, -60px) scale(0.9); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.login-card-compact {
    width: 360px !important;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* El cabezal dividido en dos para los logos corporativos (ocupa el espacio grande anterior) */
.login-split-header {
    display: flex;
    height: 75px;
    border-bottom: 3.5px solid #E63946;
}

.header-brand-left {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid rgba(11, 30, 51, 0.08);
    padding: 10px;
}

.header-brand-right {
    flex: 1;
    background-color: #0a2c5c;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.brand-logo-masdelivery {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
}

.mas-blue {
    color: #00a8e8;
    font-weight: 700;
}

.delivery-dark {
    color: #373737;
    font-weight: 800;
    position: relative;
}

.chef-accent {
    position: relative;
    top: -7px;
    left: 8px;
    font-size: 7px;
    color: #00a8e8;
}

.brand-logo-epay {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0;
    display: flex;
    align-items: center;
}

.epay-accent {
    color: #00b4d8;
    font-size: 18px;
    margin-right: 5px;
    font-weight: 900;
    line-height: 1;
}

.epay-white {
    color: #ffffff;
}

/* La cápsula estrecha y elegante para el "Acceso al CRM" */
.access-capsule {
    background-color: rgba(11, 30, 51, 0.04);
    border: 1.5px solid rgba(11, 30, 51, 0.08);
    border-radius: 50px;
    padding: 6px 18px;
    margin: 10px auto 25px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0b1e33;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.login-body-premium {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 12px 16px;
    border: 1px solid rgba(11, 30, 51, 0.12);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.85);
    outline: none;
    transition: all 0.25s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #00a8e8;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.3);
}

.btn-secondary {
    background-color: #f1f3f5;
    color: #495057;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.btn-transfer {
    position: relative;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0 !important;
    border-radius: 9px;
    overflow: hidden;
    justify-content: center;
    background: #0f9f73;
    color: transparent !important;
    border: 1px solid #0b8f68;
    box-shadow: 0 4px 12px rgba(15, 159, 115, 0.18);
    font-size: 0 !important;
    line-height: 1;
}

.btn-transfer::before {
    content: "\21c4";
    color: white;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.btn-transfer:hover {
    background: #0b8f68;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 159, 115, 0.24);
}

.btn-transfer-icon {
    width: 34px;
    min-width: 34px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-danger {
    background-color: #fff0f2;
    color: #d90429;
    border: 1px solid #fbc4cb;
}

.alert-success {
    background-color: #f0fff4;
    color: #25d366;
    border: 1px solid #c7ebcf;
}


/* --- CRM LAYOUT --- */
.crm-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.crm-sidebar {
    width: 290px;
    background: linear-gradient(180deg, #0b1e33 0%, #050e18 100%);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    flex-shrink: 0;
    box-shadow: 4px 0 25px rgba(0,0,0,0.05);
}

.sidebar-header {
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    margin-top: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.menu-item button[data-section] {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 16px;
    color: #a5b5c5;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.crm-notification-badge {
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    background: #ffd43b;
    color: #0b1e33;
    font-size: 11px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 4px rgba(255, 212, 59, 0.14), 0 3px 9px rgba(0, 0, 0, 0.24);
    animation: crmNotificationPulse 1.8s ease-in-out infinite;
}

.crm-notification-badge[hidden] {
    display: none;
}

@keyframes crmNotificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
    .crm-notification-badge {
        animation: none;
    }
}

.menu-item button[data-section]:hover {
    background-color: rgba(255,255,255,0.04);
    color: white;
    transform: translateX(2px);
}

.menu-item.active button[data-section] {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.sidebar-add-btn {
    width: calc(100% - 24px);
    margin: 8px 12px 10px 12px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.sidebar-add-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateX(2px);
}

.sidebar-export-widget {
    margin: 8px 12px 12px 12px;
}

.sidebar-export-widget .sidebar-add-btn {
    width: 100%;
    margin: 0;
}

.sidebar-export-toggle {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-export-toggle::before {
    content: '';
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
    transition: transform 0.2s ease;
}

.sidebar-export-toggle.is-open {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.22);
}

.sidebar-export-toggle.is-open::before {
    transform: rotate(135deg) translate(-1px, -1px);
}

.sidebar-export-panel {
    display: grid;
    gap: 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 8px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.22s ease, border-color 0.22s ease;
}

.sidebar-export-panel.is-open {
    max-height: 260px;
    opacity: 1;
    padding: 11px;
    border-color: rgba(255,255,255,0.12);
}

.sidebar-export-copy {
    display: grid;
    gap: 2px;
    padding-bottom: 2px;
}

.sidebar-export-copy strong {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.sidebar-export-copy span {
    color: rgba(255,255,255,0.64);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.sidebar-export-field {
    display: grid;
    gap: 4px;
}

.sidebar-export-field label {
    color: rgba(255,255,255,0.74);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sidebar-export-field input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.96);
    color: #0b1e33;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 9px;
    outline: none;
}

.sidebar-export-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18);
}

.sidebar-export-confirm {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-export-confirm:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.sidebar-export-confirm:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.sidebar-export-status {
    min-height: 14px;
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--dark-medium);
    font-size: 13px;
    color: #adb5bd;
}

.sidebar-footer .user-profile {
    margin-bottom: 15px;
}

.sidebar-footer .role-badge {
    background-color: var(--dark-medium);
    color: white;
    font-weight: 700;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Main Content Area */
.crm-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.crm-header {
    background-color: white;
    padding: 16px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.crm-header h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--dark);
}

.header-user-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user-info {
    font-size: 13px;
    color: var(--text-color);
}

.header-user-info strong {
    color: var(--dark);
}

.header-role-tag {
    background-color: var(--dark);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    margin-left: 5px;
}

.crm-body {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}


/* --- SECCIONES Y TABLAS --- */
.section-panel {
    display: none;
}

.section-panel.active {
    display: block;
}

.tab-container {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 15px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

/* --- DASHBOARD COMERCIAL --- */
.dashboard-shell {
    display: grid;
    gap: 22px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(560px, 1.3fr);
    gap: 22px;
    align-items: end;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.dashboard-hero h2 {
    margin: 0;
    font-family: 'Outfit';
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
}

.dashboard-hero p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.dashboard-range-panel {
    display: grid;
    grid-template-columns: auto minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
}

.dashboard-date-field {
    display: grid;
    gap: 6px;
}

.dashboard-date-field label {
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-date-field input {
    min-height: 38px;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}

.dashboard-date-field input:focus {
    outline: none;
    border-color: #39c5f3;
    box-shadow: 0 0 0 3px rgba(57, 197, 243, 0.18);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
}

.dashboard-kpi-card,
.dashboard-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.dashboard-kpi-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    min-height: 132px;
}

.dashboard-kpi-card span,
.dashboard-conversion-grid span {
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-kpi-card strong {
    color: var(--dark);
    font-family: 'Outfit';
    font-size: 30px;
    line-height: 1;
}

.dashboard-kpi-card small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1.25fr) minmax(300px, 0.75fr);
    gap: 16px;
}

.dashboard-segment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.dashboard-card {
    padding: 18px;
}

.dashboard-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-card-head h3 {
    margin: 0;
    font-family: 'Outfit';
    font-size: 18px;
    font-weight: 800;
}

.dashboard-card-head span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-bars {
    display: grid;
    gap: 14px;
}

.dashboard-bar-row {
    display: grid;
    gap: 7px;
}

.dashboard-bar-label,
.dashboard-state-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.dashboard-bar-label strong,
.dashboard-state-row strong {
    color: var(--dark);
    font-weight: 800;
}

.dashboard-bar-label span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.dashboard-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.dashboard-state-list {
    display: grid;
    gap: 10px;
}

.dashboard-state-row {
    grid-template-columns: 12px minmax(0, 1fr) 42px 56px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

.dashboard-state-row:last-child {
    border-bottom: none;
}

.dashboard-state-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dashboard-state-row span,
.dashboard-state-row em {
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.dashboard-state-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-conversion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.dashboard-conversion-grid > div {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.dashboard-conversion-grid strong {
    color: var(--dark);
    font-size: 16px;
}

.dashboard-empty {
    padding: 18px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
}

.preview-logo-wrap,
.preview-logo-img,
.preview-logo-fallback {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.preview-logo-wrap {
    position: relative;
}

.preview-logo-img,
.preview-logo-fallback {
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    object-fit: cover;
}

.preview-logo-fallback {
    color: #ffffff;
    font-weight: 900;
    font-size: 20px;
}

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

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .planner-controls {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-range-panel,
    .dashboard-kpi-grid,
    .dashboard-conversion-grid,
    .planner-controls {
        grid-template-columns: 1fr;
    }

}

.tab-btn:hover {
    color: var(--dark);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}


/* --- METRICAS DE POST-VENTA --- */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.metric-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
}

.metric-card-action {
    margin-top: 7px;
    padding: 5px 9px;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: rgba(255, 255, 255, .72);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.metric-card-action:hover:not(:disabled) {
    background: #fff;
}

.metric-card-action:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .24);
    outline-offset: 2px;
}

.metric-card-action:disabled {
    cursor: default;
    opacity: .62;
}

.metric-pendiente {
    border-left: 5px solid #d90429;
    background-color: #fff0f2;
    color: #d90429;
}

.metric-progress {
    border-left: 5px solid #ff9f1c;
    background-color: #fffbf0;
    color: #ff9f1c;
}

.metric-solved {
    border-left: 5px solid #25d366;
    background-color: #f0fff4;
    color: #25d366;
}

.metric-partner {
    border-left: 5px solid #2563eb;
    background-color: #eff6ff;
    color: #2563eb;
}

#section-partners .metrics-row {
    grid-template-columns: repeat(4, 1fr);
}


/* --- AGENDA Y CALENDARIO SEMANAL --- */
.expander-header {
    background-color: white;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.expander-content {
    display: none;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.expander-content.active {
    display: block;
}

.planner-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
}

.calendar-peek {
    margin-bottom: 20px;
}

.calendar-module {
    margin-bottom: 20px;
}

.planner-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.planner-days-grid.calendar-days-1 {
    grid-template-columns: minmax(320px, 620px);
}

.planner-days-grid.calendar-days-3 {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.planner-days-grid.calendar-search-results {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.planner-days-grid.calendar-responsible-results {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: stretch;
}

.planner-controls .form-group[hidden] {
    display: none !important;
}

.calendar-responsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 12px;
    padding: 13px 16px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fafc, #eef4fa);
}

.calendar-responsible-summary[hidden] {
    display: none;
}

.calendar-responsible-summary > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-responsible-summary span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.calendar-responsible-summary strong {
    color: var(--dark);
    font-family: "Outfit", sans-serif;
    font-size: 16px;
}

.calendar-responsible-count {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--dark);
    color: #fff !important;
}

.responsible-issue-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 190px;
    margin: 0;
    padding: 15px;
    background: #fff;
}

.responsible-issue-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.responsible-issue-card-head h4 {
    margin: 3px 0 0;
    color: var(--dark);
    font-family: "Outfit", sans-serif;
    font-size: 16px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.responsible-issue-area {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.responsible-issue-status {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--issue-status-color);
    font-size: 10px;
    font-weight: 800;
}

.responsible-issue-contact {
    margin-top: 9px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.responsible-issue-task {
    flex: 1 1 auto;
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.responsible-issue-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 11px;
}

.responsible-issue-footer strong {
    color: var(--dark);
}

.responsible-issue-footer a {
    margin-left: auto;
    color: #08783e;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 760px) {
    .planner-days-grid.calendar-responsible-results {
        grid-template-columns: minmax(0, 1fr);
    }

    .calendar-responsible-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

.calendar-search-empty {
    grid-column: 1 / -1;
    padding: 28px 18px;
    border: 1.5px dashed #d7dee6;
    border-radius: 10px;
    color: var(--text-muted);
    background: #fafbfc;
    text-align: center;
    font-size: 13px;
}

.planner-days-grid.calendar-days-1 .event-card,
.planner-days-grid.calendar-days-3 .event-card {
    padding: 14px;
    font-size: 12.5px;
    margin-bottom: 10px;
}

.planner-days-grid.calendar-days-1 .event-card-header,
.planner-days-grid.calendar-days-3 .event-card-header {
    font-size: 13px;
    gap: 8px;
}

.planner-days-grid.calendar-days-1 .planner-day-header,
.planner-days-grid.calendar-days-3 .planner-day-header {
    font-size: 12px;
    padding: 8px 4px;
}

.planner-day-col {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 10px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
}

.planner-day-header {
    text-align: center;
    padding: 6px 2px;
    background-color: var(--dark);
    color: white;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 10px;
}

.planner-day-header.today {
    background: linear-gradient(135deg, #FF9F1C, #E63946);
    box-shadow: 0 4px 8px rgba(230,57,70,0.3);
}

.event-card {
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.35;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.event-task-text {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.35;
    margin-top: 6px;
}

.event-responsible-text {
    color: #495057;
    font-size: 10px;
    font-weight: 600;
    margin-top: 6px;
}

.planner-days-grid.calendar-days-1 .event-task-text,
.planner-days-grid.calendar-days-3 .event-task-text,
.planner-days-grid.calendar-days-1 .event-responsible-text,
.planner-days-grid.calendar-days-3 .event-responsible-text {
    font-size: 11px;
}

.event-card-clickable {
    cursor: pointer;
}

.event-card-clickable:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
}

.event-card-lead {
    background-color: white;
    border-top: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.event-conflict {
    border: 1.5px solid #d90429 !important;
    background-color: #fff0f2 !important;
}

.event-card-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 12px;
}

.event-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 9px;
    flex-shrink: 0;
}

.event-avatar-shell {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-avatar-shell img.event-avatar {
    object-fit: cover;
}

.event-time-badge {
    background-color: var(--dark);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
    display: inline-block;
}

.issue-history-box {
    max-height: 170px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #f8fafc;
    padding: 10px;
}

.issue-history-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 9px 10px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.35;
}

.issue-history-item:last-child {
    margin-bottom: 0;
}

.issue-history-meta {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    margin-bottom: 4px;
}


/* --- SECCIÓN LEADS / CONTACTOS --- */
.contact-item-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.contact-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.contact-default-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.contact-name-block h3 {
    font-size: 16px;
    color: var(--dark);
    font-weight: 700;
}

.contact-name-block span {
    font-size: 13px;
    color: var(--text-muted);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

/* SIMULADOR MOVIL GIGANTE */
.simulador-mobil-frame {
    border: 10px solid #2b2d30;
    border-radius: 32px;
    padding: 8px;
    background-color: #f1f3f5;
    max-width: 340px;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.simulador-preview-shell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 560px;
    padding: 18px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8fafc;
}

.simulador-inner-screen {
    background-color: white;
    border-radius: 20px;
    overflow-y: auto;
    height: 480px;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}

.simulador-header-bar {
    background-color: var(--dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    font-weight: 700;
    font-size: 12px;
}

.simulador-product-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f1f3f5;
    padding: 10px 0;
    font-size: 11px;
    text-align: left;
}


/* --- MODAL DIALOGS --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 30, 51, 0.5);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    background-color: var(--dark);
    color: white;
    padding: 15px 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
}

.transfer-confirm-dialog {
    max-width: 560px;
}

.transfer-confirm-header {
    background: linear-gradient(135deg, #0b1e33 0%, #0f6f8f 100%);
}

.transfer-confirm-body {
    padding: 26px;
    text-align: center;
}

.transfer-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: #e8f8f0;
    color: #0f9f73;
    font-size: 24px;
    font-weight: 800;
}

.transfer-confirm-body h3 {
    margin: 0 0 12px;
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    line-height: 1.25;
}

.transfer-confirm-body p {
    margin: 0;
    color: #52677f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.transfer-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.transfer-confirm-actions .btn {
    min-width: 132px;
    justify-content: center;
}

.transfer-confirm-btn {
    background: linear-gradient(135deg, #0f9f73 0%, #1378a8 100%);
    color: white;
    border: 1px solid #0f8f77;
    box-shadow: 0 6px 18px rgba(19, 120, 168, 0.22);
}

.transfer-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(19, 120, 168, 0.28);
}

.transfer-confirm-btn:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.lead-edit-dialog {
    max-width: min(1240px, calc(100vw - 48px)) !important;
    width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.lead-edit-dialog .modal-header {
    padding: 10px 16px;
}

.lead-edit-dialog .modal-body {
    padding: 14px;
    max-height: calc(100vh - 92px);
    overflow-x: hidden;
    overflow-y: auto;
}

.lead-edit-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px 10px;
    align-items: end;
}

.lead-edit-form > .form-group,
.lead-edit-form > details {
    min-width: 0;
}

.lead-edit-form .form-group {
    margin-bottom: 0;
}

.lead-edit-form .form-group label {
    font-size: 10px;
    margin-bottom: 4px;
}

.lead-edit-form .form-group input,
.lead-edit-form .form-group select,
.lead-edit-form .form-group textarea {
    padding: 7px 9px;
    font-size: 12px;
    min-height: 34px;
}

.lead-edit-form details {
    grid-column: span 2;
    margin: 0 !important;
    align-self: stretch;
}

.lead-edit-services-field {
    grid-column: span 2;
}

.lead-edit-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
}

.lead-edit-footer .btn {
    width: auto;
    min-width: 150px;
}

.lead-edit-logo-instagram {
    margin-top: 10px;
}

.lead-edit-history-panel {
    grid-column: 1 / -1;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
}

.lead-edit-history-panel h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

.lead-edit-history-entry {
    display: grid;
    grid-template-columns: 170px minmax(260px, 1fr) 100px;
    gap: 8px;
    align-items: end;
}

.lead-edit-history-entry .form-group {
    margin-bottom: 0;
}

.lead-edit-history-entry textarea {
    height: 38px;
    min-height: 38px !important;
    resize: vertical;
}

.lead-edit-history-list {
    display: grid;
    gap: 6px;
    max-height: 112px;
    overflow-y: auto;
    margin-top: 8px;
    padding-right: 4px;
}

.lead-edit-history-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px;
}

.lead-edit-history-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.lead-edit-history-actions {
    display: flex;
    gap: 6px;
}

.lead-edit-history-edit {
    display: none;
    gap: 6px;
    margin-top: 6px;
}

.lead-edit-history-edit.active {
    display: grid;
    grid-template-columns: 170px minmax(220px, 1fr) auto auto;
    align-items: end;
}

@media (max-width: 1100px) {
    .lead-edit-form {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
}

@media (max-width: 760px) {
    .lead-edit-dialog {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px) !important;
    }

    .lead-edit-dialog .modal-body {
        max-height: 82vh;
        overflow-y: auto;
    }

    .lead-edit-form {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .lead-edit-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 10px;
    }

    .lead-edit-footer .btn {
        width: 100%;
        min-width: 0;
    }
}

.lead-follow-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}

.lead-follow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px minmax(150px, 0.8fr);
    gap: 12px;
}

.lead-follow-grid .form-group {
    margin-bottom: 10px;
}

.lead-history-date-field {
    margin-bottom: 8px !important;
}

.lead-history-date-field input {
    max-width: 190px;
}

#new_note_content {
    width: 100%;
    height: 60px;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
}

@media (max-width: 560px) {
    .lead-follow-grid {
        grid-template-columns: 1fr;
    }
}


/* --- USUARIOS (PERSONAL) --- */
.user-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

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

.user-card-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
}

.user-card-name span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.user-role-badge {
    font-weight: 700;
    font-size: 11px;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
    color: #495057;
    text-transform: uppercase;
}

.user-status-text {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.user-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

/* Colores pasteles suaves y no invasivos por rubro para PHP */
.lead-card-cafeteria { background-color: #FAF3E0 !important; border-color: #E9DCC9 !important; }
.lead-card-cafeteria .info-value { color: #5C3D2E !important; }
.lead-card-hamburgueseria { background-color: #FEF5E7 !important; border-color: #FDE2B2 !important; }
.lead-card-hamburgueseria .info-value { color: #B05B00 !important; }
.lead-card-heladeria { background-color: #FDF0F5 !important; border-color: #FBC2D7 !important; }
.lead-card-heladeria .info-value { color: #B03A7A !important; }
.lead-card-pizzas-empanadas { background-color: #FDF2F2 !important; border-color: #FBC3C3 !important; }
.lead-card-pizzas-empanadas .info-value { color: #D32F2F !important; }
.lead-card-restaurante { background-color: #F0F7F4 !important; border-color: #C2EBD7 !important; }
.lead-card-restaurante .info-value { color: #2E7D32 !important; }
.lead-card-sushi { background-color: #FFF2EE !important; border-color: #FFD3C3 !important; }
.lead-card-sushi .info-value { color: #E65100 !important; }
.lead-card-parrilla { background-color: #FBF3F2 !important; border-color: #F5D3C3 !important; }
.lead-card-parrilla .info-value { color: #C0392B !important; }
.lead-card-milanesas { background-color: #FEFAE0 !important; border-color: #FDF3C3 !important; }
.lead-card-milanesas .info-value { color: #786000 !important; }
.lead-card-etnica { background-color: #EEFAFB !important; border-color: #C3F3F5 !important; }
.lead-card-etnica .info-value { color: #007A78 !important; }
.lead-card-otros { background-color: #F1F3F5 !important; border-color: #E9ECEF !important; }
.lead-card-otros .info-value { color: #495057 !important; }

/* --- SLEEK SEARCH TOOLBAR & FILTER DRAWER --- */
.crm-search-toolbar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.crm-search-input-wrapper {
    flex-grow: 1;
}

.crm-search-input-wrapper input {
    width: 100% !important;
}

.crm-search-field {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    background: #ffffff;
    color: var(--dark);
    padding: 10px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.crm-search-field::placeholder {
    color: #6f7f90;
}

.crm-search-field:focus {
    outline: none;
    border-color: #39c5f3;
    box-shadow: 0 0 0 3px rgba(57, 197, 243, 0.18);
    background: #fff;
}

.crm-search-field-compact {
    max-width: 360px;
}

.crm-multi-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.crm-check-select {
    width: 100%;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.crm-check-select:focus-within {
    border-color: #39c5f3;
    box-shadow: 0 0 0 3px rgba(57, 197, 243, 0.18);
}

.crm-check-select-summary {
    min-height: 34px;
    padding: 8px 12px;
    border-bottom: 1px solid #edf2f7;
    color: var(--dark);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    background: #f8fafc;
}

.crm-check-select-list {
    max-height: 118px;
    overflow-y: auto;
    padding: 6px;
    display: grid;
    gap: 4px;
}

.crm-check-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 28px;
    padding: 5px 7px;
    border-radius: 6px;
    color: var(--dark);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.crm-check-option:hover {
    background: #f1f5f9;
}

.crm-check-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--primary);
}

.crm-check-option-all {
    border-bottom: 1px solid #edf2f7;
    border-radius: 6px 6px 0 0;
    color: #40576f;
    font-weight: 800;
}

.lead-edit-form .crm-check-select-list {
    max-height: 96px;
}

.crm-filter-pane {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease-out, padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    background-color: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.crm-filter-pane.active {
    max-height: 500px;
    opacity: 1;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.crm-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.crm-add-toggle {
    margin-bottom: 14px;
    text-align: center;
}

.crm-create-card {
    display: none;
    margin-top: 14px;
}

.crm-create-card.active {
    display: block;
    width: 100%;
    max-width: none !important;
}

.section-panel.creating > div {
    display: block !important;
}

.section-panel.creating > div > div:first-child {
    width: 100% !important;
    max-width: none !important;
}

.section-panel.creating > div > div:not(:first-child),
.section-panel.creating .crm-search-toolbar,
.section-panel.creating .crm-filter-pane,
.section-panel.creating #leads_list_container {
    display: none !important;
}

#section-leads:not(.creating) > div > div:first-child,
#section-clientes:not(.creating) > div > div:first-child,
#section-partners:not(.creating) > div > div:first-child {
    display: none;
}

#section-leads:not(.creating) > div > div:last-child,
#section-clientes:not(.creating) > div > div:last-child,
#section-partners:not(.creating) > div > div:last-child {
    flex: 1 1 auto;
    width: 100%;
}

.crm-create-card.active form {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px 16px;
    align-items: end;
}

.crm-create-card.active form .form-group,
.crm-create-card.active form details {
    margin-bottom: 0 !important;
}

.crm-simulation-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px 16px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
}

.crm-simulation-tools h4 {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--dark);
    font-family: 'Outfit';
    font-size: 15px;
    font-weight: 800;
}

.crm-abm-card.active form {
    display: block;
}

.crm-abm-card.active form .form-group {
    margin-bottom: 15px !important;
}

.crm-create-card.active form textarea {
    min-height: 74px;
}

.crm-create-card.active form button {
    align-self: end;
}

.crm-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.crm-form-actions .btn {
    min-width: 150px;
    width: auto;
}

@media (max-width: 1200px) {
    .crm-create-card.active form {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .crm-create-card.active form {
        grid-template-columns: minmax(0, 1fr);
    }

    .crm-create-card.active form > * {
        min-width: 0;
    }

    .crm-simulation-tools {
        grid-template-columns: 1fr;
    }

    .crm-form-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .crm-form-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

.leads-table {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.leads-table-header,
.lead-table-row {
    display: grid;
    grid-template-columns: minmax(92px, 0.65fr) minmax(150px, 1.15fr) minmax(90px, 0.65fr) minmax(130px, 0.85fr) minmax(140px, 0.85fr) minmax(130px, 0.85fr) minmax(110px, 0.7fr) minmax(135px, 0.8fr) minmax(180px, auto);
    align-items: center;
    gap: 10px;
    min-width: 1280px;
}

.leads-table-header {
    padding: 11px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.lead-sort-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
    text-align: left;
    text-transform: uppercase;
}

.lead-sort-btn:hover {
    color: var(--primary);
}

.lead-table-row {
    padding: 10px 14px;
    border-bottom: 1px solid #edf2f7;
    min-height: 52px;
}

.lead-table-row:last-child {
    border-bottom: none;
}

.lead-table-row:hover {
    background: #f8fafc;
}

.lead-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
}

.lead-brand {
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.lead-brand-edit {
    display: inline;
    max-width: 100%;
    overflow: hidden;
    border: 0;
    padding: 2px 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .16s ease, text-decoration-color .16s ease;
}

.lead-brand-edit:hover {
    color: var(--primary);
    text-decoration-color: currentColor;
}

.lead-brand-edit:focus-visible {
    outline: 3px solid rgba(230, 57, 70, .2);
    outline-offset: 2px;
    border-radius: 3px;
    color: var(--primary);
    text-decoration-color: currentColor;
}

#section-leads .lead-table-row .lead-number-cell {
    display: none !important;
}

.lead-secondary-contact-separator {
    color: var(--text-muted);
    font-weight: 700;
}

.lead-wsp-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.lead-wsp-link {
    min-width: 0;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    color: #0e8c43;
    background: #e8f8f0;
    border: 1px solid #c2f0d5;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.lead-instagram-link {
    min-width: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    color: #9d174d;
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.lead-empty {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.lead-message-cell {
    display: none;
}

.lead-message-block {
    display: none;
}

.lead-date-cell {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 180px;
    white-space: nowrap;
}

.lead-actions .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.support-module {
    display: grid;
    gap: 18px;
}

.support-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.support-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.support-module-header h2 {
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 3px;
}

.support-module-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.support-config-btn {
    width: auto;
    min-width: 190px;
    white-space: nowrap;
}

.support-search-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 170px minmax(190px, 0.8fr) auto;
    align-items: end;
    gap: 12px;
    padding: 16px 18px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.support-search-field {
    display: grid;
    gap: 6px;
}

.support-search-field label {
    color: #52677f;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.support-search-field input,
.support-search-field select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dark);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    outline: none;
}

.support-search-field input:focus,
.support-search-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.support-search-btn {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 18px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(230, 57, 70, 0.18);
}

.support-search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.support-table {
    width: 100%;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.support-table-header,
.support-table-row {
    display: grid;
    grid-template-columns: 88px 105px 60px 76px minmax(140px, 1fr) 122px 90px 82px;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.support-table-header {
    padding: 9px 8px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    color: #52677f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.support-table-row {
    padding: 9px 8px;
    border-bottom: 1px solid #edf2f7;
    min-height: 58px;
}

.support-table-row:last-child {
    border-bottom: none;
}

.support-table-row:hover {
    background: #f8fafc;
}

.support-cell {
    min-width: 0;
    color: var(--text-color);
    font-size: 12.5px;
    font-weight: 600;
}

.support-date {
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 800;
    text-align: center;
    justify-self: center;
    align-self: center;
    width: 100%;
}

.support-brand {
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-message {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.support-wa-link {
    display: inline-flex;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0e8c43;
    background: #e8f8f0;
    border: 1px solid #c2f0d5;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 10.5px;
    font-weight: 800;
    text-decoration: none;
}

.support-responsible-select,
.support-status-select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--dark);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 7px;
}

.support-status-cell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.support-history-btn {
    width: 100%;
    border: 1px solid #cfe3f7;
    border-radius: 7px;
    background: #f4f9ff;
    color: #285c8f;
    font: inherit;
    font-size: 10.5px;
    font-weight: 800;
    padding: 5px 7px;
    cursor: pointer;
}

.support-history-btn:hover {
    background: #e7f2ff;
    border-color: #9dccf4;
}

.support-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.support-actions .btn-sm {
    width: 100%;
    padding: 5px 6px;
    font-size: 10.5px;
    white-space: nowrap;
}

.support-loading,
.support-empty {
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.support-empty.compact {
    padding: 12px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.support-filter-empty {
    background: #ffffff;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-responsible-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 16px;
}

.support-responsible-form .form-group {
    margin-bottom: 0;
}

.support-responsibles-list {
    display: grid;
    gap: 8px;
}

.support-history-title {
    color: var(--dark);
    font-weight: 800;
    margin-bottom: 12px;
}

.support-status-history-list {
    display: grid;
    gap: 10px;
}

.support-status-history-item {
    padding: 11px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
}

.support-status-history-time {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px;
}

.support-status-history-detail {
    color: var(--dark);
    font-size: 13px;
    font-weight: 800;
}

.support-responsible-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .support-module-header,
    .support-responsible-form,
    .support-search-panel {
        grid-template-columns: 1fr;
        display: grid;
    }

    .support-config-btn,
    .support-responsible-form .btn,
    .support-search-btn {
        width: 100%;
    }
}

.opciones-table {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.opciones-table-header,
.opciones-table-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 140px minmax(180px, auto);
    align-items: center;
    gap: 12px;
    min-width: 560px;
}

.opciones-table-header {
    padding: 10px 12px;
    background: #f1f5f9;
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.opciones-table-row {
    padding: 10px 12px;
    border-top: 1px solid #edf2f7;
    font-size: 13px;
    font-weight: 600;
}

.opcion-valor {
    color: var(--dark);
    font-weight: 800;
}

.lead-options-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.lead-options-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.lead-options-header p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.lead-options-editor {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
}

.lead-options-editor h4 {
    margin: 0 0 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
}

.partner-abm-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 14px;
}

.crm-create-card.active form.lead-options-abm-form,
.crm-create-card.active form.partner-abm-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 14px;
}

.partner-abm-form .form-group,
.lead-options-abm-form .form-group {
    margin-bottom: 0;
}

.lead-options-abm-form .crm-form-actions {
    align-self: end;
}

.partner-name-field,
.partner-contact-grid {
    grid-column: 1 / -1;
}

.partner-contact-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr) minmax(280px, 1.25fr);
    gap: 10px 14px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
}

.partner-contact-grid > .form-group label {
    display: none;
}

.partner-contact-head {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr) minmax(280px, 1.25fr);
    gap: 14px;
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0 2px;
}

.partner-contact-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr) minmax(280px, 1.25fr);
    gap: 14px;
    align-items: center;
}

.partner-contact-grid > .form-group {
    min-width: 0;
}

.partner-contact-row input,
.partner-contact-grid > .form-group input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    font: inherit;
    font-size: 14px;
}

.partner-contact-row input::placeholder,
.partner-contact-grid > .form-group input::placeholder {
    color: #6f7f90;
}

.partner-contact-row input:focus,
.partner-contact-grid > .form-group input:focus {
    outline: none;
    border-color: #39c5f3;
    box-shadow: 0 0 0 3px rgba(57, 197, 243, 0.18);
}

.partner-contact-extra-row input {
    min-height: 40px;
    background: #ffffff;
}

.partner-extra-field {
    display: none;
}

.partner-extra-field textarea {
    resize: vertical;
    min-height: 70px;
}

.partner-main-line {
    font-weight: 700;
    color: var(--dark);
}

.partner-extra-line {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.25;
}

@media (max-width: 980px) {
    .partner-contact-grid,
    .partner-contact-head,
    .partner-contact-row {
        grid-template-columns: 1fr;
    }

    .partner-contact-head {
        display: none;
    }

    .partner-contact-extra-row {
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
    }
}

.partner-notas-field,
.partner-abm-form .crm-form-actions,
.lead-options-abm-form .crm-form-actions {
    grid-column: 1 / -1;
}

.partners-list-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.2fr);
    gap: 18px;
    align-items: end;
    margin-bottom: 16px;
}

.partners-registry-card.collapsed {
    padding-bottom: 14px;
}

.partners-registry-card.collapsed #partners_list_container,
.partners-registry-card.collapsed .partners-search-wrap {
    display: none;
}

.partners-registry-card #partners_list_toggle {
    white-space: nowrap;
}

.partners-list-toolbar h3 {
    font-family: 'Outfit';
    font-weight: 800;
    margin: 0;
}

.partners-list-toolbar p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.partners-list-actions {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.partners-search-wrap {
    display: grid;
    gap: 5px;
}

.partners-search-wrap span {
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.partners-table {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.partners-table-header,
.partners-table-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(120px, 0.8fr) minmax(170px, 1.1fr) 90px minmax(170px, auto);
    align-items: center;
    gap: 12px;
    min-width: 900px;
}

.partners-table-header {
    padding: 10px 12px;
    background: #f1f5f9;
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.partners-table-row {
    padding: 10px 12px;
    border-top: 1px solid #edf2f7;
    font-size: 13px;
    font-weight: 600;
}

.partner-name {
    color: var(--dark);
    font-weight: 800;
}

.partner-inactivo {
    background: #fff7f7;
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .partners-list-toolbar,
    .partners-list-actions {
        grid-template-columns: 1fr;
    }
}

.partner-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #e8f8f0;
    color: #0e8c43;
    font-size: 11px;
    font-weight: 800;
}

.partner-inactivo .partner-status {
    background: #fee2e2;
    color: #991b1b;
}

.partner-issue-filter-grid {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(260px, .9fr) minmax(210px, .7fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 16px;
}

.partner-issue-filter-grid label,
.partner-status-filter > label {
    display: block;
    margin-bottom: 7px;
    color: #52677f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.partner-responsible-filter {
    position: relative;
    min-width: 0;
}

.partner-responsible-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.partner-filter-clear {
    border: 0;
    padding: 0;
    background: transparent;
    color: #d90429;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
}

.partner-responsible-toggle {
    display: flex;
    width: 100%;
    min-height: 47px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
}

.partner-responsible-toggle:focus,
.partner-responsible-filter.is-open .partner-responsible-toggle {
    outline: none;
    border-color: #39c5f3;
    box-shadow: 0 0 0 3px rgba(57, 197, 243, .18);
}

.partner-responsible-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid #52677f;
    border-bottom: 2px solid #52677f;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}

.partner-responsible-filter.is-open .partner-responsible-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.partner-responsible-dropdown {
    position: absolute;
    z-index: 40;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    padding: 10px;
    border: 1px solid #d9e1ea;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 41, 66, .18);
}

.partner-responsible-dropdown[hidden] {
    display: none;
}

.partner-responsible-options {
    display: grid;
    gap: 2px;
    max-height: 245px;
    margin-top: 8px;
    padding: 1px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.partner-responsible-option {
    display: flex !important;
    width: 100%;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 8px 9px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #334155 !important;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.partner-responsible-option:hover {
    background: #f1f5f9;
}

.partner-responsible-option.is-selected {
    background: #eaf2ff;
    color: #174ea6 !important;
}

.partner-responsible-option input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #ef3340;
}

.partner-responsible-empty,
.partner-responsible-loading {
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.partner-status-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.partner-status-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    color: #52677f;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.partner-status-options .is-pending { color: #d90429; }
.partner-status-options .is-partner { color: #2563eb; }
.partner-status-options .is-progress { color: #e98500; }
.partner-status-options .is-solved { color: #0e9f4d; }

.partner-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 16px;
    align-items: start;
}

.partner-event-grid > .alert {
    grid-column: 1 / -1;
}

.partner-event-card {
    display: flex;
    min-width: 0;
    min-height: 285px;
    aspect-ratio: 1 / 1;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #dfe6ee;
    border-top: 5px solid var(--event-status-color, #25d366);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 41, 66, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.partner-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 41, 66, .1);
}

.partner-event-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.partner-event-identity {
    min-width: 0;
}

.partner-event-identity h4 {
    margin: 0 0 3px;
    overflow: hidden;
    color: var(--dark);
    font-family: 'Outfit';
    font-size: 17px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-event-identity > span {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-event-status {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 5px;
    background: #f4f6f8;
    color: var(--event-status-color);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.partner-event-task,
.partner-event-comment {
    min-width: 0;
    margin-top: 13px;
}

.partner-event-task > span,
.partner-event-comment > span {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.partner-event-task p,
.partner-event-comment p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #172033;
    font-size: 12px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
}

.partner-event-task p { -webkit-line-clamp: 2; }
.partner-event-comment p {
    color: #52677f;
    -webkit-line-clamp: 2;
}

.partner-event-meta {
    margin-top: auto;
    padding-top: 12px;
}

.partner-event-date {
    display: block;
    margin-bottom: 8px;
    color: #52677f;
    font-size: 11px;
    font-weight: 700;
}

.partner-event-responsibles {
    display: flex;
    gap: 5px;
    min-height: 24px;
    overflow: hidden;
    flex-wrap: wrap;
}

.partner-event-responsibles span {
    max-width: 100%;
    padding: 4px 7px;
    overflow: hidden;
    border-radius: 5px;
    background: #eef3f8;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-event-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #edf1f5;
}

.partner-event-actions > div {
    display: flex;
    gap: 6px;
}

.partner-event-actions .btn {
    min-height: 32px;
    padding: 6px 9px;
}

.partner-event-whatsapp {
    color: #08783e;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 980px) {
    .partner-issue-filter-grid {
        grid-template-columns: 1fr;
    }

    #section-partners .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .partner-event-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .partner-event-card {
        min-height: 0;
        padding: 12px;
    }
}

/* Card hover transitions */
.contact-item-card {
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.contact-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02) !important;
    border-color: #cbd5e1 !important;
}

/* Badges premium para Teléfonos y Correos */
.contact-badge-wsp {
    background-color: #e8f8f0;
    color: #0e8c43;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #c2f0d5;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.contact-badge-wsp:hover {
    background-color: #d4f5e1;
    transform: translateY(-1px);
}

.contact-badge-mail {
    background-color: #e6f0fa;
    color: #1a73e8;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #cce0f5;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.contact-badge-mail:hover {
    background-color: #dbe9f6;
    transform: translateY(-1px);
}

/* --- MOBILE CRM TABLES: CSS-only card layout --- */
@media (max-width: 768px) {
    .crm-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    .crm-sidebar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        height: 56px !important;
        max-height: 56px !important;
        min-height: 0 !important;
        position: relative !important;
        z-index: 5 !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
    }

    .sidebar-header {
        display: none !important;
    }

    .sidebar-header h2 {
        display: none !important;
    }

    .sidebar-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 2px 2px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .sidebar-menu::-webkit-scrollbar {
        display: none !important;
    }

    .sidebar-menu .menu-item {
        flex: 0 0 auto !important;
        min-width: max-content !important;
        height: 38px !important;
        display: flex !important;
        align-items: center !important;
    }

    .menu-item button[data-section] {
        width: auto !important;
        min-height: 38px !important;
        height: 38px !important;
        padding: 0 12px !important;
        font-size: 11px !important;
        line-height: 38px !important;
        white-space: nowrap !important;
        transform: none !important;
        border-radius: 8px !important;
    }

    .sidebar-add-btn,
    .sidebar-export-widget {
        display: none !important;
    }

    .sidebar-footer {
        display: none !important;
    }

    .crm-header {
        position: relative !important;
        z-index: 1 !important;
        padding: 12px 14px !important;
        align-items: flex-start !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    .crm-header h1 {
        width: 100% !important;
        font-size: 18px !important;
        line-height: 1.2 !important;
    }

    .crm-main,
    .crm-body,
    #section-leads,
    #section-leads > *,
    #leads_list_container,
    .leads-table {
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: auto !important;
    }

    .crm-main {
        display: block !important;
        flex: none !important;
        overflow-x: hidden !important;
    }

    .crm-body {
        padding-left: 10px !important;
        padding-right: 10px !important;
        overflow-x: hidden !important;
    }

    #section-leads table,
    #section-leads thead,
    #section-leads tbody,
    #section-leads tr,
    #section-leads td,
    #section-soporte table,
    #section-soporte thead,
    #section-soporte tbody,
    #section-soporte tr,
    #section-soporte td {
        display: block !important;
        width: 100% !important;
    }

    #section-leads thead,
    #section-soporte thead,
    .leads-table-header,
    .support-table-header {
        display: none !important;
    }

    .leads-table,
    .support-table {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 12px !important;
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .lead-table-row,
    .support-table-row,
    #section-leads tr,
    #section-soporte tr {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 14px !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        box-shadow: var(--shadow) !important;
    }

    .lead-cell,
    .support-cell,
    #section-leads td,
    #section-soporte td {
        display: grid !important;
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 10px !important;
        align-items: start !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 6px 0 !important;
        overflow: visible !important;
        white-space: normal !important;
        text-overflow: clip !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
    }

    .lead-table-row .lead-cell:nth-child(1),
    .lead-table-row .lead-cell:nth-child(3),
    .lead-table-row .lead-cell:nth-child(6),
    .lead-table-row .lead-cell:nth-child(7),
    .support-table-row .support-cell:nth-child(3) {
        display: none !important;
    }

    .lead-table-row:hover .lead-cell:nth-child(1),
    .lead-table-row:hover .lead-cell:nth-child(3),
    .lead-table-row:hover .lead-cell:nth-child(6),
    .lead-table-row:hover .lead-cell:nth-child(7),
    .lead-table-row:active .lead-cell:nth-child(1),
    .lead-table-row:active .lead-cell:nth-child(3),
    .lead-table-row:active .lead-cell:nth-child(6),
    .lead-table-row:active .lead-cell:nth-child(7),
    .lead-table-row:focus-within .lead-cell:nth-child(1),
    .lead-table-row:focus-within .lead-cell:nth-child(3),
    .lead-table-row:focus-within .lead-cell:nth-child(6),
    .lead-table-row:focus-within .lead-cell:nth-child(7),
    .support-table-row:hover .support-cell:nth-child(3),
    .support-table-row:active .support-cell:nth-child(3),
    .support-table-row:focus-within .support-cell:nth-child(3) {
        display: grid !important;
    }

    .lead-table-row .lead-cell:nth-child(2) {
        color: var(--dark) !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 17px !important;
        font-weight: 900 !important;
    }

    .lead-table-row .lead-cell:nth-child(2)::before { content: "Marca"; }
    .lead-table-row .lead-cell:nth-child(4)::before { content: "Contacto"; }
    .lead-table-row .lead-cell:nth-child(5)::before { content: "WhatsApp"; }
    .lead-table-row .lead-cell:nth-child(8)::before { content: "Estado"; }
    .lead-table-row .lead-cell:nth-child(1)::before { content: "N"; }
    .lead-table-row .lead-cell:nth-child(3)::before { content: "Tipo"; }
    .lead-table-row .lead-cell:nth-child(6)::before { content: "Instagram"; }
    .lead-table-row .lead-cell:nth-child(7)::before { content: "Origen"; }

    .support-table-row .support-cell:nth-child(1)::before { content: "Fecha"; }
    .support-table-row .support-cell:nth-child(2)::before { content: "Marca"; }
    .support-table-row .support-cell:nth-child(3)::before { content: "Contacto"; }
    .support-table-row .support-cell:nth-child(4)::before { content: "WhatsApp"; }
    .support-table-row .support-cell:nth-child(5)::before { content: "Mensaje"; }
    .support-table-row .support-cell:nth-child(6)::before { content: "Estado"; }
    .support-table-row .support-cell:nth-child(7)::before { content: "Gestión"; }

    .lead-cell::before,
    .support-cell::before,
    #section-leads td::before,
    #section-soporte td::before {
        color: #52677f !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
    }

    .lead-wsp-cell,
    .support-cell {
        min-width: 0 !important;
    }

    .lead-wsp-link,
    .support-wa-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: fit-content !important;
        max-width: 100% !important;
        min-height: 36px !important;
        padding: 8px 10px !important;
        white-space: nowrap !important;
    }

    .lead-actions,
    .support-actions {
        display: none !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
        padding-top: 10px !important;
        border-top: 1px dashed #d9e1ea !important;
    }

    .lead-table-row:hover .lead-actions,
    .lead-table-row:active .lead-actions,
    .lead-table-row:focus-within .lead-actions,
    .support-table-row:hover .support-actions,
    .support-table-row:active .support-actions,
    .support-table-row:focus-within .support-actions {
        display: grid !important;
    }

    .lead-actions .btn,
    .support-actions .btn {
        width: 100% !important;
        min-height: 40px !important;
    }

    .lead-table-row .lead-cell:nth-child(1),
    .lead-table-row .lead-cell:nth-child(3),
    .lead-table-row .lead-cell:nth-child(7),
    .lead-table-row .lead-cell:nth-child(8),
    .lead-table-row .lead-cell:nth-child(9),
    .lead-table-row:hover .lead-cell:nth-child(1),
    .lead-table-row:hover .lead-cell:nth-child(3),
    .lead-table-row:hover .lead-cell:nth-child(7),
    .lead-table-row:hover .lead-cell:nth-child(8),
    .lead-table-row:hover .lead-cell:nth-child(9),
    .lead-table-row:active .lead-cell:nth-child(1),
    .lead-table-row:active .lead-cell:nth-child(3),
    .lead-table-row:active .lead-cell:nth-child(7),
    .lead-table-row:active .lead-cell:nth-child(8),
    .lead-table-row:active .lead-cell:nth-child(9),
    .lead-table-row:focus-within .lead-cell:nth-child(1),
    .lead-table-row:focus-within .lead-cell:nth-child(3),
    .lead-table-row:focus-within .lead-cell:nth-child(7),
    .lead-table-row:focus-within .lead-cell:nth-child(8),
    .lead-table-row:focus-within .lead-cell:nth-child(9) {
        display: none !important;
    }

    .lead-table-row .lead-cell:nth-child(2),
    .lead-table-row .lead-cell:nth-child(4),
    .lead-table-row .lead-cell:nth-child(5) {
        display: grid !important;
    }

    .lead-table-row .lead-cell:nth-child(6)::before { content: "Mensaje"; }
    .lead-table-row .lead-cell:nth-child(7)::before { content: "Instagram"; }
    .lead-table-row .lead-cell:nth-child(8)::before { content: "Origen"; }
    .lead-table-row .lead-cell:nth-child(9)::before { content: "Estado"; }

    .lead-message-cell {
        white-space: normal !important;
        line-height: 1.45 !important;
        color: var(--text-main) !important;
    }

    .lead-table-row .lead-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
        padding-top: 10px !important;
        margin-top: 8px !important;
        border-top: 1px dashed #d9e1ea !important;
    }

    .lead-table-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .lead-table-row .lead-date-cell,
    .lead-table-row .lead-ingreso-cell,
    .lead-table-row .lead-entry-cell,
    .lead-table-row .lead-cell[data-label="Ingreso"],
    .lead-table-row .lead-cell[data-field="fecha_ingreso"] {
        display: block !important;
        order: 1 !important;
        width: 100% !important;
        padding: 0 0 8px !important;
        color: #64748b !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        text-transform: uppercase !important;
        letter-spacing: 0 !important;
        white-space: normal !important;
    }

    .lead-table-row .lead-date-cell::before,
    .lead-table-row .lead-ingreso-cell::before,
    .lead-table-row .lead-entry-cell::before,
    .lead-table-row .lead-cell[data-label="Ingreso"]::before,
    .lead-table-row .lead-cell[data-field="fecha_ingreso"]::before {
        content: "Ingreso: " !important;
        display: inline !important;
        color: #52677f !important;
        font-size: inherit !important;
        font-weight: 900 !important;
        text-transform: uppercase !important;
    }

    .lead-table-row .lead-cell:nth-child(2) {
        order: 2 !important;
    }

    .lead-table-row .lead-cell:nth-child(4) {
        order: 3 !important;
    }

    .lead-table-row .lead-cell:nth-child(5) {
        order: 4 !important;
    }

    .lead-table-row .lead-actions {
        order: 5 !important;
    }

    .lead-table-row .lead-message-cell {
        display: none !important;
    }

    .lead-table-row .lead-message-block {
        display: block !important;
        order: 6 !important;
        width: 100% !important;
        margin-top: 10px !important;
        padding: 11px 12px !important;
        border: 1px solid #d9e1ea !important;
        border-radius: 8px !important;
        background: #f8fafc !important;
        color: #0f172a !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.5 !important;
        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
        box-shadow: inset 3px 0 0 var(--primary) !important;
    }

    .lead-table-row .lead-message-block::before {
        content: "Mensaje" !important;
        display: block !important;
        margin-bottom: 5px !important;
        color: #52677f !important;
        font-size: 10.5px !important;
        font-weight: 900 !important;
        line-height: 1.1 !important;
        text-transform: uppercase !important;
    }

    .lead-table-row .lead-date-cell {
        display: block !important;
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 5px !important;
        padding: 0 0 6px !important;
        color: #64748b !important;
        font-size: 11px !important;
        font-weight: bold !important;
        line-height: 1.25 !important;
        text-transform: uppercase !important;
    }

    .lead-table-row .lead-date-cell::before {
        content: "Ingreso: " !important;
        display: inline !important;
        color: #52677f !important;
        font-size: inherit !important;
        font-weight: 900 !important;
    }

    .lead-table-row .lead-cell {
        display: none !important;
    }

    .lead-table-row .lead-brand {
        display: grid !important;
        order: 2 !important;
    }

    .lead-table-row .lead-cell:nth-child(5) {
        display: grid !important;
        order: 3 !important;
    }

    .lead-table-row .lead-wsp-cell {
        display: grid !important;
        order: 4 !important;
    }

    .lead-table-row .lead-brand::before { content: "Marca" !important; }
    .lead-table-row .lead-cell:nth-child(5)::before { content: "Contacto" !important; }
    .lead-table-row .lead-wsp-cell::before { content: "WhatsApp" !important; }

    .lead-table-row .lead-message-cell {
        display: none !important;
    }

    .lead-table-row .lead-actions {
        display: grid !important;
        order: 5 !important;
    }

    .lead-table-row .lead-message-block {
        display: block !important;
        order: 6 !important;
        width: 100% !important;
        background: #f8f9fc !important;
        padding: 10px !important;
        border-left: 3px solid #e74a3b !important;
        margin-top: 10px !important;
        border-radius: 4px !important;
        font-size: 14px !important;
        color: #333 !important;
        line-height: 1.5 !important;
        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
        box-shadow: none !important;
    }

    .lead-message-block .mobile-label {
        display: inline !important;
        color: #52677f !important;
        font-weight: 900 !important;
        text-transform: uppercase !important;
    }

    .lead-table-row,
    .lead-card {
        display: flex !important;
        flex-direction: column !important;
    }

    .lead-header,
    .lead-table-row .lead-date-cell,
    .lead-table-row .lead-brand {
        order: 1 !important;
    }

    .lead-contact-block,
    .lead-table-row .lead-cell:nth-child(5),
    .lead-table-row .lead-wsp-cell {
        order: 2 !important;
    }

    .lead-table-row .lead-message-block,
    .section-mensaje,
    .lead-message-block {
        display: block !important;
        order: 3 !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    .lead-actions-block,
    .lead-table-row .lead-actions {
        order: 5 !important;
        margin-top: 0 !important;
    }

    .lead-table-row .lead-origin-cell {
        display: grid !important;
        order: 3 !important;
    }

    .lead-table-row .lead-origin-cell::before {
        content: "Origen" !important;
    }

    .lead-table-row .lead-message-block,
    .section-mensaje,
    .lead-message-block {
        order: 4 !important;
    }
}


.time-picker-field {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.time-picker-field input[readonly] {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    background: #fff;
    font-variant-numeric: tabular-nums;
}

.time-picker-button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-inline: 14px;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
}

.time-picker-dialog {
    max-width: 420px;
}

.time-picker-intro {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 14px;
}

.time-picker-selects {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 12px;
}

.time-picker-selects .form-group {
    margin-bottom: 0;
}

.time-picker-selects select {
    min-height: 52px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.time-picker-separator {
    padding-bottom: 12px;
    color: var(--dark);
    font-size: 24px;
    font-weight: 800;
}

.time-picker-actions {
    justify-content: flex-end;
    margin-top: 22px;
}

@media (max-width: 520px) {
    .time-picker-field {
        flex-direction: column;
    }

    .time-picker-button {
        width: 100%;
    }
}
