/* ==========================================================================
   Very Online · Panel de Cuenta (/account y /account/game)
   Armoniza el panel de cuenta con la estetica obsidian/slate de Login/Register
   y los marcos esculpidos, crestas y botones RPG de Season 1.
   ========================================================================== */

.home-account-dialog[data-screen="account"] .home-account-content,
.home-account-dialog[data-screen="account-game"] .home-account-content {
    background:
        radial-gradient(ellipse 75% 48% at 50% 8%, rgba(212, 173, 99, 0.14), transparent 64%),
        radial-gradient(ellipse 55% 40% at 15% 22%, rgba(72, 146, 201, 0.12), transparent 60%),
        linear-gradient(180deg, rgba(6, 8, 12, 0.78), rgba(7, 9, 13, 0.94));
}

.home-account-feature.account-dashboard {
    width: min(100%, 1340px);
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(216, 179, 102, 0.45);
    border-image: url("/poe2/assets/a913b33e21f3.webp") 120 260 / 30px 58px / 6px 8px;
    background:
        linear-gradient(165deg, rgba(14, 17, 24, 0.95), rgba(7, 9, 13, 0.98)),
        url("/poe2/assets/62fdc8cd9c7e.webp") center top / 820px auto repeat,
        url("/account/leather.jpg") center / 520px auto repeat;
    background-blend-mode: normal, soft-light, normal;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.account-dashboard .account-panel-heading {
    position: relative;
    padding: 2.2rem 1.5rem 1.45rem;
    border-bottom: 1px solid rgba(216, 179, 102, 0.35);
    background:
        linear-gradient(95deg, rgba(7, 8, 12, 0.94) 0%, rgba(12, 16, 24, 0.78) 52%, rgba(7, 8, 12, 0.92) 100%),
        url("/replica/assets/very-online-hunter.webp") center 28% / cover no-repeat,
        url("/account/grunge.png") center / 300px auto repeat;
    background-blend-mode: normal, normal, soft-light;
}

.account-dashboard .account-panel-heading::after {
    content: "";
    position: absolute;
    inset: auto 0 -9px 0;
    height: 9px;
    background: url("/poe2/assets/a412fd194f91.webp") center / 100% 28px no-repeat;
    opacity: 0.9;
    pointer-events: none;
}

.account-dash-crest {
    position: absolute;
    top: -17px;
    left: 50%;
    width: min(250px, 60%);
    aspect-ratio: 337 / 93;
    transform: translateX(-50%);
    background: url("/poe2/assets/4818f37e165b.webp") center / contain no-repeat;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
    pointer-events: none;
}

.account-dashboard .account-panel-heading h1 {
    font-family: "Cinzel", var(--account-display), Georgia, serif;
    font-size: clamp(1.9rem, 3.6vw, 2.85rem);
    letter-spacing: 0.055em;
    color: #f8e6b4;
    -webkit-text-fill-color: #f8e6b4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 24px rgba(228, 185, 101, 0.25);
}

.account-dashboard .account-panel-heading p {
    color: #dad2bf;
    font-style: normal;
}

/* ── Rejilla Principal: Columna de Cuenta (izq) + Info/Clock/Social (der) ─ */

.account-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(265px, 320px);
    gap: clamp(1rem, 2vw, 1.75rem);
    align-items: start;
}

.account-dash-main,
.account-dash-aside {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
}

.account-dash-aside {
    position: sticky;
    top: 1rem;
}

/* Tarjetas esculpidas en obsidiana/zafiro */
.account-dashboard .home-account-feature-body .home-account-feature-card {
    position: relative;
    isolation: isolate;
    padding: clamp(1rem, 1.8vw, 1.35rem);
    border: 1px solid rgba(212, 173, 99, 0.34);
    border-image: url("/poe2/assets/2ddf9fdee2c8.webp") 120 240 / 24px 44px / 4px 4px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(103, 196, 235, 0.08), transparent 62%),
        linear-gradient(160deg, rgba(16, 20, 29, 0.96), rgba(8, 10, 15, 0.98)),
        url("/account/grunge.png") center / 320px auto repeat;
    background-blend-mode: normal, normal, soft-light;
    box-shadow: inset 0 1px 0 rgba(255, 234, 184, 0.08), 0 14px 30px rgba(0, 0, 0, 0.52);
}

.account-dashboard .account-dash-section > h2 {
    position: relative;
    margin: 0 0 0.95rem;
    padding-bottom: 0.65rem;
    border-bottom: 0;
    color: #f6e7c1;
    font: 400 clamp(1.3rem, 2vw, 1.6rem)/1.15 var(--account-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-dashboard .account-dash-section > h2::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 8px;
    background: url("/poe2/assets/a412fd194f91.webp") center / 100% 24px no-repeat;
    opacity: 0.85;
    pointer-events: none;
}

.account-dash-alert-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.account-dash-alert-row form {
    margin: 0;
}

.account-dash-label {
    color: #e2c27f;
    font: 400 0.82rem/1.2 var(--account-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.account-dash-number {
    color: #fff2ce;
    text-shadow: 0 2px 12px rgba(212, 173, 99, 0.28);
}

.account-dash-invite {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.account-dash-invite label {
    color: #c8bfa9;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-dash-copy-row {
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
}

.account-dash-copy-row input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 0.65rem;
    border: 1px solid rgba(212, 173, 99, 0.44);
    background: rgba(8, 10, 14, 0.9);
    color: #f3ede0;
    font-size: 0.8rem;
}

.account-dash-copy-row .home-account-action {
    margin-top: 0;
    min-height: 40px;
    padding-inline: 0.9rem;
}

/* Detalles de la cuenta (estilo filas alternas obsidian-zafiro) */
.account-dash-facts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    margin: 0;
}

.account-dash-facts-list > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 0.75rem;
    padding: 0.55rem 0.75rem;
    border-inline-start: 2px solid rgba(103, 196, 235, 0.36);
    border-bottom: 1px solid rgba(103, 196, 235, 0.10);
    background: linear-gradient(90deg, rgba(24, 30, 42, 0.86), rgba(12, 15, 22, 0.82));
}

.account-dash-facts-list dt {
    color: #a9b6c9;
    font-size: 0.8rem;
    font-weight: 600;
}

.account-dash-facts-list dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: #f4efe2;
    font-size: 0.86rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.account-dash-facts > div {
    border: 1px solid rgba(103, 196, 235, 0.25);
    background: linear-gradient(180deg, rgba(22, 28, 39, 0.92), rgba(11, 13, 19, 0.96));
}

.account-dashboard .home-account-feature-table th {
    color: #ebd091;
    border-bottom: 1px solid rgba(216, 179, 102, 0.36);
    background: rgba(20, 25, 35, 0.85);
}

.account-dashboard .home-account-feature-table td {
    border-bottom-color: rgba(103, 196, 235, 0.12);
}

.account-dashboard .home-account-feature-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(212, 173, 99, 0.14), rgba(68, 130, 179, 0.12));
}

/* Botones RPG */
.account-dashboard :is(a.home-account-action, button.home-account-action) {
    min-height: 2.55rem;
    padding: 0.45rem 1.2rem;
    border: 1px solid rgba(212, 173, 99, 0.48);
    border-image: url("/replica/assets/poe2-button-frame@2x.webp") 34 116 fill / 11px 28px / 2px;
    background: transparent;
    color: #ffefc7;
    font: 400 1.02rem/1 var(--account-display);
    letter-spacing: 0.055em;
    text-shadow: 0 2px 4px #000;
}

.account-dashboard :is(a.home-account-action.account-dash-action-secondary, button.home-account-action.account-dash-action-secondary) {
    border-image-source: url("/replica/assets/poe2-button-frame-blue@3x.webp");
    border-image-slice: 52 174 fill;
    border-image-width: 11px 28px;
    color: #dcefff;
}

.account-dashboard .account-dash-action-danger {
    filter: saturate(1.25);
}

/* Formularios de acciones y configuración */
.account-dashboard .home-account-feature-body .account-dash-forms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.account-dashboard .home-account-feature-body .home-account-feature-card .account-dash-form {
    max-width: none;
    padding: 0.9rem 0 0;
}

.account-dash-form .account-field-group {
    margin-bottom: 1.25rem;
}

.account-dashboard .home-account-feature-body .account-dash-form .account-field > label {
    position: static;
    display: block;
    max-width: none;
    padding: 0 0 0.35rem;
    transform: none;
    background: transparent;
    color: #e6c988;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.account-dashboard .home-account-feature-body .account-dash-form :is(input:not([type="hidden"], [type="checkbox"]), select) {
    height: 44px;
    border: 1px solid rgba(212, 173, 99, 0.44);
    background-color: rgba(9, 11, 16, 0.95);
    color: #f4efe2;
}

.account-dashboard .home-account-feature-body .account-dash-form select option {
    background: #0e121b;
    color: #f4efe2;
}

.account-dash-form .account-password-toggle {
    bottom: 6px;
}

.account-dashboard .home-account-feature-body .account-dash-form .account-submit,
.account-dashboard .home-account-feature-body .account-dash-form:has(input:invalid) .account-submit {
    min-height: 46px;
    border: 1px solid rgba(212, 173, 99, 0.55);
    border-image: url("/replica/assets/poe2-button-frame@2x.webp") 34 116 fill / 12px 30px / 2px;
    background: transparent;
    color: #fff2cf;
    font: 400 1.08rem/1 var(--account-display);
    letter-spacing: 0.06em;
    text-shadow: 0 2px 4px #000;
}

.account-dashboard .home-account-feature-body .account-dash-form .account-submit:hover {
    filter: brightness(1.16);
    color: #fff;
}

.account-dash-extra-actions {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.1rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(216, 179, 102, 0.22);
}

/* ── Panel Lateral Derecho: Horario del servidor, Info, Discord y Facebook ─ */

.account-dash-sidecard {
    display: grid;
    gap: 0.7rem;
}

.account-dash-sidecard h3 {
    margin: 0;
    color: #f5e6bf;
    font: 400 1.2rem/1.15 var(--account-display);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.account-server-clock {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(103, 196, 235, 0.34);
    background:
        radial-gradient(circle at 50% 0%, rgba(103, 196, 235, 0.16), transparent 72%),
        rgba(8, 11, 17, 0.92);
    text-align: center;
}

.account-server-clock-time {
    color: #fff2cc;
    font: 400 2rem/1.05 var(--account-display);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    text-shadow: 0 0 14px rgba(212, 173, 99, 0.38);
}

.account-server-clock-meta {
    color: #a9bacf;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-server-events {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(216, 179, 102, 0.2);
}

.account-server-events h3 {
    font-size: 1rem;
}

.account-server-event {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(103, 196, 235, 0.1);
    font-size: 0.82rem;
}

.account-server-event strong {
    color: #f2ead8;
}

.account-server-event time {
    color: #e3c37d;
    white-space: nowrap;
}

.account-side-facts {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}

.account-side-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.38rem 0.55rem;
    background: rgba(16, 20, 29, 0.82);
    border-inline-start: 2px solid rgba(216, 179, 102, 0.4);
    font-size: 0.82rem;
}

.account-side-facts dt {
    color: #a9b5c7;
    font-weight: 400;
}

.account-side-facts dd {
    margin: 0;
    color: #f4efe2;
    font-weight: 600;
}

.account-side-links {
    display: grid;
    gap: 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(216, 179, 102, 0.2);
}

.account-side-links a {
    color: #e8c982;
    font-size: 0.86rem;
    text-decoration: none;
}

.account-side-links a:hover {
    color: #fff2cc;
    text-decoration: underline;
}

/* Discord & Facebook cards */
.account-social-cards {
    display: grid;
    gap: 0.65rem;
}

.account-social-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(103, 196, 235, 0.28);
    background: linear-gradient(135deg, rgba(22, 27, 38, 0.94), rgba(11, 14, 21, 0.98));
    color: #f3ede0;
    text-decoration: none;
    transition: border-color 0.16s ease, filter 0.16s ease;
}

.account-social-card.is-discord {
    border-color: rgba(88, 101, 242, 0.55);
    background: linear-gradient(135deg, rgba(44, 52, 118, 0.42), rgba(12, 15, 24, 0.96));
}

.account-social-card.is-facebook {
    border-color: rgba(59, 130, 246, 0.48);
    background: linear-gradient(135deg, rgba(25, 62, 118, 0.42), rgba(12, 15, 24, 0.96));
}

a.account-social-card:hover {
    filter: brightness(1.16);
    text-decoration: none;
    color: #fff;
}

.account-social-card.is-pending {
    opacity: 0.8;
}

.account-social-badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.account-social-badge > span {
    width: 20px;
    height: 20px;
    background: currentColor;
    mask: var(--social-icon) center / contain no-repeat;
}

.account-social-card strong {
    display: block;
    font: 400 1.05rem/1.1 var(--account-display);
    letter-spacing: 0.04em;
    color: #fff4d4;
}

.account-social-card small {
    display: block;
    color: #c2cada;
    font-size: 0.76rem;
}

/* Armonizar tambien /account/game/{id} con obsidiana-zafiro */
.account-game-detail .paperdoll,
.account-game-detail .inv-grid {
    border-color: rgba(212, 173, 99, 0.36);
    background: linear-gradient(180deg, #121722, #080a0f);
}

.account-game-detail .paperdoll-frame,
.account-game-detail .eq-slot-box,
.account-game-detail button.inv-cell {
    border-color: rgba(103, 196, 235, 0.26);
    background: linear-gradient(180deg, #181f2c, #0b0e14);
}

@media (max-width: 980px) {
    .account-dash-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-dash-aside {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 680px) {
    .account-dash-facts-list,
    .account-dashboard .home-account-feature-body .account-dash-forms-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-dashboard .home-account-feature-body .home-account-feature-card {
        border-image-width: 18px 32px;
        border-image-outset: 1px;
    }
}

@media (forced-colors: active) {
    .home-account-feature.account-dashboard,
    .account-dashboard .home-account-feature-body .home-account-feature-card,
    .account-dashboard :is(a.home-account-action, button.home-account-action),
    .account-dash-form .account-submit {
        background: Canvas !important;
        color: CanvasText !important;
        border-image: none !important;
        border: 1px solid ButtonText !important;
    }

    .account-dashboard .account-panel-heading h1 {
        background: none !important;
        -webkit-background-clip: initial !important;
        background-clip: initial !important;
        -webkit-text-fill-color: CanvasText !important;
        color: CanvasText !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-social-card {
        transition: none;
    }
}
