/* =========================================================
   Auth Register — Modern Redesign
   Extends login visual language + form-heavy layout
   ========================================================= */

.rg-page {
    --rg-accent: rgb(var(--c-accent-rgb, 0, 156, 204));
    --rg-accent-rgb: var(--c-accent-rgb, 0, 156, 204);
    --rg-hover: rgb(var(--c-accent-hover-rgb, 0, 140, 184));
    --rg-text: rgb(var(--c-text-rgb, 15, 23, 42));
    --rg-muted: rgb(var(--c-gray-rgb, 100, 116, 139));
    --rg-card: rgb(var(--c-card-bg-rgb, 255, 255, 255));
    --rg-border: rgba(var(--c-border-rgb, 226, 232, 240), 0.95);
    --rg-ease: cubic-bezier(0.22, 1, 0.36, 1);
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: flex-start;
    padding: 2rem 0 3rem;
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.rg-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 8% 0%, rgba(var(--rg-accent-rgb), 0.15), transparent 45%),
        radial-gradient(ellipse at 95% 80%, rgba(var(--c-secondary-rgb, var(--rg-accent-rgb)), 0.12), transparent 50%),
        linear-gradient(180deg, rgba(var(--c-bg-rgb, 248, 249, 250), 1), rgba(var(--c-bg-rgb, 248, 249, 250), 1));
    pointer-events: none;
}

.rg-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.2fr;
    background: var(--rg-card);
    border: 1px solid var(--rg-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 28px 60px -32px rgba(15, 23, 42, 0.35);
}

.rg-brand {
    position: relative;
    padding: 2.25rem 2rem;
    color: #f8fafc;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(var(--rg-accent-rgb), 0.42), transparent 55%),
        linear-gradient(155deg, #0b1220 0%, #132033 55%, #0f1a2c 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rg-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.rg-brand__logo {
    max-height: 46px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.25rem;
}

.rg-brand__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.rg-brand__desc {
    margin: 0 0 1.5rem;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.95rem;
    line-height: 1.8;
    font-weight: 600;
}

.rg-brand__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rg-brand__points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.9);
}

.rg-brand__points i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--rg-accent-rgb), 0.22);
    color: #fff;
    font-size: 12px;
}

.rg-brand__art {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.rg-brand__art img {
    width: min(100%, 280px);
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

.rg-form-wrap {
    padding: 2rem 2rem 2.25rem;
}

.rg-form__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 12px;
    font-weight: 800;
    color: var(--rg-accent);
    letter-spacing: 0.04em;
}

.rg-form__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.45rem, 2.3vw, 1.9rem);
    font-weight: 800;
    color: var(--rg-text);
    letter-spacing: -0.02em;
}

.rg-form__sub {
    margin: 0 0 1.35rem;
    color: var(--rg-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
}

.rg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
}

.rg-span-2 { grid-column: 1 / -1; }

.rg-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 13px;
    font-weight: 800;
    color: var(--rg-text);
}

.rg-field label .req {
    color: #e11d48;
    margin-inline-start: 2px;
}

.rg-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--rg-muted);
    line-height: 1.5;
}

.rg-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
}

.rg-input {
    position: relative;
}

.rg-input > i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rg-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.rg-input input,
.rg-input select {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 1px solid var(--rg-border);
    background: rgba(var(--c-bg-rgb, 248, 249, 250), 0.75);
    padding: 0 42px 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--rg-text);
    transition: border-color 0.18s var(--rg-ease), box-shadow 0.18s var(--rg-ease), background 0.18s var(--rg-ease);
    appearance: none;
}

.rg-input select {
    padding-left: 36px;
    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='%6494a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    cursor: pointer;
}

.rg-input input:focus,
.rg-input select:focus {
    outline: none;
    border-color: rgba(var(--rg-accent-rgb), 0.55);
    background-color: var(--rg-card);
    box-shadow: 0 0 0 4px rgba(var(--rg-accent-rgb), 0.14);
}

.rg-input input.is-invalid,
.rg-input select.is-invalid {
    border-color: rgba(220, 38, 38, 0.55);
}

.rg-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1.5px dashed rgba(var(--rg-accent-rgb), 0.35);
    background: rgba(var(--rg-accent-rgb), 0.05);
    cursor: pointer;
    transition: border-color 0.18s var(--rg-ease), background 0.18s var(--rg-ease);
    overflow: hidden;
}

.rg-upload:hover,
.rg-upload.uploaded {
    border-color: rgba(var(--rg-accent-rgb), 0.65);
    background: rgba(var(--rg-accent-rgb), 0.08);
}

.rg-upload__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--rg-accent-rgb), 0.14);
    color: var(--rg-accent);
    font-size: 18px;
    flex-shrink: 0;
}

.rg-upload__text strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--rg-text);
    margin-bottom: 2px;
}

.rg-upload__text p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--rg-muted);
}

.rg-upload img {
    display: none;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    margin-inline-start: auto;
    border: 2px solid rgba(var(--rg-accent-rgb), 0.25);
}

.rg-upload.uploaded img {
    display: block;
}

.rg-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.rg-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rg-text);
    cursor: pointer;
    user-select: none;
}

.rg-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--rg-accent);
    flex-shrink: 0;
}

.rg-check a {
    color: var(--rg-accent);
    text-decoration: none !important;
    font-weight: 800;
}

.rg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--main-gradient, linear-gradient(135deg, var(--rg-accent), var(--rg-hover)));
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 16px 30px -14px rgba(var(--rg-accent-rgb), 0.7);
    transition: transform 0.18s var(--rg-ease), box-shadow 0.18s var(--rg-ease);
    cursor: pointer;
}

.rg-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px -14px rgba(var(--rg-accent-rgb), 0.8);
}

.rg-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--rg-muted);
}

.rg-footer a {
    color: var(--rg-accent);
    font-weight: 800;
    text-decoration: none !important;
    margin-inline-start: 4px;
}

@media (max-width: 991.98px) {
    .rg-shell {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .rg-brand__art { display: none; }

    .rg-form-wrap {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .rg-grid {
        grid-template-columns: 1fr;
    }

    .rg-span-2 { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .rg-submit { transition: none; }
}
