/**
 * MARSAPIENS // COLONY REGISTRY
 * Vault profile page — two-column dossier layout.
 * Design: dark navy + teal (#00c9a7) + amber (#f5c842). Lighter than main site.
 */

/* ── Reset / base ─────────────────────────────────────────────────────────── */

.vault-main *,
.vault-topbar * {
    box-sizing: border-box;
}

/* Override base.css body overflow:hidden so the vault page can scroll */
body[data-page-id="vault"] {
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── Topbar ───────────────────────────────────────────────────────────────── */

.vault-topbar {
    position:        sticky;
    top:             0;
    z-index:         100;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         0 1.5rem;
    height:          52px;
    background:      rgba(8, 13, 28, 0.95);
    border-bottom:   1px solid rgba(0, 201, 167, 0.15);
    backdrop-filter: blur(8px);
    gap:             1rem;
}

.vault-topbar-left {
    display:     flex;
    align-items: center;
    gap:         0.6em;
    flex-shrink: 0;
}

.vault-topbar-diamond {
    color:     #00c9a7;
    font-size: 0.7rem;
    opacity:   0.8;
}

.vault-topbar-title {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.65rem;
    letter-spacing: 0.2em;
    color:          rgba(139, 164, 192, 0.6);
    text-transform: uppercase;
    white-space:    nowrap;
}

.vault-topbar-nav {
    display:     flex;
    align-items: center;
    gap:         1rem;
}

.vault-topbar-link {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.6rem;
    letter-spacing: 0.14em;
    color:          rgba(139, 164, 192, 0.5);
    text-decoration: none;
    text-transform: uppercase;
    transition:     color 0.15s;
    white-space:    nowrap;
}
.vault-topbar-link:hover { color: #8ba4c0; }

.vault-topbar-exit {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.6rem;
    letter-spacing: 0.14em;
    padding:        0.3em 0.85em;
    border:         1px solid rgba(224, 85, 85, 0.35);
    background:     transparent;
    color:          rgba(224, 85, 85, 0.6);
    cursor:         pointer;
    border-radius:  2px;
    text-transform: uppercase;
    transition:     background 0.15s, border-color 0.15s, color 0.15s;
    white-space:    nowrap;
}
.vault-topbar-exit:hover {
    background:    rgba(224, 85, 85, 0.1);
    border-color:  #e05555;
    color:         #e05555;
}

/* ── Gate (not logged in) ─────────────────────────────────────────────────── */

.vault-main {
    min-height:      calc(100vh - 52px);
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         2rem 1rem;
    overflow-y:      auto;
    overflow-x:      hidden;
}

.vault-gate {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            1.8rem;
    text-align:     center;
    max-width:      380px;
}

.vault-gate-icon {
    font-size: 3.5rem;
    color:     rgba(0, 201, 167, 0.25);
    line-height: 1;
    text-shadow: 0 0 40px rgba(0, 201, 167, 0.15);
}

.vault-gate-eyebrow {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.58rem;
    letter-spacing: 0.28em;
    color:          rgba(0, 201, 167, 0.5);
    text-transform: uppercase;
    margin:         0;
}

.vault-gate-title {
    font-family:    'Share Tech Mono', monospace;
    font-size:      clamp(1rem, 2.5vw, 1.3rem);
    letter-spacing: 0.18em;
    color:          #c8d8f0;
    margin:         0.4rem 0 0;
}

.vault-gate-sub {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.7rem;
    letter-spacing: 0.1em;
    color:          rgba(139, 164, 192, 0.55);
    margin:         0;
    line-height:    1.8;
}

.vault-gate-actions {
    display:         flex;
    gap:             0.75rem;
    flex-wrap:       wrap;
    justify-content: center;
}

.vault-gate-btn {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.72rem;
    letter-spacing: 0.15em;
    padding:        0.6rem 1.8rem;
    border:         1px solid rgba(0, 201, 167, 0.5);
    background:     rgba(0, 201, 167, 0.06);
    color:          #00c9a7;
    cursor:         pointer;
    border-radius:  2px;
    transition:     background 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}
.vault-gate-btn:hover {
    background:   rgba(0, 201, 167, 0.14);
    border-color: #00c9a7;
    box-shadow:   0 0 16px rgba(0, 201, 167, 0.18);
}
.vault-gate-btn--secondary {
    border-color: rgba(139, 164, 192, 0.3);
    background:   transparent;
    color:        rgba(139, 164, 192, 0.65);
}
.vault-gate-btn--secondary:hover {
    background:   rgba(139, 164, 192, 0.08);
    border-color: rgba(139, 164, 192, 0.55);
    color:        #8ba4c0;
    box-shadow:   none;
}

/* ── Dossier layout (logged in) ───────────────────────────────────────────── */

.vault-dossier {
    width:       100%;
    max-width:   1020px;
    margin:      0 auto;
    padding:     2rem 1.5rem 4rem;
    display:     grid;
    grid-template-columns: 240px 1fr;
    gap:         1.5rem;
    align-items: start;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */

.vault-sidebar {
    display:        flex;
    flex-direction: column;
    gap:            1rem;
    position:       sticky;
    top:            68px;
}

.vault-sidebar-card {
    background:    #0b1424;
    border:        1px solid #1a2e4a;
    border-radius: 4px;
    padding:       1.5rem 1.25rem;
    display:       flex;
    flex-direction: column;
    align-items:   center;
    gap:           1rem;
    text-align:    center;
}

/* Avatar */
.vault-avatar-wrap {
    position: relative;
    cursor:   pointer;
    flex-shrink: 0;
}

.vault-avatar-circle {
    width:         96px;
    height:        96px;
    border-radius: 50%;
    border:        2px solid rgba(0, 201, 167, 0.35);
    background:    #080f1e;
    display:       flex;
    align-items:   center;
    justify-content: center;
    overflow:      hidden;
    transition:    border-color 0.2s, box-shadow 0.2s;
    font-family:   'Share Tech Mono', monospace;
    font-size:     2rem;
    color:         rgba(0, 201, 167, 0.45);
    letter-spacing: 0;
}
.vault-avatar-wrap:hover .vault-avatar-circle {
    border-color: #00c9a7;
    box-shadow:   0 0 20px rgba(0, 201, 167, 0.2);
}

.vault-avatar-img {
    width:         100%;
    height:        100%;
    object-fit:    cover;
    border-radius: 50%;
    display:       block;
}

.vault-avatar-delete-btn {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.6rem;
    letter-spacing: 0.08em;
    color:          rgba(224, 85, 85, 0.7);
    background:     transparent;
    border:         1px solid rgba(224, 85, 85, 0.3);
    border-radius:  3px;
    padding:        3px 10px;
    cursor:         pointer;
    transition:     color 0.15s, border-color 0.15s;
}
.vault-avatar-delete-btn:hover {
    color:         #e05555;
    border-color:  #e05555;
}
.vault-avatar-delete-btn:disabled {
    opacity:  0.4;
    cursor:   not-allowed;
}

.vault-avatar-overlay {
    position:        absolute;
    inset:           0;
    border-radius:   50%;
    background:      rgba(8, 13, 28, 0.7);
    display:         flex;
    align-items:     center;
    justify-content: center;
    opacity:         0;
    transition:      opacity 0.2s;
    flex-direction:  column;
    gap:             4px;
}
.vault-avatar-wrap:hover .vault-avatar-overlay { opacity: 1; }

.vault-avatar-upload-label {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.48rem;
    letter-spacing: 0.1em;
    color:          #fff;
    text-transform: uppercase;
    text-align:     center;
    line-height:    1.4;
    pointer-events: none;
    white-space:    pre-line;
}

.vault-avatar-spinner {
    display:       none;
    width:         20px;
    height:        20px;
    border:        2px solid rgba(0, 201, 167, 0.3);
    border-top-color: #00c9a7;
    border-radius: 50%;
    animation:     vault-spin 0.7s linear infinite;
}
.vault-avatar-wrap.uploading .vault-avatar-overlay  { opacity: 1; }
.vault-avatar-wrap.uploading .vault-avatar-upload-label { display: none; }
.vault-avatar-wrap.uploading .vault-avatar-spinner  { display: block; }

@keyframes vault-spin { to { transform: rotate(360deg); } }

/* Identity block */
.vault-sidebar-codename {
    font-family:    'Share Tech Mono', monospace;
    font-size:      clamp(0.9rem, 2vw, 1.1rem);
    letter-spacing: 0.1em;
    color:          #f5c842;
    margin:         0;
    text-shadow:    0 0 20px rgba(245, 200, 66, 0.2);
    word-break:     break-word;
}

.vault-sidebar-badges {
    display:         flex;
    gap:             0.4rem;
    flex-wrap:       wrap;
    justify-content: center;
}

.vault-dept-badge {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.55rem;
    letter-spacing: 0.14em;
    padding:        0.2rem 0.55rem;
    border-radius:  2px;
    text-transform: uppercase;
}
.vault-dept--farming       { background: rgba(109,191,122,0.12); color: #6dbf7a; border: 1px solid rgba(109,191,122,0.35); }
.vault-dept--engine-labs   { background: rgba(245,166,35,0.12);  color: #f5a623; border: 1px solid rgba(245,166,35,0.35); }
.vault-dept--security      { background: rgba(224,85,85,0.12);   color: #e05555; border: 1px solid rgba(224,85,85,0.35); }
.vault-dept--genetics      { background: rgba(196,127,255,0.12); color: #c47fff; border: 1px solid rgba(196,127,255,0.35); }
.vault-dept--administration{ background: rgba(122,184,245,0.12); color: #7ab8f5; border: 1px solid rgba(122,184,245,0.35); }
.vault-dept--unknown       { background: rgba(139,164,192,0.08); color: rgba(139,164,192,0.5); border: 1px solid rgba(139,164,192,0.15); }

.vault-level-badge {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.55rem;
    letter-spacing: 0.14em;
    padding:        0.2rem 0.55rem;
    border-radius:  2px;
    background:     rgba(0,201,167,0.1);
    color:          #00c9a7;
    border:         1px solid rgba(0,201,167,0.3);
}

/* Sidebar stat rows */
.vault-sidebar-stats {
    width:          100%;
    display:        flex;
    flex-direction: column;
    gap:            0.6rem;
    border-top:     1px solid #162030;
    padding-top:    1rem;
}

.vault-stat-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    gap:             0.5rem;
}

.vault-stat-key {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.55rem;
    letter-spacing: 0.18em;
    color:          rgba(139, 164, 192, 0.38);
    text-transform: uppercase;
    white-space:    nowrap;
}

.vault-stat-val {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.7rem;
    letter-spacing: 0.06em;
    color:          #8ba4c0;
    text-align:     right;
}

.vault-credits-val {
    color: #f5c842;
    display: flex;
    align-items: center;
    gap: 0.25em;
}
.vault-credits-diamond {
    font-size: 0.6em;
    opacity:   0.8;
}

.vault-stat--status-pending  { color: #f5c842; }
.vault-stat--status-approved { color: #00e676; }
.vault-stat--status-rejected { color: #e05555; }

/* Agent ID */
.vault-agent-id-block {
    width:          100%;
    border-top:     1px solid #162030;
    padding-top:    1rem;
}

.vault-agent-id-label {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.5rem;
    letter-spacing: 0.22em;
    color:          rgba(139, 164, 192, 0.35);
    text-transform: uppercase;
    margin:         0 0 0.35rem;
}

.vault-agent-id {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.75rem;
    letter-spacing: 0.12em;
    color:          rgba(0, 201, 167, 0.7);
    word-break:     break-all;
    margin:         0;
}

/* ── Dossier main panel ───────────────────────────────────────────────────── */

.vault-panel {
    display:        flex;
    flex-direction: column;
    gap:            1.25rem;
}

.vault-section {
    background:    #0b1424;
    border:        1px solid #1a2e4a;
    border-radius: 4px;
    padding:       1.6rem 1.75rem;
    display:       flex;
    flex-direction: column;
    gap:           1.1rem;
}

.vault-section-header {
    display:         flex;
    align-items:     baseline;
    justify-content: space-between;
    gap:             1rem;
    padding-bottom:  0.85rem;
    border-bottom:   1px solid #162030;
}

.vault-section-title {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.58rem;
    letter-spacing: 0.24em;
    color:          rgba(139, 164, 192, 0.4);
    text-transform: uppercase;
    margin:         0;
}

/* Field rows */
.vault-field-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   1rem;
}

.vault-field {
    display:        flex;
    flex-direction: column;
    gap:            0.35rem;
}

.vault-field--full { grid-column: 1 / -1; }

.vault-field label {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.56rem;
    letter-spacing: 0.18em;
    color:          rgba(139, 164, 192, 0.45);
    text-transform: uppercase;
}

.vault-input {
    background:     #07101f;
    border:         1px solid #1a2e4a;
    border-radius:  2px;
    color:          #c8d8f0;
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.8rem;
    letter-spacing: 0.04em;
    padding:        0.5em 0.75em;
    width:          100%;
    transition:     border-color 0.15s, box-shadow 0.15s;
}
.vault-input:focus {
    outline:      none;
    border-color: rgba(0, 201, 167, 0.45);
    box-shadow:   0 0 0 2px rgba(0, 201, 167, 0.07);
}
.vault-input::placeholder { color: rgba(139, 164, 192, 0.2); }
.vault-input[readonly] {
    color:   rgba(139, 164, 192, 0.35);
    cursor:  not-allowed;
    opacity: 0.7;
}

.vault-textarea {
    resize:     vertical;
    min-height: 80px;
    max-height: 180px;
}

.vault-field-hint {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.55rem;
    letter-spacing: 0.08em;
    color:          rgba(139, 164, 192, 0.3);
}

/* Save row */
.vault-save-row {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             1rem;
    flex-wrap:       wrap;
}

.vault-save-btn {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.65rem;
    letter-spacing: 0.16em;
    padding:        0.5rem 1.6rem;
    border:         1px solid rgba(0, 201, 167, 0.4);
    background:     rgba(0, 201, 167, 0.07);
    color:          #00c9a7;
    cursor:         pointer;
    border-radius:  2px;
    text-transform: uppercase;
    transition:     background 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space:    nowrap;
}
.vault-save-btn:hover {
    background:   rgba(0, 201, 167, 0.15);
    border-color: #00c9a7;
    box-shadow:   0 0 12px rgba(0, 201, 167, 0.18);
}
.vault-save-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.vault-feedback {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.6rem;
    letter-spacing: 0.08em;
    padding:        0.3em 0.65em;
    border-radius:  2px;
    display:        none;
}
.vault-feedback--ok  { color: #00c9a7; background: rgba(0,201,167,0.08); border: 1px solid rgba(0,201,167,0.22); display: inline-block; }
.vault-feedback--err { color: #e05555; background: rgba(224,85,85,0.08); border: 1px solid rgba(224,85,85,0.22); display: inline-block; }

/* ── Credits section ──────────────────────────────────────────────────────── */

.vault-credits-panel {
    display:     flex;
    align-items: center;
    gap:         1.5rem;
    flex-wrap:   wrap;
}

.vault-credits-big {
    display:     flex;
    align-items: baseline;
    gap:         0.3em;
}

.vault-credits-num {
    font-family:    'Share Tech Mono', monospace;
    font-size:      2.2rem;
    letter-spacing: 0.04em;
    color:          #f5c842;
    line-height:    1;
    text-shadow:    0 0 20px rgba(245,200,66,0.18);
}

.vault-credits-sym {
    font-size: 1rem;
    color:     rgba(245,200,66,0.6);
}

.vault-credits-meta {
    display:        flex;
    flex-direction: column;
    gap:            0.2rem;
}

.vault-credits-meta-label {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.55rem;
    letter-spacing: 0.18em;
    color:          rgba(139,164,192,0.38);
    text-transform: uppercase;
}

.vault-buy-btn {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.62rem;
    letter-spacing: 0.14em;
    padding:        0.45rem 1.2rem;
    border:         1px solid rgba(245,200,66,0.38);
    background:     rgba(245,200,66,0.06);
    color:          #f5c842;
    cursor:         pointer;
    border-radius:  2px;
    text-transform: uppercase;
    transition:     background 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space:    nowrap;
}
.vault-buy-btn:hover {
    background:   rgba(245,200,66,0.13);
    border-color: #f5c842;
    box-shadow:   0 0 14px rgba(245,200,66,0.15);
}

/* Credit history */
.vault-history {
    border-top:  1px solid #162030;
    padding-top: 1rem;
}

.vault-history-empty {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.62rem;
    letter-spacing: 0.1em;
    color:          rgba(139,164,192,0.28);
    text-align:     center;
    padding:        0.6rem 0;
}

.vault-history-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         0.45rem 0;
    border-bottom:   1px solid rgba(22,32,48,0.8);
    gap:             0.75rem;
}
.vault-history-row:last-child { border-bottom: none; }

.vault-history-date {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.58rem;
    letter-spacing: 0.06em;
    color:          rgba(139,164,192,0.32);
    white-space:    nowrap;
    flex-shrink:    0;
}
.vault-history-desc {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.62rem;
    letter-spacing: 0.06em;
    color:          #8ba4c0;
    flex:           1;
    min-width:      0;
    overflow:       hidden;
    text-overflow:  ellipsis;
    white-space:    nowrap;
}
.vault-history-delta {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.68rem;
    letter-spacing: 0.04em;
    white-space:    nowrap;
    flex-shrink:    0;
}
.vault-history-delta--pos { color: #00c9a7; }
.vault-history-delta--neg { color: #e05555; }

/* ── Buy credits modal ────────────────────────────────────────────────────── */

.vault-buy-overlay {
    position:        fixed;
    inset:           0;
    background:      rgba(4, 8, 18, 0.88);
    z-index:         9200;
    display:         flex;
    align-items:     center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.vault-buy-modal {
    background:    #0b1424;
    border:        1px solid #1a2e4a;
    border-radius: 4px;
    width:         min(380px, 90vw);
    padding:       2.2rem;
    text-align:    center;
    font-family:   'Share Tech Mono', monospace;
    box-shadow:    0 0 40px rgba(0,201,167,0.07);
}

.vault-buy-modal-icon {
    font-size:     2rem;
    color:         rgba(0,201,167,0.28);
    margin-bottom: 1rem;
}

.vault-buy-modal-title {
    font-size:      0.8rem;
    letter-spacing: 0.2em;
    color:          #00c9a7;
    margin-bottom:  0.75rem;
}

.vault-buy-modal-body {
    color:          rgba(139,164,192,0.55);
    font-size:      0.66rem;
    line-height:    1.9;
    letter-spacing: 0.06em;
    margin-bottom:  1.8rem;
}

.vault-buy-modal-close {
    background:     transparent;
    border:         1px solid #1a2e4a;
    border-radius:  2px;
    color:          rgba(139,164,192,0.45);
    cursor:         pointer;
    font-family:    inherit;
    font-size:      0.62rem;
    letter-spacing: 0.14em;
    padding:        0.4em 1.4em;
    text-transform: uppercase;
    transition:     color 0.15s, border-color 0.15s;
}
.vault-buy-modal-close:hover { color: #8ba4c0; border-color: #243850; }

/* ── Registered date footer in sidebar ───────────────────────────────────── */

.vault-sidebar-reg {
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.52rem;
    letter-spacing: 0.12em;
    color:          rgba(139,164,192,0.28);
    text-align:     center;
    padding-top:    0.5rem;
    border-top:     1px solid #162030;
    width:          100%;
}

/* ── Share card button ────────────────────────────────────────────────────── */

.vault-share-btn {
    width:          100%;
    font-family:    'Share Tech Mono', monospace;
    font-size:      0.6rem;
    letter-spacing: 0.12em;
    padding:        0.55rem 1rem;
    border:         1px solid rgba(0, 201, 167, 0.3);
    background:     rgba(0, 201, 167, 0.06);
    color:          #00c9a7;
    cursor:         pointer;
    border-radius:  3px;
    text-transform: uppercase;
    transition:     background 0.2s, border-color 0.2s, box-shadow 0.2s;
    margin-top:     0.5rem;
}
.vault-share-btn:hover {
    background:   rgba(0, 201, 167, 0.14);
    border-color: #00c9a7;
    box-shadow:   0 0 14px rgba(0, 201, 167, 0.18);
}
.vault-share-btn:active {
    background: rgba(0, 201, 167, 0.22);
}

/* ── Mobile responsive ────────────────────────────────────────────────────── */

@media (max-width: 720px) {
    .vault-dossier {
        grid-template-columns: 1fr;
        padding: 1rem 0.75rem 3rem;
        gap: 1rem;
    }

    .vault-main {
        align-items: flex-start;
    }

    .vault-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .vault-sidebar-card {
        flex: 1;
        min-width: 200px;
        padding: 1.2rem 1rem;
    }

    .vault-section { padding: 1.2rem 1.1rem; }
    .vault-field-grid { grid-template-columns: 1fr; }
    .vault-field--full { grid-column: 1; }
    .vault-topbar-title { display: none; }
}

@media (max-width: 420px) {
    .vault-sidebar { flex-direction: column; }
    .vault-sidebar-card { min-width: 0; width: 100%; }
    .vault-credits-panel { flex-direction: column; align-items: flex-start; }
}

/* ── Bio textarea ────────────────────────────────────────────────────────── */

.vault-textarea--bio {
    min-height: 5.5rem;
    resize: vertical;
    line-height: 1.5;
}

/* ── Badge wall ──────────────────────────────────────────────────────────── */

.vault-badge-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.vault-badge-card {
    background: #0f1a2e;
    border: 1px solid #1e3050;
    border-radius: 8px;
    padding: 0.9rem 0.7rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.vault-badge-card:hover {
    border-color: #00c9a7;
    box-shadow: 0 0 10px rgba(0, 201, 167, 0.15);
}

.vault-badge-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    line-height: 1;
}

.vault-badge-name {
    color: #f5c842;
    font-family: var(--font-hud, 'Orbitron', monospace);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.vault-badge-desc {
    color: #8ba4c0;
    font-size: 0.58rem;
    line-height: 1.35;
    margin-bottom: 0.3rem;
}

.vault-badge-date {
    color: #4a6a8a;
    font-size: 0.5rem;
    letter-spacing: 0.03em;
}

/* ── Activity feed ───────────────────────────────────────────────────────── */

.vault-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0.4rem;
}

.vault-activity-row {
    display: grid;
    grid-template-columns: 1.6rem 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.3rem;
    border-bottom: 1px solid rgba(30, 48, 80, 0.4);
    transition: background 0.15s;
}

.vault-activity-row:hover {
    background: rgba(0, 201, 167, 0.04);
}

.vault-activity-row:last-child {
    border-bottom: none;
}

.vault-activity-icon {
    font-size: 0.9rem;
    text-align: center;
    line-height: 1;
}

.vault-activity-desc {
    color: #8ba4c0;
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vault-activity-delta {
    font-family: var(--font-hud, 'Orbitron', monospace);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 3rem;
    text-align: right;
}

.vault-activity-date {
    color: #4a6a8a;
    font-size: 0.55rem;
    letter-spacing: 0.03em;
    min-width: 5rem;
    text-align: right;
}

/* ── Avatar gallery ──────────────────────────────────────────────────────── */

.vault-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
    padding-top: 0.5rem;
}

.vault-gallery-card {
    background: #0f1a2e;
    border: 1px solid #1e3050;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.vault-gallery-card:hover {
    border-color: #00c9a7;
    box-shadow: 0 0 12px rgba(0, 201, 167, 0.15);
}

.vault-gallery-card--active {
    border-color: #f5c842;
    box-shadow: 0 0 12px rgba(245, 200, 66, 0.2);
}

.vault-gallery-card--active::after {
    content: 'ACTIVE';
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: #f5c842;
    color: #090e1a;
    font-family: var(--font-hud, 'Orbitron', monospace);
    font-size: 0.45rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.06em;
}

.vault-gallery-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.vault-gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-top: 1px solid rgba(30, 48, 80, 0.4);
}

.vault-gallery-date {
    color: #4a6a8a;
    font-size: 0.5rem;
    letter-spacing: 0.03em;
}

.vault-gallery-platform {
    color: #00c9a7;
    font-family: var(--font-hud, 'Orbitron', monospace);
    font-size: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.vault-gallery-set-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(30, 48, 80, 0.4);
    color: #00c9a7;
    font-family: var(--font-hud, 'Orbitron', monospace);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.vault-gallery-set-btn:hover:not(:disabled) {
    background: rgba(0, 201, 167, 0.1);
}

.vault-gallery-set-btn:disabled {
    color: #4a6a8a;
    cursor: default;
}

/* ── Gallery + badge responsive ──────────────────────────────────────────── */

@media (max-width: 600px) {
    .vault-badge-wall {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .vault-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .vault-activity-row {
        grid-template-columns: 1.4rem 1fr auto;
    }
    .vault-activity-date {
        display: none;
    }
}
