/* ============================================================
   ARSENAL — AUTH PAGE
   Official palette · Flat surfaces · Hairline structure
   All .pulse-* class names retained for main.js contract
   ============================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Arsenal official palette [citation:2] */
    --ars-red:        #EF0107;
    --ars-white:      #FFFFFF;
    --ars-gold:       #9C824A;
    --ars-bg:         #F5F5F5;
    --ars-surface:    #E5E5E5;
    --ars-border:     #C1C1C1;
    --ars-text:       #1A1A1A;
    --ars-text-2:     #6E6E6E;
    --ars-muted:      #A8A8A8;

    --ars-success:    #00874B;
    --ars-error:      #D7263D;

    --ars-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ars-r:          6px;
    --ars-r-pill:     999px;
}

html, body {
    background: var(--ars-bg);
    color: var(--ars-text);
    font-family: var(--ars-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* ------------------------------------------------------------
   WRAPPER
   ------------------------------------------------------------ */
.pulse-auth {
    width: 100%;
    max-width: 420px;
}

/* ------------------------------------------------------------
   BRAND
   ------------------------------------------------------------ */
.pulse-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.pulse-brand-mark {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.pulse-brand-name {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--ars-text);
    line-height: 1;
}

/* ------------------------------------------------------------
   TAGLINE
   ------------------------------------------------------------ */
.pulse-tagline {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--ars-text-2);
    letter-spacing: 0.2px;
    line-height: 1.5;
    margin: 0 auto 24px;
    max-width: 280px;
    position: relative;
    padding-bottom: 14px;
}

.pulse-tagline::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: var(--ars-gold);
    opacity: 0.7;
}

.pulse-tagline strong {
    color: var(--ars-text);
    font-weight: 700;
}

/* ------------------------------------------------------------
   CARD
   ------------------------------------------------------------ */
.pulse-card {
    background: var(--ars-white);
    border: 1px solid var(--ars-border);
    border-radius: var(--ars-r);
    padding: 24px 20px;
    position: relative;
}

/* Thin top accent line — the only decorative element */
.pulse-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: var(--ars-red);
    border-radius: var(--ars-r) var(--ars-r) 0 0;
}

/* ------------------------------------------------------------
   SWITCH — segmented, underline thumb
   ------------------------------------------------------------ */
.pulse-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--ars-surface);
    border-radius: var(--ars-r);
    padding: 3px;
    margin-bottom: 24px;
}

.pulse-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: var(--ars-white);
    border-radius: 4px;
    border: 1px solid var(--ars-border);
    transition: transform 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 0;
}

.pulse-switch[data-active="register"] .pulse-switch-thumb {
    transform: translateX(100%);
}

.pulse-switch-btn {
    position: relative;
    z-index: 1;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-family: var(--ars-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    color: var(--ars-text-2);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-switch-btn.active {
    color: var(--ars-text);
}

.pulse-switch-btn:not(.active):hover {
    color: var(--ars-text);
}

/* ------------------------------------------------------------
   FORM
   ------------------------------------------------------------ */
.pulse-form {
    display: none;
}

.pulse-form.active {
    display: block;
    animation: pulse-fade 0.25s ease;
}

@keyframes pulse-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.pulse-field {
    margin-bottom: 16px;
}

.pulse-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--ars-text-2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
}

.pulse-optional {
    color: var(--ars-muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

/* Input — flat, hairline border */
.pulse-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--ars-bg);
    border: 1px solid var(--ars-border);
    border-radius: var(--ars-r);
    transition: border-color 0.2s, background 0.2s;
}

.pulse-input-wrap:focus-within {
    border-color: var(--ars-text);
    background: var(--ars-white);
}

.pulse-input {
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ars-text);
    font-family: var(--ars-font);
    font-size: 15px;
    font-weight: 500;
}

.pulse-input::placeholder {
    color: var(--ars-muted);
    font-weight: 400;
}

/* Eye toggle */
.pulse-eye {
    padding: 0 14px;
    background: transparent;
    border: none;
    color: var(--ars-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
    transition: color 0.2s;
}

.pulse-eye:hover {
    color: var(--ars-text-2);
}

/* ------------------------------------------------------------
   SUBMIT — solid ink, red on hover
   ------------------------------------------------------------ */
.pulse-submit {
    width: 100%;
    padding: 14px;
    min-height: 50px;
    margin-top: 4px;
    border: none;
    border-radius: var(--ars-r);
    background: var(--ars-text);
    color: var(--ars-white);
    font-family: var(--ars-font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pulse-submit:hover:not(:disabled) {
    background: var(--ars-red);
}

.pulse-submit:active:not(:disabled) {
    background: var(--ars-red);
    opacity: 0.9;
}

.pulse-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ------------------------------------------------------------
   FOOT
   ------------------------------------------------------------ */
.pulse-foot {
    text-align: center;
    font-size: 12.5px;
    color: var(--ars-text-2);
    margin-top: 16px;
    font-weight: 400;
}

.pulse-foot a {
    color: var(--ars-red);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    border-bottom: 1px solid var(--ars-red);
    padding-bottom: 0.5px;
    transition: opacity 0.2s;
}

.pulse-foot a:hover {
    opacity: 0.75;
}

/* ------------------------------------------------------------
   OR DIVIDER
   ------------------------------------------------------------ */
.pulse-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 12px;
    color: var(--ars-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.pulse-or::before,
.pulse-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ars-border);
}

/* ------------------------------------------------------------
   SOCIAL — plain text rows
   ------------------------------------------------------------ */
.pulse-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 2px;
    color: var(--ars-text);
    font-family: var(--ars-font);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--ars-surface);
    transition: color 0.18s ease;
}

.pulse-social:last-of-type {
    border-bottom: none;
}

.pulse-social:hover {
    color: var(--ars-red);
}

.pulse-social i {
    font-size: 10px;
    color: var(--ars-muted);
    transition: transform 0.18s ease, color 0.18s ease;
}

.pulse-social:hover i {
    color: var(--ars-red);
    transform: translateX(3px);
}

/* ------------------------------------------------------------
   LEGAL
   ------------------------------------------------------------ */
.pulse-legal {
    text-align: center;
    font-size: 10.5px;
    color: var(--ars-muted);
    font-weight: 400;
    margin-top: 20px;
    padding: 0 8px;
    letter-spacing: 0.2px;
}

/* ------------------------------------------------------------
   TOAST — ink pill, red/green left edge
   ------------------------------------------------------------ */
.pulse-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ars-text);
    border-radius: var(--ars-r);
    padding: 12px 20px;
    font-family: var(--ars-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--ars-white);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.18);
    z-index: 9999;
    opacity: 0;
    max-width: 90vw;
    text-align: center;
    pointer-events: none;
    animation: pulse-toast-up 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    border-left: 3px solid var(--ars-gold);
}

.pulse-toast.success { border-left-color: var(--ars-success); }
.pulse-toast.error   { border-left-color: var(--ars-error); }
.pulse-toast.warning { border-left-color: #FFB81C; }
.pulse-toast.info    { border-left-color: var(--ars-gold); }

@keyframes pulse-toast-up {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pulse-toast-down {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (min-width: 600px) {
    .pulse-auth { max-width: 440px; }
    .pulse-card { padding: 28px 26px; }
    .pulse-brand-mark { width: 44px; height: 44px; }
    .pulse-brand-name { font-size: 24px; }
}

/* ------------------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}