/* ==================================================
   Comunidade Empreendedores - Premium Glassmorphism
   Confident Indigo-600 / Slate-900 palette
   ================================================== */

/* ---------- 1. Reset & Base ---------- */
* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: radial-gradient(ellipse at top, #eef2ff, #f8fafc 50%, #ffffff);
    color: #475569;
    /* slate-600 minimum for readability */
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-weight: 800;
    color: #0f172a;
    /* slate-900 */
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h4,
h5,
h6 {
    font-weight: 700;
    color: #0f172a;
}

/* Scrollbar minimalista */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Transições globais */
a,
button,
input,
select,
textarea {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus ring - Indigo-600 deep */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
    border-color: #4f46e5;
}

/* ---------- 2. Hero Section ---------- */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #eef2ff 0%, #ffffff 60%);
}

/* Decorative blob top-right */
.hero-section::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Decorative blob bottom-left */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -8%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-overlay {
    display: none;
    /* not needed in Burgeon style */
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* ---------- 3. Search Bar (Glassmorphism) ---------- */
.glass-search-wrapper {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    padding: 0.375rem;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.05);
    width: 100%;
}

.search-container {
    width: 100%;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-box:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2), 0 20px 60px -15px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-box input {
    border: none;
    box-shadow: none !important;
    padding: 1.25rem 1.5rem 1.25rem 3.25rem;
    font-size: 1rem;
    background: transparent;
    width: 100%;
    color: #1e293b;
}

.input-with-icon {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1.1rem;
    color: #64748b;
    /* slate-500 for better contrast */
    font-size: 1.25rem;
    pointer-events: none;
}

.search-box input:focus {
    outline: none;
    box-shadow: none !important;
}

.search-box input::placeholder {
    color: #64748b;
    /* slate-500 minimum */
}

.search-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.search-btn {
    padding: 0.875rem 2rem;
    margin: 0.375rem;
    background: linear-gradient(135deg, #4f46e5 0%, #1d4ed8 100%);
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.search-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1e40af 100%);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    transform: scale(1.05);
}

/* ---------- 4. Autocomplete ---------- */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: -1px;
    right: -1px;
    background: white;
    border: 1px solid #d1fae5;
    border-radius: 1rem;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(16, 185, 129, 0.08);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f0fdf4;
    transition: background 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: #f0fdf4;
    color: #065f46;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 1rem 1rem;
}

.autocomplete-item:first-child {
    border-radius: 1rem 1rem 0 0;
}


/* ---------- 5. Business Cards (Glassmorphism) ---------- */
.business-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.05);
    position: relative;
    padding: 2rem 1.5rem;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.business-card:hover {
    border-color: rgba(79, 70, 229, 0.15);
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.15), 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.business-card-logo-container {
    width: 5rem;
    height: 5rem;
    border-radius: 1.25rem;
    /* rounded-xl, like Burgeon feature icons */
    overflow: hidden;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.02) 100%);
    border: 1px solid rgba(79, 70, 229, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.business-card:hover .business-card-logo-container {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0.04) 100%);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.business-card-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: transparent;
}

.business-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.business-card-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.business-card-category {
    font-size: 0.8rem;
    color: #475569;
    /* slate-600 */
    margin-bottom: 0.75rem;
}

.business-card-location {
    font-size: 0.813rem;
    color: #64748b;
    /* slate-500 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ---------- 6. Badges ---------- */
.sabbath-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: #ecfdf5;
    color: #065f46;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
}

/* ---------- 7. Dark Trust Section ---------- */
.trust-section {
    background: #1e293b;
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.trust-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23334155' fill-opacity='0.15'%3E%3Cpath d='M0 0h20v20H0zM20 20h20v20H20z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
}

/* ---------- 8. Feature Cards (Burgeon style) ---------- */
.feature-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.1), 0 0 0 1px rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.12);
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.03) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: #4f46e5;
    font-size: 1.5rem;
}

/* ---------- 9. Dashboard / Sidebar ---------- */
.sidebar {
    width: 260px;
    min-height: calc(100vh - 64px);
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.75rem;
    margin: 0.15rem 0.75rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: #0f172a;
    background: #f8fafc;
}

.sidebar-link.active {
    color: #4f46e5;
    background: #eef2ff;
}

.sidebar-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ---------- 10. Forms ---------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.813rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.form-input::placeholder {
    color: #64748b;
}

.form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/* ---------- 11. Buttons (Indigo-600 → Blue-700 gradient) ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #1d4ed8 100%);
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1e40af 100%);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    transform: scale(1.05);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #374151;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
    background: rgba(238, 242, 255, 0.9);
    border-color: #4f46e5;
    color: #4f46e5;
    transform: scale(1.05);
}

/* ---------- 12. Alerts ---------- */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #f0f4ff;
    color: #3b5de7;
    border: 1px solid #c7d7fe;
}

/* ---------- 13. Lazy Loading ---------- */
.img-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.img-lazy.loaded {
    opacity: 1;
}

/* ---------- 14. Mobile Sidebar ---------- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 40;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 64px;
        z-index: 50;
        transition: left 0.3s ease;
        height: calc(100vh - 64px);
    }

    .sidebar.open {
        left: 0;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .search-divider {
        width: 100%;
        height: 1px;
    }

    .search-btn {
        justify-content: center;
        border-radius: 0.75rem;
    }

    .hero-section {
        min-height: auto;
        padding: 4rem 0;
    }
}

/* ---------- 15. Toggle switch ---------- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #e2e8f0;
    border-radius: 9999px;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked+.toggle-slider {
    background: #4A6CF7;
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* ---------- 16. Image Upload ---------- */
.image-upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.image-upload-area:hover {
    border-color: #4A6CF7;
    background: #f8faff;
}

.image-upload-area.has-preview {
    padding: 0;
    border-style: solid;
}

.image-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- 17. Stats ---------- */
.stat-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.stat-label {
    font-size: 0.813rem;
    color: #64748b;
    margin-top: 0.375rem;
}

/* ---------- 18. Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn {
    padding: 0.5rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.813rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: #f0f4ff;
    border-color: #4A6CF7;
    color: #4A6CF7;
}

.page-btn.active {
    background: #4A6CF7;
    color: white;
    border-color: #4A6CF7;
}

/* ---------- 19. Spinner ---------- */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #4A6CF7;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- 20. Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}