body{background:#eef1f5}.perfil-page{max-width:1180px;margin:28px auto 42px;padding:0 15px}.perfil-hero{position:relative;overflow:hidden;border-radius:10px;background:linear-gradient(135deg,#169bd7 0%,#0f7fb4 100%);color:#fff;padding:32px;box-shadow:0 8px 24px rgba(0,0,0,.08);margin-bottom:18px}.perfil-hero h1{margin:0 0 8px;color:#fff;font-size:32px;font-weight:800}.perfil-hero p{margin:0;font-size:14px;opacity:.95}.perfil-module-nav{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:22px}.perfil-module-nav a{display:inline-flex;align-items:center;gap:8px;padding:10px 13px;border-radius:8px;background:#fff;border:1px solid #dfe5ec;color:#22313f;text-decoration:none;font-weight:800;font-size:13px;box-shadow:0 3px 12px rgba(15,23,42,.04)}.perfil-module-nav a:hover{background:#eef6ff;color:#0f7fb4}.perfil-module-nav span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:999px;background:#e53935;color:#fff;font-size:11px}.perfil-layout{display:grid;grid-template-columns:360px 1fr;gap:22px;align-items:start}.perfil-card,.perfil-panel{background:#fff;border:1px solid #dfe5ec;border-radius:8px;overflow:hidden;box-shadow:0 4px 18px rgba(15,23,42,.04)}.perfil-card-header,.perfil-panel-header{background:#169bd7;color:#fff;font-size:14px;font-weight:800;padding:13px 16px;text-transform:uppercase;letter-spacing:.3px}.perfil-card-body,.perfil-panel-body{padding:18px}.perfil-main-card{text-align:center}.perfil-avatar-wrap{position:relative;display:inline-block;width:148px;height:148px;margin:6px auto 10px;border-radius:20px;background-size:cover;background-position:center;border:1px solid #d7e1ea;box-shadow:0 10px 22px rgba(0,0,0,.08)}.perfil-avatar{width:148px;height:148px;object-fit:contain;display:block}.profile-status{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;font-size:13px;font-weight:800;margin-bottom:12px}.profile-status.online{color:#126c36;background:#e8f8ef;border:1px solid #bfe8cf}.profile-status.offline{color:#8a2631;background:#fff0f2;border:1px solid #f3c5cc}.perfil-name{margin:4px 0;font-size:27px;font-weight:900;color:#22313f;line-height:1.2;word-break:break-word}.perfil-realname{margin:0 0 13px;color:#6b7280;font-size:14px}.perfil-badges{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-bottom:16px}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800;border:1px solid #e2e8f0;background:#f8fafc;color:#334155}.badge.vip{background:#fff7e6;color:#9a5b00;border-color:#ffd98a}.badge.admin{background:#eef6ff;color:#0f6ca6;border-color:#bee3ff}.player-bars{width:148px;margin:0 auto 14px}.health-bar,.armour-bar{width:148px;height:8px;border:1px solid #000;box-sizing:border-box;display:block}.health-bar{margin-bottom:6px;background:#4B0B14}.health-bar>div{height:100%;background:#B92228}.armour-bar{background:#282828}.armour-bar>div{height:100%;background:#C8C8C8}.perfil-meta{display:grid;gap:10px;text-align:left}.meta-item,.stat-card,.message-item,.friend-item,.notification-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:13px}.meta-label{font-size:12px;text-transform:uppercase;color:#6b7280;font-weight:800;margin-bottom:4px}.meta-value{font-size:14px;color:#22313f;font-weight:700;word-break:break-word}.perfil-sections{display:grid;gap:22px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:14px}.stat-icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;background:#e9f6fd;color:#169bd7;border-radius:10px;margin-bottom:10px;font-size:16px}.stat-value{display:block;font-size:25px;font-weight:900;color:#22313f;line-height:1}.stat-label{display:block;margin-top:6px;font-size:13px;color:#6b7280;font-weight:700}.description-box{background:#f8fbff;border:1px solid #d9ebf8;border-radius:8px;padding:15px;color:#3f4f5f;font-size:14px;line-height:1.6;white-space:pre-line}.empty-text{color:#7b8794;font-style:italic}.actions-row{display:flex;gap:10px;flex-wrap:wrap}.btn-profile,.btn-danger{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none;border-radius:7px;padding:11px 14px;background:#169bd7;color:#fff!important;text-decoration:none;font-weight:800;font-size:14px;cursor:pointer;transition:.2s ease}.btn-profile:hover{background:#1188be;transform:translateY(-1px)}.btn-profile.secondary{background:#f8fafc;color:#22313f!important;border:1px solid #dfe5ec}.btn-profile.secondary:hover{background:#eef6ff;color:#0f6ca6!important}.btn-danger{background:#dc3545}.btn-danger:hover{background:#b02a37}.form-control,textarea.form-control,select.form-control{width:100%;border:1px solid #cfd8e3;background:#f8fafc;color:#374151;border-radius:7px;padding:12px 13px;font-size:14px;box-sizing:border-box;margin-bottom:12px;transition:.2s ease}.form-control:focus,textarea.form-control:focus{border-color:#169bd7;background:#fff;outline:none;box-shadow:0 0 0 4px rgba(22,155,215,.12)}textarea.form-control{min-height:130px;resize:vertical}.alert-ok,.alert-error{border-radius:7px;padding:14px 16px;margin-bottom:18px;font-size:14px;font-weight:700}.alert-ok{background:#e8f8ef;color:#1f7a45;border:1px solid #bfe8cf}.alert-error{background:#fff0f2;color:#b42335;border:1px solid #f3c5cc}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:15px}.tabs a{padding:9px 12px;border-radius:7px;background:#f8fafc;border:1px solid #dfe5ec;color:#22313f;text-decoration:none;font-weight:800}.tabs a.active{background:#169bd7;color:#fff}.message-item{display:grid;grid-template-columns:1fr auto;gap:12px;margin-bottom:10px}.message-title{font-weight:900;color:#22313f;margin-bottom:5px}.message-snippet{color:#6b7280;font-size:13px}.message-date{color:#7b8794;font-size:12px;text-align:right}.message-unread{border-left:4px solid #169bd7;background:#f1f9ff}.message-body{line-height:1.7;color:#334155;white-space:pre-line}.friend-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:12px}.friend-item{display:flex;align-items:center;justify-content:space-between;gap:12px}.friend-user{display:flex;align-items:center;gap:10px;font-weight:900;color:#22313f}.friend-user img{width:46px;height:46px;object-fit:contain;border-radius:10px;background:#eef1f5}.notification-item{margin-bottom:10px}.notification-title{font-weight:900;color:#22313f}.notification-body{color:#6b7280;margin-top:4px}.notification-date{font-size:12px;color:#7b8794;margin-top:6px}#inline-copyright{text-align:center;color:#7b8794;font-size:13px;padding-top:26px}@media(max-width:980px){.perfil-layout{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}}@media(max-width:620px){.perfil-page{padding:0 10px}.perfil-hero{padding:24px 18px}.perfil-hero h1{font-size:24px}.perfil-card-body,.perfil-panel-body{padding:14px}.stats-grid,.friend-grid{grid-template-columns:1fr}.actions-row{display:grid;grid-template-columns:1fr}.btn-profile,.btn-danger{width:100%}.message-item{grid-template-columns:1fr}.message-date{text-align:left}}
/* FIX: botones de interacciones no se salen del panel */
.perfil-panel,
.perfil-panel-body,
.actions-row {
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.actions-row form {
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.actions-row .btn-profile,
.actions-row button.btn-profile,
.actions-row a.btn-profile {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
}

/* móvil estrecho */
@media (max-width: 520px) {
    .actions-row {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .actions-row form,
    .actions-row .btn-profile,
    .actions-row button.btn-profile,
    .actions-row a.btn-profile {
        width: 100% !important;
        min-width: 0 !important;
        display: flex;
        justify-content: center;
    }
}
.friend-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.friend-modal-overlay.is-visible {
    display: flex;
}

.friend-modal {
    width: 100%;
    max-width: 390px;
    background: #fff;
    border-radius: 14px;
    padding: 26px 24px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0,0,0,.22);
    animation: friendModalIn .18s ease-out;
}

.friend-modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff1f2;
    color: #e11d48;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.friend-modal h3 {
    margin: 0 0 8px;
    color: #22313f;
    font-size: 22px;
}

.friend-modal p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.friend-modal-actions {
    margin-top: 22px;
    display: flex;
    gap: 10px;
}

.friend-modal-cancel,
.friend-modal-confirm {
    flex: 1;
    border: 0;
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 800;
    cursor: pointer;
}

.friend-modal-cancel {
    background: #eef2f7;
    color: #334155;
}

.friend-modal-confirm {
    background: #e11d48;
    color: #fff;
}

@keyframes friendModalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.open-notification-form {
    display: inline-block;
    margin-left: 8px;
}

.notification-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 28px;
    padding: 5px 12px;

    border: 1px solid rgba(22, 155, 215, 0.28);
    border-radius: 999px;

    background: rgba(22, 155, 215, 0.08);
    color: #169bd7;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;

    transition: all 0.18s ease;
}

.notification-open-btn:hover {
    background: #169bd7;
    color: #fff;
    border-color: #169bd7;
    transform: translateY(-1px);
}

.notification-open-btn i {
    font-size: 11px;
}