/* SolviFood Merchant Dashboard Styles */
@keyframes pulseUnread {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.solvifood-dash-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2c3e50;
    padding: 0 15px;
    box-sizing: border-box;
}

.solvifood-dash-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    border: 1px solid #eaeaea;
    flex-wrap: wrap;
    gap: 15px;
}

.solvifood-dash-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.solvifood-dash-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff;
}

.solvifood-dash-avatar {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    background: #ff5722;
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solvifood-dash-brand h2 {
    margin: 0 0 3px 0;
    font-size: 1.4rem;
    color: #1a1a1a;
}

.solvifood-badge-plan {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}
.solvifood-badge-plan.free { background: #e0e0e0; color: #555; }
.solvifood-badge-plan.starter { background: #d1ecf1; color: #0c5460; }
.solvifood-badge-plan.pro { background: #ffe082; color: #b78103; }
.solvifood-badge-plan.enterprise { background: #d4edda; color: #155724; }

.solvifood-dash-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-dash-copy-link {
    background: #f0f4f8;
    color: #2c3e50;
    border: 1px solid #d2dce6;
    padding: 9px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-dash-copy-link:hover { background: #e2eaf1; }

.btn-dash-share-wa {
    background: #25D366;
    color: #fff;
    padding: 9px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.btn-dash-share-wa:hover { background: #1eb956; color: #fff; }

.btn-dash-preview {
    background: #ff5722;
    color: #fff;
    padding: 9px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.btn-dash-preview:hover { background: #e64a19; color: #fff; }

.btn-dash-logout {
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 10px;
}

/* Tabs Navigation - Estilo Carpeta Profesional (Folder Tabs) */
.solvifood-dash-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 18px !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #cbd5e1 !important;
    padding: 0 4px !important;
    border-radius: 0 !important;
    overflow: visible !important;
    align-items: flex-end;
    position: relative;
    z-index: 2;
    box-shadow: none !important;
}

.dash-tab-btn {
    background: #e2e8f0;
    border: 1.5px solid #cbd5e1;
    border-bottom: none;
    padding: 10px 16px 9px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    border-radius: 9px 9px 0 0;
    transition: all 0.15s ease;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.03);
}

.dash-tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: none;
}

.dash-tab-btn.active {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    border-top: 3.5px solid #ff5722 !important;
    border-bottom: 2.5px solid #ffffff !important;
    padding-top: 8px !important;
    padding-bottom: 11px !important;
    font-weight: 800 !important;
    z-index: 5 !important;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.04) !important;
    transform: none !important;
}

.solvifood-dash-content {
    width: 100%;
    box-sizing: border-box;
}

/* Tab Panels - Cuerpo de Carpeta (Folder Body) */
.dash-tab-panel {
    display: none;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    padding: 28px 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
    border: 1.5px solid #cbd5e1;
    border-top: none;
    position: relative;
    z-index: 1;
}

.dash-tab-panel.active {
    display: block;
}

.dash-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.dash-panel-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: #1a1a1a;
}

.dash-panel-header p {
    margin: 0;
    color: #777;
    font-size: 0.9rem;
}

/* Products Grid */
.solvifood-products-grid {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.dash-product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dash-product-card.paused {
    opacity: 0.65;
    filter: grayscale(40%);
}

.dash-prod-img {
    height: 140px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    background-color: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.badge-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
}
.badge-status.active { background: #27ae60; }
.badge-status.paused { background: #e67e22; }

.dash-prod-body {
    padding: 15px;
}

.dash-prod-body h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #222;
}

.dash-prod-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #27ae60;
    margin: 0 0 5px 0;
}

.dash-prod-desc {
    font-size: 0.85rem;
    color: #777;
    margin: 0 0 12px 0;
    min-height: 34px;
}

.dash-prod-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    align-items: center;
    width: 100%;
}

.dash-prod-actions button {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.2;
    text-shadow: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    box-sizing: border-box;
    white-space: nowrap;
}

.dash-prod-actions .btn-edit-prod {
    flex: 1 1 auto;
    min-width: 0;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1.5px solid #bfdbfe !important;
}
.dash-prod-actions .btn-edit-prod:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
    transform: translateY(-1px);
}

.dash-prod-actions .btn-toggle-prod {
    flex: 1 1 auto;
    min-width: 0;
    background: #fefce8 !important;
    color: #a16207 !important;
    border: 1.5px solid #fef08a !important;
}
.dash-prod-actions .btn-toggle-prod:hover {
    background: #fef9c3 !important;
    border-color: #fde047 !important;
    color: #854d0e !important;
    transform: translateY(-1px);
}

.dash-prod-actions .btn-delete-prod {
    flex: 0 0 auto;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1.5px solid #fecaca !important;
    padding: 6px 8px;
    font-size: 0.78rem;
}
.dash-prod-actions .btn-delete-prod:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
    transform: translateY(-1px);
}

/* Buttons */
.btn-dash-primary {
    background: #ff5722;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-dash-primary:hover { background: #e64a19; color: #fff; }

.btn-take-table-order,
a.btn-take-table-order {
    background: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
}
.btn-take-table-order:hover,
a.btn-take-table-order:hover {
    background: #15803d !important;
    border-color: #166534 !important;
    color: #ffffff !important;
}

.btn-dash-secondary {
    background: #f0f0f0;
    color: #444;
    border: 1px solid #ccc;
    padding: 9px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.btn-dash-secondary:hover { background: #e4e4e4; }

.dash-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 1.05rem;
}

/* Modals */
.solvifood-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 15px;
}

.solvifood-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #1a1a1a;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Repeaters & Boxes */
.branch-card-row, .dash-payment-box {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
}

.dash-payment-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #27ae60;
}

.btn-remove-branch {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0;
    margin-top: 8px;
}

/* Logo Upload & Colors */
.dash-logo-upload-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-preview-box {
    width: 100px;
    height: 100px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
}

.logo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.banner-preview-box {
    width: 100%;
    height: 100px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.banner-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Plans Grid */
.dash-plans-outer-wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    margin-top: 15px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 980px) {
    .dash-plans-outer-wrap {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.dash-paid-plans-wrapper {
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.75) 0%, rgba(240, 249, 255, 0.75) 100%);
    border: 2px dashed #f97316;
    border-radius: 16px;
    padding: 24px 14px 14px 14px;
    position: relative;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.08);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.paid-plans-header-badge {
    position: absolute;
    top: -13px;
    left: 20px;
    background: linear-gradient(135deg, #ff5722, #ea580c);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(234, 88, 12, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    box-sizing: border-box;
}

@media (max-width: 580px) {
    .dash-paid-plans-wrapper {
        padding: 18px 10px 12px 10px;
        border-radius: 14px;
    }
    .paid-plans-header-badge {
        position: static;
        display: table;
        margin: 0 auto 12px auto;
        font-size: 0.72rem;
        padding: 4px 10px;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }
}

.dash-paid-plans-wrapper .dash-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 0;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 980px) {
    .dash-paid-plans-wrapper .dash-plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .dash-paid-plans-wrapper .dash-plans-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
}

.dash-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .dash-plans-grid {
        grid-template-columns: 1fr !important;
    }
}

.dash-plan-card {
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 22px 18px 16px 18px;
    background: #fff;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, background 0.28s ease;
}

.dash-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dash-plan-card.featured {
    border-color: #ff5722;
}

.dash-plan-card.active-plan {
    transform: translateY(-4px) !important;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

@media (max-width: 768px) {
    .dash-plan-card.active-plan {
        transform: none !important;
    }
}

.dash-plan-card[data-plan-key="free"].active-plan {
    border: 2.5px solid #22c55e !important;
    background: #f0fdf4 !important;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18), 0 0 0 3px rgba(34, 197, 94, 0.25) !important;
}

.dash-plan-card[data-plan-key="starter"].active-plan {
    border: 2.5px solid #0284c7 !important;
    background: #f0f9ff !important;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.18), 0 0 0 3px rgba(2, 132, 199, 0.25) !important;
}

.dash-plan-card[data-plan-key="pro"].active-plan {
    border: 2.5px solid #ff5722 !important;
    background: #fff7ed !important;
    box-shadow: 0 10px 28px rgba(255, 87, 34, 0.2), 0 0 0 3.5px rgba(255, 87, 34, 0.3) !important;
}

.dash-plan-card[data-plan-key="enterprise"].active-plan {
    border: 2.5px solid #7c3aed !important;
    background: #faf5ff !important;
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.2), 0 0 0 3.5px rgba(124, 58, 237, 0.3) !important;
}

.plan-ribbon {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #ff5722;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.dash-plan-card h4 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.25rem;
    color: #222;
}

.card-pricing-block {
    margin: 8px 0;
    text-align: center;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #27ae60;
    margin: 10px 0;
}

.dash-plan-card ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 15px 0;
    text-align: left;
    font-size: 0.82rem;
    width: 100%;
    box-sizing: border-box;
}

.dash-plan-card ul li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dash-plan-card .btn-open-plan-upgrade,
.dash-plan-card .btn-dash-current-plan,
.dash-plan-card .btn-select-reg-plan {
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    padding: 10px 12px;
    font-size: 0.88rem;
    line-height: 1.25;
    text-align: center;
}

.btn-dash-current-plan {
    background: #e0e0e0;
    color: #666;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: bold;
    width: 100%;
}

.plan-features-toggle-wrap {
    list-style: none !important;
    padding: 6px 0 2px 0 !important;
    margin-top: 4px;
    text-align: center;
    border: none !important;
}

.btn-toggle-plan-features {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    outline: none;
    line-height: 1.2;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-toggle-plan-features:hover {
    background: #e2e8f0;
    color: #1d4ed8;
    border-color: #94a3b8;
}

/* Subscription Period Selector Pills & Discounts */
.sub-period-pills-wrap,
.page-period-pills-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .sub-period-pills-wrap,
    .page-period-pills-wrap {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .sub-period-pills-wrap,
    .page-period-pills-wrap {
        grid-template-columns: 1fr !important;
        gap: 6px;
    }
}

.sub-period-pill,
.page-period-pill {
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sub-period-pill:hover,
.page-period-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
}

.sub-period-pill.active,
.page-period-pill.active {
    border: 2.5px solid #16a34a !important;
    background: #ecfdf5 !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25), 0 4px 12px rgba(22, 163, 74, 0.12) !important;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .sub-period-pill.active,
    .page-period-pill.active {
        transform: none !important;
    }
}

.sub-period-pill .period-title,
.page-period-pill .period-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    word-break: break-word;
}

.sub-period-pill.active .period-title,
.page-period-pill.active .period-title {
    color: #065f46 !important;
    font-weight: 800 !important;
}

.sub-period-pill .period-badge,
.page-period-pill .period-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

.sub-period-pill .period-badge.highlight,
.page-period-pill .period-badge.highlight {
    background: #fef3c7;
    color: #b45309;
    font-weight: 700;
}

.sub-period-pill .period-badge.highlight-gold,
.page-period-pill .period-badge.highlight-gold {
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 700;
}

.sub-period-pill.active .period-badge,
.page-period-pill.active .period-badge {
    background: #a7f3d0 !important;
    color: #065f46 !important;
    font-weight: 700 !important;
}

.sub-period-pill.active .period-badge.highlight,
.page-period-pill.active .period-badge.highlight {
    background: #fde68a !important;
    color: #92400e !important;
    font-weight: 800 !important;
}

.sub-period-pill.active .period-badge.highlight-gold,
.page-period-pill.active .period-badge.highlight-gold {
    background: #c7d2fe !important;
    color: #3730a3 !important;
    font-weight: 800 !important;
}

#upgrade-savings-banner {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prod-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.prod-cat-pill:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.prod-cat-pill input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.prod-cat-pill:has(input:checked) {
    background: #fff7ed;
    border-color: #ff5722;
    color: #ea580c;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 87, 34, 0.15);
}

.swal2-container {
    z-index: 9999999 !important;
}

/* Pastillas de Selección de Sedes */
.branch-nav-pills-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
}

.branch-nav-pill {
    padding: 9px 18px;
    border-radius: 25px;
    border: 2px solid #64748b;
    background: #ffffff;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.92rem;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.branch-nav-pill:hover {
    background: #fff7ed;
    border-color: #ff5722;
    color: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.18);
}

.branch-nav-pill.active {
    background: #ff5722 !important;
    border-color: #e64a19 !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255, 87, 34, 0.38) !important;
    transform: scale(1.02);
}

.branch-nav-pill.active .branch-pill-icon {
    filter: brightness(1.2);
}

/* Adaptación de intl-tel-input */
.iti {
    width: 100%;
}
.iti__country-list {
    z-index: 999999 !important;
    font-family: inherit;
    font-size: 0.9rem;
}
.iti__flag-container {
    border-radius: 6px 0 0 6px;
}

/* ================= MÉTODOS DE PAGO POR SEDE EN BLOQUES (GRID) ================= */
.branch-pm-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.branch-pm-list-container .pm-empty-notice {
    grid-column: 1 / -1;
    margin: 10px 0;
    color: #64748b;
}

.pm-item-box {
    background: #ffffff;
    border: 1.5px solid #fed7aa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pm-item-box:hover {
    border-color: #fb923c;
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.15);
}

.pm-item-box .solvifood-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.pm-item-box .solvifood-form-group {
    margin-bottom: 8px;
}

.pm-item-box .solvifood-form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #475569;
}

.pm-item-box input,
.pm-item-box select {
    padding: 8px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
}

@media (max-width: 520px) {
    .branch-pm-list-container {
        grid-template-columns: 1fr;
    }
    .pm-item-box .solvifood-form-row {
        grid-template-columns: 1fr;
    }
}

/* ================= PASSWORD WRAP & TOGGLE EYE ================= */
.solvifood-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.solvifood-password-wrap input {
    padding-right: 42px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 4px;
    color: #64748b;
    z-index: 5;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-toggle-password:hover {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
}

/* ================= MODAL MAPA LEAFLET GPS ================= */
#solvifood-branch-map-modal {
    display: none;
    position: fixed;
    z-index: 999999 !important;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

#solvifood-branch-map-modal .solvifood-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 760px;
    max-height: 92vh;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ================= MONEDA & TASA BCV SELECTOR CARDS ================= */
.currency-selector-card:hover {
    border-color: #94a3b8 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
}

.currency-selector-card.active {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

/* ================= MODAL PLAN & PERIOD SELECTOR PILLS ================= */
.modal-plan-pills-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .modal-plan-pills-wrap {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
}

.modal-plan-pill {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.modal-plan-pill:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.modal-plan-pill.active {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    box-shadow: 0 4px 14px rgba(22,163,74,0.16) !important;
}

.modal-plan-pill.plan-locked-for-feature {
    opacity: 0.5;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.modal-plan-pill .mplan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.modal-plan-pill .mplan-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
}

.modal-plan-pill.active .mplan-title {
    color: #15803d;
}

.modal-plan-pill .mplan-badge-star {
    background: #fef08a;
    color: #854d0e;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.modal-plan-pill .mplan-badge-unlocked {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
}

.modal-plan-pill .mplan-price-box {
    margin: 4px 0 2px 0;
    color: #0f172a;
}

.modal-plan-pill .mplan-price-val {
    font-size: 1.15rem;
    font-weight: 800;
}

.modal-plan-pill .mplan-price-box small {
    font-size: 0.72rem;
    color: #64748b;
    margin-left: 2px;
}

.modal-plan-pill .mplan-feature-badge {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.25;
}

.modal-period-pills-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .modal-period-pills-wrap {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
    }
}

.modal-period-pill {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.modal-period-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.modal-period-pill.active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: 0 4px 12px rgba(37,99,235,0.16) !important;
}

.modal-period-pill .mperiod-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-period-pill.active .mperiod-name {
    color: #1d4ed8;
}

.modal-period-pill .mperiod-discount {
    font-size: 0.68rem;
    color: #64748b;
}

.modal-period-pill .mperiod-discount.highlight {
    color: #ea580c;
    font-weight: 800;
}

.modal-period-pill .mperiod-discount.highlight-gold {
    color: #b45309;
    font-weight: 800;
}

#solvifood-payment-rows-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    #solvifood-payment-rows-container {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
}
/* Previsualización de imagen de producto en modal de creación/edición */
#prod-img-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    min-height: 40px;
}

#prod-img-preview img {
    max-height: 140px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Switch de Visibilidad / Pausa del Catálogo */
.solvifood-status-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
}

.solvifood-status-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.solvifood-status-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.solvifood-status-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.solvifood-status-switch input:checked + .solvifood-status-slider {
    background-color: #10b981 !important;
}

.solvifood-status-switch input:checked + .solvifood-status-slider:before {
    transform: translateX(18px);
}

/* ================= BUSCADORES & CRM & FILTROS DE PEDIDOS ================= */
.dash-orders-filters-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dash-orders-filters-bar .dash-order-filter-input {
    font-size: 0.82rem !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    font-weight: 600 !important;
    color: #334155 !important;
    height: 38px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.dash-orders-filters-bar select.dash-order-filter-input {
    cursor: pointer !important;
}

.dash-orders-filters-bar input.dash-order-filter-search {
    flex: 1.3 1 0 !important;
    font-weight: 400 !important;
}

#dish-search-input:focus,
#crm-customer-search-input:focus,
.dash-orders-filters-bar .dash-order-filter-input:focus,
#dash-filter-order-status:focus,
#dash-filter-order-type:focus,
#dash-filter-order-payment:focus,
#dash-filter-order-branch:focus,
#dash-filter-order-search:focus {
    border-color: #ff5722 !important;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15) !important;
}

@media (max-width: 768px) {
    .dash-orders-filters-bar {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .dash-orders-filters-bar .dash-order-filter-input,
    .dash-orders-filters-bar select.dash-order-filter-input,
    .dash-orders-filters-bar input.dash-order-filter-search {
        width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

.crm-customer-row:hover {
    background-color: #f8fafc;
}

.dash-order-row {
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.dash-order-row:hover {
    background-color: #f8fafc !important;
}

/* Scrollbar estilizado para el contenedor del historial de pedidos */
.dash-orders-scroll-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.dash-orders-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.dash-orders-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.dash-orders-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ================= ESTILOS DE CONFIGURACIÓN DE SEDES & SUCURSALES ================= */
.branch-block-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.branch-block-card:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    border-color: #94a3b8;
}
.branch-subpanel {
    transition: all 0.2s ease;
}
.branch-subpanel:hover {
    border-color: #cbd5e1;
}
.branch-gps-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%) !important;
}
.branch-gmap-link:hover {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}
.branch-name-input:focus,
.branch-lat-field:focus,
.branch-lng-field:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}/* ================= ESTILOS DE MATRIZ DE ROLES & PERMISOS ================= */
.solvifood-role-tabs-bar::-webkit-scrollbar {
    height: 6px;
}
.solvifood-role-tabs-bar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.solvifood-role-tabs-bar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.solvifood-role-tab-btn:hover {
    border-color: #ff5722 !important;
    background: #fff7ed !important;
    color: #c2410c !important;
}
.solvifood-role-panel {
    animation: fadeInRole 0.2s ease-in-out;
}
@keyframes fadeInRole {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= TABLA COMPARATIVA DE PLANES Y HERRAMIENTAS ================= */
.reg-comp-table-container {
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.02);
}
.reg-comp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
    min-width: 680px;
}
.reg-comp-table th, 
.reg-comp-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.reg-comp-table th {
    font-weight: 700;
    background: #f8fafc;
    color: #1e293b;
    position: sticky;
    top: 0;
    z-index: 2;
}
.reg-comp-table th.col-plan-free {
    background: rgba(240, 253, 244, 0.9);
    color: #16a34a;
    text-align: center;
}
.reg-comp-table th.col-plan-starter {
    background: rgba(240, 249, 255, 0.9);
    color: #0284c7;
    text-align: center;
}
.reg-comp-table th.col-plan-pro {
    background: rgba(255, 247, 237, 0.9);
    color: #ea580c;
    text-align: center;
}
.reg-comp-table th.col-plan-enterprise {
    background: rgba(250, 245, 255, 0.9);
    color: #7c3aed;
    text-align: center;
}
.reg-comp-table td.col-center {
    text-align: center;
}
.reg-comp-section-row td {
    background: #f1f5f9;
    font-weight: 800;
    color: #334155;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 9px 14px;
    border-top: 1.5px solid #cbd5e1;
    border-bottom: 1.5px solid #cbd5e1;
}
.reg-comp-feature-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.reg-comp-feature-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
}
.reg-comp-feature-desc {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.35;
}
.reg-feature-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.88rem;
}
.reg-feature-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
}
.reg-feature-badge.badge-yes {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.reg-feature-badge.badge-no {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #cbd5e1;
}

