:root {
    --primary-burgundy: #6C3B46;
    --bg-nude: #F7EBEB;
    --text-dark: #3A3A45;
    --text-light: #FFFFFF;
    --accent-gold: #B89674;
    --card-shadow: 0 10px 30px rgba(108, 59, 70, 0.08);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-nude);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

h1,
h2,
h3,
.serif-font {
    font-family: 'Playfair Display', serif;
}

.sidebar {
    width: 260px;
    background-color: var(--primary-burgundy);
    color: var(--text-light);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.brand {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    font-style: italic;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.main-content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
}

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

.greeting h1 {
    font-size: 2.2rem;
    color: var(--primary-burgundy);
    margin-bottom: 0.5rem;
}

.greeting p {
    color: #666;
    font-size: 0.95rem;
}

.profile-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

 .profile-img {
     width: 50px;
     height: 50px;
     border-radius: 50%;
     background-color: var(--accent-gold);
     background-image: url('foto-admin.jpg');
     /* A foto da Admin */
     background-size: cover;
     background-position: center;
     border: 2px solid var(--primary-burgundy);
 }

.agenda-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    animation: fadeIn 0.25s ease;
}

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

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

.agenda-card {
    background-color: var(--text-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

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

.calendar-header h3 {
    color: var(--primary-burgundy);
    font-size: 1.3rem;
    text-transform: capitalize;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--accent-gold);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.day-cell:hover {
    background-color: var(--bg-nude);
}

.day-cell.active {
    background-color: var(--primary-burgundy);
    color: white;
    font-weight: 600;
}

.day-cell.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 50%;
}

.day-cell.empty {
    cursor: default;
}

.day-cell.empty:hover {
    background-color: transparent;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.schedule-header h2 {
    color: var(--primary-burgundy);
}

.btn-add {
    background-color: var(--primary-burgundy);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-add:hover {
    background-color: #552d36;
}

.btn-delete {
    background: none;
    border: none;
    color: #cc0000;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 5px;
}

.btn-delete:hover {
    opacity: 1;
}

.apt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.btn-presence {
    border: 1px solid #ddd;
    background: white;
    color: var(--text-dark);
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-presence:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.apt-presence {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-burgundy);
}

.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-card {
    display: flex;
    background-color: var(--bg-nude);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-gold);
    transition: transform 0.2s;
    position: relative;
    align-items: center;
}

.appointment-card:hover {
    transform: translateX(5px);
    background-color: #f0e1e1;
}

.apt-time {
    width: 90px;
    font-weight: 600;
    color: var(--primary-burgundy);
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
}

.apt-time span {
    font-size: 0.8rem;
    color: #777;
    font-weight: 400;
}

.apt-details {
    flex: 1;
    padding-left: 1.5rem;
    border-left: 1px solid #ddd;
}

.apt-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.apt-patient {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(58, 58, 69, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--text-light);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
}

.close-modal:hover {
    color: var(--primary-burgundy);
}

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

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

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent-gold);
}

.row-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* --- Responsividade --- */
@media (max-width: 1000px) {
    .agenda-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        margin-bottom: 0;
        font-size: 1.5rem;
    }

    .nav-menu {
        flex-direction: row;
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0;
        padding: 10px;
        gap: 0;
    }

    .nav-link i {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .greeting h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .nav-menu {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .agenda-card {
        padding: 1.2rem;
    }

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

    .appointment-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .apt-time {
        width: auto;
        flex-direction: row;
        gap: 8px;
    }

    .apt-details {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #ddd;
        padding-top: 0.8rem;
        width: 100%;
    }

    .btn-delete {
        align-self: flex-end;
    }

    .row-inputs {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .calendar-header h3 {
        font-size: 1.1rem;
    }

    .day-cell {
        font-size: 0.85rem;
    }

    .weekdays {
        font-size: 0.75rem;
    }
}