/**
 * Fall of Aden — Account Management Plugin Styles
 *
 * Uses the theme's CSS custom properties for colours:
 *   --bg-primary, --bg-secondary, --surface, --surface-elevated,
 *   --gold, --gold-dark, --gold-light, --gold-glow,
 *   --red, --red-bright, --text, --heading, --muted,
 *   --border-gold, --border-dark
 *
 * Provides its own fallbacks if the theme vars are missing.
 */

/* ────────────────────────────────────────────────────────────
   0. Fallback variables (overridden by theme :root)
   ──────────────────────────────────────────────────────────── */
.foa-container,
.foa-account-layout {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --surface: #1a1a2e;
    --surface-elevated: #16213e;
    --gold: #d4a843;
    --gold-dark: #c9962c;
    --gold-light: #f5d77a;
    --gold-glow: rgba(212, 168, 67, 0.4);
    --red: #8b1a1a;
    --red-bright: #c41e3a;
    --text: #e8e6e3;
    --heading: #f5f0e8;
    --muted: #8a8578;
    --border-gold: rgba(212, 168, 67, 0.2);
    --border-dark: rgba(255, 255, 255, 0.05);

    /* Plugin-specific tokens */
    --foa-radius: 8px;
    --foa-radius-lg: 12px;
    --foa-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --foa-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --foa-shadow-gold: 0 0 20px rgba(212, 168, 67, 0.15);
    --foa-green: #2ecc71;
    --foa-green-dark: #27ae60;
    --foa-blue: #3498db;
}

/* ────────────────────────────────────────────────────────────
   1. Container / Reset
   ──────────────────────────────────────────────────────────── */
.foa-container *,
.foa-account-layout * {
    box-sizing: border-box;
}

.foa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────
   2. Auth Pages (Login / Register)
   ──────────────────────────────────────────────────────────── */
.foa-auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding-top: 3rem;
}

.foa-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: var(--foa-radius-lg);
    box-shadow: var(--foa-shadow), var(--foa-shadow-gold);
    overflow: hidden;
    position: relative;
}

/* Top gold accent line */
.foa-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.foa-auth-header {
    text-align: center;
    padding: 2.5rem 2rem 1rem;
}

.foa-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.1), rgba(212, 168, 67, 0.05));
    border: 1px solid var(--border-gold);
    color: var(--gold);
    margin-bottom: 1rem;
}

.foa-auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.25rem;
    letter-spacing: 0.02em;
}

.foa-auth-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

.foa-auth-footer {
    text-align: center;
    padding: 1.25rem 2rem 2rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.foa-auth-footer p {
    margin: 0;
}

/* ────────────────────────────────────────────────────────────
   3. Forms
   ──────────────────────────────────────────────────────────── */
.foa-form {
    padding: 0 2rem;
}

.foa-field {
    margin-bottom: 1.25rem;
}

.foa-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 0.4rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.foa-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.foa-input-icon {
    position: absolute;
    left: 14px;
    color: var(--muted);
    pointer-events: none;
    transition: color var(--foa-transition);
    flex-shrink: 0;
}

.foa-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--foa-transition), box-shadow var(--foa-transition);
}

.foa-input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.foa-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.foa-input:focus ~ .foa-input-icon,
.foa-input:focus + .foa-input-icon {
    color: var(--gold);
}

/* Workaround: icon is sibling before input in DOM. Target via parent. */
.foa-input-wrap:focus-within .foa-input-icon {
    color: var(--gold);
}

.foa-field-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.35rem;
    opacity: 0.7;
}

/* Toggle password button */
.foa-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--foa-transition);
}

.foa-toggle-password:hover {
    color: var(--gold);
}

/* Password with toggle needs more right padding */
.foa-input-wrap .foa-toggle-password ~ .foa-input,
.foa-input-wrap .foa-input:has(+ .foa-toggle-password) {
    padding-right: 2.75rem;
}

/* Ensure inputs that have a toggle sibling get right padding
   (fallback for browsers not supporting :has) */
input.foa-input[type="password"] {
    padding-right: 2.75rem;
}

/* ────────────────────────────────────────────────────────────
   4. Password Strength Indicator
   ──────────────────────────────────────────────────────────── */
.foa-password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    height: 20px;
    opacity: 0;
    transition: opacity var(--foa-transition);
}

.foa-password-strength.foa-visible {
    opacity: 1;
}

.foa-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-dark);
    border-radius: 2px;
    overflow: hidden;
}

.foa-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.foa-strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 60px;
    text-align: right;
}

/* Strength levels */
.foa-strength-weak .foa-strength-bar span       { width: 25%;  background: var(--red-bright); }
.foa-strength-weak .foa-strength-label           { color: var(--red-bright); }

.foa-strength-fair .foa-strength-bar span        { width: 50%;  background: #e67e22; }
.foa-strength-fair .foa-strength-label           { color: #e67e22; }

.foa-strength-good .foa-strength-bar span        { width: 75%;  background: var(--gold); }
.foa-strength-good .foa-strength-label           { color: var(--gold); }

.foa-strength-strong .foa-strength-bar span      { width: 100%; background: var(--foa-green); }
.foa-strength-strong .foa-strength-label         { color: var(--foa-green); }

/* ────────────────────────────────────────────────────────────
   5. Buttons
   ──────────────────────────────────────────────────────────── */
.foa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--foa-radius);
    cursor: pointer;
    transition: all var(--foa-transition);
    position: relative;
    overflow: hidden;
}

.foa-btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0a0f;
    box-shadow: 0 2px 12px rgba(212, 168, 67, 0.3);
}

.foa-btn-primary:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.45);
    transform: translateY(-1px);
}

.foa-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 168, 67, 0.25);
}

.foa-btn-block {
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Loading state */
.foa-btn.foa-loading {
    pointer-events: none;
    opacity: 0.85;
}

.foa-btn.foa-loading .foa-btn-text {
    opacity: 0;
}

.foa-btn-spinner {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(10, 10, 15, 0.2);
    border-top-color: #0a0a0f;
    border-radius: 50%;
    animation: foa-spin 0.6s linear infinite;
}

.foa-btn.foa-loading .foa-btn-spinner {
    display: block;
}

@keyframes foa-spin {
    to { transform: rotate(360deg); }
}

/* ────────────────────────────────────────────────────────────
   6. Messages (Success / Error)
   ──────────────────────────────────────────────────────────── */
.foa-form-message {
    padding: 0;
    margin: 0 0 1rem;
    border-radius: var(--foa-radius);
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease, margin 0.35s ease;
}

.foa-form-message.foa-message-visible {
    max-height: 200px;
    opacity: 1;
    padding: 0.85rem 1rem;
}

.foa-form-message.foa-message-error {
    background: rgba(196, 30, 58, 0.12);
    border: 1px solid rgba(196, 30, 58, 0.3);
    color: #f47985;
}

.foa-form-message.foa-message-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.25);
    color: #6ee7a0;
}

/* ────────────────────────────────────────────────────────────
   7. Links
   ──────────────────────────────────────────────────────────── */
.foa-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--foa-transition);
}

.foa-link:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* ────────────────────────────────────────────────────────────
   8. Account Layout (Sidebar + Main)
   ──────────────────────────────────────────────────────────── */
.foa-account-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.foa-account-layout * {
    box-sizing: border-box;
}

/* ── Sidebar ── */
.foa-account-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
}

.foa-account-user-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: var(--foa-radius-lg);
    margin-bottom: 0.75rem;
    box-shadow: var(--foa-shadow-gold);
}

.foa-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}

.foa-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.foa-user-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.foa-user-role {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.foa-role-player { color: var(--muted); }
.foa-role-gm     { color: var(--gold); }

/* ── Nav Items ── */
.foa-account-nav {
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius-lg);
    overflow: hidden;
}

.foa-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all var(--foa-transition);
    border-left: 3px solid transparent;
}

.foa-nav-item:hover {
    background: rgba(212, 168, 67, 0.06);
    color: var(--gold-light);
}

.foa-nav-item.foa-nav-active {
    background: rgba(212, 168, 67, 0.1);
    border-left-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
}

.foa-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
}

.foa-nav-logout {
    border-top: 1px solid var(--border-dark);
    color: var(--muted);
    font-family: inherit;
}

.foa-nav-logout:hover {
    background: rgba(196, 30, 58, 0.08);
    color: var(--red-bright);
}

/* ── Main Content ── */
.foa-account-main {
    flex: 1;
    min-width: 0;
}

/* ────────────────────────────────────────────────────────────
   9. Page Titles & Headers
   ──────────────────────────────────────────────────────────── */
.foa-page-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-dark);
}

.foa-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-dark);
}

.foa-page-header .foa-page-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ────────────────────────────────────────────────────────────
   10. Stats Grid (Dashboard)
   ──────────────────────────────────────────────────────────── */
.foa-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.foa-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius-lg);
    transition: border-color var(--foa-transition), box-shadow var(--foa-transition);
}

.foa-stat-card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--foa-shadow-gold);
}

.foa-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(212, 168, 67, 0.08);
    color: var(--gold);
    flex-shrink: 0;
}

.foa-stat-body {
    display: flex;
    flex-direction: column;
}

.foa-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.2;
}

.foa-stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* Online/Offline status variants */
.foa-stat-online .foa-stat-icon {
    background: rgba(46, 204, 113, 0.1);
    color: var(--foa-green);
}

.foa-stat-online .foa-stat-value {
    color: var(--foa-green);
}

.foa-stat-offline .foa-stat-icon {
    background: rgba(138, 133, 120, 0.1);
    color: var(--muted);
}

/* ────────────────────────────────────────────────────────────
   11. Cards
   ──────────────────────────────────────────────────────────── */
.foa-card {
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: border-color var(--foa-transition);
}

.foa-card:hover {
    border-color: var(--border-gold);
}

.foa-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
}

.foa-card-icon {
    color: var(--gold);
    display: flex;
}

.foa-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading);
    margin: 0;
}

.foa-card-body {
    padding: 1.5rem;
}

.foa-card-description {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.foa-card-muted {
    opacity: 0.85;
}

/* ────────────────────────────────────────────────────────────
   12. Info Grid (Dashboard Account Info)
   ──────────────────────────────────────────────────────────── */
.foa-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.foa-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-dark);
}

.foa-info-row:last-child {
    border-bottom: none;
}

.foa-info-label {
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 500;
}

.foa-info-value {
    font-size: 0.95rem;
    color: var(--heading);
    font-weight: 600;
    text-align: right;
}

/* Badges */
.foa-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.foa-badge-player {
    background: rgba(138, 133, 120, 0.15);
    color: var(--muted);
}

.foa-badge-gm {
    background: rgba(212, 168, 67, 0.15);
    color: var(--gold);
    border: 1px solid rgba(212, 168, 67, 0.25);
}

.foa-badge-admin {
    background: rgba(196, 30, 58, 0.12);
    color: var(--red-bright);
    border: 1px solid rgba(196, 30, 58, 0.2);
}

/* ────────────────────────────────────────────────────────────
   13. Quick Links (Dashboard)
   ──────────────────────────────────────────────────────────── */
.foa-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.foa-quick-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius-lg);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--foa-transition);
}

.foa-quick-link svg {
    color: var(--gold);
    flex-shrink: 0;
    transition: transform var(--foa-transition);
}

.foa-quick-link:hover {
    border-color: var(--gold);
    box-shadow: var(--foa-shadow-gold);
    color: var(--gold-light);
    transform: translateY(-2px);
}

.foa-quick-link:hover svg {
    transform: scale(1.1);
}

/* ────────────────────────────────────────────────────────────
   14. Character Cards
   ──────────────────────────────────────────────────────────── */
.foa-char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.foa-char-card {
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all var(--foa-transition);
}

.foa-char-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: opacity var(--foa-transition);
}

.foa-char-card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--foa-shadow), var(--foa-shadow-gold);
    transform: translateY(-2px);
}

/* Race accent colours */
.foa-race-human::before  { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.foa-race-elf::before    { background: linear-gradient(90deg, transparent, #5dade2, transparent); }
.foa-race-dark-elf::before { background: linear-gradient(90deg, transparent, #8e44ad, transparent); }
.foa-race-orc::before    { background: linear-gradient(90deg, transparent, var(--red-bright), transparent); }
.foa-race-dwarf::before  { background: linear-gradient(90deg, transparent, #e67e22, transparent); }

.foa-char-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.foa-char-identity {
    min-width: 0;
    flex: 1;
}

.foa-char-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.foa-char-class {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

.foa-char-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid var(--border-gold);
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.foa-level-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.foa-level-label {
    font-size: 0.6rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* Online/offline status */
.foa-char-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

.foa-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.foa-char-status.foa-online {
    background: rgba(46, 204, 113, 0.1);
    color: var(--foa-green);
}

.foa-char-status.foa-online .foa-status-dot {
    background: var(--foa-green);
    box-shadow: 0 0 6px var(--foa-green);
    animation: foa-pulse 2s infinite;
}

.foa-char-status.foa-offline {
    background: rgba(138, 133, 120, 0.1);
    color: var(--muted);
}

.foa-char-status.foa-offline .foa-status-dot {
    background: var(--muted);
}

@keyframes foa-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* Stats row */
.foa-char-stats {
    display: flex;
    gap: 1.25rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 0.85rem;
}

.foa-char-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.foa-char-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.foa-char-stat-label {
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.foa-pvp  { color: var(--foa-blue); }
.foa-pk   { color: var(--red-bright); }
.foa-fame { color: var(--gold); }
.foa-karma { color: #e74c3c; }

/* Meta row (clan, playtime) */
.foa-char-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.foa-char-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.foa-char-meta-item svg {
    flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   15. Search Bar (Characters)
   ──────────────────────────────────────────────────────────── */
.foa-search-wrap {
    position: relative;
    width: 240px;
}

.foa-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.foa-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dark);
    border-radius: var(--foa-radius);
    color: var(--text);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--foa-transition), box-shadow var(--foa-transition);
}

.foa-search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.12);
}

.foa-search-input::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

/* ────────────────────────────────────────────────────────────
   16. Empty State
   ──────────────────────────────────────────────────────────── */
.foa-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.foa-empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.foa-empty-state h3 {
    font-size: 1.3rem;
    color: var(--heading);
    margin: 0 0 0.5rem;
}

.foa-empty-state p {
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────
   17. Security Tips
   ──────────────────────────────────────────────────────────── */
.foa-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.foa-tips-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.75rem;
    color: var(--text);
    font-size: 0.9rem;
}

.foa-tips-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.6;
}

/* ────────────────────────────────────────────────────────────
   18. Responsive
   ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .foa-account-layout {
        flex-direction: column;
    }

    .foa-account-sidebar {
        width: 100%;
        position: static;
    }

    .foa-account-nav {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .foa-nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 0.75rem 1.25rem;
        justify-content: center;
    }

    .foa-nav-item.foa-nav-active {
        border-left-color: transparent;
        border-bottom-color: var(--gold);
    }

    .foa-nav-logout {
        border-top: none;
        border-left: 1px solid var(--border-dark);
    }

    .foa-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .foa-char-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .foa-auth-container {
        padding-top: 1.5rem;
    }

    .foa-auth-card {
        border-radius: var(--foa-radius);
    }

    .foa-form {
        padding: 0 1.25rem;
    }

    .foa-auth-header {
        padding: 2rem 1.25rem 0.75rem;
    }

    .foa-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .foa-search-wrap {
        width: 100%;
    }

    .foa-stats-grid {
        grid-template-columns: 1fr;
    }

    .foa-stat-card {
        padding: 1rem;
    }

    .foa-quick-links {
        grid-template-columns: 1fr;
    }

    .foa-account-user-card {
        gap: 0.65rem;
        padding: 1rem;
    }

    .foa-nav-label {
        font-size: 0.82rem;
    }

    .foa-card-body {
        padding: 1rem;
    }
}

/* ────────────────────────────────────────────────────────────
   19. Animations (entrance)
   ──────────────────────────────────────────────────────────── */
@keyframes foa-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.foa-auth-card {
    animation: foa-fadeInUp 0.45s ease-out;
}

.foa-char-card {
    animation: foa-fadeInUp 0.35s ease-out both;
}

.foa-char-card:nth-child(2) { animation-delay: 0.05s; }
.foa-char-card:nth-child(3) { animation-delay: 0.10s; }
.foa-char-card:nth-child(4) { animation-delay: 0.15s; }
.foa-char-card:nth-child(5) { animation-delay: 0.20s; }
.foa-char-card:nth-child(6) { animation-delay: 0.25s; }

.foa-stat-card {
    animation: foa-fadeInUp 0.3s ease-out both;
}

.foa-stat-card:nth-child(2) { animation-delay: 0.06s; }
.foa-stat-card:nth-child(3) { animation-delay: 0.12s; }
.foa-stat-card:nth-child(4) { animation-delay: 0.18s; }

/* ────────────────────────────────────────────────────────────
   20. Character card hide (search filter)
   ──────────────────────────────────────────────────────────── */
.foa-char-card.foa-hidden {
    display: none;
}
