/* ==========================================================================
   SellerLeak.com — High-Trust Financial Interface Styling
   Inspired by Stripe, Linear, and Modern Institutional Fintech
   ========================================================================== */

:root {
    --brand-primary: #0f172a;
    --brand-accent: #2563eb;
    --brand-success: #059669;
    --brand-warning: #d97706;
    --brand-danger: #dc2626;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: #f8fafc;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

/* Mobile-Friendly Smooth Touch Scrolling */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Prevent iOS Safari auto-zoom on input focus */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* iPhone Home Bar Safe Area Support */
.safe-area-pb {
    padding-bottom: max(0.375rem, env(safe-area-inset-bottom));
}

/* Pristine Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 9999px;
    height: 6px;
    outline: none;
    transition: background 0.2s ease;
}

input[type="range"]:hover {
    background: #cbd5e1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16), 0 0 0 2px #2563eb;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3), 0 0 0 3px #2563eb;
}

/* Institutional Card Shadows & Micro-interactions */
.fintech-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fintech-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

.winner-card {
    border-color: #10b981 !important;
    box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.15), 0 8px 10px -6px rgba(16, 185, 129, 0.08) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%) !important;
}

/* Subtle Grid Background Pattern */
.bg-grid-pattern {
    background-image: radial-gradient(#cbd5e1 0.75px, transparent 0.75px);
    background-size: 24px 24px;
}

/* Revenue Breakdown Multi-Segment Bar */
.breakdown-segment {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
}

.breakdown-segment:first-child {
    border-top-left-radius: 9999px;
    border-bottom-left-radius: 9999px;
}

.breakdown-segment:last-child {
    border-top-right-radius: 9999px;
    border-bottom-right-radius: 9999px;
}

/* High-Trust Data Table */
.audit-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.audit-table td {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid #f1f5f9;
}

.audit-table tr:hover td {
    background-color: #f8fafc;
}

/* Preset Pills */
.preset-btn {
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.preset-btn:hover {
    border-color: #94a3b8;
    background-color: #f1f5f9;
}

.preset-btn.active-preset {
    border-color: #2563eb;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

/* Toast Notification */
#toast {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

#toast.show-toast {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Clean Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
