/* =========================================
   1. VARIABILE ȘI RESET
   ========================================= */
:root {
    --primary: #00adb5;
    --primary-hover: #00d1da;
    --bg: #121212;
    --card: #1e1e1e;
    --card-hover: #252525;
    --text: #eeeeee;
    --text-muted: #888;
    --danger: #ff4d4d;
    --border: #333;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
}

/* Scrollbar personalizat */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Containerul Custom */
.custom-color-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centrare verticală */
    gap: 2px;
    border-left: 1px solid #444;
    padding-left: 15px;
    height: 40px; /* Aliniere cu înălțimea preset-urilor */
}

/* Selectorul propriu-zis (pătrățelul de culoare) */
#culoare {
    width: 30px;
    height: 20px;
    padding: 0;
    border: 1px solid #555;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

/* Eliminăm marginile extra pe care unele browsere le pun la input color */
#culoare::-webkit-color-swatch-wrapper {
    padding: 0;
}
#culoare::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Textul "Custom" de sub el */
.color-label {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
}

/* =========================================
   2. NAVIGARE (TOP BAR)
   ========================================= */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo img {
    height: 35px;
    width: auto;
}

.nav-logo span {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--primary);
}

/* =========================================
   3. COMPONENTE (CALENDAR & AGENDA)
   ========================================= */
#calendar {
    background: var(--card);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.page-title {
    color: var(--primary);
    text-align: center;
    margin: 20px 0 30px;
}

/* Agenda Cards */
.event-card {
    background: var(--card);
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.2s;
    border: 1px solid var(--border);
}

.event-card:hover {
    transform: translateY(-3px);
    background: var(--card-hover);
}

/* FullCalendar Text Colors */
.fc-col-header-cell-cushion, 
.fc-daygrid-day-number,
.fc-toolbar-title {
    color: var(--text) !important;
    text-decoration: none !important;
}

/* =========================================
   4. MODAL ȘI FORMULARE
   ========================================= */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card);
    margin: 2% auto;
    padding: 25px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    background: #252525;
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
    outline: none;
}

input:focus, textarea:focus {
    border-color: var(--primary);
}

/* Culori Rapide */
.color-selection-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #252525;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #444;
}

.color-presets { display: flex; gap: 10px; }
.color-dot {
    width: 25px; height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}
.color-dot.active { border-color: #fff; box-shadow: 0 0 8px #fff; }

/* Butoane */
.modal-buttons { display: flex; gap: 10px; margin-top: 25px; }
button { flex: 1; padding: 12px; font-weight: bold; border-radius: 8px; border: none; cursor: pointer; transition: 0.3s; }

.btn-save { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(0, 173, 181, 0.3); }
.btn-delete { background: var(--danger); color: white; }
.btn-cancel { background: #444; color: white; }

/* Buton Plutitor */
.btn-floating {
    position: fixed; bottom: 20px; right: 20px;
    width: 55px; height: 55px;
    border-radius: 50%;
    background: var(--primary);
    color: white; font-size: 24px;
    z-index: 999;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 173, 181, 0.5);
}

/* =========================================
   5. LOGIN PAGE
   ========================================= */
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--bg); }
.login-card {
    background: var(--card);
    padding: 30px;
    border-radius: 15px;
    width: 100%; max-width: 350px;
    text-align: center;
    border: 1px solid var(--border);
}

/* =========================================
   6. VERSIUNEA DE TELEFON (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {
    /* Navigație mobilă */
    .top-nav {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 5px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .nav-logo span {
        font-size: 1rem;
    }

    /* Container și Calendar */
    .container {
        padding: 10px;
    }

    #calendar {
        padding: 5px;
        font-size: 0.8rem; /* Calendar mai mic pe mobil */
    }

    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    /* Modal mobil */
    .modal-content {
        margin: 5% auto;
        padding: 15px;
        width: 95%;
    }

    .modal-buttons {
        flex-direction: column; /* Butoanele unul sub altul pe mobil */
    }

    /* Agenda mobil */
    .event-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ev-date {
        border-bottom: 1px solid var(--border);
        width: 100%;
        padding-bottom: 5px;
    }

    .btn-floating {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}

/* 7. FOOTER */
.main-footer {
    text-align: center;
    padding: 30px;
    color: #444;
    font-size: 0.75rem;
    border-top: 1px solid #222;
}