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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
}

/* Login Screen */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

#loginForm input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

#loginForm button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#loginForm button:hover {
    background: #5a67d8;
}

.error {
    color: #e53e3e;
    margin-top: 10px;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar h1 {
    color: #667eea;
    font-size: 24px;
}

.nav-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#yearSelector {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.btn-secondary {
    padding: 8px 16px;
    background: #cbd5e0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #a0aec0;
}

/* Main Content */
.main-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Calendar */
.calendar-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.month-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e2e8f0;
}

.month-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.birthday-item {
    background: white;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.birthday-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.birthday-date {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
}

.birthday-name {
    font-size: 16px;
    color: #2d3748;
    margin: 4px 0;
}

.birthday-age {
    font-size: 13px;
    color: #718096;
}

.birthday-note {
    font-size: 12px;
    color: #a0aec0;
    font-style: italic;
    margin-top: 4px;
}

.no-birthdays {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Add Button */
.btn-add {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.btn-add:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #a0aec0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #2d3748;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="number"],
.modal-content input[type="time"],
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.date-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-danger {
    padding: 10px 20px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c53030;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

#emailSettings {
    margin-top: 15px;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    color: #718096;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #667eea;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* User Management */
.user-item {
    background: #f7fafc;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.user-role {
    font-size: 13px;
    color: #718096;
}

.user-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.settings-modal .modal-content {
    max-width: 700px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-controls {
        margin-top: 15px;
        width: 100%;
    }
    
    #calendar {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .btn-add {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
