/* ============================================================
   DeixaPraMim — CSS Principal (Mobile First)
   ============================================================ */

:root {
    --primary:       #7C3AED;
    --primary-dark:  #6D28D9;
    --primary-light: #EDE9FE;
    --secondary:     #F59E0B;
    --success:       #10B981;
    --danger:        #EF4444;
    --body-bg:       #F9FAFB;
    --card-bg:       #FFFFFF;
    --text:          #111827;
    --text-muted:    #6B7280;
    --border:        #E5E7EB;
    --radius:        12px;
    --radius-sm:     8px;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow:        0 4px 12px rgba(0,0,0,.10);
    --bottom-nav-h:  64px;
    --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* -------- Base -------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--body-bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--bottom-nav-h);
}

body.auth-body {
    padding-bottom: 0;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 60%);
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* -------- Override Bootstrap -------- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}
.text-primary { color: var(--primary) !important; }
.bg-primary   { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(124,58,237,.15);
}

.form-control-lg,
.form-select-lg {
    font-size: 1rem;
    min-height: 48px;   /* Touch target mínimo */
    border-radius: var(--radius-sm);
}

.btn-lg {
    min-height: 48px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.btn-ghost-icon {
    background: none;
    border: none;
    padding: 6px 10px;
    color: var(--text);
    border-radius: 50%;
}
.btn-ghost-icon:hover { background: var(--body-bg); }

/* -------- Navbar -------- */
.navbar-brand .logo-icon-sm {
    font-size: 1.4rem;
    color: var(--primary);
}

/* -------- Auth Layout -------- */
.auth-wrapper {
    width: 100%;
    padding: 16px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.auth-logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.auth-logo .logo-icon {
    font-size: 2rem;
    color: var(--primary);
}
.auth-logo .logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.auth-title {
    text-align: center;
    margin-bottom: 24px;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
}

/* -------- Step Indicator -------- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}

.step.active {
    background: var(--primary);
    color: #fff;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 48px;
}

/* -------- Category Chips (cadastro prestador) -------- */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.category-chip input[type="checkbox"] { display: none; }
.category-chip span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
    user-select: none;
}
.category-chip input:checked + span {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.category-chip span i { font-size: 1rem; }

/* -------- City List -------- */
.city-state-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 4px 4px;
    letter-spacing: .05em;
}

.city-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 14px;
    border-radius: var(--radius-sm);
}
.city-option:hover { background: var(--body-bg); }
.city-option input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* -------- Verify Icons -------- */
.verify-icon { font-size: 4rem; }
.verify-icon--success { color: var(--success); }
.verify-icon--error   { color: var(--danger); }

/* -------- Avatar -------- */
.avatar-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
}
.avatar-placeholder {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* -------- Notification Badge -------- */
.notification-badge {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* -------- Bottom Navigation (mobile) -------- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-h);
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    flex: 1;
    padding: 8px 4px;
    transition: color .15s;
}
.bottom-nav-item i { font-size: 1.3rem; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active i { font-weight: 700; }

.bottom-nav-center { position: relative; top: -12px; }
.bottom-nav-plus {
    width: 48px; height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(124,58,237,.4);
}

/* -------- Cards -------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-clickable {
    cursor: pointer;
    transition: box-shadow .15s, transform .1s;
}
.card-clickable:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

/* -------- Status Badges -------- */
.badge-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}
.badge-open           { background: #DBEAFE; color: #1D4ED8; }
.badge-with_proposals { background: #EDE9FE; color: #6D28D9; }
.badge-negotiating    { background: #FEF3C7; color: #92400E; }
.badge-contracted     { background: #FEF9C3; color: #854D0E; }
.badge-in_progress    { background: #FEF3C7; color: #92400E; }
.badge-completed      { background: #DCFCE7; color: #166534; }
.badge-cancelled      { background: #FEE2E2; color: #991B1B; }
.badge-expired        { background: #F3F4F6; color: #6B7280; }
.badge-pending        { background: #FEF3C7; color: #92400E; }
.badge-accepted       { background: #DCFCE7; color: #166534; }
.badge-rejected       { background: #FEE2E2; color: #991B1B; }
.badge-active         { background: #FEF9C3; color: #854D0E; }

/* -------- Desktop: esconde bottom nav -------- */
@media (min-width: 992px) {
    body { padding-bottom: 0; }
}

/* ============================================================
   Landing Page
   ============================================================ */
body.landing-body {
    padding-bottom: 0;
    background: #F9FAFB;
}

/* Navbar */
.landing-nav {
    position: sticky;
    top: 0;
    height: 60px;
    background: var(--primary);
    z-index: 100;
    box-shadow: 0 2px 12px rgba(124,58,237,.3);
}

/* Hero */
.landing-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -80px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.95);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.landing-hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -.02em;
}

.landing-hero-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: rgba(255,255,255,.85);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.landing-hero-trust {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    font-weight: 500;
}

.landing-hero-cta-primary {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    transition: transform .15s, box-shadow .15s;
}
.landing-hero-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    color: var(--primary-dark);
}

.landing-hero-cta-secondary {
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,.5);
    transition: border-color .15s, background .15s;
}
.landing-hero-cta-secondary:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
    color: #fff;
}

.landing-wave {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    line-height: 0;
}
.landing-wave svg { width: 100%; height: 60px; display: block; }

/* Sections */
.landing-section {
    padding: 80px 0;
}
.landing-section-gray { background: #F1F5F9; }

.landing-section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 12px;
}
.landing-section-sub {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Steps */
.landing-step-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    height: 100%;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.landing-step-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.landing-step-num {
    position: absolute;
    top: -14px; left: 28px;
    width: 28px; height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-step-icon {
    width: 64px; height: 64px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 auto 20px;
}

/* Category cards */
.landing-cat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    transition: all .15s;
    box-shadow: var(--shadow-sm);
}
.landing-cat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-2px);
}

.landing-cat-icon {
    width: 52px; height: 52px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.landing-cat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

/* Provider section */
.landing-provider-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #312E81 100%);
    padding: 80px 0;
}

/* Footer */
.landing-footer {
    background: #111827;
    padding: 56px 0 32px;
}
.landing-footer-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
    margin-bottom: 12px;
}
.landing-footer-link {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color .15s;
}
.landing-footer-link:hover { color: #fff; }

/* ============================================================
   Admin Layout
   ============================================================ */
body.admin-body {
    padding-bottom: 0;
    display: block;
    background: #F1F5F9;
}

.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 240px;
    background: #1E1B4B;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    overflow-y: auto;
}

.admin-content {
    margin-left: 240px;
    flex: 1;
    padding: 28px 24px;
    min-height: 100vh;
}

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
}

@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; padding: 16px; }
}

.admin-sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.admin-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: auto;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 8px;
    transition: background .15s, color .15s;
    cursor: pointer;
}
.admin-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav-link.active { background: rgba(255,255,255,.15); color: #fff; }
.admin-nav-link i { font-size: 1rem; width: 18px; flex-shrink: 0; }

/* Stat Cards */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
}

.stat-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
