/**
 * Modern enrolment form style (DSA-inspired)
 * Section-based layout with clear headings and form groups.
 */
.form-modern {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.form-modern .form-page-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 24px 0 32px;
    color: #1a1a1a;
}

.form-modern .form-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.form-modern .form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #c9a227;
    display: block;
}

.form-modern .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.form-modern .form-row:last-child {
    margin-bottom: 0;
}

.form-modern .form-label {
    flex: 0 0 200px;
    min-width: 140px;
    font-weight: 600;
    color: #444;
    padding-top: 8px;
}

.form-modern .form-label.required::after {
    content: ' *';
    color: #c00;
}

.form-modern .form-label.required-one-of::after {
    content: ' *';
    color: #c00;
}

.form-modern .form-table-modern th.required::after {
    content: ' *';
    color: #c00;
}

.form-modern .form-table-modern th.required-one-of::after {
    content: ' *';
    color: #c00;
}

.form-modern .form-control {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-modern .form-control:focus {
    border-color: #c9a227;
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}

.form-modern select.form-control {
    height: 2.4em;
    cursor: pointer;
}

.form-modern .form-control-inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.form-modern .form-control-inline-group input,
.form-modern .form-control-inline-group select {
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-modern .form-control-inline-group input:focus,
.form-modern .form-control-inline-group select:focus {
    border-color: #c9a227;
    outline: none;
}

.form-modern .form-hint {
    font-size: 0.875rem;
    color: #666;
    margin-top: 4px;
}

.form-modern .form-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.form-modern .form-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.form-modern .form-radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #c9a227;
}

.form-modern .form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
}

.form-modern .form-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #c9a227;
}

.form-modern .form-checkbox-label .form-checkbox-label-text {
    flex: 1;
    min-width: 0;
}
.form-modern .form-checkbox-label .form-checkbox-label-text a {
    white-space: nowrap;
}

.form-modern .form-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.form-modern .form-table-modern th,
.form-modern .form-table-modern td {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: middle;
}

.form-modern .form-table-modern thead th {
    background: #f5f5f5;
    font-weight: 600;
    color: #444;
}

.form-modern .form-table-modern input[type="text"],
.form-modern .form-table-modern select {
    width: 100%;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-modern .form-table-modern .td-name-group input {
    width: auto;
    min-width: 80px;
    margin-right: 6px;
}

.form-modern .form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.form-modern .btn {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, color 0.2s;
}

.form-modern .btn-primary {
    background: #c9a227;
    color: #fff;
}

.form-modern .btn-primary:hover {
    background: #b08c1f;
    color: #fff;
}

.form-modern .btn-secondary {
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-modern .btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

.form-modern .form-nav-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
}

.form-modern .form-nav-links a {
    color: #0066cc;
    text-decoration: none;
}

.form-modern .form-nav-links a:hover {
    text-decoration: underline;
}

.form-modern .form-nav-links span {
    margin: 0 8px;
    color: #999;
}

.form-modern .alert-error {
    background: #fff0f0;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.form-modern .info-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 14px 18px;
    margin: 12px 0;
    font-size: 14px;
}

.form-modern .notes-list {
    margin: 12px 0;
    padding-left: 24px;
}

.form-modern .notes-list li {
    margin-bottom: 6px;
}

.form-modern .declaration-text {
    font-size: 14px;
    color: #555;
    margin: 8px 0;
}

@media (max-width: 640px) {
    .form-modern .form-label {
        flex: 0 0 100%;
    }
    .form-modern .form-section {
        padding: 16px;
    }
    .form-modern .form-table-modern .td-name-group input {
        min-width: 70px;
    }
}
