/* ===========================================
   ShovelBids.com - Main Stylesheet
   Design: Clean, modern snow removal marketplace
   =========================================== */

:root {
    --primary: #1B2A4A;
    --primary-light: #2A3D66;
    --primary-dark: #111D35;
    --accent: #E8913A;
    --accent-dark: #D07A2A;
    --teal: #2A7B88;
    --teal-light: #35959F;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --dark: #1B2A4A;
    --light: #f5f7fa;
    --gray: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
    --shadow-lg: 0 10px 40px rgba(27, 42, 74, 0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); line-height: 1.6; color: #333; background: #fff; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }
h1, h2, h3 { line-height: 1.3; font-weight: 700; color: var(--primary); }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.text-muted { color: var(--gray); }
.text-center { text-align: center; }
.text-warning { color: var(--warning); }

/* ===========================================
   Buttons
   =========================================== */
button.btn, a.btn, .btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border: none; border-radius: 25px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; letter-spacing: 0.3px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); text-decoration: none; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
a.btn-primary, a.btn-primary:visited { background: var(--accent); color: white; }
.btn-secondary { background: var(--teal); color: white; }
.btn-secondary:hover { background: var(--teal-light); }
.btn-dark { background: var(--primary); color: white; }
.btn-dark:hover { background: var(--primary-light); }
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: #f0f0f0; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-white { background: transparent; color: white; border: 2px solid white; }
.btn-outline-white:hover { background: white; color: var(--primary); }
.btn-outline-accent { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline-accent:hover { background: var(--accent); color: white; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.875rem; border-radius: 20px; }

/* ===========================================
   Forms
   =========================================== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--primary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-family: var(--font); transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input[type="checkbox"] { width: auto; padding: 0; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42, 123, 136, 0.15); }
.form-group small { display: block; margin-top: 0.25rem; color: var(--gray); font-size: 0.875rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-group-small { max-width: 120px; }
.form-section-title { margin: 1.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-weight: 700; color: var(--primary); }
.toggle-group { display: flex; gap: 1rem; }
.toggle-option { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 10px 20px; border: 2px solid var(--border); border-radius: var(--radius); transition: all 0.2s; }
.toggle-option:has(input:checked) { border-color: var(--teal); background: rgba(42, 123, 136, 0.05); }
.toggle-option input { display: none; }

/* ===========================================
   Header / Navigation
   =========================================== */
.header { background: white; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.header-content { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.75rem; }
.nav { display: flex; align-items: center; gap: 0; }
.nav-link { color: var(--secondary); font-weight: 500; text-align: center; padding: 0.5rem 1rem; white-space: nowrap; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); text-decoration: none; }
.nav-link .badge { display: inline-block; background: var(--accent); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 10px; margin-left: 4px; min-width: 18px; text-align: center; }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { background: none; border: none; font-size: 1rem; font-weight: 500; color: var(--secondary); cursor: pointer; padding: 8px 12px; border-radius: var(--radius); transition: color 0.2s; font-family: var(--font); }
.nav-dropdown-toggle:hover { color: var(--primary); }
.nav-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; padding: 8px 0; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 8px 16px; color: var(--dark); transition: background 0.2s; }
.nav-dropdown-menu a:hover { background: var(--light); text-decoration: none; }
.nav-dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.mobile-menu-toggle { display: none; }

/* Get Started button in nav (for logged-out users) */
.nav .btn-primary { border-radius: 25px; padding: 10px 24px; }

/* ===========================================
   Badges
   =========================================== */
.badge { display: inline-flex; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-open { background: #dbeafe; color: #1e40af; }
.badge-accepted, .badge-success { background: #dcfce7; color: #166534; }
.badge-expired, .badge-error { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-active { background: #fef3c7; color: #92400e; }
.badge-admin { background: var(--dark); color: white; }

/* ===========================================
   Alerts
   =========================================== */
.alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }
.alert-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; opacity: 0.5; margin-left: auto; }

/* ===========================================
   Cards
   =========================================== */
.card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow 0.3s; }
.card:hover { box-shadow: var(--shadow-lg); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border); background: var(--light); }
.card-body { padding: 1.25rem; }
.card-body p { margin-bottom: 0.5rem; }
.card-footer { padding: 1rem; border-top: 1px solid var(--border); background: var(--light); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card-success { border-color: var(--success); }

/* ===========================================
   Tables
   =========================================== */
.table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: var(--primary); color: white; font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--light); }

/* ===========================================
   Dashboard
   =========================================== */
.dashboard { padding: 2rem 0; }
.dashboard .card { padding: 1.25rem; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.dashboard-section { margin-bottom: 2.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }

/* ===========================================
   Stats
   =========================================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stats-grid-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--gray); font-size: 0.875rem; margin-top: 0.25rem; }
.stat-card-highlight { border-color: var(--accent); }
.stat-card-success .stat-value { color: var(--success); }

/* ===========================================
   Action Grid
   =========================================== */
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.action-card { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem; background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; transition: all 0.3s; color: var(--dark); box-shadow: var(--shadow); }
.action-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.action-icon { font-size: 2rem; }
.action-title { font-weight: 600; font-size: 0.9rem; }

/* ===========================================
   Empty State
   =========================================== */
.empty-state { text-align: center; padding: 3rem; background: white; border: 2px dashed var(--border); border-radius: var(--radius-lg); }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--gray); margin-bottom: 1.5rem; }

/* ===========================================
   Request List / Cards
   =========================================== */
.request-list { display: flex; flex-direction: column; gap: 1rem; }
.request-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.request-card:hover { box-shadow: var(--shadow-lg); }
.request-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.request-meta { display: flex; gap: 1rem; font-size: 0.875rem; color: var(--gray); }
.request-footer { display: flex; justify-content: flex-end; }
.distance { font-size: 0.875rem; color: var(--gray); }

/* ===========================================
   Balance Display
   =========================================== */
.balance-display { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; padding: 12px 20px; border-radius: 25px; }
.balance-label { opacity: 0.8; margin-right: 8px; }
.balance-amount { font-weight: 700; font-size: 1.25rem; }

/* ===========================================
   Hero Section (Landing Page)
   =========================================== */
.hero {
    background: linear-gradient(135deg, rgba(27, 42, 74, 0.85) 0%, rgba(27, 42, 74, 0.7) 100%),
                url('/images/hero-snow.jpg') center/cover no-repeat;
    background-color: var(--primary);
    color: white;
    padding: 6rem 0;
}
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: 3rem; margin-bottom: 1.5rem; color: white; line-height: 1.2; }
.hero-subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2.5rem; line-height: 1.7; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-buttons .btn { padding: 14px 28px; font-size: 1.05rem; }
.hero-icon { font-size: 8rem; }

/* ===========================================
   How It Works Section
   =========================================== */
.how-it-works { padding: 5rem 0; background: white; }
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2rem; color: var(--primary); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.step { text-align: center; padding: 2rem; }
.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(27, 42, 74, 0.2);
}
.step h3 { margin-bottom: 0.75rem; color: var(--primary); }
.step p { color: var(--secondary); line-height: 1.7; }

/* ===========================================
   Feature Sections (For Customers / Shovelers)
   =========================================== */
.for-shovelers { padding: 5rem 0; background: var(--light); }
.for-customers { padding: 5rem 0; background: #fff; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.feature-list { margin: 1.5rem 0; }
.feature-list li { padding: 0.75rem 0; font-size: 1.05rem; color: #555; }
.big-icon { font-size: 6rem; }

/* ===========================================
   CTA Section
   =========================================== */
.cta { background: var(--primary); color: white; padding: 5rem 0; }
.cta h2 { margin-bottom: 0.75rem; color: white; font-size: 2rem; }
.cta p { opacity: 0.85; margin-bottom: 2rem; font-size: 1.1rem; }
.cta-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ===========================================
   Footer
   =========================================== */
.footer { background: var(--primary-dark); color: #94a3b8; padding: 3rem 0 1.5rem; margin-top: 0; }
.footer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer ul li { margin-bottom: 0.5rem; }
.footer a { color: #94a3b8; transition: color 0.2s; }
.footer a:hover { color: white; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.875rem; }

/* ===========================================
   Auth Pages
   =========================================== */
.auth-page { background: var(--light); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-container { width: 100%; max-width: 450px; }
.auth-container-wide { max-width: 600px; }
.auth-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.5rem; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { margin-top: 1rem; font-size: 1.75rem; color: var(--primary); }
.auth-tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); }
.auth-tab { flex: 1; padding: 12px; text-align: center; color: var(--gray); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tab:hover { text-decoration: none; color: var(--primary); }
.auth-footer { text-align: center; color: var(--gray); font-size: 0.9rem; }
.auth-footer p { margin-bottom: 0.5rem; }
.auth-footer a { color: var(--accent); }

/* ===========================================
   Error Pages
   =========================================== */
.error-page { background: var(--light); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.error-container { text-align: center; padding: 3rem; }
.error-code { font-size: 6rem; font-weight: 700; color: var(--accent); }

/* ===========================================
   Activity Feed
   =========================================== */
.activity-feed { background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.activity-item { display: flex; align-items: center; gap: 1rem; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background 0.2s; }
.activity-item:hover { background: var(--light); }
.activity-item:last-child { border-bottom: none; }
.activity-time { color: var(--gray); font-size: 0.875rem; margin-left: auto; }

/* ===========================================
   Settings
   =========================================== */
.settings-summary { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.setting-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.setting-item:last-child { border-bottom: none; }

/* ===========================================
   Shoveler Login Button
   =========================================== */
.btn-shoveler-login { background: var(--primary); }
.btn-shoveler-login:hover { background: var(--primary-light); }

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 992px) {
    .header-content { flex-wrap: wrap; }
    .nav { gap: 0.5rem; }
    .nav-link { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
    .nav-dropdown-toggle { font-size: 0.9rem; padding: 0.4rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero h1 { font-size: 2rem; }
    .hero-buttons { justify-content: center; }
    .hero-image { display: none; }
    .steps { grid-template-columns: 1fr; }
    .two-column { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .stats-grid-5 { grid-template-columns: repeat(2, 1fr); }

    /* Header and Navigation */
    .header-content { padding: 0.5rem 1rem; }
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        display: none;
        z-index: 99;
    }
    .nav.active, .nav.nav-open { display: flex; }
    .nav-link { padding: 0.75rem 1rem; border-bottom: 1px solid #eee; width: 100%; text-align: left; }
    .nav-dropdown { width: 100%; }
    .nav-dropdown-toggle { width: 100%; text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #eee; }
    .nav-dropdown-menu { position: static; box-shadow: none; border: none; background: #f9f9f9; border-radius: 0; }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--primary);
        border-radius: 2px;
        transition: 0.3s;
    }

    .container { padding: 0 32px; }
    .dashboard-header { flex-direction: column; gap: 1rem; text-align: center; }
    .dashboard-header h1 { font-size: 1.5rem; }
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .stat-card { padding: 1rem; }
    .card-grid { grid-template-columns: 1fr; }
    .table { display: block; overflow-x: auto; white-space: nowrap; font-size: 0.85rem; }
    .table th, .table td { padding: 0.5rem; }
    .action-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .action-card { padding: 1rem; }
    .form-row { flex-direction: column; }
    .form-group { width: 100%; }
    .btn { width: 100%; text-align: center; margin-bottom: 0.5rem; }
    .btn-sm { width: auto; }
    .section-header { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    .logo-text { font-size: 1.1rem; }
    .action-grid { grid-template-columns: 1fr; }
    .badge { font-size: 0.7rem; padding: 0.2rem 0.4rem; }
    .empty-state { padding: 2rem 1rem; }
    .empty-icon { font-size: 2rem; }
}

/* Ensure viewport is respected */
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
* { box-sizing: border-box; }
img, video, iframe { max-width: 100%; height: auto; }

/* Mobile dropdown menu show state */
.nav-dropdown-menu.show { display: block; }

/* Mobile menu toggle (default hidden, shown via media query) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}
.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
}
