/* ============================================================
   Linkssi v3 — Auth pages (login / register / reset)
   Split-screen layout. No frameworks.
   ============================================================ */

:root {
    --brand-dark:     #023f3e;
    --brand-dark-2:   #035a59;
    --brand-accent:   #fd6e5d;
    --brand-accent-2: #ff8a78;

    --ink-900: #0f1f1f;
    --ink-700: #2c3e3d;
    --ink-500: #5b6a69;
    --ink-300: #97a4a3;
    --ink-100: #d8dedd;

    --bg:        #f4f6f5;
    --bg-card:   #ffffff;
    --bg-soft:   #fafbfb;
    --border:    #e6eae9;
    --border-2:  #eef1f0;

    --r-md:   10px;
    --r-lg:   14px;
    --r-xl:   20px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(15, 31, 31, 0.04);
    --shadow-md: 0 6px 24px rgba(15, 31, 31, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 31, 31, 0.12);

    --t-fast: 140ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink-900);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- Shell ----- */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

.auth-main {
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    background: var(--bg-card);
}

.auth-main__header {
    display: flex;
    align-items: center;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.auth-brand img {
    height: 32px;
    width: auto;
    display: block;
    /* The shipped logo is white-on-transparent, so invert for the white panel */
    filter: invert(1) hue-rotate(180deg);
}

.auth-main__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-accent);
    margin-bottom: 16px;
}

.auth-heading {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--ink-900);
}

.auth-sub {
    margin: 0 0 32px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-500);
}

.auth-main__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--ink-300);
    width: 100%;
    max-width: 420px;
    margin-top: 32px;
}
.auth-main__footer a {
    color: var(--ink-500);
    text-decoration: none;
}
.auth-main__footer a:hover { color: var(--brand-accent); }

/* ----- Form ----- */
.auth-form { display: grid; gap: 18px; }

.auth-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.auth-row > .auth-field { margin: 0; }

.auth-field { display: grid; gap: 6px; }

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
}

.auth-input {
    height: 48px;
    padding: 0 14px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--border);
    background: var(--bg-soft);
    font: inherit;
    font-size: 15px;
    color: var(--ink-900);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    width: 100%;
}
.auth-input::placeholder { color: var(--ink-300); }
.auth-input:hover { border-color: var(--ink-100); }
.auth-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px rgba(253, 110, 93, 0.14);
}

.auth-helper {
    font-size: 12px;
    color: var(--ink-300);
    margin-top: 2px;
}

/* Password input with toggle */
.auth-password { position: relative; }
.auth-password .auth-input { padding-right: 44px; }
.auth-password__toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--ink-300);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color var(--t-fast), background var(--t-fast);
}
.auth-password__toggle:hover { color: var(--ink-700); background: var(--bg); }

/* Inline meta row (forgot link, terms checkbox) */
.auth-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--ink-500);
    margin: -4px 0 4px;
}
.auth-meta a {
    color: var(--ink-700);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--t-fast);
}
.auth-meta a:hover { color: var(--brand-accent); }

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-500);
    line-height: 1.5;
    cursor: pointer;
}
.auth-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--ink-100);
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.auth-check input[type="checkbox"]:checked {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
}
.auth-check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / 12px no-repeat;
}
.auth-check a {
    color: var(--ink-700);
    font-weight: 500;
    text-decoration: none;
}
.auth-check a:hover { color: var(--brand-accent); }

.auth-turnstile {
    display: flex;
    justify-content: center;
}

/* ----- Buttons ----- */
.auth-btn {
    height: 50px;
    padding: 0 22px;
    border-radius: var(--r-md);
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.005em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    width: 100%;
}
.auth-btn--primary {
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-2) 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(253, 110, 93, 0.28);
}
.auth-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(253, 110, 93, 0.36);
}
.auth-btn--primary:active { transform: translateY(0); }
.auth-btn--ghost {
    background: var(--bg);
    color: var(--ink-700);
}
.auth-btn--ghost:hover { background: var(--border-2); }

/* ----- Alerts ----- */
.auth-alert {
    border-radius: var(--r-md);
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.auth-alert svg { flex-shrink: 0; margin-top: 2px; }
.auth-alert--error {
    background: #fff1f0;
    border: 1px solid #ffd6d2;
    color: #b3271a;
}
.auth-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* ----- Footer link row (after form) ----- */
.auth-foot-link {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-2);
    text-align: center;
    font-size: 14px;
    color: var(--ink-500);
}
.auth-foot-link a {
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}
.auth-foot-link a:hover { color: var(--brand-accent); }

/* ----- Right brand panel ----- */
.auth-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(253, 110, 93, 0.18) 0%, rgba(253, 110, 93, 0) 60%),
        linear-gradient(160deg, #012a29 0%, var(--brand-dark) 50%, var(--brand-dark-2) 100%);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.auth-panel__glow {
    position: absolute;
    inset: -20% -10% auto auto;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(closest-side, rgba(253, 110, 93, 0.35), rgba(253, 110, 93, 0));
    filter: blur(20px);
    pointer-events: none;
}

.auth-panel__content {
    position: relative;
    max-width: 460px;
}
.auth-panel__eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}
.auth-panel__heading {
    margin: 0 0 16px;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 700;
}
.auth-panel__body {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    max-width: 38ch;
}
.auth-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.auth-panel__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
}
.auth-panel__list svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 4px;
    border-radius: 50%;
    background: rgba(253, 110, 93, 0.2);
    color: var(--brand-accent-2);
    box-sizing: content-box;
}

/* Decorative phone mockup */
.auth-panel__phone {
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 280px;
    height: 540px;
    border-radius: 44px;
    background: #0a1a1a;
    border: 8px solid #1a2a2a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255,255,255,0.04);
    transform: rotate(8deg);
    overflow: hidden;
}
.auth-panel__phone-screen {
    height: 100%;
    background: linear-gradient(180deg, #0d2524 0%, #0a1a1a 100%);
    padding: 40px 24px;
    text-align: center;
    color: #fff;
}
.auth-panel__phone-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a574, #b8865f);
    color: #2a1810;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
}
.auth-panel__phone-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}
.auth-panel__phone-bio {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 18px;
    line-height: 1.4;
}
.auth-panel__phone-link {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-main { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .auth-row { grid-template-columns: 1fr; }
    .auth-heading { font-size: 26px; }
    .auth-main__inner { padding: 24px 0; }
}
