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

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f6fa;
    color: #2d3436;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    width: 100%;
}

.container:has(.closed-message) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #003a75 0%, #004d9c 50%, #0066cc 100%);
    color: #fff;
    padding: 2.5rem 1rem;
}

.header-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-inner.centered {
    flex-direction: column;
    text-align: center;
}

.header-badge {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

/* Container */
/* Closed Message */
.closed-message {
    background: #fff;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    max-width: 480px;
    margin: auto;
}

.closed-icon {
    margin-bottom: 1.25rem;
}

.closed-message h2 {
    color: #c0392b;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.closed-message p {
    color: #636e72;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

/* Form Card */
.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Section */
.form-section {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.05rem;
    color: #004d9c;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.01em;
}

.section-number {
    background: #004d9c;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* Form Group */
.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: #4a5568;
    letter-spacing: 0.01em;
}

.form-group label .required {
    color: #c0392b;
}

.form-group input[type="text"] {
    text-transform: capitalize;
}

.form-group input[type="text"][name="kodi_postar"],
.form-group input[type="text"][name="nr_pasaportes"] {
    text-transform: uppercase;
}

.form-group input[type="email"] {
    text-transform: none;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid #dfe6e9;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #004d9c;
    box-shadow: 0 0 0 3px rgba(12, 30, 60, 0.08);
    background: #fff;
}

.form-group input.error,
.form-group select.error {
    border-color: #c0392b;
}

.form-group .error-msg,
#termsError,
#examsError {
    color: #c0392b;
    font-size: 0.78rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group .error-msg.show {
    display: block;
}

.form-group input[type="file"] {
    padding: 0;
    background: #fafafa;
    border: 2px dashed #c9d6e3;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-group input[type="file"]:hover {
    border-color: #004d9c;
    background: #f0f6ff;
}

.form-group input[type="file"]::file-selector-button {
    padding: 0.6rem 1rem;
    margin-right: 0.75rem;
    background: #004d9c;
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.form-group input[type="file"]::file-selector-button:hover {
    background: #003a75;
}

.form-group .file-hint {
    font-size: 0.78rem;
    color: #636e72;
    margin-top: 0.35rem;
}

/* Info Notice */
.info-notice {
    background: #fffbf0;
    border: 1px solid #f0ddb8;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #5c3a0a;
    line-height: 1.7;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-notice-icon {
    font-size: 1.4rem;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.info-notice-content p {
    margin-bottom: 0.5rem;
}

.info-notice-content p:last-child {
    margin-bottom: 0;
}

.info-notice-title {
    font-weight: 600;
    color: #92400e;
}

.info-notice-warning {
    font-weight: 600;
    color: #c2410c;
    font-size: 0.83rem;
    margin-top: 0.25rem;
}

/* Deadline Banner (unused, kept for admin) */

/* N/A Message */
.na-message {
    background: #fef2f2;
    color: #c0392b;
    border: 1.5px solid #fecaca;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 0.75rem;
    font-weight: 500;
    text-align: center;
    font-size: 0.9rem;
}

/* Exam List */
.exams-list {
    margin-bottom: 1rem;
}

.exam-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.exam-info {
    flex: 1;
    font-size: 0.9rem;
}

.exam-info strong {
    color: #166534;
    font-weight: 600;
}

.exam-price {
    display: inline-block;
    margin-left: 1rem;
    color: #004d9c;
    font-weight: 600;
}

.exam-remove {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.exam-remove:hover {
    color: #922b21;
}

/* Add Exam Buttons */
.add-exam-btn {
    display: block;
    width: 100%;
    padding: 0.7rem;
    margin-top: 1rem;
    background: #004d9c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.add-exam-btn:hover {
    background: #003a75;
}

.add-another-btn {
    display: block;
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.75rem;
    background: #fff;
    color: #004d9c;
    border: 2px dashed #dfe6e9;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.add-another-btn:hover {
    background: #f5f6fa;
    border-color: #004d9c;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.radio-group.horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
}

.radio-group.horizontal .radio-option {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 0.6rem 0.2rem;
    border-radius: 10px;
    border-width: 2px;
    background: #fff;
}

.radio-group.horizontal .radio-option input[type="radio"] {
    display: none;
}

.radio-group.horizontal .radio-option .radio-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #004d9c;
}

.radio-group.horizontal .radio-option.selected {
    background: #004d9c;
    border-color: #004d9c;
}

.radio-group.horizontal .radio-option.selected .radio-label {
    color: #fff;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #dfe6e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.radio-option:hover {
    border-color: #004d9c;
    background: #f5f6fa;
}

.radio-option input[type="radio"] {
    margin-right: 0.6rem;
    accent-color: #004d9c;
    width: 16px;
    height: 16px;
}

.radio-option.selected {
    border-color: #004d9c;
    background: #eef2f7;
}

.radio-option .radio-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.radio-option .radio-desc {
    font-size: 0.8rem;
    color: #636e72;
    margin-left: 0.4rem;
}

/* Price Display */
.price-display {
    background: #eef2f7;
    border: 1.5px solid #c9d6e3;
    border-radius: 8px;
    padding: 0.85rem;
    text-align: center;
    margin-top: 0.75rem;
    display: none;
}

.price-display.show {
    display: block;
}

.price-display .price-label {
    font-size: 0.8rem;
    color: #636e72;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.price-display .price-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: #004d9c;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.modal-card h2 {
    color: #2d3436;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.modal-card p {
    color: #636e72;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.modal-ref {
    background: #f0f6ff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin: 0.5rem 0 1rem;
    color: #004d9c;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #004d9c;
    color: #fff;
}

.modal-btn-primary:hover {
    background: #003a75;
}

.modal-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-btn-secondary:hover {
    background: #cbd5e0;
}

/* Partner Section */
.partner-section {
    margin-top: 1rem;
    display: none;
}

.partner-section.show {
    display: block;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    border: 1.5px solid #dfe6e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    line-height: 1.5;
    background: #fafafa;
}

.checkbox-option:hover {
    border-color: #004d9c;
    background: #f5f6fa;
}

.checkbox-option input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: #004d9c;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.checkbox-option a {
    color: #004d9c;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: #004d9c;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.submit-btn:hover {
    background: #003a75;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 30, 60, 0.2);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 30, 60, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 3rem;
    text-align: center;
    font-weight: 500;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #dfe6e9;
    border-top-color: #004d9c;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.9rem;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #fef2f2;
    color: #c0392b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

/* Success Page */
.success-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    padding: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.success-header {
    text-align: center;
    margin-bottom: 2rem;
}

.success-icon-svg {
    margin-bottom: 0.75rem;
}

.success-message {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.7;
}

.success-message p {
    margin-bottom: 0.35rem;
}

.success-payment-info {
    background: #fffbf0;
    border: 1px solid #f0ddb8;
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: #5c3a0a;
    line-height: 1.7;
}

.success-payment-info p {
    margin-bottom: 0.5rem;
}

.success-payment-info p:last-child {
    margin-bottom: 0;
}

.success-warning {
    color: #c0392b;
    font-weight: 600;
    margin-top: 0.5rem;
}

.success-contact {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 0.82rem;
    color: #636e72;
    line-height: 1.7;
}

.success-contact a {
    color: #004d9c;
    text-decoration: none;
    font-weight: 500;
}

.success-contact a:hover {
    text-decoration: underline;
}

.success-header h2 {
    color: #166534;
    margin-bottom: 0.5rem;
}

.ref-number {
    background: #eef2f7;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #004d9c;
    margin-top: 0.5rem;
    border: 1px solid #c9d6e3;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.data-table th,
.data-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.data-table th {
    background: #f8f9fa;
    color: #4a5568;
    font-weight: 600;
    width: 40%;
}

.data-table td {
    color: #2d3436;
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #004d9c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-btn:hover {
    background: #003a75;
    transform: translateY(-1px);
}

/* Kursi Form */
.kursi-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    padding: 2rem;
    border-top: 4px solid #004d9c;
}

.kursi-card h2 {
    color: #004d9c;
    margin-bottom: 0.5rem;
}

.kursi-card .optional-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #004d9c;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #f0f2f5;
    color: #4a5568;
    padding: 2.5rem 1rem 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.footer-logo img {
    height: 60px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #4a5568;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: #004d9c;
    color: #fff;
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #004d9c;
}

.footer-copy {
    font-size: 0.75rem;
    color: #a0aec0;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    width: 100%;
    text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
    .header h1 {
        font-size: 1.15rem;
    }

    .header-badge {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 1.25rem 1rem;
    }

    .container {
        padding: 1rem 0.5rem;
    }

    .container:has(.closed-message) {
        align-items: flex-start;
        padding-top: 2rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .radio-group.horizontal .radio-option {
        padding: 0.5rem 0.15rem;
    }

    .radio-group.horizontal .radio-option .radio-label {
        font-size: 0.8rem;
    }
}
