/* =========================================================
   BAZĂ
   ========================================================= */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f7fa;
    color: #222;
}

main {
    width: 90%;
    max-width: none;
    margin: 24px auto;
    background: #fff;
    padding: 24px;
    border-radius: 8px;
}


/* =========================================================
   HEADER / MENIU
   ========================================================= */

header {
    background: #172033;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header strong {
    font-size: 16px;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

nav a,
nav button {
    color: #fff;
    background: none;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 7px;
    margin: 0;
}

nav a:hover,
nav button:hover {
    text-decoration: underline;
}

nav form {
    margin: 0;
}


/* =========================================================
   TITLURI
   ========================================================= */

h1 {
    margin-top: 0;
}

h2,
h3 {
    margin-top: 20px;
}


/* =========================================================
   FORMULARE
   ========================================================= */

label {
    display: block;
    margin-bottom: 10px;
}

input,
select,
textarea {
    width: 100%;
    padding: 8px;
    margin: 4px 0 12px;
    box-sizing: border-box;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin: 0 6px 0 0;
}

input[type="file"] {
    width: auto;
    max-width: 100%;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

fieldset {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 14px;
    margin: 14px 0;
}

legend {
    padding: 0 6px;
    font-weight: bold;
}


/* =========================================================
   BUTOANE
   ========================================================= */

button,
.btn {
    background: #224b8f;
    color: #fff;
    border: 0;
    padding: 9px 14px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    width: auto;
}

button:hover,
.btn:hover {
    opacity: 0.9;
}

button + button,
.btn + .btn {
    margin-left: 5px;
}


/* =========================================================
   TABELE
   ========================================================= */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 9px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f3f5f8;
    font-weight: bold;
}


/* =========================================================
   FLASH / MESAJE
   ========================================================= */

.flash {
    background: #eef6ff;
    padding: 12px;
    margin-bottom: 18px;
    border-left: 4px solid #224b8f;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.card {
    background: #f3f5f8;
    padding: 18px;
    border-radius: 8px;
}

.card > strong {
    font-size: 24px;
}

.card hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 12px 0;
}

.dashboard-company {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 2px solid #ccc;
}

.dashboard-employee {
    margin-left: 12px;
    margin-top: 6px;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-box {
    max-width: 340px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.login-box h1 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 22px;
}

.login-box label {
    margin-bottom: 12px;
}

.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    padding: 7px 9px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.login-box button {
    padding: 8px 14px;
}

.login-info {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}


/* =========================================================
   DISTRIBUIRE
   ========================================================= */

.company-block {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.employee-row {
    display: block;
    padding: 8px;
    margin: 5px 0;
    border-bottom: 1px solid #eee;
}

.employee-row:last-child {
    border-bottom: 0;
}


/* =========================================================
   INSTRUIRI
   ========================================================= */

.training-actions form {
    margin-bottom: 8px;
}

.pdf-status {
    font-weight: bold;
}

.hash-short {
    font-size: 12px;
    color: #555;
}


/* =========================================================
   UTILITARE
   ========================================================= */

.inline {
    display: inline-block;
}

.text-center {
    text-align: center;
}

.muted {
    color: #666;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .cards {
        grid-template-columns: 1fr 1fr;
    }

    main {
        margin: 15px;
        padding: 18px;
    }

    header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    nav {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .login-box {
        max-width: 100%;
        margin: 15px 0;
    }

    table {
        font-size: 13px;
    }

    th,
    td {
        padding: 6px;
    }
}
/* =========================================================
   SIGLĂ HEADER
   ========================================================= */

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    display: block;
    width: auto;
    height: 46px;
    object-fit: contain;
}

/* =========================================================
   SIGLĂ + TITLU
   ========================================================= */

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo img {
    display: block;
    width: auto;
    height: 46px;
    object-fit: contain;
}

.site-title {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
}

/* =========================================================
   TOTP / GOOGLE AUTHENTICATOR
   ========================================================= */

.totp-secret {
    padding: 10px;
    background: #f3f5f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 2px;
    word-break: break-all;
}

/* =========================================================
   FILTRE INSTRUIRI
   ========================================================= */

.filters-form {
    margin-bottom: 20px;
    padding: 15px;
    background: #f3f5f8;
    border-radius: 8px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.filters-grid label {
    margin: 0;
}

.filters-grid select {
    margin-bottom: 0;
}

.filters-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.filters-actions .btn {
    margin: 0;
}

@media (max-width: 1000px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}


/* Meniu: pagina curenta + buton Iesire */
nav a.nav-active {
    background: #f5c542;
    color: #172033;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: inset 0 -3px 0 #d19d00;
}

nav a.nav-active:hover {
    text-decoration: none;
}

nav .logout-button {
    background: #b42318;
    color: #ffffff;
    border-radius: 5px;
    font-weight: 700;
    margin-left: 6px;
}

nav .logout-button:hover {
    text-decoration: none;
    opacity: .9;
}

/* Grupare vizuala meniu */
nav .nav-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    color: rgba(255,255,255,.55);
    font-weight: 700;
    user-select: none;
}
