:root {
    --primary: #d946ef;
    --primary-dark: #be185d;
    --bg-light: #fff5f7;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #fdfdfd; /* Consistente com main-content */
    color: var(--text-dark);
}

/* Dropdown Menu Wrapper */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1001;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.1), 0px 4px 6px -2px rgba(0,0,0,0.05);
    z-index: 1002;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 0.5rem;
    border: 1px solid #f3f4f6;
}

.dropdown-menu a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.2s;
    text-align: left;
}

.dropdown-menu a:hover {
    background-color: #fff0f5;
    color: var(--primary);
}

.dropdown-menu.show {
    display: block;
}

/* --- Dashboard Layout --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #f3f4f6;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto; /* Adicionado para telas pequenas com scroll */
    z-index: 1000;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.brand span {
    font-size: 1.4rem;
    font-weight: 700;
    color: black;
    font-family: 'Playfair Display', serif;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer; /* Adicionado para garantir feedback visual */
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--bg-light);
    color: var(--primary);
}

.sidebar-nav a i {
    width: 24px;
}

.logout-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: #fdfdfd;
    min-height: 100vh;
}

.top-header {
    background: white;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0; /* Remove margem padrão */
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
}

/* Dashboard Content & Grid */
.dashboard-content {
    padding: 3rem;
}

.stats-grid {
    display: grid; /* Mudado para grid real */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    background: white;
    border-radius: 1.5rem; /* Consistente com outros cards */
}

.stat-label {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}
.stat-number-black {
    font-size: 2.5rem;
    font-weight: 700;
    color: black;
}

.chart-section {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    border: 1px solid #f3f4f6; /* Adicionado borda sutil */
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Tabelas e Listas */
.table-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
    overflow-x: auto;
}

.table-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: #9ca3af;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid #f3f4f6;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f9fafb;
    font-size: 0.95rem;
}

.status-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #d1fae5;
    color: #059669;
}

.action-cancel {
    color: #ef4444;
    background: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
}
.action-cancel:hover {
    text-decoration: underline;
}

.btn-update {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-update:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-pill-gray {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-pill-gray:hover {
    background: #e5e7eb;
}

/* Date Filter Styles */
.date-filter-container {
    position: relative;
    z-index: 100;
}

.date-filter-btn {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
    min-width: 180px;
    transition: all 0.2s;
}

.date-filter-btn:hover {
    border-color: var(--primary);
    background: #fdfdfd;
}

.date-filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.8rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    width: 280px;
    overflow: hidden;
    z-index: 1001;
}

.date-filter-dropdown.show {
    display: block;
}

.filter-presets {
    border-bottom: 1px solid #f3f4f6;
    padding: 0.5rem 0;
}

.filter-option {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: background 0.2s;
    border-bottom: 1px solid #f9fafb;
}

.filter-option:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.filter-option.active {
    background: var(--bg-light);
    color: var(--primary);
    font-weight: 600;
}

.custom-range-inputs {
    display: none;
    padding: 1rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.custom-range-inputs.show {
    display: block;
}

.input-group-date {
    margin-bottom: 0.8rem;
}

.input-group-date label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.3rem;
}

.input-group-date input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Settings & Forms */
.settings-container {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
    max-width: 600px;
}

.logo-upload-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.days-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Modal Shared */
.form-control {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    font-family: inherit;
}

.content-section {
    padding: 4rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f3f4f6;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -5px rgba(0,0,0,0.1);
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.service-info {
    padding: 1.5rem;
    text-align: center;
}

.service-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.service-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.book-btn {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.book-btn:hover {
    background: var(--primary);
    transform: scale(1.02);
}

/* Auth Pages Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff0f5, #fae8ff);
    padding: 2rem 1rem;
    position: relative;
}

.auth-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Playfair Display', serif;
}

.btn-auth-nav {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: background 0.3s;
}

.btn-auth-nav:hover {
    background: rgba(217, 70, 239, 0.1);
}

.auth-box {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-form {
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.8rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: 0.8rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.auth-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(217, 70, 239, 0.3);
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--text-dark);
}

@media (max-width: 480px) {
    .auth-box {
        padding: 2rem;
    }
    .auth-nav {
        padding: 1rem;
    }
}

/* Public Landing Page & Common */
.app-header {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #fff0f5, #fae8ff);
}
.logo-container img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.brand-subtitle {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    font-weight: 600;
}
.address-text {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.nav-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.pill-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}
.pill-btn.active {
    background: var(--text-dark);
    color: white;
}
.pill-btn.inactive {
    background: white;
    color: var(--text-dark);
    border: 1px solid #e5e7eb;
}
.pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Top Nav */
.top-nav {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 100;
}
.btn-signup-top {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Footer */
.app-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: 4rem;
}
.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.footer-subtitle {
    color: #9ca3af;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}
.social-links a:hover {
    color: var(--primary);
}
.copyright {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal.active, .modal.show {
    display: flex;
}
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-content {
        padding: 1.5rem;
    }
    
    .top-header {
        padding: 1rem 1.5rem;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 900;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    #mobile-menu-btn {
        display: block;
    }

    /* Mobile Date Filter */
    .date-filter-btn {
        min-width: 150px;
    }
    .date-filter-dropdown {
        width: 250px;
    }
}
