* {
    box-sizing: border-box;
}

:root {
    --blue: #25378b;
    --dark-blue: #17205f;
    --light-blue: #2fb7e8;
    --text: #172033;
    --muted: #667085;
    --border: #d7deea;
    --white: #ffffff;
    --danger: #dc2626;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #eef9ff;
}

.register-page {
    width: 100%;
    height: 100svh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.8vw, 22px);
    background:
        radial-gradient(circle at 84% 18%, rgba(47, 183, 232, .34), transparent 30%),
        radial-gradient(circle at 12% 88%, rgba(37, 55, 139, .14), transparent 28%),
        linear-gradient(135deg, #f6fcff 0%, #dff2ff 48%, #f8fbff 100%);
}

.register-shell {
    width: min(1180px, 100%);
    height: min(680px, calc(100svh - 24px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
    overflow: hidden;
    border-radius: 34px;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(255, 255, 255, .68);
    box-shadow: 0 28px 80px rgba(23, 32, 95, .16);
    backdrop-filter: blur(10px);
}

.register-form-panel {
    padding: clamp(22px, 3vw, 38px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, .86);
}

.register-header {
    margin-bottom: 18px;
}

.register-header h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(34px, 3.8vw, 54px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -1.5px;
}

.register-header p {
    margin: 10px 0 0;
    width: min(640px, 100%);
    color: #3b4964;
    font-size: 15px;
    line-height: 1.5;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 0 15px;
    color: var(--text);
    background: rgba(248, 250, 252, .96);
    font-size: 14px;
    outline: none;
    transition: .2s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--light-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 183, 232, .14);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 72px;
}

.toggle-password {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    padding: 0 11px;
    border: none;
    border-radius: 11px;
    background: rgba(47, 183, 232, .14);
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.terms-box {
    height: 120px;
    border: 1px solid rgba(215, 222, 234, .9);
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    overflow: hidden;
    padding: 12px 14px;
}

.terms-box h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.terms-box ol {
    height: 76px;
    overflow-y: auto;
    margin: 0;
    padding-left: 20px;
    color: #344054;
    font-size: 12px;
    line-height: 1.5;
}

.form-bottom {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #344054;
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
    white-space: nowrap;
}

.check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--light-blue);
}

.submit-btn {
    height: 52px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--light-blue), #1e9fd0);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(47, 183, 232, .30);
    transition: .2s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.alert-error {
    margin-bottom: 12px;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(220, 38, 38, .08);
    border: 1px solid rgba(220, 38, 38, .18);
    color: var(--danger);
    font-size: 13px;
    line-height: 1.45;
}

.alert-error ul {
    margin: 6px 0 0;
    padding-left: 18px;
    max-height: 60px;
    overflow-y: auto;
}

/* Panel kanan */
.register-visual-panel {
    position: relative;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(47, 183, 232, .30), transparent 36%),
        linear-gradient(135deg, #17205f 0%, #25378b 48%, #2fb7e8 145%);
    overflow: hidden;
}

.register-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.12), transparent 26%),
        linear-gradient(180deg, transparent, rgba(0,0,0,.16));
}

.visual-card {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-height: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-campus,
.logo-unggul {
    object-fit: contain;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(255,255,255,.76);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .14);
    backdrop-filter: blur(8px);
}

.logo-campus {
    width: 74px;
    height: 74px;
    border-radius: 20px;
    padding: 7px;
}

.logo-unggul {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    padding: 6px;
}

.sobi-register {
    width: min(295px, 74%);
    max-height: 320px;
    object-fit: contain;
    margin-top: -2px;
    margin-bottom: 12px;
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .24));
}

.visual-text {
    width: 100%;
    margin-top: auto;
    padding: 18px 20px;
    border-radius: 24px;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}

.visual-text span {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.visual-text h2 {
    margin: 0;
    font-size: clamp(23px, 2.1vw, 31px);
    line-height: 1.12;
    font-weight: 900;
}

.visual-text p {
    margin: 10px 0 0;
    color: rgba(255,255,255,.9);
    font-size: 13px;
    line-height: 1.45;
}

/* Tablet */
@media (max-width: 980px) {
    .register-shell {
        grid-template-columns: 1fr;
        height: calc(100svh - 24px);
    }

    .register-visual-panel {
        display: none;
    }

    .register-form-panel {
        justify-content: center;
    }

    .register-header {
        text-align: center;
    }

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

    .check-row {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .register-page {
        padding: 10px;
    }

    .register-shell {
        height: calc(100svh - 20px);
        border-radius: 24px;
    }

    .register-form-panel {
        padding: 16px;
    }

    .register-header {
        margin-bottom: 12px;
    }

    .register-header h1 {
        font-size: 29px;
    }

    .register-header p {
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.4;
    }

    .register-form {
        gap: 9px;
    }

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

    .input-group label {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .input-group input,
    .input-group select {
        height: 42px;
        border-radius: 13px;
        font-size: 13px;
    }

    .terms-box {
        height: 104px;
        padding: 10px 12px;
    }

    .terms-box h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .terms-box ol {
        height: 64px;
        font-size: 11px;
        line-height: 1.45;
    }

    .check-row {
        font-size: 12px;
    }

    .submit-btn {
        height: 48px;
        font-size: 16px;
    }

    .alert-error {
        max-height: 82px;
        overflow-y: auto;
        font-size: 12px;
    }
}

/* HP kecil */
@media (max-width: 390px) {
    .register-form-panel {
        padding: 13px;
    }

    .register-header h1 {
        font-size: 25px;
    }

    .register-header p {
        display: none;
    }

    .input-group input,
    .input-group select {
        height: 39px;
    }

    .terms-box {
        height: 88px;
    }

    .terms-box ol {
        height: 50px;
    }

    .submit-btn {
        height: 45px;
    }
}


.error-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    z-index: 99999;
    width: min(520px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 44px 1fr 34px;
    gap: 12px;
    align-items: flex-start;
    padding: 18px 18px;
    border-radius: 22px;
    background: rgba(255, 245, 245, .98);
    border: 1px solid rgba(220, 38, 38, .22);
    box-shadow: 0 28px 80px rgba(127, 29, 29, .22);
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%);
    animation: popupCenterIn .25s ease both;
}

.error-popup-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #dc2626;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.error-popup-content strong {
    display: block;
    color: #b91c1c;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
}

.error-popup-content ul {
    margin: 0;
    padding-left: 18px;
    color: #dc2626;
    font-size: 15px;
    line-height: 1.6;
}

.error-popup-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: rgba(220, 38, 38, .10);
    color: #b91c1c;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
}

.error-popup-close:hover {
    background: rgba(220, 38, 38, .18);
}

.error-popup.hide {
    animation: popupCenterOut .2s ease both;
}

@keyframes popupCenterIn {
    from {
        opacity: 0;
        transform: translate(-50%, -54%) scale(.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popupCenterOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -54%) scale(.96);
    }
}

@media (max-width: 640px) {
    .error-popup {
        width: calc(100% - 28px);
        grid-template-columns: 38px 1fr 30px;
        border-radius: 18px;
        padding: 14px;
    }

    .error-popup-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 21px;
    }

    .error-popup-content strong {
        font-size: 16px;
    }

    .error-popup-content ul {
        font-size: 13px;
    }
}