/* Game Arena Admin — Auth screens */
:root {
    --bg: #f4f5f9;
    --card: #ffffff;
    --text: #1e2130;
    --text-muted: #8b90a0;
    --label: #3a3f52;
    --primary: #6c4fe6;
    --primary-hover: #5c40d6;
    --primary-soft: #ece8fd;
    --input-bg: #f7f8fb;
    --input-border: #e6e8f0;
    --input-border-focus: #6c4fe6;
    --error: #e2464b;
    --error-bg: #fdeced;
    --error-border: #f3b9bc;
    --success: #16a35a;
    --radius-card: 16px;
    --radius-input: 10px;
    --shadow-card: 0 10px 40px -12px rgba(30, 33, 48, 0.12);
}

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Brand */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #8a5cf0 0%, #6c3fd6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.auth-brand__text {
    line-height: 1.1;
}

.auth-brand__name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text);
}

.auth-brand__sub {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Card */
.auth-card {
    width: 100%;
    max-width: 436px;
    background: var(--card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 40px;
}

.auth-card--centered {
    text-align: center;
}

/* Icon badge */
.auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Titles */
.auth-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-card > .auth-title + .auth-subtitle {
    margin-bottom: 26px;
}

.auth-card--centered .auth-title + .auth-subtitle {
    margin-bottom: 28px;
}

/* Form */
.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--label);
    margin-bottom: 8px;
}

.input-shell {
    position: relative;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-input);
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--input-border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108, 79, 230, 0.12);
}

.input-shell--icon .form-control {
    padding-right: 48px;
}

.input-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-toggle:hover {
    color: var(--label);
}

/* Error states */
.form-control.is-invalid {
    border-color: var(--error);
    background: #fff;
}

.field-error {
    display: block;
    font-size: 13px;
    color: var(--error);
    margin-top: 7px;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    font-size: 14px;
    border-radius: var(--radius-input);
    padding: 13px 16px;
    margin-bottom: 22px;
    text-align: left;
}

/* Password requirements */
.pw-rules {
    list-style: none;
    margin: -2px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pw-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.pw-rule__dot {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--success);
}

.pw-rule--pending .pw-rule__dot {
    background: transparent;
    border: 2px solid #d3d6e0;
}

.pw-rule--pending {
    color: var(--text-muted);
}

/* Row: remember + link */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--label);
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbcfdb;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.checkbox input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Button */
.btn {
    width: 100%;
    height: 52px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-input);
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:active {
    transform: translateY(1px);
}

/* Back link (centered under button) */
.auth-back {
    margin-top: 20px;
    text-align: center;
}

.auth-back .link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
