/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* BODY */
body {
    background: #0f172a;
    color: #e2e8f0;
}

/* TITULOS */
h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

h2 {
    margin-top: 20px;
    color: #38bdf8;
}

/* LINKS */
a {
    text-decoration: none;
    color: #94a3b8;
    font-weight: bold;
}

    a:hover {
        color: #38bdf8;
    }

/* SELECT */
select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #020617;
    color: #e2e8f0;
}

/* BOTÕES */
button {
    padding: 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

/* BOTÕES CORES */
.btn-primary {
    background: #06b6d4;
    color: white;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: #111827;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
}

.btn-outline {
    background: #eff6ff;
    color: #0f172a;
    border: 1px solid #bfdbfe;
}

.btn-muted {
    background: #e2e8f0;
    color: #334155;
}

/* LAYOUT */
.layout {
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 230px;
    height: 100vh;
    background: linear-gradient(180deg, #020617, #0f172a);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1e293b;
}

    .sidebar h2 {
        color: #38bdf8;
        margin-bottom: 20px;
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 0 20px;
        padding: 8px 0 4px;
        background: transparent !important;
        overflow: hidden;
    }

    .sidebar-brand img {
        width: 110px;
        max-width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }

    .sidebar a {
        margin: 10px 0;
        padding: 8px;
        border-radius: 6px;
        transition: 0.2s;
    }

        .sidebar a:hover {
            background: #1e293b;
        }

    .sidebar button {
        margin-top: auto;
        background: #ef4444;
        color: white;
    }

/* CONTEÚDO */
.content {
    padding: 20px;
    flex: 1;
    min-width: 0;
}

/* BOTÃO MENU MOBILE */
#menuToggle {
    display: none;
    background: #020617;
    color: white;
    font-size: 22px;
    padding: 10px;
    margin-bottom: 10px;
}

/* CARD */
.card {
    background: #020617;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #1e293b;
}

/* CALENDÁRIO */
#calendar {
    background: white;
    border-radius: 12px;
    padding: 10px;
    min-height: 720px;
}

/* FULLCALENDAR */
.fc {
    background: white;
    border-radius: 10px;
}

.fc-view-harness {
    min-height: 640px;
}

.fc-scrollgrid {
    border: none !important;
}

.fc-timegrid-slot {
    height: 50px !important;
}

.fc-event {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #fff !important;
    font-weight: 600;
}

.fc-event-title {
    white-space: normal !important;
}

/* MODAL */
.modal-overlay {
    display: none; /* IMPORTANTE */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #ffffff;
    color: #1e293b;
    padding: 20px;
    border-radius: 12px;
    width: 380px;
    max-width: calc(100vw - 32px);
}

    .modal-content h3 {
        margin-bottom: 15px;
        color: #0f172a;
    }

    /* INPUTS */
    .modal-content input {
        width: 100%;
        padding: 10px;
        margin-top: 8px;
        border-radius: 6px;
        border: 1px solid #cbd5f5;
    }

/* SERVIÇOS */
#listaServicos {
    margin-bottom: 15px;
}

.servico-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #f1f5f9;
    margin-bottom: 8px;
    cursor: pointer;
}

    .servico-item input {
        width: 18px;
        height: 18px;
    }

    .servico-item span {
        display: flex;
        flex-direction: column;
    }

    .servico-item strong {
        font-size: 14px;
    }

    .servico-item small {
        font-size: 12px;
        color: #64748b;
    }

/* BOTÕES MODAL */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.modal-buttons button {
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
}

.modal-buttons-agendamento button {
    min-height: 44px;
}

.modal-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.status-badge-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e0f2fe;
    color: #075985;
}

.status-agendado {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-confirmado {
    background: #dcfce7;
    color: #166534;
}

.status-concluido {
    background: #ede9fe;
    color: #6d28d9;
}

.status-faltou {
    background: #ffedd5;
    color: #c2410c;
}

.status-cancelado {
    background: #fee2e2;
    color: #b91c1c;
}

.modal-datahora {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.modal-cliente-linha {
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: 600;
}

#modalInfo {
    line-height: 1.5;
    color: #334155;
}

/* RESPONSIVO */
@media (max-width: 768px) {

    /* MENU */
    #menuToggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        width: 220px;
        height: 100%;
        z-index: 999;
        transition: 0.3s;
    }

        .sidebar.active {
            left: 0;
        }

    /* LAYOUT */
    .layout {
        flex-direction: column;
    }

    .content {
        width: 100%;
        padding: 10px;
    }

    /* MODAL */
    .modal-content {
        width: 95vw;
        max-width: none;
    }

    .modal-buttons button {
        flex: 1 1 100%;
        min-width: 0;
    }

    .modal-status-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 998;
}

    #overlay.active {
        display: block;
    }

.fc-timegrid-slot-label {
    color: #1e293b !important;
    font-weight: bold;
    font-size: 13px;
}

.fc-timegrid-slot {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.fc-timegrid-slot-lane {
    border-bottom: 1px solid #cbd5e1 !important;
}

.fc-timegrid-slot:hover {
    background: #e0f2fe;
}
.fc-event.bloqueio {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    color: white !important;
}

@media (max-width: 768px) {

    .content {
        margin-left: 0; /* 🔥 remove no mobile */
    }
}
