/* =========================================
   1. FONTURI & RESET
   ========================================= */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    overflow-x: hidden;
}

/* =========================================
   2. NAVBAR & HERO (Pagina Principală)
   ========================================= */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 8%;
    z-index: 1000;
}

.logo img {
    height: 80px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: white;
}

.auth-btn {
    background-color: white;
    color: black !important;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600 !important;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../media/hero_image_turbine.jpeg') center/cover fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4rem;
    letter-spacing: 5px;
}

/* =========================================
   3. DASHBOARD LAYOUT
   ========================================= */
.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 280px;
    background-color: #1a1a1a;
    color: white;
    padding: 20px 15px;
    height: 100vh;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    overflow-y: auto;
    border-right: 1px solid #333;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.sidebar-nav a {
    color: #bbb;
    text-decoration: none;
    display: block;
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 10px;
    transition: 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #ff4d4d;
    color: white;
}

.main-content {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background-color: #f4f7f6;
}

/* =========================================
   4. TAB-URI ȘI CARDURI DASHBOARD
   ========================================= */
.tab-content {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

.app-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow-y: auto;
    flex: 1;
}

/* =========================================
   5. FORMULARE DASHBOARD (Fundal Alb)
   ========================================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

/* Selectori specifici pentru interiorul dashboard-ului */
.main-content input[type="text"],
.main-content input[type="number"],
.main-content input[type="date"],
.main-content input[type="time"],
.main-content select,
.main-content textarea {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #ccc !important;
    padding: 10px 12px !important;
    border-radius: 5px !important;
    width: 100%;
    font-size: 0.95rem;
    box-sizing: border-box;
    font-family: inherit;
}

.main-content input:focus,
.main-content select:focus {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.25) !important;
    outline: none;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #333;
}

/* Buline INT (Radio) */
.int-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #333;
}

.radio-container input {
    display: none;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #f0f0f0;
    border-radius: 50%;
    border: 2px solid #ddd;
    position: relative;
    margin-top: 4px;
}

.radio-container input:checked~.checkmark {
    background-color: #ff4d4d;
    border-color: #ff4d4d;
}

/* =========================================
   6. TABELE
   ========================================= */
.table-wrapper {
    overflow: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    flex: 1;
    background: white;
}

.data-table {
    width: 100%;
    min-width: 1800px;
    border-collapse: collapse;
}

.data-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 5;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #eee;
    color: #333;
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    color: #444;
}

/* =========================================
   7. PAGINA LOGIN & REGISTER (Tema Dark)
   ========================================= */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.login-box {
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: white;
}

.login-box h2 {
    margin-bottom: 25px;
    color: #ff4d4d;
}

/* Restabilire stiluri câmpuri text pentru Login */
.login-box .input-group input {
    background-color: #252525 !important;
    color: #ffffff !important;
    border: 1px solid #333 !important;
    padding: 12px !important;
    border-radius: 8px !important;
    margin-bottom: 5px;
}

.login-box .input-group input:focus {
    border-color: #ff4d4d !important;
}

/* Butoane specifice Login */
.login-box .main-button.dark {
    background-color: #ff4d4d !important;
    color: white !important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    margin-top: 15px;
    transition: 0.3s;
}

.login-box .main-button.dark:hover {
    background-color: #e60000 !important;
}

.login-box .back-link,
.login-box .switch-auth a {
    color: #ff4d4d !important;
    text-decoration: none;
}

.login-box .switch-auth {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

/* =========================================
   8. BUTOANE & UTILITARE
   ========================================= */
.crm-btn,
.add-btn {
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

.crm-btn {
    background: #ff4d4d;
    color: white;
    padding: 15px 35px;
}

.crm-btn:hover {
    background: #e60000;
    transform: translateY(-2px);
}

.add-btn {
    background: #2ecc71;
    color: white;
    padding: 10px 20px;
}

.hidden {
    display: none !important;
}


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

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

@media (max-width: 900px) {
    .sidebar {
        width: 70px;
        padding: 20px 5px;
    }

    .sidebar h3,
    .sidebar-nav span {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}

/* --- OPTIMIZARE MOBIL (PWA) --- */
@media (max-width: 768px) {

    /* 1. Resetăm containerele mari să ocupe tot ecranul */
    .dashboard-container,
    .wizard-step {
        width: 95% !important;
        margin: 10px auto !important;
        padding: 10px !important;
    }

    /* 2. Transformăm layout-ul din 2 coloane în 1 coloană */
    .step-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* 3. Mărim butoanele pentru degete (Touch Target) */
    .main-button,
    .crm-btn,
    .action-btn {
        width: 100% !important;
        height: 50px !important;
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
    }

    /* 4. Hărțile trebuie să fie înalte pe mobil */
    #map-point,
    #map-path {
        height: 350px !important;
        width: 100% !important;
        border-radius: 8px;
    }

    /* 5. Selectorul de proiecte (BAND) să nu iasă din ecran */
    .project-selector {
        width: 100% !important;
    }

    /* 6. Navbar-ul de mobil */
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .nav-links {
        display: none;
        /* Putem face un meniu burger mai târziu */
    }

    /* 7. Input-uri mari și lizibile */
    input[type="text"],
    input[type="number"],
    select {
        font-size: 16px !important;
        /* Previne auto-zoom-ul pe iPhone */
        height: 45px !important;
    }
}