/* Variabile CSS */
:root {
    --primary-color: #4f46e5;
    /* Indigo-600 */
    --primary-hover: #4338ca;
    /* Indigo-700 */
    --background-color: #f3f4f6;
    /* Gray-100 */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    /* Asigură-te că aceasta este o culoare închisă (ex: negru) pentru contrast! */
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- STIL MODIFICAT: AURORA BOREALIS EFFECT (Turquoise & Light Gray) --- */
/* --- VARIANTA OPTIMIZATĂ (Simplificată) --- */
body::before {
    /* ... proprietăți existente ... */

    /* Un singur gradient, mai simplu */
    background: radial-gradient(circle at 60% 40%, rgba(173, 216, 230, 0.7) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(64, 224, 208, 1) 0%, transparent 35%); /* Păstrăm esența culorilor */

    background-size: 200% 200%; /* Reducem suprafața de calcul */
    animation: aurora-shift 60s ease-in-out infinite alternate; /* Mărim durata, reducem frecvența repaint-ului */
    filter: blur(30px); /* Reducem intensitatea blur-ului */
}

@media (max-width: 768px) {
    body::before {
        /* Îndepărtează animația care consumă resurse pe mobil */
        animation: none !important;
        
        /* Poți reduce și mai mult blur-ul sau opacitatea */
        filter: blur(10px); 
        opacity: 0.8; 
    }
}


/* ---------------------------------------------------------------- */

/* --- HEADER STYLES (Navy/Dark Contrast) --- */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    /* Culoare închisă pentru contrast cu fundalul Aurora */
    background-color: #1a202c;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.4);
    /* Shadow colorat în Turquoise */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 12px;
    flex-wrap: wrap;
    margin: 20px auto;
    /* Centrare și spațiu de la margine */
    width: 90%;
    max-width: 1200px;
    color: #f1f5f9;
    /* Text alb-gri deschis */
}

/* Stil pentru logo-ul din header */
.logo {
    height: 50px;
    margin-right: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
}





/* --- TITLURI (Turquoise) --- */
h1 {
    text-align: center;
    /* Turquoise vibrant */
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
    /* Efect de neon subtil */
}

h2 {
    text-align: center;
    /* Turquoise vibrant */
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
    /* Efect de neon subtil */
}

/* Stiluri pentru logare/înregistrare (Noi - Flip Card) */
.flip-container {
    perspective: 1000px;
}

.flipper {
    transition: transform 0.8s;
    transform-style: preserve-3d;
    position: relative;
}

.flip-container.flip .flipper {
    transform: rotateY(180deg);
}

.front,
.back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    /* Colțuri mai rotunde */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* Umbră mai puternică */
    padding: 2.5rem;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.back {
    transform: rotateY(180deg);
}

/* Input styling with focus animation (Tailwind compatible) */
.input-field {
    transition: border-color 0.3s, box-shadow 0.3s;
    /* Tailwind @apply directives would go here if this was a Tailwind setup */
    /* Folosim stiluri CSS standard pentru compatibilitate directă */
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.75rem;
    /* rounded-xl */
    outline: none;
}

.input-field:focus {
    border-color: #4f46e5;
    /* indigo-500 */
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.5);
    /* ring-2 focus:ring-indigo-500 */
}




/* Ajustări pentru afișarea corectă a formelor pe fundal alb */
.front .content-wrapper,
.back .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Hiding content based on flip state */
.back {
    visibility: hidden;
}

.flip-container.flip .back {
    visibility: visible;
}

.flip-container.flip .front {
    visibility: hidden;
}

/* Stiluri pentru Mesajele de Erori/Succes (Noi) */
.error-message {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #fca5a5;
    /* Red-300 */
    color: #7f1d1d;
    /* Red-900 */
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: fadeInOut 5s ease-in-out;
}

.success-message {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #a7f3d0;
    /* Green-300 */
    color: #065f46;
    /* Green-900 */
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: fadeInOut 5s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Ajustari pentru celelalte elemente ale aplicatiei logate (Pontaj, Tabele etc.) */
.pontaj-table input {
    text-align: center;
    width: 100%;
    border: 1px solid #ccc;
    padding: 4px;
    border-radius: 4px;
}

.pontaj-table th,
.pontaj-table td {
    padding: 8px;
    text-align: center;
}

/* --- Stiluri inițiale păstrate/modificate --- */

#registerContainer,
#loginForm {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}




input[type="text"],
input[type="password"],
select,
input[type="submit"] {
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

input[type="submit"] {
    background-color: #5cb85c;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #4cae4c;
}

.toggle-button {
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffc107;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-button:hover {
    background-color: #e0a800;
}

.error-message {
    /* Păstrat, deși cele "Noi" sunt mai sus, cu position: fixed */
    color: red;
    text-align: center;
    font-size: 16px;
}

.success-message {
    /* Păstrat, deși cele "Noi" sunt mai sus, cu position: fixed */
    color: green;
    text-align: center;
    font-size: 16px;
}

/* Stiluri Calendar FullCalendar */
#calendar {
    max-width: 90%;
    margin: 20px auto;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    text-align: center;
}

.fc-prev-button,
.fc-next-button {
    font-size: 1.5rem !important;
}

/* Culori evenimente Calendar */
.fc-day-concediu {
    background-color: #ffcccc !important;
}

.fc-day-pontaj {
    background-color: #e6e6e6 !important;
}

.fc-event.shift-8 {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

.fc-event.shift-Z {
    background-color: #34a853;
    border-color: #34a853;
}

.fc-event.shift-N {
    background-color: #4285f4;
    border-color: #4285f4;
}

.fc-event.shift-24 {
    background-color: #ea4335;
    border-color: #ea4335;
}

.fc-event.shift-CO {
    background-color: #f7a052;
    border-color: #f7a052;
}

.fc-event.shift-CM {
    background-color: #55b6f3;
    border-color: #55b6f3;
}

/* MODIFICARE 2: Selectoare Lună/An unul lângă altul */
.select-calendar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px;
}

.select-calendar-container form {
    display: flex;
    gap: 15px;
}

.select-calendar-container select {
    /* Asigură lățime decentă pe desktop */
    width: auto;
    min-width: 120px;
}

/* Stiluri Tabel Expirate / General */
.table-style,
.pontaj-table {
    width: 80%;
    margin: 0 auto;
    border-collapse: collapse;
    border: 1px solid #ddd;
    text-align: center;
}

/* Stiluri Tabel Pontaj (Admin Panel) */
.pontaj-table {
    margin-top: 20px;
    width: 100%;
    /* Lățime maximă pe desktop */
    max-width: 1200px;
    overflow-x: auto;
    margin-left: auto;
    margin-right: auto;
}

.table-style th,
.table-style td,
.pontaj-table th,
.pontaj-table td {
    padding: 12px;
    border: 1px solid #ddd;
}

.pontaj-table th,
.pontaj-table td {
    /* MODIFICARE 1: Ajustare padding pentru a îngusta coloanele pe desktop */
    padding: 8px 3px;
}

.table-style th,
.table-style td {
    background-color: #fff;
}

.pontaj-table th {
    background-color: #f4f4f4;
    font-size: 12px;
    line-height: 1.2;
}

.pontaj-table input[type="text"] {
    /* MODIFICARE 1: Lățime redusă a input-ului pentru a îngusta chenarele */
    width: 30px;
    text-align: center;
    padding: 3px;
    margin: 0;
    box-sizing: border-box;
    font-size: 12px;
    height: 30px;
    /* Ajută la uniformizare */
}

/* Stiluri butoane și legendă */
.delete-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

form {
    display: block;
}

form.delete-form {
    display: inline-block;
}

.btn-toggle {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 25px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.btn-toggle:hover {
    background: linear-gradient(135deg, #388E3C, #1B5E20);
    transform: scale(1.05);
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-color);
    transition: background-color 0.3s, transform 0.1s;
    /* Tailwind @apply directives would go here */
    width: 100%;
    color: white;
    font-weight: 600;
    /* font-semibold */
    padding: 12px 0;
    border-radius: 0.75rem;
    /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* shadow-lg */
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    /* shadow-xl */
}

.btn-toggle-link {
    /* Tailwind @apply directives would go here */
    font-size: 0.875rem;
    /* text-sm */
    color: #4b5563;
    /* text-gray-600 */
    transition: color 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: underline;
}

.btn-toggle-link:hover {
    color: #4f46e5;
    /* hover:text-indigo-600 */
}

/* Stil pentru meniul container */
.menu-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}


/* Adaptări pentru Mobile (Max 768px) */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }

    .toggle-button {
        padding: 10px;
    }

    /* MODIFICARE 2: Selectoare Lună/An unul lângă altul pe mobil */
    .select-calendar-container {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .select-calendar-container select {
        width: 45%;
        margin-bottom: 0;
    }

    .legend {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        font-size: 14px;
    }

    .legend-color {
        width: 15px;
        height: 15px;
    }

    /* MODIFICARE 1: Ajustează dimensiunea tabelului și a input-urilor pe mobil */
    .pontaj-table {
        font-size: 10px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 95%;
    }

    .pontaj-table th,
    .pontaj-table td {
        padding: 5px 2px;
        /* Reducem padding-ul la minim */
        min-width: 30px;
        /* Lățimea minimă a unei zile */
    }

    .pontaj-table th:first-child,
    .pontaj-table td:first-child {
        min-width: 80px;
        position: sticky;
        left: 0;
        z-index: 10;
        background-color: #f4f4f4;
    }

    .pontaj-table td:first-child {
        background-color: #fff;
    }

    .pontaj-table input[type="text"] {
        width: 30px;
        font-size: 10px;
        padding: 2px;
        height: 25px;
    }
    .summary-card {
            background-color: #ffffff;
            border-radius: 0.75rem; /* rounded-xl */
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
            padding: 1.5rem; /* p-6 */
        }
        .summary-title {
            font-size: 1.125rem; /* text-lg */
            font-weight: 600; /* font-semibold */
            color: #4b5563; /* text-gray-700 */
            margin-bottom: 0.5rem; /* mb-2 */
        }
        .summary-value {
            font-size: 2.25rem; /* text-4xl */
            font-weight: 700; /* font-bold */
        }
        .hours-color { color: #10b981; } /* emerald-500 */
        .co-color { color: #f59e0b; } /* amber-500 */
        .cm-color { color: #3b82f6; } /* blue-500 */

}