/* ============================================================
   PBS Nicaragua — Main Stylesheet
   ni.pragmaticsolutions.app
   ============================================================ */

/* ---------- Brand Variables ---------- */
:root {
    --pbs-coral: #F26354;
    --pbs-coral-dark: #D94F3F;
    --pbs-coral-light: #FBC5BC;
    --pbs-coral-50: #FEF2F0;
    --pbs-blue: #2563EB;
    --pbs-blue-dark: #1D4ED8;
    --pbs-blue-light: #DBEAFE;
    --pbs-blue-50: #EFF6FF;
    --pbs-orange: #E85D04;
    --pbs-orange-dark: #C44D03;
    --pbs-orange-light: #FED7AA;
    --pbs-orange-50: #FFF7ED;
    --pbs-green: #16A34A;
    --pbs-green-dark: #15803D;
    --pbs-green-light: #BBF7D0;
    --pbs-green-50: #F0FDF4;
    --pbs-slate: #0F172A;
    --pbs-slate-700: #334155;
    --pbs-slate-500: #64748B;
    --pbs-slate-400: #94A3B8;
    --pbs-slate-300: #CBD5E1;
    --pbs-surface: #F8FAFC;
    --pbs-border: #E2E8F0;
    --pbs-white: #FFFFFF;
    --pbs-ink: #0A0A0A;
    --pbs-muted: #71717A;
    --pbs-radius: 0.75rem;
    --pbs-radius-lg: 1rem;
    --pbs-radius-xl: 1.5rem;
    --pbs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --pbs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --pbs-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --pbs-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --pbs-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --pbs-transition: 0.2s ease;
    --pbs-transition-slow: 0.4s ease;
}

/* ---------- Heading Font ---------- */
h1, h2, h3, h4, h5, h6,
.font-heading {
    font-family: 'Space Grotesk', system-ui, sans-serif;
}


/* ---------- Glassmorphism Cards ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--pbs-radius-lg);
    box-shadow: var(--pbs-shadow);
    transition: transform var(--pbs-transition), box-shadow var(--pbs-transition);
}

.glass-card-dark {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbs-radius-lg);
    box-shadow: var(--pbs-shadow);
    color: #F8FAFC;
}

.glass-card:hover,
.glass-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--pbs-shadow-lg);
}


/* ---------- Animate on Scroll ---------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for child elements */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }


/* ---------- Product Cards ---------- */
.product-card {
    background: var(--pbs-white);
    border: 1px solid var(--pbs-border);
    border-radius: var(--pbs-radius-lg);
    padding: 1.5rem;
    transition: transform var(--pbs-transition), box-shadow var(--pbs-transition), border-color var(--pbs-transition);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pbs-blue), var(--pbs-orange));
    opacity: 0;
    transition: opacity var(--pbs-transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pbs-shadow-lg);
    border-color: var(--pbs-blue-light);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card .product-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    transition: transform var(--pbs-transition);
}

.product-card:hover .product-icon {
    transform: scale(1.08);
}


/* ---------- Status Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    line-height: 1;
    white-space: nowrap;
}

.badge-free {
    background: rgba(22, 163, 74, 0.1);
    color: #16A34A;
}

.badge-active {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

.badge-development {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.badge-suspended {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.badge-coming {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.badge-popular {
    background: rgba(232, 93, 4, 0.1);
    color: #E85D04;
}


/* ---------- Hero / Gradient Sections ---------- */
.hero-gradient {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    color: #F8FAFC;
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(232, 93, 4, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-gradient-blue {
    background: linear-gradient(135deg, #1E3A5F 0%, #1E293B 50%, #0F172A 100%);
    color: #F8FAFC;
}

.hero-gradient-orange {
    background: linear-gradient(135deg, #7C2D12 0%, #1E293B 60%, #0F172A 100%);
    color: #F8FAFC;
}

.section-light {
    background: var(--pbs-surface);
}


/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border-radius: var(--pbs-radius);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    cursor: pointer;
    transition: all var(--pbs-transition);
    border: none;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--pbs-blue);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--pbs-blue);
    color: var(--pbs-white);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--pbs-blue-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-orange {
    background: var(--pbs-orange);
    color: var(--pbs-white);
    box-shadow: 0 1px 3px rgba(232, 93, 4, 0.3);
}

.btn-orange:hover {
    background: var(--pbs-orange-dark);
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.35);
    transform: translateY(-1px);
}

.btn-green {
    background: var(--pbs-green);
    color: var(--pbs-white);
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
}

.btn-green:hover {
    background: var(--pbs-green-dark);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--pbs-slate-700);
    border: 1px solid var(--pbs-border);
}

.btn-ghost:hover {
    background: var(--pbs-surface);
    border-color: var(--pbs-slate-300);
}

.btn-outline-blue {
    background: transparent;
    color: var(--pbs-blue);
    border: 1.5px solid var(--pbs-blue);
}

.btn-outline-blue:hover {
    background: var(--pbs-blue);
    color: var(--pbs-white);
}

.btn-outline-white {
    background: transparent;
    color: var(--pbs-white);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: var(--pbs-radius-lg);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
}


/* ---------- Form Inputs ---------- */
.form-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--pbs-border);
    border-radius: var(--pbs-radius);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--pbs-ink);
    background: var(--pbs-white);
    transition: border-color var(--pbs-transition), box-shadow var(--pbs-transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--pbs-slate-400);
}

.form-input:focus {
    border-color: var(--pbs-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input:disabled {
    background: var(--pbs-surface);
    color: var(--pbs-slate-400);
    cursor: not-allowed;
}

.form-input-error {
    border-color: #EF4444;
}

.form-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pbs-slate-700);
    margin-bottom: 0.375rem;
}

.form-helper {
    font-size: 0.75rem;
    color: var(--pbs-slate-500);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.75rem;
    color: #EF4444;
    margin-top: 0.25rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}


/* ---------- Navigation ---------- */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pbs-slate-500);
    text-decoration: none;
    transition: color var(--pbs-transition);
    position: relative;
}

.nav-link:hover {
    color: var(--pbs-blue);
}

.nav-link.active {
    color: var(--pbs-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--pbs-blue);
    border-radius: 1px;
}


/* ---------- Sidebar (Dashboard / Admin) ---------- */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--pbs-white);
    border-right: 1px solid var(--pbs-border);
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-section {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

.sidebar-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pbs-slate-400);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pbs-slate-500);
    text-decoration: none;
    transition: all var(--pbs-transition);
}

.sidebar-link:hover {
    background: var(--pbs-surface);
    color: var(--pbs-slate-700);
}

.sidebar-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--pbs-blue);
}

.sidebar-link .sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link.active .sidebar-icon {
    opacity: 1;
}

.sidebar-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: var(--pbs-blue);
    color: var(--pbs-white);
}


/* ---------- Data Tables ---------- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    background: var(--pbs-surface);
    color: var(--pbs-slate-500);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--pbs-border);
    white-space: nowrap;
}

.data-table th:first-child {
    border-top-left-radius: var(--pbs-radius);
}

.data-table th:last-child {
    border-top-right-radius: var(--pbs-radius);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pbs-border);
    color: var(--pbs-slate-700);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--pbs-transition);
}

.data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table-container {
    background: var(--pbs-white);
    border: 1px solid var(--pbs-border);
    border-radius: var(--pbs-radius-lg);
    overflow: hidden;
}


/* ---------- Dashboard Stats Cards ---------- */
.stat-card {
    background: var(--pbs-white);
    border: 1px solid var(--pbs-border);
    border-radius: var(--pbs-radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card-blue::before { background: var(--pbs-blue); }
.stat-card-orange::before { background: var(--pbs-orange); }
.stat-card-green::before { background: var(--pbs-green); }
.stat-card-slate::before { background: var(--pbs-slate-700); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pbs-ink);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--pbs-slate-500);
    margin-top: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.375rem;
}

.stat-change-up { color: var(--pbs-green); }
.stat-change-down { color: #EF4444; }


/* ---------- Pricing Cards ---------- */
.pricing-card {
    background: var(--pbs-white);
    border: 1px solid var(--pbs-border);
    border-radius: var(--pbs-radius-xl);
    padding: 2rem;
    text-align: center;
    transition: transform var(--pbs-transition), box-shadow var(--pbs-transition);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pbs-shadow-xl);
}

.pricing-card-featured {
    border-color: var(--pbs-blue);
    border-width: 2px;
    box-shadow: var(--pbs-shadow-lg);
}

.pricing-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: var(--pbs-blue);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pbs-ink);
    line-height: 1;
}

.pricing-price .currency {
    font-size: 1.25rem;
    font-weight: 600;
    vertical-align: top;
    line-height: 1.5;
}

.pricing-price .period {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--pbs-slate-500);
}


/* ---------- Alert / Notice Cards ---------- */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--pbs-radius);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.alert-info {
    background: var(--pbs-blue-50);
    border: 1px solid var(--pbs-blue-light);
    color: #1E40AF;
}

.alert-success {
    background: var(--pbs-green-50);
    border: 1px solid var(--pbs-green-light);
    color: #15803D;
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}


/* ---------- Tooltip ---------- */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: var(--pbs-slate);
    color: #F8FAFC;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--pbs-transition), transform var(--pbs-transition);
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}


/* ---------- Empty States ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state img,
.empty-state svg {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pbs-slate-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--pbs-slate-500);
    max-width: 320px;
    margin: 0 auto;
}


/* ---------- Loading / Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--pbs-border) 25%, var(--pbs-surface) 37%, var(--pbs-border) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: 0.375rem;
}

@keyframes skeletonShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}


/* ---------- Divider ---------- */
.divider {
    height: 1px;
    background: var(--pbs-border);
    margin: 1.5rem 0;
}

.divider-vertical {
    width: 1px;
    background: var(--pbs-border);
    align-self: stretch;
}


/* ---------- Keyframe Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-32px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(32px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Animation utility classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out forwards;
    opacity: 0;
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
}

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s infinite; }

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }


/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
    --pbs-surface: #1E293B;
    --pbs-border: #334155;
    --pbs-white: #0F172A;
    --pbs-ink: #F8FAFC;
    --pbs-muted: #94A3B8;
    --pbs-slate-700: #CBD5E1;
    --pbs-slate-500: #94A3B8;
    --pbs-slate-400: #64748B;
    --pbs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --pbs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --pbs-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --pbs-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
    background: #0A0A0A;
    color: #F8FAFC;
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .product-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .product-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .stat-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .data-table th {
    background: #1E293B;
    border-color: #334155;
    color: #94A3B8;
}

[data-theme="dark"] .data-table td {
    border-color: #334155;
    color: #CBD5E1;
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

[data-theme="dark"] .form-input {
    background: #1E293B;
    border-color: #334155;
    color: #F8FAFC;
}

[data-theme="dark"] .sidebar {
    background: #0F172A;
    border-color: #1E293B;
}

[data-theme="dark"] .sidebar-link:hover {
    background: #1E293B;
}

[data-theme="dark"] .pricing-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .alert-info {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .alert-success {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}


/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        z-index: 40;
        transition: left 0.3s ease;
        box-shadow: var(--pbs-shadow-xl);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 35;
    }

    .sidebar.open ~ .sidebar-overlay {
        display: block;
    }

    .stat-value {
        font-size: 1.375rem;
    }

    .pricing-price {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hero-gradient {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .product-card {
        padding: 1rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}


/* ---------- Utility: Gradient text ---------- */
.text-gradient-coral {
    background: linear-gradient(135deg, #F26354, #F9A79C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #2563EB, #60A5FA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-orange {
    background: linear-gradient(135deg, #E85D04, #FB923C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-mixed {
    background: linear-gradient(135deg, #F26354, #E85D04);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ---------- Utility: Scrollbar ---------- */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--pbs-slate-300);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--pbs-slate-400);
}


/* ---------- Utility: Focus ring ---------- */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}


/* ---------- Utility: Backdrop blur support ---------- */
@supports not (backdrop-filter: blur(12px)) {
    .glass-card {
        background: rgba(255, 255, 255, 0.95);
    }
    .glass-card-dark {
        background: rgba(15, 23, 42, 0.95);
    }
}


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

    .glass-card,
    .product-card,
    .stat-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    body {
        color: #000;
        background: #fff;
    }
}


/*
 * ============================================================
 * IntersectionObserver — Animate on Scroll
 * ============================================================
 * Add this script before </body> in your template:
 *
 * <script>
 * document.addEventListener('DOMContentLoaded', function() {
 *     const observer = new IntersectionObserver(function(entries) {
 *         entries.forEach(function(entry) {
 *             if (entry.isIntersecting) {
 *                 entry.target.classList.add('visible');
 *                 observer.unobserve(entry.target);
 *             }
 *         });
 *     }, {
 *         threshold: 0.1,
 *         rootMargin: '0px 0px -40px 0px'
 *     });
 *
 *     document.querySelectorAll('.fade-in-up, .fade-in-left, .fade-in-right, .fade-in-scale').forEach(function(el) {
 *         observer.observe(el);
 *     });
 * });
 * </script>
 *
 * ============================================================
 */