/* =========================================
   ESTILOS BASE: FORMULARIOS DEL USUARIO
========================================= */

.po-users-form {
    max-width: 480px;
    margin: 20px auto;
    padding: 16px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* MI CUENTA - ANCHO COMPLETO PARA GRID */
.po-users-account {
    max-width: 1200px;
    margin: 20px auto;
    padding: 16px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.po-users-form h2,
.po-users-account h2,
.po-users-account h3 {
    margin-top: 0;
}

/* CAMPOS */
.po-users-form input[type="text"],
.po-users-form input[type="email"],
.po-users-form input[type="password"],
.po-users-form select,
.po-users-account input[type="text"],
.po-users-account select {
    width: 100%;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.po-users-form button,
.po-users-account button {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
}

/* ERRORES / NOTIFICACIONES */
.po-users-errors {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.po-users-errors ul {
    margin: 0;
    padding-left: 18px;
}

.po-users-notice {
    background: #dcfce7;
    color: #166534;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

/* =========================================
   CABECERA MI CUENTA
========================================= */

.po-account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.po-account-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.po-account-title-small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.po-account-title-name {
    font-size: 1.4rem;
    font-weight: 700;
}

.po-account-title-country {
    font-size: 0.9rem;
    color: #4b5563;
}

/* Botones reutilizables */
.po-btn-secondary {
    background: #374151;
    color: #ffffff;
    font-size: 0.9rem;
}

.po-btn-primary {
    background: #111827;
    color: #ffffff;
    font-size: 0.9rem;
}

.po-btn-link {
    font-size: 0.9rem;
    text-decoration: underline;
}

.po-account-hint {
    font-size: 0.85rem;
    color: #6b7280;
}

/* =========================================
   MENÚ / NAV MI CUENTA
   (usa .po-account-tabs y .po-account-tab del template)
========================================= */

.po-account-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0 20px;
}

/* Pastillas del menú */
.po-account-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

/* hover general */
.po-account-tab:hover {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15,23,42,0.15);
    transform: translateY(-1px);
}

/* Primera pestaña marcada por defecto (Palomas perdidas) */
.po-account-tabs .po-account-tab:first-child {
    background: #111827;
    color: #ffffff;
}

/* Logout en rojo suave (el último enlace del menú) */
.po-account-tabs .po-account-tab:last-child {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.po-account-tabs .po-account-tab:last-child:hover {
    background: #fecaca;
    color: #7f1d1d;
    box-shadow: 0 4px 10px rgba(185,28,28,0.25);
}

/* =========================================
   SECCIONES MI CUENTA
========================================= */

.po-account-section {
    display: none;
}

.po-account-section-active {
    display: block;
}

/* =========================================
   GRID DE ANUNCIOS (MI CUENTA)
========================================= */

.po-account-ads-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* móvil: 2 columnas */
    gap: 16px;
    margin: 16px 0 28px;
}

@media (min-width: 992px) {
    .po-account-ads-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* PC: 4 columnas */
    }
}

/* CARD DE CADA ANUNCIO */
.po-account-ad-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06);
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: 0.85rem;
}

/* MINIATURA */
.po-account-ad-thumb {
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 4 / 3;
    margin-bottom: 8px;
}

.po-account-ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.po-account-ad-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* CUERPO */
.po-account-ad-body {
    margin-bottom: 8px;
}

.po-account-ad-title a {
    font-weight: 600;
    text-decoration: none;
}

.po-account-ad-title a:hover {
    text-decoration: underline;
}

.po-account-ad-price {
    margin-top: 2px;
    font-weight: 500;
    font-size: 0.82rem;
}

.po-account-ad-meta {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #6b7280;
}

/* BOTONES */
.po-account-ad-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.po-account-ad-btn {
    display: inline-block;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    background: #ffffff;
    color: #111827;
    white-space: nowrap;
}

.po-account-ad-btn-muted {
    background: #f3f4f6;
    color: #374151;
}

.po-account-ad-btn-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* Texto si no hay anuncios */
.po-account-ad-empty {
    font-size: 0.9rem;
    color: #6b7280;
    padding: 20px 0;
    text-align: center;
}
