/**
 * صفحات الدخول / إنشاء الحساب — هوية المنصة التركواز/مرجاني
 */
:root {
    --auth-ink: #0f2a33;
    --auth-muted: #5a7a84;
    --auth-teal: #0d9488;
    --auth-teal-deep: #0f766e;
    --auth-coral: #f97316;
    --auth-coral-hot: #ea580c;
    --auth-sky: #38bdf8;
    --auth-shadow: 0 18px 40px rgba(15, 42, 51, 0.14);
    --auth-radius: 24px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html.auth-page, body.auth-page {
    margin: 0;
    min-height: 100%;
    font-family: 'Tajawal', 'Fredoka', sans-serif;
    color: var(--auth-ink);
}

body.auth-page {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.35), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(249, 115, 22, 0.22), transparent 50%),
        linear-gradient(160deg, #e8f7f6 0%, #d9f0f4 45%, #fff7ed 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    padding: 24px 14px 40px;
}

.auth-float {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.auth-float span {
    position: absolute;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.1);
    animation: authFloat 16s ease-in-out infinite;
}
@keyframes authFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-22px) scale(1.05); }
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 22px;
    align-items: stretch;
    padding-top: 36px;
}
.auth-shell--narrow {
    grid-template-columns: 1fr;
    width: min(640px, 100%);
}

.auth-brand {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
    padding: clamp(1.6rem, 4vw, 2.4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    animation: authRise .45s ease;
}
.auth-brand img {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    object-fit: cover;
    margin: 0 auto 14px;
    border: 3px solid rgba(13, 148, 136, 0.25);
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.2);
    background: #fff;
}
.auth-brand h1 {
    font-family: 'Fredoka', 'Tajawal', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 10px;
    background: linear-gradient(120deg, #0f766e, #0369a1 55%, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.auth-brand p {
    margin: 0;
    color: var(--auth-muted);
    font-weight: 700;
    line-height: 1.75;
    font-size: 1.05rem;
}
.auth-brand .pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
}
.auth-brand .pills span {
    background: #ecfeff;
    color: var(--auth-teal-deep);
    border: 1px solid #99f6e4;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .85rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
    padding: clamp(1.4rem, 3.5vw, 2.2rem);
    animation: authRise .5s ease;
}
@keyframes authRise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.auth-card__head {
    text-align: center;
    margin-bottom: 1.25rem;
}
.auth-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0d9488, #0891b2);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.3);
}
.auth-card__head h2 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--auth-teal-deep);
}
.auth-card__head p {
    margin: 0;
    color: var(--auth-muted);
    font-weight: 700;
}

.auth-alert {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: .95rem;
}
.auth-alert ul { margin: 8px 0 0; padding: 0 1.1rem 0 0; }
.auth-alert.err { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.auth-alert.ok { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.15rem;
}
.auth-tab {
    border: 2px solid #d1e7ea;
    background: #fff;
    border-radius: 18px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
    font-family: inherit;
}
.auth-tab:hover { transform: translateY(-2px); border-color: var(--auth-teal); }
.auth-tab.selected,
.auth-tab.active {
    border-color: transparent;
    background: linear-gradient(145deg, #ecfeff, #fff7ed);
    box-shadow: 0 10px 22px rgba(13, 148, 136, 0.14);
}
.auth-tab i {
    display: block;
    font-size: 1.5rem;
    color: var(--auth-teal);
    margin-bottom: 6px;
}
.auth-tab.selected i,
.auth-tab.active i { color: var(--auth-coral); }
.auth-tab strong {
    display: block;
    font-size: 1rem;
    color: var(--auth-ink);
    margin-bottom: 2px;
}
.auth-tab small {
    color: var(--auth-muted);
    font-weight: 700;
    font-size: .8rem;
}

.auth-field { margin-bottom: 14px; }
.auth-field label {
    display: block;
    font-weight: 800;
    color: var(--auth-teal-deep);
    margin-bottom: 6px;
    font-size: .95rem;
}
.auth-field label i { color: var(--auth-coral); margin-left: 4px; }
.auth-field .hint {
    display: block;
    margin-top: 5px;
    color: var(--auth-muted);
    font-weight: 600;
    font-size: .82rem;
}
.auth-input-wrap { position: relative; }
.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    border: 2px solid #d1e7ea;
    border-radius: 14px;
    padding: 12px 14px;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    background: #fff;
    color: var(--auth-ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-input-wrap input { padding-right: 42px; }
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    outline: none;
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.16);
}
.auth-field textarea { min-height: 88px; resize: vertical; }
.auth-field .err-msg {
    color: #c2410c;
    font-weight: 700;
    font-size: .85rem;
    margin-top: 5px;
}

.auth-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 18px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    transition: transform .18s ease;
}
.auth-submit:hover { transform: translateY(-2px); }

.auth-links {
    text-align: center;
    margin-top: 1.1rem;
}
.auth-links p {
    margin: 0 0 8px;
    font-weight: 700;
    color: var(--auth-muted);
}
.auth-links a {
    color: var(--auth-teal-deep);
    font-weight: 800;
    text-decoration: none;
}
.auth-links a:hover { color: var(--auth-coral); }

.auth-home {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--auth-teal-deep) !important;
    text-decoration: none;
    font-weight: 800;
    font-size: .9rem;
    border: 1px solid rgba(15,42,51,.08);
    box-shadow: var(--auth-shadow);
}

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; padding-top: 52px; }
    .auth-brand { order: -1; }
}
@media (max-width: 520px) {
    body.auth-page { padding: 14px 10px 28px; }
    .auth-tabs { gap: 8px; }
    .auth-tab { padding: 12px 8px; }
}
