:root {
    --primary: #6366f1;
    --primary-dark: #4338ca;
    --primary-light: #a5b4fc;
    --navy-1: #1e293b;
    --navy-2: #334155;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border: #e2e8f0;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 12px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: url('https://images.unsplash.com/photo-1713018604446-198b165aa772?fm=jpg&q=80&w=1920&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 0;
}

/* ---------- Animated background shapes ---------- */
.bg-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    animation: float 14s ease-in-out infinite;
}

.shape-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: #6366f1;
}

.shape-2 {
    width: 360px;
    height: 360px;
    bottom: -120px;
    right: -80px;
    background: #818cf8;
    animation-delay: -4s;
}

.shape-3 {
    width: 260px;
    height: 260px;
    top: 55%;
    left: 12%;
    background: #3b82f6;
    animation-delay: -8s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    top: 12%;
    right: 16%;
    background: #22d3ee;
    opacity: 0.25;
    animation-delay: -11s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -35px) scale(1.06); }
    50%      { transform: translate(-25px, 20px) scale(0.96); }
    75%      { transform: translate(20px, 30px) scale(1.04); }
}

/* ---------- Card ---------- */
.register-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(36px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Brand panel (left) ---------- */
.brand-panel {
    display: flex;
    flex-direction: column;
    padding: 48px 36px;
    background: linear-gradient(160deg, var(--navy-2) 0%, var(--primary-dark) 55%, var(--primary) 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 55px solid rgba(255, 255, 255, 0.08);
    bottom: -100px;
    right: -100px;
}

/* ---------- School profile ---------- */
.school-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.school-logo {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    margin-bottom: 14px;
    font-size: 30px;
    color: #c7d2fe;
}

.school-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.school-tagline {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Steps ---------- */
.brand-steps {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: auto;
    padding: 0 4px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.step.active {
    color: rgba(255, 255, 255, 0.95);
}

.step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.step.active .step-num {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.step-line {
    width: 2px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    margin-left: 14px;
}

.brand-footer {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

/* ---------- Form panel (right) ---------- */
.form-panel {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    min-height: 100vh;
}

.form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 28px 48px 0;
}

.header-left {
    flex: 1;
}

.form-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 13.5px;
    color: var(--text-gray);
}

/* ---------- Form scroll ---------- */
.form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 48px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.form-scroll::-webkit-scrollbar {
    width: 5px;
}

.form-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.form-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* ---------- Logo Upload ---------- */
.logo-upload {
    flex-shrink: 0;
}

.logo-preview {
    width: 72px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.logo-preview:hover {
    border-color: var(--primary);
    background: #eef2ff;
}

.logo-preview i {
    font-size: 18px;
    color: #94a3b8;
}

.logo-preview span {
    font-size: 9px;
    font-weight: 600;
    color: #94a3b8;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ---------- Sections ---------- */
.form-section {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-title i {
    font-size: 14px;
}

/* ---------- Form fields ---------- */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.required {
    color: var(--danger);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 13px;
    display: flex;
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.2s ease;
    font-size: 14px;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-size: 13.5px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-dark);
    background: #f9fafb;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

/* ---------- Select ---------- */
.input-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.input-wrapper select.placeholder {
    color: #9ca3af;
}

/* ---------- Validation ---------- */
.field-validation-error {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--danger);
    margin-top: 5px;
}

.input-validation-error {
    border-color: var(--danger) !important;
}

/* ---------- Actions ---------- */
.form-actions {
    padding: 18px 48px;
    border-top: 1px solid #f1f5f9;
}

.btn-register-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-register-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.btn-register-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(67, 56, 202, 0.4);
}

.btn-register-submit:hover::before {
    transform: translateX(120%);
}

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

/* ---------- Footer ---------- */
.form-footer {
    padding: 16px 48px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-gray);
    border-top: 1px solid #f1f5f9;
}

.form-footer a {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-left: 6px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .register-card {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
    }

    .form-header {
        padding: 28px 28px 0;
    }

    .form-scroll {
        padding: 20px 28px;
    }

    .form-actions {
        padding: 18px 28px;
    }

    .form-footer {
        padding: 16px 28px;
    }
}

@media (max-width: 580px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-header {
        padding: 24px 20px 0;
    }

    .form-scroll {
        padding: 16px 20px;
    }

    .form-actions {
        padding: 14px 20px;
    }

    .form-footer {
        padding: 14px 20px;
    }
}
