/* ===== Base Styles ===== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* ===== Containers ===== */
.container {
    max-width: 1000px;
    margin: auto;
}

.form-card,
.tile,
.trainee-table-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-card:hover,
.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* ===== Form Header ===== */
.form-header h1 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #333;
}

.form-header p {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.95rem;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1rem;
}

label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
    display: block;
}

/* Input Fields */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select,
input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus State */
input:focus,
textarea:focus,
select:focus,
input[type="file"]:focus {
    border-color: #0056d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 86, 210, 0.2);
}

/* Dropdown Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D'4'%20height%3D'5'%20xmlns%3D'http://www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M2%200L0%202h4L2%200zm0%205l2-2H0l2%202z'%20fill%3D'%236c757d'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 10px;
}

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

/* ===== Buttons ===== */
.btn {
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: #0056d2;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0041a8;
}

/* ===== Checkboxes & Fieldsets ===== */
.checkbox-group label,
fieldset label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 1rem;
}

legend {
    padding: 0 10px;
    font-weight: 600;
    color: #333;
}

/* ===== File Upload Styling ===== */
input[type="file"] {
    cursor: pointer;
}

.form-text {
    font-size: 0.85rem;
    color: #666;
}

/* ===== Tables ===== */
.trainee-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.trainee-table-container th,
.trainee-table-container td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.trainee-table-container th {
    background-color: #0056d2;
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.trainee-table-container tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.trainee-table-container tbody tr:hover {
    background-color: #e6f0ff;
}

.trainee-table-container img {
    border-radius: 8px;
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
}

/* ===== Modals ===== */
#modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

#modal.hidden {
    display: none;
}

#modal .modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    .tile,
    .form-card {
        padding: 20px;
    }

    .trainee-table-container th,
    .trainee-table-container td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .trainee-table-container img {
        max-width: 80px;
        max-height: 80px;
    }
}