/* ============================================================
   Nutrition Platform — Clean Health & Wellness Design
   ============================================================ */

/* ---- Reset & Base ---- */
body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: #f4f7f5;
    color: #2d3748;
    line-height: 1.75;
    text-align: right;
}

a { color: #198754; text-decoration: none; }
a:hover { color: #146c43; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: #1a202c; }
.text-muted { color: #718096 !important; }
.fw-bold { font-weight: 700; }

/* ---- Navbar ---- */
.navbar {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.navbar .navbar-brand { color: #198754 !important; font-weight: 800; }
.navbar-logo { height: 28px; }
@media (min-width: 1400px) { .navbar-logo { height: 30px; } }
@media (max-width: 767.98px) { .navbar-logo { height: 24px; } }
.sidebar-logo { height: auto; max-height: 50px; max-width: 100%; }
.navbar .nav-link { color: #4a5568 !important; font-weight: 500; font-size: 0.9rem; padding: 0.5rem 1rem; }
.navbar .nav-link:hover { color: #198754 !important; }
.navbar .btn-outline-light { color: #198754; border-color: #198754; }
.navbar .btn-outline-light:hover { background: #198754; color: #fff; }
.navbar .btn-warning { background: #198754; border-color: #198754; color: #fff; }
.navbar .btn-warning:hover { background: #146c43; }

/* ---- Buttons ---- */
.btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    transition: background 0.2s;
}
.btn:hover { transform: none; box-shadow: none; }
.btn-success { background: #198754; border-color: #198754; }
.btn-success:hover { background: #146c43; }
.btn-outline-success { color: #198754; border-color: #198754; }
.btn-outline-success:hover { background: #198754; color: #fff; }
.btn-outline-secondary { color: #718096; border-color: #cbd5e0; }
.btn-outline-secondary:hover { background: #edf2f7; color: #4a5568; }
.btn-outline-info { color: #2b6cb0; border-color: #bee3f8; }
.btn-outline-info:hover { background: #ebf8ff; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* ---- Cards ---- */
.card {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: none;
}
.card:hover { transform: none; box-shadow: none; }

/* ---- Sidebar ---- */
.sidebar {
    background: #1a202c !important;
    border-right: 1px solid #2d3748;
}
.sidebar .nav-link {
    padding: 0.55rem 1rem;
    border-radius: 6px;
    margin: 1px 8px;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff !important;
}
.active-sidebar {
    background: rgba(25,135,84,0.2) !important;
    color: #fff !important;
    font-weight: 600;
}

/* ---- Tables ---- */
.table { font-size: 0.85rem; }
.table thead th {
    font-weight: 600;
    color: #718096;
    text-transform: none;
    font-size: 0.8rem;
    letter-spacing: 0;
    border-bottom: 2px solid #e2e8f0;
}
.table tbody td { vertical-align: middle; color: #4a5568; }

/* ---- Forms ---- */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.55rem 0.85rem;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 0.875rem;
}
.form-control:focus, .form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25,135,84,0.1);
}
.form-label { font-weight: 600; font-size: 0.85rem; color: #4a5568; }

/* ---- Badges ---- */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.3em 0.65em;
    border-radius: 5px;
}

/* ---- Progress ---- */
.progress {
    background: #edf2f7;
    border-radius: 10px;
    height: 8px;
}
.progress-bar { border-radius: 10px; }

/* ---- Alerts ---- */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
}

/* ---- Breadcrumb ---- */
.breadcrumb { background: transparent; padding: 0; font-size: 0.8rem; }

/* ---- Pagination ---- */
.pagination { font-size: 0.85rem; }
.page-link { border-radius: 6px; margin: 0 2px; color: #4a5568; }
.page-item.active .page-link { background: #198754; border-color: #198754; }

/* ---- Modal ---- */
.modal-content { border-radius: 12px; border: none; }
.modal-header { border-bottom: 1px solid #e2e8f0; padding: 1rem 1.25rem; }

/* ---- KPI Tiles ---- */
.kpi-tile {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
}
.kpi-tile .kpi-label { font-size: 0.8rem; color: #718096; }
.kpi-tile .kpi-value { font-size: 1.5rem; font-weight: 700; }

/* ---- Timeline ---- */
.timeline .timeline-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.timeline-line {
    width: 2px;
    background: #e2e8f0;
    position: absolute;
    left: 20px;
    top: 24px;
    bottom: 0;
}

/* ---- Footer ---- */
footer {
    background: #1a202c !important;
    color: #a0aec0 !important;
    font-size: 0.85rem;
    padding: 3rem 0 2rem;
}
footer a { color: #a0aec0; }
footer a:hover { color: #fff; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f7fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .sidebar { min-height: auto; }
    .kpi-tile .kpi-value { font-size: 1.25rem; }
}

/* ---- Panel Responsive (comprehensive) ---- */

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1050;
    background: #1a202c;
    color: #fff;
    border: 1px solid #2d3748;
    border-radius: 8px;
    width: 40px; height: 40px;
    font-size: 1.2rem;
    align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Sidebar offcanvas on mobile */
@media (max-width: 767.98px) {
    .sidebar-toggle { display: flex; }

    .sidebar {
        position: fixed; top: 0; right: -280px; bottom: 0; z-index: 1040;
        width: 260px; min-height: 100vh !important;
        transition: right 0.25s ease;
        overflow-y: auto;
        padding-top: 60px !important;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }
    .sidebar.show { right: 0; }
    .sidebar-backdrop {
        display: none;
        position: fixed; inset: 0; z-index: 1035;
        background: rgba(0,0,0,0.4);
    }
    .sidebar-backdrop.show { display: block; }

    /* Main content full-width */
    main.col-md-10, main.col-md-9 { width: 100% !important; padding: 0.75rem !important; }

    /* Tables — force horizontal scroll */
    .table-responsive { -webkit-overflow-scrolling: touch; }
    .table { font-size: 0.75rem; }
    .table thead th { font-size: 0.7rem; white-space: nowrap; }

    /* Cards & grid */
    .card-body { padding: 1rem 0.75rem; }
    .card-header { padding: 0.6rem 0.75rem; }
    .row.g-3 > [class*="col-"] { margin-bottom: 0.5rem; }

    /* KPIs */
    .kpi-tile { padding: 0.75rem; }
    .kpi-tile .kpi-label { font-size: 0.7rem; }
    .kpi-tile .kpi-value { font-size: 1.1rem; }

    /* Buttons */
    .btn { font-size: 0.78rem; padding: 0.4rem 0.75rem; }
    .btn-sm { font-size: 0.72rem; padding: 0.3rem 0.6rem; }
    .d-flex.gap-2 { gap: 0.35rem !important; }
    .d-flex.gap-3 { gap: 0.5rem !important; }

    /* Forms */
    .form-control, .form-select { font-size: 0.82rem; padding: 0.45rem 0.65rem; }
    .form-label { font-size: 0.78rem; }
    .input-group-sm .form-control { font-size: 0.8rem; }

    /* Alerts */
    .alert { font-size: 0.78rem; padding: 0.6rem 0.75rem; }
    .alert.d-flex { flex-direction: column; align-items: flex-start !important; }
    .alert.d-flex .btn { margin-top: 0.5rem; margin-right: 0 !important; }

    /* Headings */
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }

    /* Badges */
    .badge { font-size: 0.68rem; padding: 0.2em 0.5em; }

    /* Wizard steps */
    .wizard-step { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
    .wizard-step .step-num { width: 16px; height: 16px; line-height: 16px; font-size: 0.6rem; }

    /* Pagination */
    .pagination { font-size: 0.75rem; }
    .page-link { padding: 0.3rem 0.5rem; }

    /* Plan cards in browse */
    .row.g-3 > .col-md-4 { width: 100%; }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar { width: 180px; min-width: 180px; }
    .col-md-2.sidebar { flex: 0 0 180px; max-width: 180px; }
    main.col-md-10, main.col-md-9 { flex: 1; max-width: calc(100% - 180px); }

    .table { font-size: 0.8rem; }
    .kpi-tile { padding: 1rem; }
    .kpi-tile .kpi-value { font-size: 1.3rem; }

    /* 3-col cards on tablet */
    .row.g-3 > .col-md-4 { width: 50%; }
    .row.g-3 > .col-md-3 { width: 50%; }
}

/* Medium screen — sidebar narrower */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .col-md-2.sidebar { flex: 0 0 200px; max-width: 200px; }
    main.col-md-10 { flex: 1; max-width: calc(100% - 200px); }
}

/* ---- HTMX ---- */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }

/* ============================================================
   Landing Page — Premium SaaS Health-Tech Style
   ============================================================ */

/* Hero — Light, airy, modern */
.landing-hero {
    background: #F8FAFC;
    position: relative;
    overflow: hidden;
    padding: 7rem 0 6rem;
}

/* Organic blurred shapes */
.landing-hero::before {
    content: '';
    position: absolute;
    top: -180px;
    right: -120px;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, #D1FAE5 0%, #ECFDF5 35%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.7;
    z-index: 0;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #A7F3D0 0%, #D1FAE5 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    z-index: 0;
}

/* Extra floating accent */
.landing-hero .hero-accent-1 {
    position: absolute;
    top: 15%;
    left: 8%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
}
.landing-hero .hero-accent-2 {
    position: absolute;
    bottom: 10%;
    right: 12%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(5,150,105,0.06) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: 0;
}

/* Subtle grid pattern overlay */
.landing-hero .hero-grid {
    position: absolute; inset: 0; z-index: 0; opacity: 0.03;
    background-image: radial-gradient(#059669 1px, transparent 1px);
    background-size: 32px 32px;
}

.hero-badge {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 50px;
    color: #065F46;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
}
.hero-badge .badge-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #10B981;
    margin-left: 6px;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 900;
    line-height: 1.25;
    color: #0F172A;
    letter-spacing: -0.02em;
}
.hero-title .highlight {
    background: linear-gradient(135deg, #059669, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #64748B;
    max-width: 620px;
    line-height: 1.8;
}

/* Primary CTA button */
.btn-hero-primary {
    background: #0F172A;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 14px rgba(15,23,42,0.12);
}
.btn-hero-primary:hover {
    background: #1E293B;
    color: #fff;
    box-shadow: 0 4px 20px rgba(15,23,42,0.2);
    transform: translateY(-1px);
}

/* Secondary CTA button */
.btn-hero-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-hero-secondary:hover {
    background: #F8FAFC;
    color: #0F172A;
    border-color: #CBD5E0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Hero stats — light version */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1rem;
}
.hero-stat-item {
    text-align: center;
    padding: 0.5rem 1.5rem;
}
.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
}
.hero-stat-label {
    font-size: 0.8rem;
    color: #94A3B8;
    font-weight: 500;
}
.hero-stat-divider {
    width: 1px;
    background: #E2E8F0;
    align-self: stretch;
}

/* Feature pill row */
.hero-features-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.hero-feature-pill {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    color: #64748B;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.hero-feature-pill i {
    color: #10B981;
    font-size: 0.7rem;
}

/* Section utilities */
.section-padding { padding: 5rem 0; }
.section-label {
    display: inline-block;
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px;
    color: #198754; background: rgba(25,135,84,0.08);
    padding: 0.35rem 1rem; border-radius: 50px; margin-bottom: 0.75rem;
}
.section-heading { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; margin-bottom: 0.75rem; }

/* Premium Cards */
.premium-card {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 16px; padding: 2rem 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.premium-card:hover { border-color: #198754; box-shadow: 0 4px 24px rgba(25,135,84,0.08); }
.premium-card .card-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
}

/* Step Cards */
.step-item { position: relative; text-align: center; }
.step-item .step-circle {
    width: 48px; height: 48px; border-radius: 50%;
    background: #198754; color: #fff; font-weight: 800; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: 0 4px 14px rgba(25,135,84,0.25);
}
.step-arrow {
    position: absolute; top: 24px; right: 65%;
    color: #cbd5e0; font-size: 1.5rem;
}

/* Feature list */
.feature-list { list-style: none; padding: 0; }
.feature-list li {
    padding: 0.4rem 0; font-size: 0.9rem;
    display: flex; align-items: flex-start; gap: 0.5rem;
}
.feature-list li::before {
    content: ''; min-width: 20px; height: 20px;
    background: rgba(25,135,84,0.12);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23198754'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center;
}

/* Plan showcase card */
.plan-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
    overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.plan-card:hover { border-color: #198754; box-shadow: 0 4px 24px rgba(25,135,84,0.08); }
.plan-card.featured { border-color: #198754; border-width: 2px; }
.plan-card .plan-header {
    padding: 1.5rem; text-align: center;
    background: linear-gradient(160deg, rgba(25,135,84,0.04), rgba(32,201,151,0.06));
    border-bottom: 1px solid #e2e8f0;
}
.plan-card.featured .plan-header { background: rgba(25,135,84,0.08); }
.plan-price {
    font-size: 2.5rem; font-weight: 900;
    color: #198754; line-height: 1;
}

/* Testimonial */
.testimonial-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
    padding: 2rem; position: relative;
}
.testimonial-card::before {
    content: '"'; position: absolute; top: 8px; right: 1.5rem;
    font-size: 4rem; color: #198754; opacity: 0.08; font-family: serif; line-height: 1;
}
.testimonial-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: #198754; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}

/* Trust bar */
.trust-bar {
    background: rgba(25,135,84,0.04);
    border-top: 1px solid rgba(25,135,84,0.1);
    border-bottom: 1px solid rgba(25,135,84,0.1);
}

/* FAQ on landing */
.faq-item {
    border: 1px solid #e2e8f0; border-radius: 12px;
    margin-bottom: 0.75rem; overflow: hidden;
}
.faq-question {
    background: none; border: none; width: 100%; text-align: right;
    padding: 1rem 1.25rem; font-weight: 600; font-size: 0.95rem;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; color: #2d3748;
}
.faq-question:hover { color: #198754; }
.faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.85rem; color: #718096; display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { color: #198754; }

/* CTA section */
.cta-section {
    background: linear-gradient(160deg, #0b5e3c, #146c43);
    position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp 0.7s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* Responsive overrides */
@media (max-width: 767.98px) {
    .section-padding { padding: 3rem 0; }
    .step-arrow { display: none; }
    .hero-title { font-size: 1.75rem; }
}

/* ---- Form Hint Tooltip ---- */
.form-label .hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
    margin-right: 4px;
    position: relative;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
}
.form-label .hint-icon:hover {
    background: #0F172A;
    color: #fff;
}
.form-label .hint-icon .hint-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: #0F172A;
    color: #F1F5F9;
    font-size: 0.75rem;
    font-weight: 400;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    line-height: 1.5;
}
.form-label .hint-icon .hint-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: #0F172A;
}
.form-label .hint-icon:hover .hint-tooltip {
    display: block;
}
@media (max-width: 767.98px) {
    .form-label .hint-icon .hint-tooltip {
        white-space: normal;
        width: 200px;
    }
}

/* ---- Plans Vertical Tabs ---- */
.plans-vertical-layout {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    min-height: 480px;
}

/* Right sidebar — category tabs */
.category-tabs-sidebar {
    width: 280px;
    min-width: 280px;
    background: #fafbfc;
    border-left: 1px solid #e2e8f0;
    padding: 1.25rem 0;
    overflow-y: auto;
}
.category-tabs-inner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

/* Vertical category tab button */
.category-vertical-tab {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    font-size: 0.9rem;
    color: #4a5568;
    transition: all 0.25s ease;
    position: relative;
}
.category-vertical-tab:hover {
    background: #fff;
    border-color: #e2e8f0;
    color: #1a202c;
}
.category-vertical-tab.active {
    background: #fff;
    border-color: #198754;
    color: #198754;
    box-shadow: 0 2px 12px rgba(25,135,84,0.1);
}
.category-vertical-tab.active::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -11px;
    transform: translateY(-50%);
    width: 6px;
    height: 28px;
    background: #198754;
    border-radius: 3px 0 0 3px;
}

.vtab-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(25,135,84,0.06);
    color: #198754;
    transition: all 0.3s ease;
}
.category-vertical-tab.active .vtab-icon {
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
    box-shadow: 0 4px 14px rgba(25,135,84,0.25);
}

.vtab-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.vtab-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vtab-count {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}
.category-vertical-tab.active .vtab-count {
    color: #198754;
}

.vtab-arrow {
    font-size: 0.7rem;
    color: #cbd5e0;
    transition: all 0.3s ease;
    opacity: 0;
}
.category-vertical-tab.active .vtab-arrow {
    opacity: 1;
    color: #198754;
}
.category-vertical-tab:hover .vtab-arrow {
    opacity: 0.5;
}

/* Left content — plan panels */
.category-plans-content {
    flex: 1;
    padding: 1.75rem 2rem;
    overflow-y: auto;
    min-width: 0;
}

.category-plan-panel {
    display: none;
    animation: fadeInPanel 0.4s ease;
}
.category-plan-panel.active {
    display: block;
}
@keyframes fadeInPanel {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.category-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}
.category-panel-header h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
}
.category-panel-header h4 i {
    color: #198754;
    font-size: 1.3rem;
}
.panel-plan-count {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
    background: #f8fafc;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
}

/* Plan vertical card */
.plan-vertical-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.plan-vertical-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #198754, #20c997);
    opacity: 0;
    transition: opacity 0.3s;
}
.plan-vertical-card:hover {
    border-color: #198754;
    box-shadow: 0 8px 28px rgba(25,135,84,0.1);
    transform: translateY(-2px);
}
.plan-vertical-card:hover::before {
    opacity: 1;
}

.plan-vcard-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.plan-vcard-duration {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.plan-vcard-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: #198754;
}

.plan-vcard-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.plan-vcard-desc {
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex: 1;
}

.plan-vcard-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.plan-vcard-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    flex-wrap: wrap;
}
.plan-vcard-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.plan-vcard-meta i {
    color: #198754;
    font-size: 0.7rem;
}

/* "View Products" button */
.btn-products-view {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(25,135,84,0.08), rgba(32,201,151,0.06));
    color: #198754;
    border: 1px solid rgba(25,135,84,0.15);
    border-radius: 10px;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
}
.btn-products-view:hover {
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(25,135,84,0.25);
}
.btn-products-view i {
    font-size: 0.85rem;
}

/* ---- Product Details Modal ---- */
.products-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.products-modal-overlay.open {
    display: flex;
}

.products-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.35s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.products-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}
.products-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 0.3rem;
}
.products-modal-subtitle {
    font-size: 0.8rem;
    color: #718096;
}
.products-modal-subtitle strong {
    color: #198754;
}

.products-modal-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}
.products-modal-close:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.products-modal-body {
    padding: 1.25rem 1.75rem 1.75rem;
    overflow-y: auto;
    flex: 1;
}

/* Product row in modal */
.product-modal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fafcfb;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}
.product-modal-item:hover {
    background: #fff;
    border-color: #198754;
    box-shadow: 0 2px 12px rgba(25,135,84,0.06);
}
.product-modal-item:last-child {
    margin-bottom: 0;
}

.product-modal-img {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(25,135,84,0.06), rgba(32,201,151,0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #198754;
    overflow: hidden;
}
.product-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal-info {
    flex: 1;
    min-width: 0;
}
.product-modal-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a202c;
    margin-bottom: 0.15rem;
}
.product-modal-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-modal-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}
.product-modal-qty {
    font-size: 0.73rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.product-modal-qty i {
    color: #198754;
    font-size: 0.65rem;
}

.product-modal-price {
    margin-right: auto;
    font-weight: 700;
    font-size: 0.9rem;
    color: #198754;
    white-space: nowrap;
}

/* Empty modal */
.products-modal-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}
.products-modal-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* Responsive — vertical tabs */
@media (max-width: 991.98px) {
    .plans-vertical-layout {
        flex-direction: column;
    }
    .category-tabs-sidebar {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem;
        overflow-x: auto;
    }
    .category-tabs-inner {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0;
    }
    .category-vertical-tab {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.75rem 0.6rem;
        min-width: 90px;
        text-align: center;
        border-radius: 12px;
    }
    .category-vertical-tab.active::after {
        display: none;
    }
    .vtab-icon {
        width: 36px; height: 36px; min-width: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }
    .vtab-name {
        font-size: 0.72rem;
    }
    .vtab-count {
        font-size: 0.65rem;
    }
    .vtab-arrow {
        display: none;
    }
    .category-plans-content {
        padding: 1.25rem 1rem;
    }
    .products-modal {
        max-width: 95vw;
    }
}

@media (max-width: 767.98px) {
    .category-tabs-sidebar {
        padding: 0.75rem 0.5rem;
    }
    .category-vertical-tab {
        min-width: 72px;
        padding: 0.6rem 0.4rem;
        border-radius: 10px;
    }
    .vtab-icon {
        width: 32px; height: 32px; min-width: 32px;
        font-size: 0.9rem;
    }
    .vtab-name {
        font-size: 0.68rem;
    }
    .plan-vertical-card {
        padding: 1.15rem;
    }
    .plan-vcard-title {
        font-size: 0.9rem;
    }
    .products-modal-header {
        padding: 1.25rem;
    }
    .products-modal-body {
        padding: 1rem;
    }
    .product-modal-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ---- Browse Plans — Card hover ---- */
.browse-plan-card {
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
}
.browse-plan-card:hover {
    border-color: #198754;
    box-shadow: 0 6px 24px rgba(25,135,84,0.1);
    transform: translateY(-2px);
}

/* ---- Plan Detail Modal ---- */
.plan-detail-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.plan-detail-modal-overlay.open {
    display: flex;
}

.plan-detail-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    animation: modalSlideUp 0.35s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.plan-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}
.plan-detail-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 0.5rem;
}
.plan-detail-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.plan-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
}
.plan-detail-modal-close {
    width: 38px; height: 38px; min-width: 38px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}
.plan-detail-modal-close:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Modal body */
.plan-detail-modal-body {
    padding: 1.25rem 1.75rem;
    overflow-y: auto;
    flex: 1;
}
.plan-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.plan-detail-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #4a5568;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
}
.plan-detail-meta-chip i {
    color: #198754;
    font-size: 0.7rem;
}

.plan-detail-section {
    margin-bottom: 1.25rem;
}
.plan-detail-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
}
.plan-detail-section-title i {
    color: #198754;
}

/* Products list in modal */
.modal-products-list {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.modal-product-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.modal-product-row:last-child {
    border-bottom: none;
}
.modal-product-row:hover {
    background: #fafcfb;
}
.modal-product-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}
.modal-product-index {
    width: 22px; height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(25,135,84,0.1);
    color: #198754;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-product-info {
    min-width: 0;
}
.modal-product-name {
    font-size: 0.82rem;
    color: #1a202c;
    display: block;
}
.modal-product-notes {
    font-size: 0.68rem;
    color: #94a3b8;
    display: block;
    margin-top: 1px;
}
.modal-product-qty-badge {
    font-size: 0.7rem;
    color: #64748b;
    background: #f8fafc;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.modal-product-qty-badge i {
    color: #198754;
    font-size: 0.6rem;
}
.modal-product-price {
    font-weight: 700;
    font-size: 0.82rem;
    color: #198754;
    white-space: nowrap;
    min-width: 100px;
    text-align: left;
}

/* Cost summary in modal */
.plan-detail-cost-summary {
    background: linear-gradient(135deg, rgba(25,135,84,0.04), rgba(32,201,151,0.04));
    border: 1px solid rgba(25,135,84,0.12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
.cost-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}
.cost-summary-row strong {
    color: #198754;
    font-size: 1.1rem;
}
.cost-summary-note {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Modal footer */
.plan-detail-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.75rem 1.5rem;
    gap: 1rem;
}
.plan-detail-modal-footer .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.25rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .plan-detail-modal {
        max-width: 95vw;
        max-height: 92vh;
        border-radius: 16px;
    }
    .plan-detail-modal-header {
        padding: 1.25rem 1rem 1rem;
    }
    .plan-detail-modal-body {
        padding: 1rem;
    }
    .plan-detail-modal-footer {
        padding: 0.75rem 1rem 1.25rem;
        flex-direction: column;
    }
    .plan-detail-modal-footer .btn {
        width: 100%;
    }
    .modal-product-row {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .modal-product-price {
        width: 100%;
        text-align: right;
    }
}

/* ============================================================
   Mobile-First Responsive — Global
   ============================================================ */

/* ---- Images — fluid ---- */
img { max-width: 100%; height: auto; }

/* ---- Touch-friendly tap targets ---- */
@media (max-width: 767.98px) {
    .btn { min-height: 40px; padding: 0.55rem 1rem; font-size: 0.85rem; }
    .btn-sm { min-height: 36px; padding: 0.4rem 0.75rem; font-size: 0.78rem; }
    .nav-link { padding: 0.6rem 0.75rem; }
    .form-check-input { width: 1.1em; height: 1.1em; }
    .form-check-label { font-size: 0.85rem; }
}

/* ---- Base typography scaling ---- */
@media (max-width: 575.98px) {
    body { font-size: 0.9rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    .section-heading { font-size: 1.35rem; }
    .section-label { font-size: 0.72rem; }
}

/* ---- Container padding ---- */
@media (max-width: 767.98px) {
    .container { padding-left: 0.85rem; padding-right: 0.85rem; }
    .container-fluid { padding-left: 0.5rem; padding-right: 0.5rem; }
    .section-padding { padding: 2.5rem 0; }
    main.col-md-10, main.col-md-9 { padding: 0.75rem !important; }
}

/* ---- Navbar mobile ---- */
@media (max-width: 767.98px) {
    .navbar .navbar-brand img { height: 28px; }
    .navbar .container { padding-left: 0.75rem; padding-right: 0.75rem; }
    .navbar .dropdown-menu {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0;
        border-radius: 16px 16px 0 0; max-height: 60vh; overflow-y: auto;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
}

/* ---- Dashboard sidebar (mobile offcanvas) ---- */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed; top: 0; right: -285px; bottom: 0; z-index: 1040;
        width: 270px; min-height: 100vh !important;
        transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto; padding-top: 65px !important;
        box-shadow: -4px 0 24px rgba(0,0,0,0.18);
        will-change: right;
    }
    .sidebar.show { right: 0; }

    .sidebar-backdrop {
        display: none;
        position: fixed; inset: 0; z-index: 1035;
        background: rgba(0,0,0,0.45);
        transition: opacity 0.25s;
    }
    .sidebar-backdrop.show { display: block; }

    main.col-md-10, main.col-md-9 { width: 100% !important; }
}

/* ---- Tables — horizontal scroll on mobile ---- */
@media (max-width: 767.98px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.75rem;
        width: calc(100% + 1.5rem);
        padding: 0 0.75rem;
    }
    .table {
        font-size: 0.73rem;
        min-width: 550px;
    }
    .table thead th {
        font-size: 0.68rem; white-space: nowrap; padding: 0.5rem 0.4rem;
    }
    .table tbody td {
        padding: 0.45rem 0.4rem; white-space: nowrap;
    }
    /* Allow description columns to wrap */
    .table td.text-wrap-cell { white-space: normal; min-width: 120px; }
}

/* ---- Cards & grids ---- */
@media (max-width: 767.98px) {
    .row.g-3 > [class*="col-"], .row.g-4 > [class*="col-"] {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    .card-body { padding: 1rem 0.75rem; }
    .card-header { padding: 0.6rem 0.75rem; }
    .card { border-radius: 12px; }
}

/* ---- Filter forms ---- */
@media (max-width: 767.98px) {
    .row.g-2.align-items-end > [class*="col-"] {
        width: 100%;
        margin-bottom: 0.35rem;
    }
    .input-group-sm .form-control,
    .form-select-sm { font-size: 0.85rem; padding: 0.5rem 0.65rem; }
}

/* ---- Modals / Popups — full-width on mobile ---- */
@media (max-width: 575.98px) {
    .products-modal,
    .plan-detail-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        margin: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    .products-modal-overlay,
    .plan-detail-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .products-modal-header,
    .plan-detail-modal-header {
        padding: 1rem 1.15rem;
        border-radius: 16px 16px 0 0;
    }
    .products-modal-body,
    .plan-detail-modal-body {
        padding: 0.85rem 1.15rem;
    }
    .plan-detail-modal-footer {
        padding: 0.75rem 1.15rem 1.25rem;
        flex-direction: column;
    }
    .plan-detail-modal-footer .btn { width: 100%; }
    .plan-detail-modal-title { font-size: 1rem; }

    /* Product rows stacked */
    .product-modal-item {
        flex-direction: column; align-items: flex-start; gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .modal-product-row {
        flex-wrap: wrap; gap: 0.4rem;
        padding: 0.6rem 0.75rem;
    }
    .modal-product-price { width: 100%; text-align: right; }
}

/* ---- Landing Page — Hero ---- */
@media (max-width: 767.98px) {
    .landing-hero { padding: 4rem 0 3rem; }
    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 0.9rem; max-width: 100%; }
    .hero-features-row { gap: 0.4rem; }
    .hero-feature-pill { font-size: 0.7rem; padding: 0.3rem 0.65rem; }
    .hero-stats { gap: 0.75rem; }
    .hero-stat-item { padding: 0.25rem 0.75rem; }
    .hero-stat-value { font-size: 1.25rem; }
    .hero-stat-label { font-size: 0.68rem; }
    .hero-stat-divider { display: none; }
    .btn-hero-primary, .btn-hero-secondary {
        display: block; width: 100%;
        text-align: center; padding: 0.75rem 1.5rem;
    }
    .hero-badge { font-size: 0.72rem; padding: 0.3rem 0.75rem; }
}

/* ---- Landing — Why Choose Us cards ---- */
@media (max-width: 767.98px) {
    .premium-card { padding: 1.25rem 1rem; border-radius: 14px; }
    .premium-card .card-icon { width: 44px; height: 44px; font-size: 1.2rem; }
}

/* ---- Landing — Steps / How it works ---- */
@media (max-width: 767.98px) {
    .step-item { text-align: center; padding: 0.5rem 0; }
    .step-item .step-circle { width: 40px; height: 40px; font-size: 1rem; }
    .step-item h6 { font-size: 0.85rem; }
    .step-item p { font-size: 0.75rem; }
}

/* ---- Landing — Vertical tabs ---- */
@media (max-width: 991.98px) {
    .plans-vertical-layout { flex-direction: column; border-radius: 16px; }
    .category-tabs-sidebar {
        width: 100%; min-width: 0; border-left: none;
        border-bottom: 1px solid #e2e8f0; padding: 0.75rem;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .category-tabs-inner {
        flex-direction: row; gap: 0.4rem; padding: 0;
        flex-wrap: nowrap;
    }
    .category-vertical-tab {
        flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.5rem;
        min-width: 80px; text-align: center; border-radius: 12px;
        flex-shrink: 0;
    }
    .category-vertical-tab.active::after { display: none; }
    .vtab-icon { width: 34px; height: 34px; min-width: 34px; font-size: 1rem; }
    .vtab-name { font-size: 0.7rem; }
    .vtab-count { font-size: 0.62rem; }
    .vtab-arrow { display: none; }
    .category-plans-content { padding: 1rem 0.75rem; }
    .category-panel-header { flex-direction: column; gap: 0.35rem; align-items: flex-start; }
    .category-panel-header h4 { font-size: 1.05rem; }
}

/* ---- Landing — Testimonials ---- */
@media (max-width: 767.98px) {
    .testimonial-card { padding: 1.25rem 1rem; }
    .testimonial-card::before { font-size: 2.5rem; top: 2px; right: 1rem; }
}

/* ---- Landing — FAQ ---- */
@media (max-width: 767.98px) {
    .faq-question { font-size: 0.85rem; padding: 0.85rem 1rem; }
    .faq-answer { font-size: 0.78rem; padding: 0 1rem 0.85rem; }
}

/* ---- Landing — CTA ---- */
@media (max-width: 767.98px) {
    .cta-section { padding: 3rem 0 !important; }
    .cta-section h2 { font-size: 1.3rem; }
    .cta-section .btn { width: 100%; margin-bottom: 0.5rem; }
}

/* ---- KPI tiles ---- */
@media (max-width: 767.98px) {
    .kpi-tile { padding: 0.85rem; }
    .kpi-tile .kpi-label { font-size: 0.7rem; }
    .kpi-tile .kpi-value { font-size: 1.2rem; }
}

/* ---- Forms ---- */
@media (max-width: 767.98px) {
    .form-control, .form-select { font-size: 0.85rem; padding: 0.5rem 0.65rem; }
    .form-label { font-size: 0.8rem; }
    /* Stack form rows */
    .row.g-2 > [class*="col-"].form-col-mobile {
        width: 100%;
    }
}

/* ---- Alerts ---- */
@media (max-width: 767.98px) {
    .alert { font-size: 0.78rem; padding: 0.6rem 0.75rem; }
    .alert.d-flex { flex-direction: column; align-items: flex-start !important; }
    .alert.d-flex .btn { margin-top: 0.5rem; margin-right: 0 !important; }
}

/* ---- Badges ---- */
@media (max-width: 767.98px) {
    .badge { font-size: 0.68rem; padding: 0.2em 0.55em; }
}

/* ---- Pagination ---- */
@media (max-width: 767.98px) {
    .pagination { font-size: 0.75rem; }
    .page-link { padding: 0.35rem 0.55rem; }
}

/* ---- Footer ---- */
@media (max-width: 767.98px) {
    footer { padding: 2rem 0 1.5rem; font-size: 0.78rem; }
    footer h5 { font-size: 0.95rem; }
}

/* ---- Scroll containers — smooth scroll ---- */
.category-tabs-sidebar,
.plan-detail-modal-body,
.products-modal-body,
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ---- Plan vertical card ---- */
@media (max-width: 767.98px) {
    .plan-vertical-card { padding: 1rem 0.85rem; border-radius: 12px; }
    .plan-vcard-title { font-size: 0.9rem; }
    .plan-vcard-desc { font-size: 0.75rem; }
    .plan-vcard-top { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
    .plan-vcard-footer { flex-direction: column; gap: 0.5rem; }
    .btn-products-view { width: 100%; justify-content: center; }
}

/* ---- Print ---- */
@media print {
    .sidebar, .navbar, .btn, footer { display: none !important; }
}
