/* IMPORT: Professional Font Stack */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* "Linear-style" Black & White Palette */
    /* "Linear-style" Black & White Palette */
    --bg-app: #f9fafb;
    /* Premium Vapor */
    --bg-subtle: #f3f4f6;
    /* Slightly darker shift for badges */
    /* Very light grey for headers/sidebars */
    /* Platinum-Blue: Sophisticated, cool, and premium */
    --bg-azure: #f1f5f9;
    --border-color: #e4e4e7;
    /* Zinc-200: Sharp, professional borders */

    --text-primary: #09090b;
    /* Zinc-950: Rich black */
    --text-secondary: #71717a;
    /* Zinc-500: Muted grey for metadata */

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

html,
body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-app);
    font-size: 14px;
    /* SaaS Standard Size */
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    /* Crisper text on Mac */
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Global Reset for Bootstrap Boxes */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* BRANDING */
.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.5rem;
    /* Spacious padding */
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-app);
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
    background: var(--bg-subtle);
    padding: 0.4rem;
    border-radius: 8px;
    /* Rounded square usage */
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    /* Tight professional tracking */
}

/* Authentication Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.auth-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.form-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--text-primary);
}

.btn-auth {
    background-color: var(--text-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-auth:hover {
    background-color: #27272a;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-link:hover {
    color: #000;
}

/* Footer Styles (Moved from Scoped for reliability) */
.app-footer {
    background-color: #09090b !important;
    /* Black (Zinc-950) */
    border-top: 1px solid #27272a;
    /* Dark Border */
    padding: 30px 0 15px;
    /* Further Reduced vertical padding */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin-top: auto;
    color: #a1a1aa !important;
    /* Default text color */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* Brand Column */
.brand-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    /* White */
    letter-spacing: -0.02em;
}

.footer-tagline {
    font-size: 13px;
    color: #a1a1aa;
    /* Zinc-400 */
    letter-spacing: -0.01em;
}

/* Headings */
.footer-heading {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    /* White */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px 0;
}

/* Links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    font-size: 14px;
    color: #a1a1aa;
    /* Zinc-400 */
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #ffffff;
}

/* Prominent Link (Advertise) */
.link-prominent {
    font-weight: 700;
    text-decoration: underline;
    color: #ffffff;
}

.external-icon {
    font-size: 10px;
    margin-left: 4px;
    vertical-align: text-top;
}

/* Bottom */
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    /* Reduced margin */
    padding: 24px 24px 0;
    border-top: 1px solid #27272a;
    /* Dark Border */
    text-align: left;
}

.footer-bottom p {
    font-size: 13px;
    color: #71717a;
    /* Zinc-500 */
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* --- PLATINUM VISUAL MATCH (FEB 2026) --- */

/* 1. Header Updates */
.update-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    background-color: #EFF6FF !important;
    color: #1E40AF !important;
    padding: 4px 12px;
    border-radius: 9999px;
    font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
    font-size: 13px;
    font-weight: 500;
}

.update-badge svg {
    width: 14px;
    height: 14px;
}

/* 2. Quick Filter Pill */
.quick-select {
    padding: 8px 36px 8px 14px !important;
    border: 1px solid #e4e4e7 !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    color: #71717a !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    min-width: 220px !important;
    cursor: pointer !important;
    appearance: none !important;
}

.quick-select:hover {
    border-color: #d4d4d8 !important;
    background-color: #fafafa !important;
}

.quick-select:focus {
    border-color: #09090b !important;
    box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.1) !important;
    color: #09090b !important;
}

/* 3. Category Pills (Gradient Glow) */
.pill-btn {
    border: 1px solid #e4e4e7 !important;
    background-color: #ffffff !important;
    color: #52525b !important;

    /* Default: Larger/Modern size for big screens */
    padding: 6px 14px !important;
    font-size: 13px !important;

    border-radius: 999px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

@media (max-width: 1350px) {
    .pill-btn {
        padding: 5px 12px !important;
        /* Smaller padding on wrap */
        font-size: 13px !important;
        /* Smaller font on wrap */
    }
}

.pill-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.pill-btn.active {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%) !important;
    border-color: #d8b4fe !important;
    color: #1e1b4b !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15) !important;
}

/* 4. Flagship Badge (Gold) */
.category-badge-flagship {
    background-color: #fef9c3 !important;
    /* Yellow-100 */
    border: 1px solid #fde047 !important;
    /* Yellow-300 */
    color: #854d0e !important;
    /* Yellow-800 */
    padding: 4px 12px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 1px 2px rgba(234, 179, 8, 0.1) !important;
}

/* 5. Inputs & Selects */
.card-input,
.card-select {
    border-radius: 8px !important;
    border: 1px solid #e4e4e7 !important;
    padding: 8px 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.card-input:focus,
.card-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* 6. Model Logo */
.model-logo {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain !important;
    margin-right: 0 !important;
    vertical-align: middle !important;
}


/* 7. Azure Background Layout */
.content-area {
    background-color: #f5f4f1 !important;
    /* User Requested Warm Grey */
    min-height: 100vh;
}

/* 8. Cache Hit Toggle Switch (Platinum Style) */
.cache-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-right: 16px;
    user-select: none;
}

.toggle-label-text {
    font-size: 13px;
    font-weight: 600;
    color: #52525b;
    /* Zinc-600 */
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.cache-toggle-wrapper:hover .toggle-label-text {
    color: #18181b;
    /* Zinc-900 */
}

/* The hidden checkbox */
.toggle-checkbox {
    display: none;
}

/* The switch track */
.toggle-switch {
    width: 36px;
    height: 20px;
    background-color: #e4e4e7;
    /* Zinc-200 */
    border-radius: 999px;
    position: relative;
    transition: background-color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* The switch knob */
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Checked State */
.toggle-checkbox:checked+.toggle-switch {
    background-color: #18181b;
    /* Zinc-900 (Black) */
}

.toggle-checkbox:checked+.toggle-switch::after {
    transform: translateX(16px);
}

/* Active/Focus states for accessibility if needed, 
   but simplistic for Platinum aesthetic */
.cache-toggle-wrapper:active .toggle-switch::after {
    width: 20px;
    /* Slight stretch effect */
}

/* 9. Cache Hit Columns */
.cache-col {
    background-color: #fafaeb;
    /* Very subtle warm tint for "gold/money" association or just clear separation */
    color: #09090b;
    font-weight: 500;
    width: 140px;
    border-left: 1px dashed #e4e4e7;
    border-right: 1px dashed #e4e4e7;
}

/* 10. Provider Link Hint */
.provider-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: all 0.2s;
}

.provider-link:hover .provider-name {
    color: #4F46E5;
    /* Indigo-600 */
    text-decoration: underline;
}

.provider-link:hover .provider-name::after {
    content: " ↗";
    /* External link hint */
    font-size: 0.85em;
    vertical-align: text-top;
    opacity: 0.7;
    margin-left: 2px;
}