/* ──────────────────────────────────────────────────────────────────────────
   TwytchMobile Portal – Theme (Twitch-inspired dark/purple)
   ────────────────────────────────────────────────────────────────────────── */

:root {
    --twitch-purple:      #9147ff;
    --twitch-purple-dark: #772ce8;
    --twitch-purple-dim:  #3a1f6e;
    --bg-base:            #0e0e10;
    --bg-surface:         #18181b;
    --bg-card:            #1f1f23;
    --text-primary:       #efeff1;
    --text-muted:         #adadb8;
    --border-color:       #2c2c31;
    --input-bg:           #2c2c31;
    --input-focus-border: #9147ff;
    --danger:             #e91916;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

a { color: var(--twitch-purple); text-decoration: none; }
a:hover { color: var(--twitch-purple-dark); text-decoration: underline; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar-twitch {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: .75rem 1.5rem;
}

.navbar-twitch .navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--twitch-purple) !important;
    letter-spacing: -0.5px;
}

.navbar-twitch .navbar-brand span {
    color: var(--text-primary);
}

.navbar-twitch .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: color .15s;
}

.navbar-twitch .nav-link:hover,
.navbar-twitch .nav-link.active {
    color: var(--text-primary) !important;
}

/* ── Auth card ────────────────────────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(145, 71, 255, .18) 0%, transparent 70%),
                var(--bg-base);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
}

.auth-card-landing {
    max-width: 100%;
    padding: 2rem;
}

.login-page-shell {
    min-height: calc(100vh - 74px);
}

.login-meta-copy {
    color: var(--text-muted);
    font-size: .9rem;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--twitch-purple);
    letter-spacing: -1px;
    margin-bottom: .25rem;
}

.auth-logo span { color: var(--text-primary); }

.auth-subtitle {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 1.75rem;
}

/* ── Form controls ────────────────────────────────────────────────────────── */
.form-label {
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .35rem;
}

.form-control {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: .5rem;
    padding: .65rem .9rem;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}

.form-control::placeholder { color: var(--text-muted) !important; opacity: 1; }

.form-select {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: .5rem;
    padding: .65rem .9rem;
    font-size: .95rem;
}

.form-select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 3px rgba(145, 71, 255, .25) !important;
    outline: none;
}

.form-select:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 3px rgba(145, 71, 255, .25) !important;
    outline: none;
}

.form-helper-text {
    color: var(--text-muted);
    font-size: .8rem;
}

.gym-select {
    min-height: 11.5rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-twitch {
    background: var(--twitch-purple);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: .7rem 1.25rem;
    border-radius: .5rem;
    font-size: 1rem;
    width: 100%;
    transition: background .15s, transform .1s;
    letter-spacing: .3px;
}

.btn-twitch:hover  { background: var(--twitch-purple-dark); color: #fff; }
.btn-twitch:active { transform: scale(.98); }

.btn-twitch-inline {
    background: var(--twitch-purple);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: .5rem;
    padding: .55rem 1rem;
    transition: background .15s, transform .1s;
}

.btn-twitch-inline:hover { background: var(--twitch-purple-dark); color: #fff; }
.btn-twitch-inline:active { transform: scale(.98); }

.btn-outline-twitch {
    border: 1.5px solid var(--twitch-purple);
    color: var(--twitch-purple);
    background: transparent;
    font-weight: 600;
    border-radius: .5rem;
    padding: .5rem 1rem;
    transition: background .15s, color .15s;
}

.btn-outline-twitch:hover {
    background: var(--twitch-purple);
    color: #fff;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: .8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard-hero {
    background: linear-gradient(135deg, var(--twitch-purple-dim) 0%, var(--bg-surface) 100%);
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    padding: 1.5rem;
    transition: border-color .2s, transform .2s;
}

.stat-card:hover {
    border-color: var(--twitch-purple);
    transform: translateY(-3px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: .6rem;
    background: rgba(145, 71, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert-success {
    background: rgba(0, 200, 100, .12);
    border-color: rgba(0, 200, 100, .4);
    color: #4ade80;
    border-radius: .6rem;
}

.alert-danger {
    background: rgba(233, 25, 22, .12);
    border-color: rgba(233, 25, 22, .4);
    color: #f87171;
    border-radius: .6rem;
}

.alert-info {
    background: rgba(145, 71, 255, .12);
    border-color: rgba(145, 71, 255, .4);
    color: var(--twitch-purple);
    border-radius: .6rem;
}

.alert .btn-close { filter: invert(1) brightness(1.5); }

/* -- Landing page ---------------------------------------------------------- */
.landing-page {
    background: radial-gradient(ellipse at 50% 0%, rgba(145, 71, 255, .12) 0%, transparent 60%);
}

.landing-hero {
    border-bottom: 1px solid var(--border-color);
}

.landing-kicker {
    color: var(--twitch-purple);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: .75rem;
    font-size: .85rem;
}

.landing-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 850;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.landing-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 62ch;
}

.landing-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: .9rem;
    padding: 1.25rem;
}

.landing-panel h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .85rem;
}

.landing-list {
    padding-left: 1rem;
    color: var(--text-muted);
}

.landing-list li + li {
    margin-top: .5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    padding: 1.1rem;
}

.benefit-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .55rem;
}

.benefit-card p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: .95rem;
}

.product-media {
    margin: 0 0 .9rem;
    border-radius: .65rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(145, 71, 255, .18), rgba(145, 71, 255, .06));
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .35rem;
}

.product-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.cta-band {
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(145, 71, 255, .08), transparent 80%);
}

.cta-band p {
    color: var(--text-muted);
}

/* ── Password toggle ──────────────────────────────────────────────────────── */
.password-wrapper { position: relative; }
.password-toggle {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    transition: color .15s;
}
.password-toggle:hover { color: var(--text-primary); }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--twitch-purple); }

/* ── Hero iPad image ──────────────────────────────────────────────────────── */
.hero-ipad-img {
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 1.25rem;
    filter: drop-shadow(0 24px 48px rgba(145, 71, 255, 0.35));
    transition: transform .3s ease;
}

.hero-ipad-img:hover {
    transform: translateY(-6px) scale(1.01);
}

.landing-trust-item {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 0;
    padding-left: 1rem;
    border-left: 2px solid var(--twitch-purple);
}
