/* ── AUTH FORMS ───────────────────────────────────────────────────────────── */
.ryou-auth-wrap {
    display: flex; justify-content: center; align-items: flex-start;
    padding: 2rem 1rem; min-height: 60vh;
    font-family: 'Amaranth', sans-serif;
}
.ryou-auth-card {
    background: var(--ryou-parch-lt, #faf5e4);
    border: 2px solid var(--ryou-parch-dk, #c8a96e);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    width: 100%; max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.6);
    position: relative;
}
.ryou-auth-card::before {
    content: '';
    position: absolute; inset: 6px;
    border: 1px solid rgba(200,169,110,.3);
    border-radius: 8px; pointer-events: none;
}
.ryou-auth-header { text-align: center; margin-bottom: 1.8rem; }
.ryou-auth-title {
    font-family: 'Cinzel', serif; font-size: 1.8rem; font-weight: 700;
    color: #2a1a08; margin: 0 0 .3rem;
    text-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.ryou-auth-subtitle { font-size: 14px; color: #7a5a30; margin: 0; }

/* Avatar upload */
.ryou-auth-avatar-section {
    display: flex; flex-direction: column; align-items: center;
    gap: .5rem; margin-bottom: 1.5rem;
}
.ryou-avatar-preview {
    width: 90px; height: 90px; border-radius: 50%;
    background: rgba(0,0,0,.06); border: 3px solid var(--ryou-parch-dk, #c8a96e);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 2.5rem;
}
.ryou-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.ryou-avatar-upload-btn {
    background: rgba(0,0,0,.06); border: 1px dashed #c8a96e;
    border-radius: 20px; padding: .3rem 1rem; cursor: pointer;
    font-size: 13px; color: #5a3a10; font-family: 'Amaranth', sans-serif;
    transition: background .15s;
}
.ryou-avatar-upload-btn:hover { background: rgba(200,169,110,.2); }
.ryou-auth-hint { font-size: 11px; color: #aaa; margin: 0; }

/* Fields */
.ryou-auth-fields { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.2rem; }
.ryou-auth-field { display: flex; flex-direction: column; gap: .3rem; }
.ryou-auth-field label { font-size: 13px; font-weight: 700; color: #4a3820; }
.ryou-auth-field input[type=text],
.ryou-auth-field input[type=email],
.ryou-auth-field input[type=password],
.ryou-auth-field select,
.ryou-auth-field textarea {
    width: 100%; padding: .55rem .8rem;
    background: rgba(255,255,255,.8);
    border: 1.5px solid #c8a96e; border-radius: 6px;
    font-family: 'Amaranth', sans-serif; font-size: 14px; color: #1a1208;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.ryou-auth-field input:focus,
.ryou-auth-field select:focus,
.ryou-auth-field textarea:focus {
    outline: none; border-color: var(--ryou-gold, #c9a84c);
    box-shadow: 0 0 0 3px rgba(201,168,76,.2);
}
.ryou-auth-input-wrap { position: relative; display: flex; align-items: center; }
.ryou-auth-input-wrap input { padding-right: 2.5rem; }
.ryou-toggle-pass {
    position: absolute; right: .6rem;
    background: none; border: none; cursor: pointer; font-size: 1rem;
    padding: 0; line-height: 1; color: #aaa;
}
.ryou-toggle-pass:hover { color: #555; }
.ryou-field-status {
    position: absolute; right: .5rem; font-size: 1rem;
}
.ryou-field-status--ok { color: #2a7a2a; }
.ryou-field-status--err { color: #c00; }

/* Password strength */
.ryou-password-strength {
    height: 4px; border-radius: 2px; background: #eee;
    margin-top: .3rem; overflow: hidden; transition: all .3s;
}
.ryou-password-strength::after {
    content: ''; display: block; height: 100%; border-radius: 2px;
    width: var(--strength, 0%); background: var(--strength-color, #eee);
    transition: width .3s, background .3s;
}

/* Inline field */
.ryou-auth-field--inline { flex-direction: row; align-items: center; justify-content: space-between; }
.ryou-checkbox-label { display: flex; align-items: center; gap: .4rem; font-size: 13px; cursor: pointer; }
.ryou-auth-link { font-size: 13px; color: var(--ryou-gold, #c9a84c); text-decoration: none; }
.ryou-auth-link:hover { text-decoration: underline; }

/* Optional section */
.ryou-auth-optional {
    border: 1px dashed #c8a96e; border-radius: 6px;
    padding: .8rem; margin-bottom: 1.2rem;
}
.ryou-auth-optional summary {
    cursor: pointer; font-size: 14px; font-weight: 700; color: #4a3820;
    list-style: none;
}
.ryou-auth-optional summary span { font-weight: 400; color: #999; font-size: 12px; }
.ryou-auth-optional summary::-webkit-details-marker { display: none; }
.ryou-auth-optional[open] .ryou-auth-fields--optional { margin-top: 1rem; }

/* Submit button */
.ryou-auth-btn {
    width: 100%; padding: .75rem;
    background: linear-gradient(135deg, #8b1a1a 0%, #c0392b 100%);
    color: #fff; border: none; border-radius: 6px;
    font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700;
    cursor: pointer; letter-spacing: .05em;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 3px 8px rgba(139,26,26,.35);
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.ryou-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(139,26,26,.45); }
.ryou-auth-btn:active { transform: translateY(0); }

/* Messages */
.ryou-auth-msg {
    border-radius: 6px; padding: .6rem .9rem;
    font-size: 13px; margin-bottom: .8rem; font-family: 'Amaranth', sans-serif;
}
.ryou-auth-msg--success { background: rgba(42,122,42,.1); border: 1px solid rgba(42,122,42,.3); color: #1a6b1a; }
.ryou-auth-msg--error   { background: rgba(192,0,0,.08); border: 1px solid rgba(192,0,0,.25); color: #a00; }
.ryou-auth-switch { text-align: center; font-size: 13px; color: #888; margin-top: .8rem; }
.ryou-auth-switch a { color: var(--ryou-gold, #c9a84c); text-decoration: none; font-weight: 700; }
.ryou-auth-notice { text-align: center; padding: 1rem; font-family: 'Amaranth', sans-serif; }

/* ── USER PROFILE — Ninja Dossier ────────────────────────────────────────── */
:root {
    --np-ink:      #0d0d0d;
    --np-red:      #8b1a1a;
    --np-red-lt:   #c0392b;
    --np-gold:     #c9a84c;
    --np-parch:    #f5ede0;
    --np-parch-dk: #e8d5b7;
    --np-border:   rgba(139,26,26,.25);
    --np-shadow:   rgba(0,0,0,.35);
}

.ryou-perfil-wrap {
    font-family: 'Amaranth', sans-serif;
    max-width: 960px; margin: 0 auto;
    position: relative;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.ryou-perfil-hero {
    position: relative; overflow: hidden;
    background: var(--np-ink);
    border: 1px solid rgba(139,26,26,.4);
    border-radius: 12px;
    padding: 0; margin-bottom: 1.2rem;
    box-shadow: 0 8px 40px var(--np-shadow);
}
/* Red diagonal slash decoration */
.ryou-perfil-hero::before {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 40%; height: 100%;
    background: linear-gradient(135deg, transparent 30%, rgba(139,26,26,.12) 100%);
    pointer-events: none;
}
/* Subtle noise texture */
.ryou-perfil-hero::after {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; border-radius: 12px;
}

.ryou-perfil-hero-inner {
    display: flex; gap: 0; align-items: stretch;
    position: relative; z-index: 1;
}

/* Avatar column */
.ryou-perfil-avatar-col {
    flex-shrink: 0; width: 180px;
    background: rgba(255,255,255,.03);
    border-right: 1px solid rgba(139,26,26,.3);
    display: flex; flex-direction: column; align-items: center;
    padding: 1.8rem 1rem; gap: .8rem;
    position: relative;
}
.ryou-perfil-avatar-col::after {
    content: '';
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--np-red), transparent);
}
.ryou-perfil-avatar-wrap { position: relative; }
.ryou-perfil-avatar {
    width: 120px; height: 120px; border-radius: 8px; object-fit: cover;
    border: 2px solid var(--np-red);
    box-shadow: 0 4px 20px rgba(139,26,26,.5), 0 0 0 1px rgba(139,26,26,.2);
    display: block;
}
.ryou-perfil-avatar-placeholder {
    width: 120px; height: 120px; border-radius: 8px;
    background: rgba(255,255,255,.04); border: 2px solid var(--np-red);
    display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.ryou-perfil-edit-avatar-btn {
    position: absolute; bottom: -8px; right: -8px;
    background: var(--np-red); color: #fff; border: 2px solid #1a0a0a;
    border-radius: 50%; width: 26px; height: 26px; font-size: 11px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.ryou-perfil-edit-avatar-btn:hover { background: var(--np-red-lt); }
.ryou-perfil-member-since {
    font-size: 11px; color: rgba(255,255,255,.35); text-align: center;
    text-transform: uppercase; letter-spacing: .08em;
}

/* Info column */
.ryou-perfil-info-col {
    flex: 1; padding: 1.8rem 2rem;
    display: flex; flex-direction: column; justify-content: space-between;
}
.ryou-perfil-username {
    font-family: 'Cinzel', serif;
    font-size: 2rem; font-weight: 700;
    color: #fff; margin: 0 0 .5rem;
    letter-spacing: .04em;
    text-shadow: 0 2px 8px rgba(139,26,26,.5);
}
/* Red underline accent */
.ryou-perfil-username-underline {
    width: 60px; height: 3px;
    background: linear-gradient(90deg, var(--np-red), transparent);
    margin-bottom: .8rem; border-radius: 2px;
}
.ryou-perfil-badges {
    display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem;
}
.ryou-perfil-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 3px; padding: .2rem .6rem;
    font-size: 12px; color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.06);
    font-family: 'Amaranth', sans-serif;
    text-transform: uppercase; letter-spacing: .05em;
}
.ryou-perfil-badge--aldea  { border-color: rgba(42,180,42,.3);  color: #7dca7d; background: rgba(42,180,42,.08); }
.ryou-perfil-badge--org    { border-color: rgba(139,26,26,.5);   color: #e88; background: rgba(139,26,26,.12); }
.ryou-perfil-badge--prof   { border-color: rgba(201,168,76,.3);  color: var(--np-gold); background: rgba(201,168,76,.08); }
.ryou-perfil-bio {
    font-size: 14px; color: rgba(255,255,255,.55);
    line-height: 1.7; margin: 0; max-width: 500px;
    font-style: italic;
}
.ryou-perfil-hero-actions {
    display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap;
}
.ryou-perfil-hero-actions .ryou-btn {
    font-size: 12px; padding: .3rem .9rem; border-radius: 3px;
}

/* ── STATS BAR ────────────────────────────────────────────────────────────── */
.ryou-perfil-stats-bar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px; margin-bottom: 1.2rem;
    background: rgba(139,26,26,.2);
    border: 1px solid rgba(139,26,26,.25); border-radius: 6px; overflow: hidden;
}
.ryou-perfil-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: .9rem .5rem;
    background: var(--np-ink);
    transition: background .2s;
}
.ryou-perfil-stat:hover { background: rgba(139,26,26,.08); }
.ryou-perfil-stat-val {
    font-family: 'Cinzel', serif; font-size: 1.6rem; font-weight: 700;
    color: var(--np-red); line-height: 1;
}
.ryou-perfil-stat-lbl {
    font-size: 11px; color: rgba(255,255,255,.35);
    text-transform: uppercase; letter-spacing: .1em; margin-top: .3rem;
}

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */
.ryou-perfil-section { margin-bottom: 1.5rem; }
.ryou-perfil-section-title {
    display: flex; align-items: center; gap: .6rem;
    font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700;
    color: rgba(255,255,255,.8);
    border-bottom: 1px solid rgba(139,26,26,.3);
    padding-bottom: .6rem; margin-bottom: 1rem;
    text-transform: uppercase; letter-spacing: .1em;
}
.ryou-perfil-title-icon {
    color: var(--np-red); font-size: 1rem;
}

/* ── FICHAS LIST — widget style rows ──────────────────────────────────────── */
.ryou-perfil-fichas-list {
    display: flex; flex-direction: column; gap: 2px;
    border: 1px solid rgba(139,26,26,.2); border-radius: 8px; overflow: hidden;
}

.ryou-perfil-ficha-row {
    display: flex; align-items: center; gap: .7rem;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: .5rem .7rem;
    text-decoration: none; color: inherit;
    transition: background .15s, border-left-color .15s;
    border-left: 3px solid transparent;
    position: relative;
}
.ryou-perfil-ficha-row:last-child { border-bottom: none; }
.ryou-perfil-ficha-row:hover {
    background: rgba(201,168,76,.1);
    border-left-color: var(--np-gold);
}
.ryou-perfil-ficha-row--new {
    border-left-color: rgba(139,26,26,.3);
    background: rgba(139,26,26,.04);
}
.ryou-perfil-ficha-row--new:hover {
    background: rgba(139,26,26,.1);
    border-left-color: var(--np-red);
}

/* Image — exact same as widget: round, fixed size */
.ryou-perfil-ficha-row-img {
    width: 44px; height: 44px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
}
.ryou-perfil-ficha-row-img img {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.ryou-perfil-ficha-row-img--new {
    font-size: 1.4rem; color: rgba(139,26,26,.5);
    border-style: dashed; border-color: rgba(139,26,26,.3);
}
.ryou-perfil-ficha-row-initial {
    font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700;
    color: #fff;
}

/* Main info */
.ryou-perfil-ficha-row-main {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: .15rem;
}
.ryou-perfil-ficha-row-top {
    display: flex; align-items: center; gap: .5rem;
}
.ryou-perfil-ficha-row-name {
    font-family: 'Amaranth', sans-serif; font-size: 14px; font-weight: 700;
    color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ryou-perfil-ficha-row-tipo {
    margin-left: auto; font-size: 11px;
    color: rgba(255,255,255,.35); flex-shrink: 0;
}
.ryou-perfil-ficha-row-tags {
    display: flex; flex-wrap: wrap; gap: .25rem;
}
.ryou-perfil-ficha-tag {
    font-size: 11px; color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.06); border-radius: 3px;
    padding: .05rem .35rem;
}
.ryou-perfil-ficha-tag--rango { color: var(--np-red); background: rgba(139,26,26,.15); }
.ryou-perfil-ficha-tag--aldea { color: rgba(100,200,100,.7); background: rgba(42,122,42,.1); }

/* Balances mini row */
.ryou-perfil-ficha-row-balances {
    display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .1rem;
}
.ryou-perfil-ficha-row-bal {
    font-size: 11px; color: var(--np-gold);
    display: flex; align-items: center; gap: .2rem;
}

/* Arrow */
.ryou-perfil-ficha-row-arrow {
    font-size: 1.2rem; color: rgba(255,255,255,.2);
    flex-shrink: 0; transition: color .15s, transform .15s;
}
.ryou-perfil-ficha-row:hover .ryou-perfil-ficha-row-arrow {
    color: var(--np-gold); transform: translateX(2px);
}

/* Empty state */
.ryou-perfil-empty-fichas {
    display: flex; flex-direction: column; align-items: center; gap: .8rem;
    padding: 2.5rem; border: 1px dashed rgba(139,26,26,.3); border-radius: 8px;
    background: rgba(139,26,26,.04);
}
.ryou-perfil-empty-icon { font-size: 3rem; opacity: .3; }
.ryou-perfil-empty-fichas p { color: rgba(255,255,255,.4); margin: 0; }

/* ── EDIT SECTION ─────────────────────────────────────────────────────────── */
.ryou-perfil-edit-section {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(139,26,26,.25);
    border-radius: 8px; padding: 1.5rem;
}
.ryou-perfil-edit-section .ryou-auth-field label { color: rgba(255,255,255,.6); }
.ryou-perfil-edit-section input,
.ryou-perfil-edit-section select,
.ryou-perfil-edit-section textarea {
    background: rgba(255,255,255,.06) !important;
    border-color: rgba(139,26,26,.3) !important;
    color: #fff !important;
}
.ryou-perfil-edit-section input:focus,
.ryou-perfil-edit-section select:focus,
.ryou-perfil-edit-section textarea:focus {
    border-color: var(--np-red) !important;
    box-shadow: 0 0 0 3px rgba(139,26,26,.2) !important;
}
.ryou-perfil-edit-section select option { background: #1a0a0a; color: #fff; }
.ryou-perfil-edit-section .ryou-auth-optional {
    border-color: rgba(139,26,26,.25);
}
.ryou-perfil-edit-section .ryou-auth-optional summary { color: rgba(255,255,255,.5); }

/* Responsive */
@media (max-width: 640px) {
    .ryou-perfil-hero-inner { flex-direction: column; }
    .ryou-perfil-avatar-col { width: 100%; border-right: none; border-bottom: 1px solid rgba(139,26,26,.3); flex-direction: row; padding: 1rem 1.5rem; }
    .ryou-perfil-fichas-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .ryou-perfil-username { font-size: 1.4rem; }
}
