:root {
    --color-bg: #0f0f0f;
    --color-bg-card: #1a1a1a;
    --color-gold: #d4af37;
    --color-gold-hover: #f1c40f;
    --color-text: #f0f0f0;
    --color-text-muted: #a0a0a0;
    --color-success: #27ae60;
    --border-radius: 8px;
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all var(--transition-speed) ease;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(15, 15, 15, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-gold);
    text-transform: uppercase;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a:hover,
nav a.active {
    color: var(--color-gold);
    border-bottom: 1px solid var(--color-gold);
}

.user-points {
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--color-gold);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-auth {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-auth:hover {
    background: var(--color-gold);
    color: #000;
}

/* --- Layout --- */
main {
    min-height: 80vh;
    padding: 2rem 5%;
    max-width: 1800px;
    /* Aumentado de 1200px */
    margin: 0 auto;
    width: 100%;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1585747860715-2ba37e788b70?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    border: 1px solid #333;
}

.hero h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero h1 span {
    color: var(--color-gold);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #ddd;
}

.btn-primary {
    background-color: var(--color-gold);
    color: #000;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
}

.btn-primary:hover {
    background-color: var(--color-gold-hover);
    transform: scale(1.05);
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-bg-card);
    border: 1px solid #333;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-speed);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-gold);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.service-img {
    height: 200px;
    background-color: #333;
    background-size: cover;
    background-position: center;
}

.service-info {
    padding: 1.5rem;
}

.service-price {
    float: right;
    color: var(--color-gold);
    font-weight: 700;
    font-size: 1.2rem;
}

/* --- Booking Wizard --- */
.wizard-container {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #333;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
    z-index: 0;
    transform: translateY(-50%);
}

.step {
    z-index: 1;
    background: var(--color-bg-card);
    border: 2px solid #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    transition: 0.3s;
}

.step.active {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: #2a2a2a;
}

.step.completed {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #000;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.staff-card {
    text-align: center;
    background: #222;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
}

.staff-card.selected {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.05);
}

.staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #444;
    margin: 0 auto 1rem;
    background-size: cover;
    border: 2px solid var(--color-gold);
}

/* --- Calendar Mock --- */
.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 0.5rem 1rem;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.time-slot:hover {
    border-color: var(--color-gold);
}

.time-slot.selected {
    background: var(--color-gold);
    color: #000;
    border-color: var(--color-gold);
}

.time-slot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Profile/Loyalty --- */
.loyalty-card {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #000;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.loyalty-info h3 {
    color: #000;
    margin-bottom: 0.2rem;
}

.loyalty-points {
    font-size: 2.5rem;
    font-weight: 800;
}

.history-list {
    list-style: none;
}

.history-item {
    background: var(--color-bg-card);
    border-bottom: 1px solid #333;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
}

/* --- Admin Panel --- */
.admin-container {
    width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-gold);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #333;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    color: var(--color-gold);
    font-weight: 700;
}

.appointments-table {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #333;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 1fr 1fr 1.5fr;
    padding: 1rem;
    background: #222;
    font-weight: 600;
    border-bottom: 1px solid #333;
}

.appointment-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 1fr 1fr 1.5fr;
    padding: 1rem;
    border-bottom: 1px solid #333;
    align-items: center;
}

.appointment-row:hover {
    background: rgba(212, 175, 55, 0.05);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    text-align: center;
    display: inline-block;
}

.status-pendiente {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.status-confirmado {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-finalizado {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
}

.status-cancelado {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    background: transparent;
    border: 1px solid;
}

.btn-complete {
    border-color: var(--color-success);
    color: var(--color-success);
}

.btn-complete:hover {
    background: var(--color-success);
    color: #fff;
}

.btn-cancel {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-cancel:hover {
    background: #e74c3c;
    color: #fff;
}

/* --- Loading Spinner --- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Responsive --- */

/* Mobile Menu Toggle (hamburger) */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Tablets and below (768px) */
@media (max-width: 768px) {

    /* Header */
    header {
        padding: 1rem 3%;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.2rem;
    }

    nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        background: #1a1a1a;
        padding: 1rem;
        border-radius: 4px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Hero */
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Main content */
    main {
        padding: 1.5rem 3%;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Staff Grid */
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Time Slots */
    .time-slots {
        gap: 0.5rem;
    }

    .time-slot {
        flex: 1 1 calc(33.333% - 0.5rem);
        min-width: 80px;
        text-align: center;
        padding: 0.75rem 0.5rem;
    }

    /* Wizard */
    .wizard-container {
        padding: 1.5rem;
    }

    .step-indicator {
        gap: 0.5rem;
    }

    .step {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Admin Panel */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-header button {
        width: 100%;
    }

    .admin-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    /* Appointments Table - Stack on mobile */
    .table-header {
        display: none;
    }

    .appointment-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
        border: 1px solid #333;
        border-radius: 4px;
        margin-bottom: 1rem;
    }

    .appointment-row>div::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-gold);
        display: block;
        margin-bottom: 0.25rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }

    /* Boss Panel */
    .boss-navigation {
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .boss-nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .management-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .management-header button {
        width: 100%;
    }

    .management-grid {
        grid-template-columns: 1fr;
    }

    .management-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .management-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Config Form */
    .config-container {
        padding: 1.5rem;
    }

    /* Loyalty Card */
    .loyalty-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .loyalty-points {
        font-size: 2rem;
    }

    /* Charts - Make them stack */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(400px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .staff-grid {
        grid-template-columns: 1fr;
    }

    .time-slot {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .user-points {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-auth {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Tablets landscape and small desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    main {
        padding: 2rem 4%;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .management-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large desktop (1440px and above) */
@media (min-width: 1440px) {
    main {
        max-width: none;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* --- Boss Panel Specific Styles --- */
.boss-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.boss-nav-btn {
    background: transparent;
    color: var(--color-text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.boss-nav-btn.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-gold);
    border-bottom: 2px solid var(--color-gold);
}

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

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

.management-card {
    background: var(--color-bg-card);
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.management-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.management-info h4 {
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.management-info p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.management-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: transparent;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Config Form */
.config-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-gold);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Premium Stat Cards */
.stat-card.premium {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0, 0, 0, 0));
    border: 1px solid var(--color-gold);
    position: relative;
    overflow: hidden;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}