/* ==========================================================================
   FoodSaver — Modern Premium Design System (Stripe & Fluent Inspired)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
    /* Brand Colors */
    --fs-primary: #16a34a; /* Active Emerald Green */
    --fs-primary-hover: #15803d; /* Rich Dark Green */
    --fs-primary-light: rgba(22, 163, 74, 0.08);
    --fs-primary-glass: rgba(22, 163, 74, 0.05);
    /* Neutral Scale (Stripe/Notion Inspired) */
    --fs-bg: #f8fafc; /* Soft Slate Gray */
    --fs-surface: #ffffff;
    --fs-border: #e2e8f0; /* Sub-pixel Slate Border */
    --fs-text-main: #0f172a; /* Deep Slate/Carbon */
    --fs-text-muted: #64748b; /* Clean Steel Gray */
    /* Fluent Design Glassmorphism */
    --fs-glass-bg: rgba(255, 255, 255, 0.7);
    --fs-glass-border: rgba(226, 232, 240, 0.8);
    /* Layout & Geometry */
    --fs-radius-sm: 8px;
    --fs-radius-md: 12px;
    --fs-radius-lg: 20px; /* Premium Rounded Cards */
    /* Fluent Soft Shadows */
    --fs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --fs-shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --fs-shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.08);
    /* Fonts */
    --fs-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --fs-font-display: 'Poppins', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Core Layout & Typography
   ========================================================================== */
html {
    font-size: 15px;
    scroll-behavior: smooth;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--fs-font-sans);
    background-color: var(--fs-bg);
    color: var(--fs-text-main);
    letter-spacing: -0.011em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: var(--fs-font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--fs-primary);
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

    a:hover {
        color: var(--fs-primary-hover);
    }

/* ==========================================================================
   Fluent & Glassmorphic UI Containers
   ========================================================================== */
.fs-card {
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    background: var(--fs-surface);
    box-shadow: var(--fs-shadow-md);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

    .fs-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--fs-shadow-lg);
    }

/* Premium Glass Container */
.fs-glass {
    background: var(--fs-glass-bg);
    backdrop-filter: blur(12px) saturate(190%);
    -webkit-backdrop-filter: blur(12px) saturate(190%);
    border: 1px solid var(--fs-glass-border);
    box-shadow: var(--fs-shadow-md);
}

/* Sticky Premium Navigation */
.fs-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   Custom Buttons & Interactivity
   ========================================================================== */
.btn-primary, .transition-btn {
    font-family: var(--fs-font-sans);
    font-weight: 600;
    color: #ffffff !important;
    background-color: var(--fs-primary) !important;
    border: 1px solid var(--fs-primary) !important;
    border-radius: var(--fs-radius-md) !important;
    padding: 0.625rem 1.25rem !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

    .btn-primary:hover, .transition-btn:hover {
        background-color: var(--fs-primary-hover) !important;
        border-color: var(--fs-primary-hover) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(22, 163, 74, 0.25);
    }

    .btn-primary:active, .transition-btn:active {
        transform: translateY(0);
    }

/* Secondary Button style */
.btn-secondary {
    background-color: transparent !important;
    color: var(--fs-text-main) !important;
    border: 1px solid var(--fs-border) !important;
    border-radius: var(--fs-radius-md) !important;
    transition: all 0.2s ease;
}

    .btn-secondary:hover {
        background-color: #f1f5f9 !important;
        border-color: #cbd5e1 !important;
    }

/* Focus States for WCAG Accessibility */
.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(22, 163, 74, 0.4) !important;
    border-color: var(--fs-primary) !important;
}

/* ==========================================================================
   Modern Elegant Forms & Floating Inputs
   ========================================================================== */
.form-control, .form-select {
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: var(--fs-text-main);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-control:focus, .form-select:focus {
        background-color: #ffffff;
    }

/* Styling for ASP.NET Floating labels */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--fs-primary);
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
}

.form-floating > label {
    padding-left: 1rem;
    color: var(--fs-text-muted);
}

/* Custom Input Groups integration */
.input-group:focus-within .input-group-text {
    border-color: var(--fs-primary);
    background-color: #ffffff !important;
    color: var(--fs-primary) !important;
}

/* ASP.NET Validation styles */
.field-validation-error {
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 500;
    margin-top: 0.35rem;
    display: block;
}

div[asp-validation-summary] ul, .alert ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Modern Stat Tiles & Metric Badges
   ========================================================================== */
.stat-tile {
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    box-shadow: var(--fs-shadow-sm);
    background: var(--fs-surface);
    height: 100%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

    .stat-tile:hover {
        transform: translateY(-3px);
        box-shadow: var(--fs-shadow-md);
        border-color: rgba(22, 163, 74, 0.2);
    }

.stat-tile-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: var(--fs-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--fs-primary-light);
    color: var(--fs-primary);
    transition: background 0.2s ease, color 0.2s ease;
}

.stat-tile:hover .stat-tile-icon {
    background: var(--fs-primary);
    color: #ffffff;
}

.stat-tile-value {
    font-family: var(--fs-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fs-text-main);
    line-height: 1.1;
    margin: 0;
}

.stat-tile-label {
    color: var(--fs-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* ==========================================================================
   Stripe-Inspired Hero Section & Visuals
   ========================================================================== */
.hero-section {
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(240, 253, 244, 0.8) 0%, rgba(255, 255, 255, 1) 90%);
    padding: 120px 20px;
    overflow: hidden;
    border-bottom: 1px solid var(--fs-border);
}

    .hero-section::before {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(22, 163, 74, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
        top: -10%;
        right: -5%;
        z-index: 1;
        pointer-events: none;
    }

/* Modernized Legacy Cards (Kept for routing safety) */
.dashboard-card {
    border: none;
    border-radius: var(--fs-radius-lg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

    .dashboard-card:hover {
        transform: translateY(-6px);
    }

.card-green {
    background: linear-gradient(135deg, #16a34a, #10b981);
    color: white;
}

.card-orange {
    background: linear-gradient(135deg, #f97316, #eab308);
    color: white;
}

.card-blue {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

.card-red {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

/* Sticky Footer */
.footer {
    margin-top: auto;
    background: #ffffff;
    border-top: 1px solid var(--fs-border);
    white-space: nowrap;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--fs-text-muted);
}
