/* Al-tawakkal-poultryfarm — login & register, navy gold */

*, *::before, *::after { box-sizing: border-box; }

body.at-auth {
    margin: 0;
    min-height: 100dvh;
    color: #eef5ff;
    background: #061530;
    font-family: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body.at-auth > .page-bg,
body.at-auth .navbar,
body.at-auth .ir-nav,
body.at-auth .site-footer {
    display: none !important;
}

.atx {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    margin: 0 auto;
    min-height: 100dvh;
    padding:
        max(12px, env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right))
        max(28px, env(safe-area-inset-bottom))
        max(12px, env(safe-area-inset-left));
}

.atx-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 8% -8%, rgba(70, 150, 255, 0.28), transparent 55%),
        radial-gradient(760px 420px at 108% 18%, rgba(240, 196, 90, 0.16), transparent 50%),
        linear-gradient(180deg, #0a2a62 0%, #061530 48%, #0c3a7a 100%);
}

.atx-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    animation: atxFloat 11s ease-in-out infinite;
}

.atx-orb.a {
    width: min(230px, 70vw);
    height: min(230px, 70vw);
    top: 8%;
    left: -80px;
    background: radial-gradient(circle, rgba(255, 214, 120, 0.45), transparent 70%);
}

.atx-orb.b {
    width: min(240px, 70vw);
    height: min(240px, 70vw);
    right: -70px;
    bottom: 10%;
    background: radial-gradient(circle, rgba(80, 170, 255, 0.32), transparent 70%);
    animation-delay: -4s;
}

.atx-orb.c {
    width: 120px;
    height: 120px;
    left: 42%;
    top: 46%;
    background: rgba(255, 255, 255, 0.08);
    animation-delay: -6s;
}

.atx-bar {
    position: relative;
    z-index: 3;
    margin-bottom: 14px;
    animation: atxIn 0.7s ease both;
}

.atx-bar-frame {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px 12px;
    background: linear-gradient(180deg, rgba(18, 58, 128, 0.96), rgba(8, 28, 72, 0.98));
    border: 1px solid rgba(255, 224, 138, 0.3);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
}

.atx-back {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 224, 138, 0.28);
    color: #fff6d8;
}

.atx-back svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.atx-crest {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
}

.atx-crest::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #ffe9a8, #c99220);
    clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
    animation: atxPulse 3s ease-in-out infinite;
}

.atx-crest img {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #061530;
}

.atx-bar-copy { min-width: 0; }

.atx-bar-copy strong {
    display: block;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(0.68rem, 2.8vw, 0.92rem);
    color: #ffe08a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atx-bar-copy small {
    display: none;
    color: #cfe0ff;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.atx-wave {
    display: block;
    width: 100%;
    height: 18px;
    margin-top: -1px;
    fill: #143a86;
}

.atx-shell {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 14px;
}

.atx-side,
.atx-card {
    position: relative;
    min-width: 0;
    background: linear-gradient(180deg, rgba(20, 64, 140, 0.9), rgba(8, 28, 72, 0.94));
    border: 1px solid rgba(255, 224, 138, 0.28);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.atx-side {
    display: none;
    padding: 28px 24px;
    border-radius: 36px 14px 36px 14px;
    text-align: center;
    overflow: hidden;
    animation: atxCard 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.atx-side::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    right: -50px;
    top: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 196, 90, 0.22), transparent 70%);
}

.atx-side-logo {
    width: 92px;
    height: 92px;
    margin: 0 auto 14px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #f0c45a;
    box-shadow: 0 0 0 7px rgba(240, 196, 90, 0.16), 0 16px 28px rgba(0, 0, 0, 0.35);
    animation: atxPulse 3s ease-in-out infinite;
}

.atx-chip {
    display: inline-block;
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 16px 28px;
    background: rgba(255, 224, 138, 0.12);
    color: #ffe08a;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.atx-side h1,
.atx-card h2 {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-style: italic;
    color: #ffe08a;
}

.atx-side h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.atx-side p {
    margin: 10px auto 0;
    max-width: 32ch;
    color: #d5e4ff;
    line-height: 1.6;
}

.atx-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.atx-pills li {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 224, 138, 0.25);
    color: #ffe08a;
    font-size: 0.7rem;
}

.atx-card {
    padding: 22px 16px 18px;
    border-radius: 14px 36px 14px 36px;
    animation: atxCard 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.atx-card h2 {
    font-size: clamp(1.45rem, 6vw, 1.9rem);
}

.atx-lead {
    margin: 8px 0 16px;
    color: #d5e4ff;
    line-height: 1.55;
}

.atx-ref {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(62, 224, 138, 0.12);
    color: #b8f5d2;
    font-size: 0.88rem;
}

.atx-saved,
.atx-field {
    display: block;
    margin-bottom: 12px;
}

.atx-saved > span:first-child {
    display: block;
    margin-bottom: 6px;
    color: #cfe0ff;
    font-size: 0.75rem;
}

.atx-saved-box,
.atx-field {
    width: 100%;
    border: 1px solid rgba(255, 224, 138, 0.32);
    background: #0a204e;
    color: #fff8e6;
    font: inherit;
    outline: none;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.atx-saved-box {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: stretch;
    min-height: 52px;
    overflow: hidden;
}

.atx-saved-box select {
    width: 100%;
    min-width: 0;
    border: 0;
    margin: 0;
    padding: 14px 36px 14px 8px;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
    background-color: #0a204e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffe08a' d='M7 10l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #fff8e6;
    font: inherit;
    outline: none;
    cursor: pointer;
}

.atx-saved-box select option {
    background-color: #0a204e;
    color: #fff8e6;
}

.atx-field {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: stretch;
    min-height: 52px;
    overflow: hidden;
}

.atx-field.is-pass {
    grid-template-columns: 54px minmax(0, 1fr) 48px;
}

.atx-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    outline: none;
    padding: 14px 10px 14px 8px;
}

.atx-field:focus-within,
.atx-saved-box:focus-within {
    border-color: #f0c45a;
    box-shadow: 0 0 0 4px rgba(240, 196, 90, 0.16);
}

.atx-ico,
.atx-eye {
    display: grid;
    place-items: center;
    color: #12351f;
}

.atx-ico {
    position: relative;
    background: linear-gradient(180deg, #ffe9a8, #e0a82a);
    clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
}

.atx-ico svg {
    width: 22px;
    height: 22px;
}

.atx-eye {
    position: relative;
    z-index: 2;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.atx-toon {
    position: relative;
    display: block;
    width: 28px;
    height: 22px;
    transform-origin: 50% 60%;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.atx-eye:active .atx-toon {
    transform: scale(0.86) rotate(-8deg);
}

.atx-toon-white {
    position: absolute;
    inset: 3px 1px 2px;
    border-radius: 50% 50% 48% 48%;
    background: radial-gradient(circle at 50% 40%, #fff, #e8f0ff 78%);
    box-shadow: inset 0 -2px 3px rgba(10, 30, 70, 0.18);
    overflow: hidden;
}

.atx-toon-iris {
    position: absolute;
    top: 3px;
    left: 7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #7ad0ff, #1d6ad4 62%, #0b2c6a);
    animation: atxLook 2.4s ease-in-out infinite;
}

.atx-toon-pupil {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #081426;
}

.atx-toon-glint {
    position: absolute;
    top: 2px;
    left: 6px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
}

.atx-toon-lid {
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 40% 40%;
    background: linear-gradient(180deg, #f7d27a, #e0a82a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform-origin: 50% 0;
    transform: scaleY(1);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.atx-toon-lash {
    position: absolute;
    left: 4px;
    right: 4px;
    top: 9px;
    height: 3px;
    border-radius: 999px;
    background: #12351f;
    box-shadow: -7px -2px 0 -1px #12351f, 7px -2px 0 -1px #12351f;
    opacity: 1;
    transition: opacity 0.2s ease, top 0.28s ease;
}

.atx-toon-brow {
    position: absolute;
    left: 4px;
    right: 4px;
    top: -4px;
    height: 4px;
    border-radius: 999px;
    background: #f0c45a;
    transform: rotate(-8deg);
    opacity: 0.85;
}

.atx-eye.is-visible .atx-toon {
    animation: atxToonPop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.atx-eye.is-visible .atx-toon-lid {
    transform: scaleY(0.12);
}

.atx-eye.is-visible .atx-toon-lash {
    opacity: 0;
    top: 1px;
}

.atx-eye.is-visible .atx-toon-white {
    animation: atxBlink 3.2s ease-in-out infinite;
}

.atx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
    font-size: 0.82rem;
}

.atx-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8f0ff;
}

.atx-forgot {
    color: #ffe08a;
    text-decoration: none;
}

.atx-go {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    padding: 12px 18px;
    border: 0;
    border-radius: 16px 36px;
    background: linear-gradient(180deg, #ffe9a8, #e0a82a);
    color: #12351f;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(224, 168, 42, 0.28);
}

.atx-go span { position: relative; z-index: 1; }

.atx-go i {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.55), transparent 70%);
    transform: translateX(-130%);
    animation: atxShimmer 2.4s ease-in-out infinite;
}

.atx-switch {
    margin: 16px 0 0;
    text-align: center;
    color: #c9d7e8;
}

.atx-switch a {
    color: #ffe08a;
    font-weight: 700;
    text-decoration: none;
}

body.at-auth .auth-msg {
    min-height: 0;
    margin: 0 0 10px;
    color: #ffb4b4;
    font-size: 0.85rem;
}

body.at-auth .auth-msg.show {
    padding: 8px 10px;
    border-radius: 12px;
}

body.at-auth .auth-msg.error {
    background: rgba(180, 40, 40, 0.2);
    color: #ffb4b4;
}

body.at-auth .auth-msg.success {
    background: rgba(40, 140, 80, 0.2);
    color: #b8f5d2;
}

@media (min-width: 480px) {
    .atx-bar-copy small { display: block; }
    .atx-card { padding: 26px 22px 22px; }
}

@media (min-width: 860px) {
    .atx { padding: 18px 20px 40px; }
    .atx-shell {
        grid-template-columns: 0.92fr 1.08fr;
        align-items: stretch;
        gap: 16px;
    }
    .atx-side { display: block; }
    .atx-card { display: flex; flex-direction: column; justify-content: center; }
}

@media (hover: hover) and (min-width: 860px) {
    .atx-go:hover,
    .atx-back:hover { transform: translateY(-2px); }
}

@keyframes atxFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(16px, -18px, 0); }
}

@keyframes atxIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}

@keyframes atxCard {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

@keyframes atxPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes atxShimmer {
    0% { transform: translateX(-130%); }
    55%, 100% { transform: translateX(130%); }
}

@keyframes atxLook {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3px, 1px); }
    50% { transform: translate(-2px, 2px); }
    75% { transform: translate(2px, -1px); }
}

@keyframes atxToonPop {
    0% { transform: scale(0.7) rotate(-12deg); }
    55% { transform: scale(1.18) rotate(8deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes atxBlink {
    0%, 86%, 100% { transform: scaleY(1); }
    90%, 94% { transform: scaleY(0.08); }
}

@media (prefers-reduced-motion: reduce) {
    .atx-orb, .atx-crest::before, .atx-side-logo, .atx-go i, .atx-card, .atx-side, .atx-bar,
    .atx-toon-iris, .atx-toon-white, .atx-eye.is-visible .atx-toon {
        animation: none !important;
    }
}
