/* ============================================================
   Portal Agency — Register Page (Dark Space Theme)
   assets/css/page-register.css
   Primary: #315EFB  |  Font: Comfortaa
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&display=swap');

/* ── Page wrapper ─────────────────────────────────────────── */
.pt-reg-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #0a0a0f;
    overflow: hidden;
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
    padding: 40px 20px 60px;
    box-sizing: border-box;
}

/* ── Star field ────────────────────────────────────────────── */
.pt-reg-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 8% 15%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 55%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 8%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 72% 38%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 88% 75%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 18% 88%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 62% 65%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 92% 12%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(2px 2px at 78% 22%, rgba(49, 94, 251, 0.4) 0%, transparent 100%),
        radial-gradient(2px 2px at 38% 92%, rgba(0, 104, 255, 0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Orbs ──────────────────────────────────────────────────── */
.pt-reg-page__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.pt-reg-page__orb--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(49, 94, 251, 0.14) 0%, transparent 65%);
    top: -180px;
    right: -150px;
    animation: ptRegFloat 13s ease-in-out infinite;
}

.pt-reg-page__orb--2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 104, 255, 0.1) 0%, transparent 65%);
    bottom: -120px;
    left: -100px;
    animation: ptRegFloat 16s ease-in-out infinite reverse;
}

@keyframes ptRegFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

/* ── Grid ──────────────────────────────────────────────────── */
.pt-reg-page__dots {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(49, 94, 251, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 94, 251, 0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ── Container ─────────────────────────────────────────────── */
.pt-reg-page__container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 560px;
    padding: 60px 12px;
}

/* ── Logo ──────────────────────────────────────────────────── */
.pt-reg-page__logo {
    display: block;
    margin-bottom: 32px;
    text-decoration: none;
}

.pt-reg-page__logo img {
    height: 44px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.pt-reg-page__logo span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ── Card ──────────────────────────────────────────────────── */
.pt-reg-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 40px 36px;
    box-shadow:
        0 0 0 1px rgba(49, 94, 251, 0.1),
        0 32px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: ptRegCardIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ptRegCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pt-reg-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #315EFB 30%, #60a5fa 70%, transparent 100%);
    border-radius: 24px 24px 0 0;
}

.pt-reg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(49, 94, 251, 0.6), transparent);
    pointer-events: none;
}

/* ── Badge ─────────────────────────────────────────────────── */
.pt-reg-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(49, 94, 251, 0.15);
    border: 1px solid rgba(49, 94, 251, 0.35);
    border-radius: 100px;
    color: #93b4fd;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ── Header ────────────────────────────────────────────────── */
.pt-reg-card__header {
    margin-bottom: 28px;
}

.pt-reg-card__title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.pt-reg-card__subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13.5px;
    margin: 0;
    line-height: 1.5;
}

/* ── Messages ──────────────────────────────────────────────── */
.pt-reg-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    margin-bottom: 18px;
    line-height: 1.5;
    backdrop-filter: blur(8px);
}

.pt-reg-msg svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.pt-reg-msg--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.pt-reg-msg--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

/* ── Two-column row ────────────────────────────────────────── */
.pt-reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Form group ────────────────────────────────────────────── */
.pt-reg-group {
    margin-bottom: 16px;
}

.pt-reg-label {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 7px;
    letter-spacing: 0.1px;
}

/* ── Input wrapper ─────────────────────────────────────────── */
.pt-reg-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pt-reg-icon {
    position: absolute;
    left: 13px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* ── Input ─────────────────────────────────────────────────── */
.pt-reg-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    color: #ffffff;
    font-size: 13.5px;
    padding: 12px 40px 12px 40px;
    outline: none;
    transition: all 0.22s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    font-family: 'Comfortaa', sans-serif;
}

.pt-reg-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pt-reg-input:focus {
    border-color: rgba(49, 94, 251, 0.7);
    background: rgba(49, 94, 251, 0.08);
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.15), 0 0 20px rgba(49, 94, 251, 0.1);
}

.pt-reg-input:-webkit-autofill,
.pt-reg-input:-webkit-autofill:hover,
.pt-reg-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 10, 20, 0.9) inset;
    -webkit-text-fill-color: #ffffff;
}

/* ── Select ────────────────────────────────────────────────── */
.pt-reg-input-wrap--select {
    position: relative;
}

.pt-reg-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 36px;
}

.pt-reg-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.pt-reg-select-arrow {
    position: absolute;
    right: 12px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* ── Password eye ──────────────────────────────────────────── */
.pt-reg-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    z-index: 1;
}

.pt-reg-eye:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Password strength ─────────────────────────────────────── */
.pt-reg-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 14px;
}

.pt-reg-strength__bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.pt-reg-strength__bar {
    height: 3px;
    flex: 1;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.pt-reg-strength__label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    transition: color 0.3s;
    min-width: 80px;
    text-align: right;
}

.pt-reg-strength--weak .pt-reg-strength__bar:nth-child(1) {
    background: #ef4444;
}

.pt-reg-strength--fair .pt-reg-strength__bar:nth-child(-n+2) {
    background: #f59e0b;
}

.pt-reg-strength--good .pt-reg-strength__bar:nth-child(-n+3) {
    background: #3b82f6;
}

.pt-reg-strength--strong .pt-reg-strength__bar {
    background: #22c55e;
}

.pt-reg-strength--weak .pt-reg-strength__label {
    color: #ef4444;
}

.pt-reg-strength--fair .pt-reg-strength__label {
    color: #f59e0b;
}

.pt-reg-strength--good .pt-reg-strength__label {
    color: #3b82f6;
}

.pt-reg-strength--strong .pt-reg-strength__label {
    color: #22c55e;
}

/* ── Terms checkbox ────────────────────────────────────────── */
.pt-reg-group--terms {
    margin-bottom: 22px;
}

.pt-reg-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
    line-height: 1.55;
}

.pt-reg-check-label a {
    color: #315EFB;
    text-decoration: none;
    font-weight: 700;
}

.pt-reg-check-label a:hover {
    text-decoration: underline;
    color: #60a5fa;
}

.pt-reg-checkbox {
    display: none;
}

.pt-reg-checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    transition: all 0.2s;
    margin-top: 1px;
}

.pt-reg-checkbox:checked+.pt-reg-checkmark {
    background: #315EFB;
    border-color: #315EFB;
    box-shadow: 0 0 12px rgba(49, 94, 251, 0.4);
}

.pt-reg-checkbox:checked+.pt-reg-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ── Submit button ─────────────────────────────────────────── */
.pt-reg-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #315EFB 0%, #0068FF 100%);
    border: 1px solid rgba(49, 94, 251, 0.5);
    border-radius: 12px;
    color: #fff;
    font-family: 'Comfortaa', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(49, 94, 251, 0.4), 0 0 40px rgba(49, 94, 251, 0.1);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.pt-reg-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.pt-reg-btn:hover::before {
    left: 100%;
}

.pt-reg-btn:hover {
    background: transparent;
    color: #315EFB;
    box-shadow: 0 6px 28px rgba(49, 94, 251, 0.3), 0 0 0 1px rgba(49, 94, 251, 0.5);
    transform: translateY(-2px);
}

.pt-reg-btn:active {
    transform: translateY(0);
}

.pt-reg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pt-reg-btn__arrow {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.pt-reg-btn:hover .pt-reg-btn__arrow {
    transform: translateX(4px);
}

/* ── Sign in link ──────────────────────────────────────────── */
.pt-reg-signin {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12.5px;
    margin: 18px 0 0;
}

.pt-reg-signin a {
    color: #315EFB;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.pt-reg-signin a:hover {
    text-decoration: underline;
    color: #60a5fa;
}

/* ── Switch / Back ─────────────────────────────────────────── */
.pt-reg-switch,
.pt-reg-back {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    text-decoration: none;
    font-size: 12.5px;
    transition: color 0.2s;
    font-family: 'Comfortaa', sans-serif;
}

.pt-reg-switch {
    color: #315EFB;
    font-weight: 600;
}

.pt-reg-switch:hover {
    color: #60a5fa;
}

.pt-reg-back {
    color: rgba(255, 255, 255, 0.3);
}

.pt-reg-back:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Spinner / Shake ───────────────────────────────────────── */
@keyframes ptRegSpin {
    to {
        transform: rotate(360deg);
    }
}

.pt-spin {
    animation: ptRegSpin 0.8s linear infinite;
    display: block;
}

@keyframes ptRegShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

.pt-reg-card--shake {
    animation: ptRegShake 0.4s ease;
}

/* ── Success state ─────────────────────────────────────────── */
.pt-reg-card--success .pt-reg-form {
    display: none;
}

.pt-reg-success-state {
    text-align: center;
    padding: 20px 0 10px;
    display: none;
}

.pt-reg-card--success .pt-reg-success-state {
    display: block;
}

.pt-reg-success-state__icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #315EFB, #60a5fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    color: #fff;
    animation: ptRegPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 0 40px rgba(49, 94, 251, 0.4);
}

@keyframes ptRegPop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.pt-reg-success-state__title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
}

.pt-reg-success-state__sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13.5px;
    margin: 0 0 26px;
    line-height: 1.6;
}

.pt-reg-success-state__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #315EFB, #0068FF);
    border: 1px solid rgba(49, 94, 251, 0.5);
    border-radius: 12px;
    color: #fff;
    font-family: 'Comfortaa', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.pt-reg-success-state__btn:hover {
    background: transparent;
    color: #315EFB;
    box-shadow: 0 0 0 1px rgba(49, 94, 251, 0.5);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 580px) {
    .pt-reg-card {
        padding: 30px 22px 26px;
    }

    .pt-reg-card__title {
        font-size: 20px;
    }

    .pt-reg-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}