/* ==========================================================================
   شاشاتي برو — Auth Pages Design System
   Shares the landing-page identity (welcome-modern.css is loaded first and
   supplies the design tokens, navbar, footer and buttons). This file only
   adds the auth-specific layout, surfaces and form controls.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page shell — dark aurora background
   -------------------------------------------------------------------------- */
body {
    font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(75% 60% at 85% -5%, rgba(16, 185, 129, 0.28), transparent 62%),
        radial-gradient(70% 60% at 8% 100%, rgba(79, 70, 229, 0.3), transparent 62%),
        linear-gradient(165deg, #08102a 0%, #0d1636 45%, #070c1c 100%);
    background-attachment: fixed;
    color: var(--slate-700);
    line-height: 1.75;
    /* The auth navbar is taller than --nav-h (brand chip + 16px padding),
       so the offset is measured explicitly instead of reusing the token. */
    padding-top: 96px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.auth-bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 78%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 78%);
}

/* --------------------------------------------------------------------------
   2. Split shell
   -------------------------------------------------------------------------- */
.auth-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1140px;
    margin-inline: auto;
    padding: 40px 0 72px;
}

/* --- Brand side ----------------------------------------------------------- */
.auth-visual {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    overflow: hidden;
    align-self: stretch;
}

.auth-visual .orb {
    animation: orb-drift 17s ease-in-out infinite;
}

.auth-visual .orb-1 { top: -120px; inset-inline-start: -100px; }
.auth-visual .orb-2 { bottom: -130px; inset-inline-end: -70px; animation-delay: -6s; }

.auth-visual-inner {
    position: relative;
    z-index: 2;
    padding: 12px;
}

.auth-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 22px;
}

.auth-visual-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-teal);
    animation: dot-pulse 1.8s infinite;
}

.auth-visual-title {
    font-size: clamp(1.6rem, 2.6vw, 2.3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.auth-visual-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    line-height: 1.85;
}

.auth-visual-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.auth-visual-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.35s var(--ease), background 0.3s ease;
}

.auth-visual-list li:hover {
    transform: translateX(-4px);
    background: rgba(255, 255, 255, 0.12);
}

[dir="rtl"] .auth-visual-list li:hover {
    transform: translateX(4px);
}

.auth-visual-list li i {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--grad-brand);
    color: #fff;
    font-size: 0.88rem;
    box-shadow: 0 10px 22px -12px rgba(16, 185, 129, 0.9);
}

/* --- Form side ------------------------------------------------------------ */
.auth-panel {
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
}

.auth-panel-wide {
    max-width: 620px;
}

.auth-card {
    background: #fff;
    border: 1px solid rgba(16, 26, 53, 0.07);
    border-radius: var(--radius-xl);
    box-shadow: 0 44px 90px -40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.auth-card-head {
    position: relative;
    padding: 26px 30px 24px;
    text-align: center;
    background:
        radial-gradient(90% 130% at 50% 0%, rgba(16, 185, 129, 0.16), transparent 65%),
        radial-gradient(90% 130% at 50% 100%, rgba(79, 70, 229, 0.14), transparent 65%),
        linear-gradient(180deg, var(--paper-soft), #ffffff);
    border-bottom: 1px solid var(--line);
}

.auth-card-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border-radius: 22px;
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 18px 34px -16px rgba(79, 70, 229, 0.95);
}

.auth-card-head h2,
.auth-card-head h3 {
    font-size: 1.42rem;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0 0 6px;
}

.auth-card-head p {
    margin: 0;
    font-size: 0.93rem;
    color: var(--slate-500);
}

.auth-card-body {
    padding: 26px 30px 30px;
}

/* --------------------------------------------------------------------------
   3. Forms
   -------------------------------------------------------------------------- */
.form-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 7px;
}

.form-label i {
    color: var(--brand-indigo);
    font-size: 0.82rem;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(16, 26, 53, 0.1);
    background-color: var(--paper-soft);
    padding: 11px 14px;
    font-size: 0.93rem;
    color: var(--ink-900);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    box-shadow: none;
}

.form-control::placeholder {
    color: var(--slate-400);
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: var(--brand-indigo);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    outline: none;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--paper-mute);
    color: var(--slate-500);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--brand-rose);
    background-image: none;
    padding-inline-end: 14px;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.invalid-feedback {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-rose);
}

.form-text {
    font-size: 0.79rem;
    color: var(--slate-500);
}

.form-text i {
    color: var(--brand-sky);
}

/* Input groups (icon prefix / suffix / country code) */
.input-group .form-control,
.input-group .form-select {
    border-radius: var(--radius-sm);
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
    margin-inline-start: 0;
}

.input-group-text {
    background: #fff;
    border: 1.5px solid rgba(16, 26, 53, 0.1);
    color: var(--slate-500);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 0.9rem;
    transition: border-color 0.25s ease;
}

.input-group-text i {
    color: var(--brand-indigo);
}

.input-group:focus-within .input-group-text {
    border-color: var(--brand-indigo);
}

/* Round the group ends without breaking RTL */
.input-group .form-control,
.input-group .input-group-text,
.input-group .form-select {
    border-radius: 0;
}

.input-group > :first-child {
    border-start-start-radius: var(--radius-sm) !important;
    border-end-start-radius: var(--radius-sm) !important;
    border-start-end-radius: 0 !important;
    border-end-end-radius: 0 !important;
}

.input-group > :last-child {
    border-start-start-radius: 0 !important;
    border-end-start-radius: 0 !important;
    border-start-end-radius: var(--radius-sm) !important;
    border-end-end-radius: var(--radius-sm) !important;
}

.input-group .form-control:focus + .input-group-text,
.input-group .input-group-text:focus-within {
    border-color: var(--brand-indigo);
}

/* Country-code select inside the group */
.country-select,
.country-select.form-select,
.input-group .form-select[name="country_code"] {
    border: none !important;
    background: transparent !important;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--slate-700);
    padding: 0 6px;
    box-shadow: none !important;
    min-width: 96px;
}

.country-select:focus,
.input-group .form-select[name="country_code"]:focus {
    box-shadow: none !important;
}

/* Checkboxes */
.form-check {
    padding-inline-start: 1.9rem;
}

.form-check-input {
    float: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-inline-start: -1.9rem;
    border: 1.5px solid rgba(16, 26, 53, 0.22);
    border-radius: 6px;
    box-shadow: none !important;
    cursor: pointer;
    vertical-align: -0.15em;
}

.form-check-input:checked {
    background-color: var(--brand-indigo);
    border-color: var(--brand-indigo);
}

.form-check-input:focus {
    border-color: var(--brand-indigo);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14) !important;
}

.form-check-label {
    font-size: 0.88rem;
    color: var(--slate-600);
    cursor: pointer;
    line-height: 1.7;
}

.form-check-label a {
    color: var(--brand-indigo);
    font-weight: 700;
}

.form-check-label a:hover {
    color: var(--brand-violet);
}

/* Radio "pick one" cards (registration type) */
.choice-card {
    position: relative;
    display: block;
    height: 100%;
    cursor: pointer;
}

.choice-card input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.choice-card-body {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(16, 26, 53, 0.1);
    background: var(--paper-soft);
    transition: all 0.3s var(--ease);
}

.choice-card-body i {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand-indigo);
    font-size: 1rem;
    transition: all 0.3s var(--ease);
}

.choice-card-body b {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-900);
}

.choice-card-body small {
    display: block;
    font-size: 0.76rem;
    color: var(--slate-500);
}

.choice-card:hover .choice-card-body {
    border-color: rgba(79, 70, 229, 0.3);
    background: rgba(79, 70, 229, 0.04);
}

.choice-card input:checked + .choice-card-body {
    border-color: var(--brand-indigo);
    background: rgba(79, 70, 229, 0.07);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.choice-card input:checked + .choice-card-body i {
    background: var(--grad-brand);
    color: #fff;
}

/* --------------------------------------------------------------------------
   4. Alerts
   -------------------------------------------------------------------------- */
.auth-alert {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 13px 15px;
    font-size: 0.87rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-alert ul {
    margin: 6px 0 0;
    padding-inline-start: 18px;
}

.auth-alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-alert-danger {
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.22);
    color: #be123c;
}

.auth-alert-info {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.22);
    color: #0369a1;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #047857;
}

.auth-alert .btn-close {
    margin-inline-start: auto;
    font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn-login,
.btn-register,
.btn-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 14px 26px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--grad-brand);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    transition: transform 0.35s var(--ease-back), box-shadow 0.35s var(--ease), filter 0.3s ease;
}

.btn-login::after,
.btn-register::after,
.btn-auth-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
    transform: translateX(-140%);
    transition: transform 0.7s var(--ease);
}

.btn-login:hover,
.btn-register:hover,
.btn-auth-submit:hover {
    transform: translateY(-3px);
    filter: brightness(1.06);
    color: #fff !important;
}

.btn-login:hover::after,
.btn-register:hover::after,
.btn-auth-submit:hover::after {
    transform: translateX(140%);
}

.btn-whatsapp-affiliate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.94rem;
    color: #fff;
    background: linear-gradient(135deg, #25d366, #128c7e);
    text-decoration: none !important;
    box-shadow: 0 16px 34px -18px rgba(37, 211, 102, 0.95);
    transition: transform 0.35s var(--ease-back), box-shadow 0.35s var(--ease);
}

.btn-whatsapp-affiliate:hover {
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 22px 42px -18px rgba(37, 211, 102, 1);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--slate-400);
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--slate-500);
    margin: 0;
}

.auth-switch a {
    color: var(--brand-indigo);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover {
    color: var(--brand-violet);
}

/* --------------------------------------------------------------------------
   6. Package preview widget (register page)
   -------------------------------------------------------------------------- */
.auth-package-preview {
    border: 1.5px solid rgba(79, 70, 229, 0.22);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(16, 185, 129, 0.05));
    padding: 16px 18px;
    box-shadow: none;
}

.auth-package-preview .card-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink-900) !important;
}

/* --------------------------------------------------------------------------
   7. Verification / OTP helper blocks
   -------------------------------------------------------------------------- */
#verification-status {
    font-size: 0.8rem;
    font-weight: 700;
}

#send-verification-btn {
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.company-fields {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--paper-soft);
    border: 1px dashed var(--line-strong);
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
    .auth-shell { gap: 28px; }
}

@media (max-width: 991px) {
    body { padding-top: 92px; }

    .auth-shell {
        flex-direction: column;
        padding: 32px 0 52px;
    }

    .auth-panel,
    .auth-panel-wide { max-width: 620px; }
}

@media (max-width: 767px) {
    body { padding-top: 88px; }

    .auth-shell { padding: 24px 0 40px; }

    .auth-card { border-radius: var(--radius-lg); }

    .auth-card-head { padding: 20px 18px 18px; }
    .auth-card-icon { width: 58px; height: 58px; font-size: 1.4rem; border-radius: 18px; margin-bottom: 12px; }
    .auth-card-head h2,
    .auth-card-head h3 { font-size: 1.2rem; }
    .auth-card-head p { font-size: 0.85rem; }

    .auth-card-body { padding: 20px 18px 24px; }

    .form-control,
    .form-select { padding: 10px 13px; font-size: 0.9rem; }

    .btn-login,
    .btn-register,
    .btn-auth-submit { padding: 13px 20px; font-size: 0.94rem; }
}

@media (max-width: 575px) {
    body { padding-top: 84px; }

    .auth-shell { padding: 20px 0 32px; }
    .auth-card-body { padding: 18px 14px 22px; }
    .form-label { font-size: 0.84rem; }
    .form-check-label { font-size: 0.84rem; }
}

@media (hover: none) and (pointer: coarse) {
    .btn-login:hover,
    .btn-register:hover,
    .btn-auth-submit:hover,
    .btn-whatsapp-affiliate:hover {
        transform: none;
    }
}
