@import url("https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap");

:root {
    --font-body: "Almarai", "Segoe UI", Tahoma, Arial, sans-serif;
    --font-display: "Almarai", "Segoe UI", Tahoma, Arial, sans-serif;
    --line-body: 1.75;
    --line-tight: 1.35;
    --auth-primary: #2f7f8f;
    --auth-primary-dark: #246a78;
    --auth-secondary: #5f91a5;
    --auth-surface: #ffffff;
    --auth-surface-soft: #f4fbfa;
    --auth-border: rgba(47, 127, 143, 0.18);
    --auth-border-strong: rgba(47, 127, 143, 0.36);
    --auth-shadow: rgba(33, 91, 104, 0.12);
    --auth-text: #132f3a;
    --auth-muted: #657982;
    --auth-success: #3f8f6c;
    --auth-error: #bd5c5f;
}

* {
    box-sizing: border-box;
}

body.auth-body {
    min-height: 100vh;
    margin: 0;
    direction: rtl;
    color: var(--auth-text);
    font-family: var(--font-body);
    line-height: var(--line-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background:
        linear-gradient(140deg, #fbfefd 0%, #f3faf9 48%, #ffffff 100%);
}

h1,
h2,
h3,
.auth-card h1,
.auth-card h2 {
    font-family: var(--font-display);
    line-height: var(--line-tight);
}

.skin-analysis-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.auth-icon {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.auth-card,
.auth-hero-card {
    width: min(100%, 510px);
    padding: 30px;
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 70px var(--auth-shadow);
    backdrop-filter: blur(18px);
}

.auth-card-wide {
    width: min(100%, 760px);
}

.auth-hero-wide {
    width: min(100%, 1040px);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-text);
    text-decoration: none;
    margin-bottom: 26px;
}

.auth-logo span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--auth-primary);
    background: #fbf5ed;
    border: 1px solid rgba(210, 125, 154, 0.24);
    box-shadow: 0 10px 24px rgba(210, 125, 154, 0.14);
}

.auth-logo span img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.auth-logo b {
    font-size: 25px;
    letter-spacing: 0;
}

.auth-logo small {
    color: var(--auth-primary);
    font-weight: 800;
    margin-inline-start: 2px;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: center;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--auth-surface-soft);
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 800;
    border: 1px solid var(--auth-border);
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h1,
.auth-copy h1 {
    margin: 14px 0 10px;
    color: var(--auth-text);
    font-size: clamp(29px, 4vw, 48px);
    line-height: 1.25;
    letter-spacing: 0;
}

.auth-heading h1 {
    font-size: clamp(28px, 4vw, 36px);
}

.auth-heading p,
.auth-copy p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.9;
    font-size: 15px;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.auth-btn {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--auth-text);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
}

.auth-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    box-shadow: 0 16px 34px rgba(47, 127, 143, 0.22);
}

.auth-btn-secondary,
.auth-btn-ghost {
    background: #ffffff;
    color: var(--auth-primary-dark);
    border: 1px solid var(--auth-border-strong);
}

.auth-btn-ghost {
    background: var(--auth-surface-soft);
}

.auth-btn-full {
    width: 100%;
}

.auth-preview {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f9fdfd, #eef8f7);
    border: 1px solid var(--auth-border);
}

.auth-preview-orb {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    background: #ffffff;
    border: 1px solid var(--auth-border);
    box-shadow: 0 16px 34px var(--auth-shadow);
}

.auth-preview-orb .auth-icon {
    width: 36px;
    height: 36px;
}

.auth-preview-card {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(47, 127, 143, 0.12);
}

.auth-preview-card b {
    font-size: 15px;
}

.auth-preview-card span {
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0 0 24px;
    direction: ltr;
}

.auth-steps span {
    min-height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-muted);
    font-weight: 800;
    background: #ffffff;
    border: 1px solid var(--auth-border);
}

.auth-steps span.active {
    color: #ffffff;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-steps span.done {
    color: var(--auth-primary-dark);
    background: var(--auth-surface-soft);
    border-color: var(--auth-border-strong);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form-span {
    grid-column: 1 / -1;
}

.auth-form label {
    display: grid;
    gap: 8px;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: 0 15px;
    color: var(--auth-text);
    background: #ffffff;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(47, 127, 143, 0.10);
    background: #fbfffe;
}

.auth-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--auth-border);
    color: var(--auth-primary-dark);
    background: var(--auth-surface-soft);
    font-size: 14px;
    line-height: 1.7;
}

.auth-alert-error {
    color: #8d3639;
    background: #fff5f4;
    border-color: rgba(189, 92, 95, 0.24);
}

.auth-alert-success {
    color: #24684d;
    background: #f0faf5;
    border-color: rgba(63, 143, 108, 0.24);
}

.auth-alert-info {
    color: var(--auth-primary-dark);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.auth-links a {
    color: var(--auth-primary-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-admin-body {
    background:
        linear-gradient(140deg, #ffffff 0%, #f6fbfb 48%, #eef8f7 100%);
}

@media (max-width: 840px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-preview {
        display: none;
    }
}

@media (max-width: 620px) {
    .auth-shell {
        width: min(100% - 18px, 1120px);
        padding: 12px 0;
    }

    .auth-card,
    .auth-hero-card {
        padding: 22px;
        border-radius: 20px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-heading h1,
    .auth-copy h1 {
        font-size: 28px;
    }

    .auth-actions {
        display: grid;
    }
}

@media (max-width: 420px) {
    .auth-shell {
        width: calc(100% - 20px);
    }

    .auth-card,
    .auth-hero-card {
        padding: 18px;
        border-radius: 16px;
    }

    .auth-logo {
        align-items: flex-start;
    }

    .auth-logo b {
        font-size: 22px;
    }

    .auth-logo small {
        font-size: 11px;
    }

    .auth-heading h1,
    .auth-copy h1 {
        font-size: 24px;
        line-height: 1.35;
    }

    .auth-btn {
        min-height: 44px;
        padding: 10px 14px;
    }
}
