/* ============================================
   AVR Computer Education - Online Admission Form
   Modern Professional Design
   Color Scheme: Blue + White + Light Gray
   ============================================ */

:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent: #0ea5e9;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 10px 40px rgba(26, 86, 219, 0.08);
    --shadow-lg: 0 20px 60px rgba(26, 86, 219, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f9ff 50%, #f8fafc 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 20px 15px 40px;
}

/* ========== HEADER ========== */
.header {
    max-width: 920px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    color: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.logo-placeholder {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.header-text h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.header-text p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.header-text .tagline {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* ========== FORM CONTAINER ========== */
.form-wrapper {
    max-width: 920px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.form-header {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 18px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.form-header h2 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.form-header .badge {
    background: #dbeafe;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

form {
    padding: 28px 32px 36px;
}

/* ========== SECTIONS ========== */
.section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dbeafe;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title span {
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ========== GRID ========== */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 20px;
}

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

/* ========== FORM CONTROLS ========== */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group label .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fafbfc;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-item label {
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

/* File upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    padding: 10px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    cursor: pointer;
}

.file-upload input[type="file"]:hover {
    border-color: var(--primary-light);
    background: #f0f7ff;
}

.file-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.photo-preview {
    margin-top: 10px;
    display: none;
}

.photo-preview img {
    max-width: 120px;
    max-height: 140px;
    border-radius: 8px;
    border: 2px solid var(--border);
    object-fit: cover;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.88rem;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1.45;
}

/* ========== FEES TABLE ========== */
.fees-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.fees-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fees-table thead {
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
    color: white;
}

.fees-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.fees-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
}

.fees-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.fees-table tbody tr:hover {
    background: #eff6ff;
}

.fees-table .fee-amount {
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
}

.fees-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

/* ========== PAYMENT / QR BOX ========== */
.payment-box {
    display: flex;
    gap: 28px;
    align-items: center;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 24px 28px;
    flex-wrap: wrap;
}

.payment-info {
    flex: 1;
    min-width: 220px;
}

.payment-info h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.upi-number {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.upi-number strong {
    color: var(--primary);
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.payment-hint {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.payment-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.45;
}

.qr-box {
    text-align: center;
    background: white;
    padding: 14px 16px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.12);
    border: 1px solid #dbeafe;
}

.qr-image {
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.qr-caption {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 8px;
}

.qr-upi {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ========== BUTTONS ========== */
.btn-row {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(26, 86, 219, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 86, 219, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ========== MESSAGES ========== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

/* ========== SUCCESS PAGE ========== */
.success-box {
    text-align: center;
    padding: 50px 30px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}

.success-box h2 {
    color: var(--success);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.success-box p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.app-number {
    display: inline-block;
    background: #ecfdf5;
    border: 2px dashed #34d399;
    color: #065f46;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 10px;
    margin: 18px 0 24px;
    letter-spacing: 1px;
}

.success-note {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

/* ========== FOOTER ========== */
.footer {
    max-width: 920px;
    margin: 24px auto 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body {
        padding: 12px 10px 30px;
    }

    .header {
        padding: 20px 18px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .header-text h1 {
        font-size: 1.35rem;
    }

    .logo-placeholder {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    form {
        padding: 20px 16px 28px;
    }

    .form-header {
        padding: 14px 16px;
    }

    .grid,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .radio-group {
        gap: 12px;
    }

    .payment-box {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 18px;
    }

    .payment-info {
        min-width: 100%;
    }

    .fees-table th,
    .fees-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .qr-image {
        width: 150px;
        height: 150px;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.7s linear infinite;
}

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