:root {
    /* Paleta padrão. Podem ser substituídas via painel administrativo logo abaixo ou inline */
    --primary: #4ab6f0;   /* Azul claro lúdico */
    --secondary: #ffb833; /* Amarelo alegre */
    --support: #ff6b6b;   /* Vermelho suave/coral */
    --bg-color: #fcefe3;  /* Fundo quentinho */
    --text-main: #34495e; /* Cinza escuro para leturabilidade */
    --text-light: #7f8c8d;
    --card-bg: #ffffff;
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout */
.calendar-container {
    display: flex;
    width: 95%;
    max-width: 1300px;
    height: 90vh;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* Left Panel */
.left-panel {
    width: 30%;
    background: linear-gradient(135deg, #fff, #f9f9f9);
    border-right: 2px dashed rgba(0,0,0,0.05);
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.panel-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.panel-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    margin-top: 50px;
    opacity: 0.6;
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.birthday-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s;
    border: 2px solid transparent;
}

.birthday-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 3px solid var(--secondary);
    cursor: pointer;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.avatar-wrapper:hover img {
    transform: scale(1.1);
}

.avatar-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.7rem;
    text-align: center;
    padding: 2px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.child-info h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 3px;
}

.child-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Right Panel */
.right-panel {
    width: 70%;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-header h1 {
    font-size: 2.2rem;
    color: var(--primary);
    text-transform: capitalize;
}

.btn-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-color);
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 15px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 15px;
    flex: 1;
}

.day {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 10px;
    position: relative;
    border: 2px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.day:not(.empty):hover, .day:not(.empty).active {
    border-color: var(--primary);
    box-shadow: var(--shadow-soft);
    transform: scale(1.02);
}

.day-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

/* Icons for birthdays */
.birthday-indicators {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.birthday-icon {
    font-size: 1.8rem;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--support);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.day:hover .tooltip {
    opacity: 1;
}

/* Modal and Upload */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 400px;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--secondary); color: #fff; }

.upload-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Responsivo */
@media (max-width: 900px) {
    .calendar-container {
        flex-direction: column-reverse;
        height: auto;
    }
    .left-panel { width: 100%; border-right: none; border-top: 2px dashed #f0f0f0; max-height: 400px; }
    .right-panel { width: 100%; }
}
