/* ════════════════════════════════
   REGISTRATION PAGE
   jotno.ai — register.css
   Requires: main.css loaded first
════════════════════════════════ */

/* ─── PAGE ─── */
.reg-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 5%;
    position: relative;
    z-index: 10;
}

/* ─── CARD ─── */
.reg-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 28px;
    padding: 2.8rem 2.8rem;
    box-shadow:
        0 24px 70px rgba(8, 145, 178, 0.18),
        0 0 0 1px rgba(6, 182, 212, 0.06) inset;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.7s ease both;
}

.card-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.card-blob-tl {
    top: -70px;
    right: -70px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 70%);
}

.card-blob-br {
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.14), transparent 70%);
}

.reg-card-inner {
    position: relative;
    z-index: 1;
}

/* ─── LOGO ─── */
.card-logo {
    text-align: center;
    margin-bottom: 1.4rem;
}

.card-logo img {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

/* ─── HEADER ─── */
.form-header {
    text-align: center;
    margin-bottom: 1.9rem;
}

.form-icon {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.7);
    animation: floatIcon 5s ease-in-out infinite;
}

.form-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 0.3rem;
    line-height: 1.1;
}

.form-subtitle {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--muted);
}

/* ─── ALERTS ─── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.alert-error {
    background: rgba(220, 38, 38, 0.07);
    border: 1.5px solid rgba(220, 38, 38, 0.22);
    color: #b91c1c;
}

.alert-success {
    background: rgba(5, 150, 105, 0.07);
    border: 1.5px solid rgba(5, 150, 105, 0.22);
    color: #065f46;
}

/* ─── FIELDS ─── */
.field-group {
    margin-bottom: 1.2rem;
}

.field-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0.42rem;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 1rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.field-input {
    width: 100%;
    padding: 0.85rem 2.8rem 0.85rem 2.8rem;
    border: 2px solid rgba(8, 145, 178, 0.12);
    border-radius: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
    background: white;
}

.field-wrap:focus-within .field-icon {
    color: var(--primary);
}

.field-input::placeholder {
    color: rgba(74, 104, 130, 0.45);
    font-weight: 500;
}

/* Password toggle */
.toggle-pw {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    z-index: 1;
}

.toggle-pw:hover {
    color: var(--primary);
    background: rgba(8, 145, 178, 0.08);
}

/* ─── STRENGTH METER ─── */
.strength-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.55rem;
}

.strength-track {
    flex: 1;
    display: flex;
    gap: 4px;
}

.strength-seg {
    flex: 1;
    height: 5px;
    border-radius: 10px;
    background: rgba(8, 145, 178, 0.1);
    transition: background 0.35s ease;
}

.strength-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
    min-width: 52px;
    text-align: right;
    transition: color 0.3s;
}

/* ─── MATCH MESSAGE ─── */
.match-msg {
    font-size: 0.75rem;
    font-weight: 800;
    margin-top: 0.45rem;
}

.match-ok {
    color: #16a34a;
}

.match-no {
    color: #dc2626;
}

/* ─── SUBMIT ─── */
.submit-btn {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: white;
    border: none;
    border-radius: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 28px rgba(8, 145, 178, 0.38);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.01em;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(8, 145, 178, 0.48);
}

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

.submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.submit-arrow {
    font-size: 1.05rem;
    transition: transform 0.2s;
}

.submit-btn:hover .submit-arrow {
    transform: translateX(3px);
}

.submit-loader {
    display: flex;
    gap: 5px;
    align-items: center;
}

.loader-dot {
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    animation: loaderBounce 0.9s ease-in-out infinite;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.30s;
}

@keyframes loaderBounce {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ─── CARD FOOTER ─── */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(8, 145, 178, 0.09);
    flex-wrap: wrap;
    gap: 0.4rem;
}

.signin-cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.signin-link {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.signin-link:hover {
    opacity: 0.75;
}

.back-home {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary);
}

.mandatory {
    color: red;
    font-weight: 700;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 540px) {
    .reg-page {
        padding: 2rem 4%;
        align-items: flex-start;
        padding-top: 2.5rem;
    }

    .reg-card {
        padding: 2rem 1.6rem;
        border-radius: 22px;
    }

    .form-title {
        font-size: 1.45rem;
    }

    .form-icon {
        width: 54px;
        height: 54px;
        border-radius: 15px;
    }
}

@media (max-width: 400px) {
    .reg-page {
        padding: 1.5rem 4%;
        padding-top: 2rem;
    }

    .reg-card {
        padding: 1.7rem 1.2rem;
        border-radius: 18px;
    }

    .field-input {
        font-size: 0.85rem;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}