/* ==========================================================================
   The Vault Stylesheet
   Self-contained: reset, layout, beacon-compatible header/footer/nav,
   theme-selector, matrix rain, and all vault component styles.
   Theme colors provided by vault-themes.css.
   ========================================================================== */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark, var(--accent)); }
img { max-width: 100%; height: auto; }

/* ── Layout ───────────────────────────────────────────────────── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Matrix Rain Canvas ───────────────────────────────────────── */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Logo ─────────────────────────────────────────────────────── */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.site-logo-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.site-logo-icon svg {
    width: 100%;
    height: 100%;
}

.site-logo-text {
    background: linear-gradient(135deg, var(--brand-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated logo for holo themes */
@keyframes holoShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

[data-theme="spectrum-holo"] .site-logo-text,
[data-theme="holographic"] .site-logo-text {
    background: var(--holo-gradient);
    background-size: 300% 300%;
    animation: holoShift 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-version {
    font-size: 0.75rem;
    color: var(--brand-primary);
    background: var(--brand-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* ── Navigation ───────────────────────────────────────────────── */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.main-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.main-nav a.active {
    background: var(--brand-light);
    color: var(--brand-primary);
    font-weight: 600;
}

/* Admin dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-dropdown-toggle.active {
    background: var(--brand-light);
    color: var(--brand-primary);
    font-weight: 600;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 180px;
    padding: 6px;
    z-index: 200;
    margin-top: 4px;
}

.nav-dropdown-menu.open { display: block; }

.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nav-dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Mobile nav toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* ── Theme Selector ───────────────────────────────────────────── */
.theme-selector {
    position: relative;
}

.theme-selector-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 9999px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.theme-selector-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--brand-primary);
}

.theme-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--holo-gradient);
    background-size: 300% 300%;
    animation: holoShift 3s linear infinite;
}

[data-theme="cyber-neon"] .theme-indicator {
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    animation: none;
}
[data-theme="neon-spectrum"] .theme-indicator {
    background: linear-gradient(135deg, #00ff88, #00ccff, #ff0066);
    animation: none;
}
[data-theme="terminal-gold"] .theme-indicator {
    background: linear-gradient(135deg, #f0b429, #2dd4bf);
    animation: none;
}

.theme-selector-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 220px;
    padding: 8px;
    margin-top: 8px;
    z-index: 200;
}

.theme-selector-menu.open { display: block; }

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: background 0.2s;
}

.theme-option:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.theme-option.active {
    color: var(--brand-primary);
    background: var(--brand-light);
}

.theme-swatch {
    display: flex;
    gap: 2px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-swatch span {
    width: 6px;
    height: 20px;
}

.theme-option-label {
    flex: 1;
    text-align: left;
}

.theme-option-check {
    opacity: 0;
    font-size: 0.75rem;
}

.theme-option.active .theme-option-check {
    opacity: 1;
}

/* ── User Badge ───────────────────────────────────────────────── */
.user-badge { position: relative; }

.user-badge-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 9999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-badge-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--brand-primary);
}

.user-badge-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--text-inverse, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.user-badge-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 200px;
    padding: 6px;
    margin-top: 8px;
    z-index: 200;
}

.user-badge-menu.open { display: block; }

.user-badge-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-badge-menu a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-badge-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success-light, rgba(16, 185, 129, 0.1));
    color: var(--brand-primary);
}

.badge-warning {
    background: var(--warning-light, rgba(245, 158, 11, 0.1));
    color: var(--warning);
}

.badge-info {
    background: var(--info-light, rgba(59, 130, 246, 0.1));
    color: var(--info);
}

/* ── Main Content ─────────────────────────────────────────────── */
main {
    flex: 1;
    position: relative;
    z-index: 1;
}

.main {
    padding: 2rem;
    max-width: none;
}

/* ── Page Header ──────────────────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--brand-primary);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 4px 0;
}
.footer-col a:hover { color: var(--brand-primary); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-light, var(--text-muted));
    margin-top: 8px;
}

/* ── Theme-Specific Header Effects ────────────────────────────── */
[data-theme="spectrum-holo"] .site-header,
[data-theme="holographic"] .site-header {
    border-bottom-color: transparent;
    background-image: linear-gradient(var(--bg-card, var(--bg-secondary)), var(--bg-card, var(--bg-secondary))),
                       var(--holo-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 300% 300%;
    animation: holoShift 4s linear infinite;
    border-bottom: 1px solid transparent;
}

[data-theme="cyber-neon"] .site-header {
    box-shadow: 0 2px 20px rgba(0,255,255,0.08);
}

[data-theme="terminal-gold"] .site-header {
    border-bottom-color: rgba(240,180,41,0.2);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
        z-index: 200;
    }
    .mobile-toggle { display: block; }

    .header-right .btn { display: none; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .theme-selector-menu { right: -40px; }
    .main { padding: 1rem; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ── Header Link (kept for fallback) ──────────────────────────── */
.header-link {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.header-link:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ==========================================================================
   Shared Hub Components
   ========================================================================== */

/* ---------- Alerts ---------- */
.alert {
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.alert-success {
    background: var(--success-light);
    border: 1px solid var(--success-light);
    color: var(--success);
}

.alert-error {
    background: var(--danger-light);
    border: 1px solid var(--danger-light);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning-light);
    color: var(--warning);
}

/* ---------- Section Headers ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ---------- Data Table ---------- */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* ---------- Form Elements ---------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-light);
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---------- Button Variants ---------- */
.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger-light);
}

.btn-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger);
}

/* ---------- Badge Variants ---------- */
.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* ---------- Text Utilities ---------- */
.text-muted {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ---------- User Display Components ---------- */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
}

.user-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.user-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.user-display .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* ---------- Empty States ---------- */
.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-state.empty-state-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ---------- Back Link ---------- */
.page-header-back {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--brand-primary);
}

/* ---------- Action Buttons Row ---------- */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ==========================================================================
   Dashboard Page
   ========================================================================== */

/* ---------- Dashboard Hero ---------- */
.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 1rem;
}

.dash-hero-left {
    min-width: 0;
}

.dash-hero-greeting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-hero-greeting svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.dash-hero-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.dash-hero-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.dash-hero-sep {
    margin: 0 0.25rem;
    opacity: 0.5;
}

.dash-hero-updated {
    font-size: 0.75rem;
    opacity: 0.7;
}

.dash-hero-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.dash-hero-secondary {
    text-align: right;
}

.dash-hero-secondary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.2;
}

.dash-hero-secondary-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.125rem;
}

/* Alert stat (e.g. active proposals > 0) */
.dash-stat-alert {
    color: var(--warning) !important;
}

/* Section divider between System / Your Wallets / System Data */
.dash-section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

.dash-section-divider span {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
}

.dash-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

@media (max-width: 640px) {
    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    .dash-hero-right {
        width: 100%;
        justify-content: space-between;
    }
    .dash-hero-value {
        font-size: 1.625rem;
    }
}

/* ---------- Legacy Setup (retained) ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.setup-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    grid-column: 1 / -1;
}

.setup-card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.setup-subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    padding: 0.375rem 0;
}

.check-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.check-done { color: var(--success); }
.check-pending { color: var(--text-muted); opacity: 0.4; }

.checklist li.done { color: var(--text-secondary); }
.checklist li.pending { color: var(--text-muted); opacity: 0.6; }

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.status-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.status-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.status-card .value.pending {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.quick-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-link.primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
}
.quick-link.primary:hover { opacity: 0.9; }

.quick-link.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.quick-link.secondary:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

@media (max-width: 640px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .checklist { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Wallets List Page
   ========================================================================== */

/* ---------- Shared Filter Bar (unified search + group badges) ---------- */
.hub-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.hub-search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 420px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hub-search-field:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-light);
}

.hub-search-field svg {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.6;
}

.hub-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.hub-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.hub-filter-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.hub-groups-manage-btn {
    margin-left: 0.25rem;
}

@media (max-width: 640px) {
    .hub-filter-bar {
        gap: 0.5rem;
    }
    .hub-search-field {
        flex: 1 1 100%;
        max-width: none;
    }
}

.wallet-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.summary-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.summary-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.wallet-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0.5rem 1rem;
    align-items: center;
    position: relative;
    transition: border-color 0.2s;
}

.wallet-card:hover {
    border-color: var(--brand-light);
}

.wallet-card-link {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 12px;
}

.wallet-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    grid-row: 1;
    grid-column: 1;
}

.wallet-info {
    min-width: 0;
    grid-row: 1;
    grid-column: 2;
}

.wallet-label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.system-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--brand-light);
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wallet-address {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: monospace;
}

.wallet-address a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.wallet-address a:hover {
    color: var(--brand-primary);
}

.wallet-address .copy-addr-btn {
    position: relative;
    z-index: 1;
}

.wallet-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    grid-row: 1;
    grid-column: 3;
}

.wallet-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    grid-row: 3;
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .wallet-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .wallet-summary { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .wallet-card {
        grid-template-columns: auto 1fr auto;
    }
    .wallet-tokens { flex-wrap: wrap; }
    .wallet-token-spacer { flex-basis: 100%; height: 0; }
}

/* ---------- View Toggle ---------- */
.wallet-view-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-view-toggle .toggle-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.wallet-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    font-family: inherit;
}

.wallet-view-btn:hover {
    border-color: var(--brand-light);
    color: var(--text-secondary);
}

.wallet-view-btn.active {
    background: var(--brand-light);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ---------- Compact Card Grid ---------- */
.wallet-grid.compact-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    flex-direction: unset;
}

.compact-grid .wallet-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.875rem;
    grid-template-columns: unset;
    grid-template-rows: unset;
    gap: 0;
    cursor: pointer;
}

.compact-grid .wallet-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
}

/* All interactive children must beat the card link z-index */
.compact-grid .wallet-card-icon,
.compact-grid .wallet-card-name,
.compact-grid .wallet-card-addr,
.compact-grid .wallet-card-balances {
    position: relative;
    z-index: 2;
    pointer-events: none;          /* pass clicks through to the link */
}

.compact-grid .wallet-card-tokens-trigger {
    pointer-events: auto;          /* this one IS interactive (tooltip) */
}

.compact-grid .wallet-card-actions {
    pointer-events: auto;          /* actions are interactive */
}

.compact-grid .wallet-card-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

.compact-grid .wallet-card-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    min-width: 0;
}

.compact-grid .wallet-card-name span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Group color dots on cards and table rows */
.wallet-card-groups {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.wallet-card-group-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.compact-grid .wallet-card-addr {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    margin-bottom: 0.375rem;
}

.compact-grid .wallet-card-tokens-trigger {
    font-size: 0.6875rem;
    color: var(--text-muted);
    border-bottom: 1px dotted var(--text-muted);
    cursor: pointer;
    position: relative;
    z-index: 3;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.compact-grid .wallet-card-tokens-trigger:hover {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

.compact-grid .wallet-card-tooltip-data {
    display: none;
}

.compact-grid .wallet-card-balances {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.compact-grid .wallet-card-sol {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.compact-grid .wallet-card-total {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fdba74;
    font-family: monospace;
}

.compact-grid .wallet-card-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 4;
}

.compact-grid .wallet-card:hover .wallet-card-actions {
    opacity: 1;
}

.compact-grid .wallet-card-actions .btn-sm {
    padding: 0.25rem;
    min-width: 0;
    background: var(--bg-secondary);
    border-color: var(--border);
}

.compact-grid .wallet-card-actions .btn-sm:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Compact grid pagination */
.compact-grid .hub-pagination {
    grid-column: 1 / -1;
}

/* ---------- Compact Grid Responsive ---------- */
@media (max-width: 1399px) and (min-width: 1024px) {
    .wallet-grid.compact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1023px) and (min-width: 769px) {
    .wallet-grid.compact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .wallet-grid.compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wallet-grid.compact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .compact-grid .wallet-card-actions {
        opacity: 1;
    }
}

/* ---------- Token Tooltip ---------- */
.wallet-token-tooltip {
    position: fixed;
    z-index: 10001;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    max-width: 320px;
    padding: 0.75rem;
    display: none;
    pointer-events: auto;
}

.wallet-token-tooltip.visible {
    display: block;
}

.wallet-token-tooltip-title {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border);
}

.wallet-token-tooltip .wallet-token-chip {
    margin-bottom: 0.25rem;
}

/* ---------- Table View ---------- */
.wallet-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.wallet-table-container .data-table td {
    font-size: 0.8125rem;
}

.wallet-table-name {
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.wallet-table-name:hover {
    color: var(--brand-primary);
}

.wallet-table-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.wallet-table-actions form {
    display: inline;
}

.token-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-secondary);
    margin-right: 0.25rem;
    margin-bottom: 0.125rem;
}

.token-badge-inline.sol {
    background: rgba(153, 69, 255, 0.1);
    color: #b794f6;
}

.token-badge-inline.usdc {
    background: rgba(39, 117, 202, 0.1);
    color: #63b3ed;
}

.token-badge-inline.dao {
    background: var(--brand-light);
    color: #fdba74;
}

.wallet-table-more {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   DAO Registry Page
   ========================================================================== */

.dao-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dao-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dao-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    overflow: hidden;
}

.dao-info {
    flex: 1;
    min-width: 200px;
}

.dao-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.dao-address {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dao-address a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.dao-address a:hover {
    color: var(--brand-primary);
}

.dao-description {
    width: 100%;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: -0.25rem;
}

.dao-details {
    width: 100%;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dao-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.dao-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dao-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Clickable DAO cards */
.dao-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
}

.dao-card-link:hover {
    border-color: var(--brand-primary);
    transform: translateY(-1px);
}

/* Live stats in DAO cards */
.dao-live-stats {
    width: 100%;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dao-live-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.dao-live-stat.treasury { color: var(--success); }
.dao-live-stat.synced { color: var(--brand-primary); }

.section-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 640px) {
    .dao-card { flex-direction: column; align-items: flex-start; }
    .dao-actions { width: 100%; }
}

/* ==========================================================================
   DAO Detail View Page
   ========================================================================== */

.dao-view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dao-view-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.dao-view-title {
    flex: 1;
    min-width: 0;
}

.dao-view-title h1 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dao-view-subtitle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.dao-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--brand-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}
.dao-view-link:hover { opacity: 0.8; }

.dao-view-addr {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-muted);
}

.dao-view-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--warning-light);
    color: var(--warning);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dao-view-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dao-view-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Stats Row */
.dao-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.dao-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.dao-stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.dao-stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Sync Status */
.sync-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    text-align: center;
}
.sync-status.syncing { color: var(--warning); }
.sync-status.synced { color: var(--success); }
.sync-status.error { color: var(--danger); }

/* Cards */
.dao-view-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.dao-view-card-header {
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.dao-view-card-header:hover {
    background: var(--bg-hover);
}

.dao-view-card-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}
.dao-view-card-count.active {
    background: var(--success-light);
    color: var(--success);
}

.dao-view-card-header .collapsible-chevron {
    margin-left: auto;
    transition: transform 0.2s;
    color: var(--text-muted);
}
.dao-view-card-header.expanded .collapsible-chevron {
    transform: rotate(180deg);
}

/* Collapsible card body states */
.dao-view-card > .collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 !important;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.dao-view-card > .expanded,
.dao-view-card > div:not(.collapsed):not(.dao-view-card-header) {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.dao-view-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}
.dao-view-empty a { color: var(--brand-primary); text-decoration: none; }
.dao-view-empty a:hover { text-decoration: underline; }

/* Treasury Table */
.treasury-table td, .treasury-table th {
    padding: 0.625rem 1.25rem;
}

.mono-link {
    font-family: monospace;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.mono-link:hover { color: var(--brand-primary); }

.token-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}
.token-badge.sol {
    background: rgba(153, 69, 255, 0.1);
    color: #9945ff;
}
.token-badge.usdc {
    background: rgba(39, 117, 202, 0.1);
    color: #2775ca;
}
.token-badge.dao {
    background: var(--brand-light);
    color: #fdba74;
    text-decoration: none;
}
a.token-badge.dao:hover {
    color: var(--brand-primary);
}
.token-badge.verified {
    border: 1px solid rgba(139, 245, 230, 0.3);
    background: rgba(139, 245, 230, 0.08);
}
.token-display {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.token-display-logo {
    border-radius: 4px;
    flex-shrink: 0;
}

/* Hub Pagination */
.hub-per-page {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.hub-per-page select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

.hub-total-label {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.hub-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
}

.hub-pagination:empty { display: none; }

.hub-pagination button {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    min-width: 28px;
}

.hub-pagination button:hover:not(:disabled) { border-color: var(--brand-primary); color: var(--text-primary); }
.hub-pagination button.active { background: var(--brand-light); border-color: var(--brand-primary); color: var(--brand-primary); font-weight: 600; }
.hub-pagination button:disabled { opacity: 0.3; cursor: default; }

.hub-pagination .pagination-ellipsis {
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: default;
    user-select: none;
}

.hub-per-page ~ .collapsible-chevron {
    margin-left: 0.5rem;
}

[data-paginated] .hidden { display: none; }

/* Proposal Feed */
.proposal-feed {
    padding: 0;
}

.proposal-item {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.proposal-item:last-child { border-bottom: none; }

.proposal-item.compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
}

.proposal-item-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.proposal-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.proposal-item-name:hover { color: var(--brand-primary); }

.proposal-item-votes {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.proposal-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.proposal-state-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.state-0 { background: var(--bg-tertiary); color: var(--text-muted); }           /* Draft */
.state-1 { background: var(--warning-light); color: var(--warning); }              /* SigningOff */
.state-2 { background: var(--info-light); color: var(--info); }              /* Voting */
.state-3 { background: var(--success-light); color: var(--success); }               /* Succeeded */
.state-4 { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }              /* Executing */
.state-5 { background: var(--success-light); color: var(--success); opacity: 0.7; }  /* Completed */
.state-6 { background: rgba(107, 114, 128, 0.1); color: #6b7280; }             /* Cancelled */
.state-7 { background: var(--danger-light); color: var(--danger); }               /* Defeated */
.state-8 { background: var(--warning-light); color: var(--warning); }              /* ExecWithErrors */
.state-9 { background: var(--danger-light); color: var(--danger); opacity: 0.8; }  /* Vetoed */

/* Vote Bar */
.vote-bar-container {
    margin-top: 0.25rem;
}

.vote-bar {
    height: 6px;
    background: var(--danger-light);
    border-radius: 3px;
    overflow: hidden;
}

.vote-bar-yes {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.vote-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
}
.vote-yes { color: var(--success); }
.vote-no { color: var(--danger); }

/* Membership Cards */
.membership-list {
    padding: 0;
}

.membership-card {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.membership-card:last-child { border-bottom: none; }

.membership-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.membership-card-link:hover {
    background: var(--bg-hover);
}

.membership-card-link:hover strong {
    color: var(--brand-primary);
}

.membership-wallet {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
}

.membership-wallet strong {
    font-size: 0.875rem;
}

.membership-details {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.membership-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .dao-view-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .dao-view-actions {
        width: 100%;
    }
    .dao-view-actions .btn {
        flex: 1;
        justify-content: center;
    }
    .dao-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dao-stats-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Wallet Edit Page
   ========================================================================== */

.we-back {
    margin-bottom: 1.5rem;
}

.we-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.we-back a:hover { color: var(--brand-primary); }

/* Page hero */
.we-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.we-hero-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.we-hero-text h1 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.we-hero-text p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Wallet summary card (edit mode) */
.we-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.we-summary-address {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.we-summary-address-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.we-summary-address-value {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.5;
}

.we-summary-address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.we-summary-address-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--brand-primary);
    text-decoration: none;
    padding: 0.25rem 0.625rem;
    background: var(--brand-light);
    border-radius: 6px;
    transition: background 0.2s;
}

.we-summary-address-actions a:hover {
    background: var(--brand-light);
}

.we-summary-balances {
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
}

.we-bal {
    text-align: center;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    min-width: 100px;
}

.we-bal-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.we-bal-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.we-bal-value.sol { color: #9945ff; }
.we-bal-value.usdc { color: #2775ca; }

.we-summary-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.we-system-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--brand-light);
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alert */
.we-alert {
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.we-alert-error {
    background: var(--danger-light);
    border: 1px solid var(--danger-light);
    color: var(--danger);
}

.we-alert-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Form card */
.we-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 640px;
    overflow: hidden;
}

.we-form-header {
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.we-form-header-icon {
    width: 28px;
    height: 28px;
    background: var(--brand-light);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
}

.we-form-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.we-form-body {
    padding: 1.5rem;
}

/* Form fields */
.we-field {
    margin-bottom: 1.25rem;
}

.we-field:last-of-type {
    margin-bottom: 0;
}

.we-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.we-label .optional {
    font-weight: 400;
    color: var(--text-muted);
}

.we-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.we-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-light);
}

.we-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.we-input.mono {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

textarea.we-input {
    resize: vertical;
    min-height: 80px;
}

.we-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Address display (edit mode) */
.we-address-readonly {
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.5;
}

/* Checkbox toggle */
.we-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.we-toggle:hover {
    border-color: var(--brand-light);
    background: var(--bg-hover);
}

.we-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.we-toggle-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.we-toggle-title {
    font-size: 0.875rem;
    font-weight: 500;
}

.we-toggle-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Form footer */
.we-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(26, 26, 36, 0.5);
}

.we-form-footer-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.we-form-actions {
    display: flex;
    gap: 0.625rem;
}

@media (max-width: 640px) {
    .we-summary {
        grid-template-columns: 1fr;
    }

    .we-summary-balances {
        justify-content: stretch;
    }

    .we-bal {
        flex: 1;
    }

    .we-form-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .we-form-actions {
        width: 100%;
    }

    .we-form-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   Admin Dashboard Page
   ========================================================================== */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.stat-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
    transition: opacity 0.2s;
}

.quick-action:hover { opacity: 0.9; }

.quick-action.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.quick-action.secondary:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.activity-card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.activity-icon.user { background: var(--info-light); color: var(--info); }
.activity-icon.wallet { background: var(--brand-light); color: var(--brand-primary); }
.activity-icon.system { background: var(--success-light); color: var(--success); }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-action {
    font-weight: 500;
    color: var(--text-primary);
}

.activity-user {
    color: var(--text-muted);
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.empty-activity {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .admin-stats { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Admin Users Page
   ========================================================================== */

.permission-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.perm-tag {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.perm-wallets {
    background: var(--brand-light);
    color: var(--brand-primary);
}

.perm-daos {
    background: var(--info-light);
    color: var(--info);
}

.perm-settings {
    background: var(--warning-light);
    color: var(--warning);
}

.available-users {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.available-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.available-user .user-cell {
    flex: 1;
}

.available-user .badge {
    flex-shrink: 0;
}

/* ==========================================================================
   Admin User Edit Page
   ========================================================================== */

.permissions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.permission-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.permission-checkbox:hover {
    background: var(--bg-secondary);
}

.permission-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-content {
    display: flex;
    flex-direction: column;
}

.checkbox-title {
    font-weight: 500;
}

.checkbox-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Proposals Page
   ========================================================================== */

.page-header h1.gradient-title {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.proposal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s;
}
.proposal-card:hover { border-color: var(--brand-primary); }

.proposal-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.proposal-version {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-primary);
    background: var(--brand-light);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
}

.proposal-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}
.status-discussion { background: var(--info-light); color: var(--info); }
.status-pending { background: var(--warning-light); color: var(--warning); }
.status-approved { background: var(--success-light); color: var(--success); }
.status-implemented { background: var(--info-light); color: var(--info); }

.proposal-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.proposal-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.proposal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proposal-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.proposal-actions {
    display: flex;
    gap: 0.75rem;
}

.proposal-actions a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--brand-primary);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--brand-light);
    border-radius: 6px;
    transition: all 0.2s;
}
.proposal-actions a:hover {
    background: var(--brand-light);
    border-color: var(--brand-primary);
}

.log-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    display: none;
}
.log-card.visible { display: block; }
.log-card pre {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.7;
    margin: 0;
}

/* ==========================================================================
   Portfolio Page
   ========================================================================== */

.portfolio-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.portfolio-hero-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portfolio-hero-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.portfolio-hero h1 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.portfolio-hero p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Per-wallet sections inside the wallet holdings card */
.portfolio-wallet-section {
    border-bottom: 1px solid var(--border);
}
.portfolio-wallet-section:last-child {
    border-bottom: none;
}

.portfolio-wallet-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.portfolio-wallet-header:hover {
    background: var(--bg-hover);
}

.portfolio-wallet-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.portfolio-wallet-info strong {
    font-size: 0.875rem;
}

.portfolio-wallet-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.portfolio-wallet-header .collapsible-chevron {
    transition: transform 0.2s;
    color: var(--text-muted);
    flex-shrink: 0;
}
.portfolio-wallet-header.expanded .collapsible-chevron {
    transform: rotate(180deg);
}

/* Collapsible wallet bodies inside the wallets card */
.portfolio-wallet-section > .collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.portfolio-wallet-section > .expanded,
.portfolio-wallet-section > div:not(.collapsed):not(.portfolio-wallet-header) {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

/* DAO membership groups */
.portfolio-dao-group {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.portfolio-dao-group:last-child {
    border-bottom: none;
}

.portfolio-dao-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-dao-link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}
.portfolio-dao-link:hover {
    color: var(--brand-primary);
}

.portfolio-members-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.75rem;
}

.portfolio-member-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.portfolio-member-role {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.0625rem 0.375rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.portfolio-member-role.council {
    background: var(--warning-light);
    color: var(--warning);
}
.portfolio-member-role.community {
    background: var(--info-light);
    color: var(--info);
}

/* Proposal DAO label */
.portfolio-proposal-dao {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--brand-light);
    color: var(--brand-primary);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .portfolio-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .dao-stats-row[style] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .portfolio-wallet-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* DAO Deposit Badges (portfolio) */
.dao-deposit-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.0625rem 0.375rem;
    border-radius: 3px;
    background: var(--brand-light);
    color: var(--brand-primary);
    margin-left: 0.375rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dao-deposit-row {
    background: var(--bg-hover);
}

.holding-breakdown {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.holding-breakdown span {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .dao-stats-row[style] {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Copy Address Module
   ========================================================================== */

.copy-addr-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.copy-addr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.125rem;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    flex-shrink: 0;
    vertical-align: middle;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
}

.copy-addr-btn:hover {
    opacity: 1;
    color: var(--brand-primary);
}

.copy-addr-btn.copied {
    color: var(--success);
    opacity: 1;
}

/* ==========================================================================
   Wallet Card Token Chips
   ========================================================================== */

.wallet-tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    grid-row: 2;
    grid-column: 1 / -1;
    padding-top: 0.375rem;
}

.wallet-token-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.8125rem;
}

.wallet-token-chip .token-badge {
    font-size: 0.6875rem;
}

.wallet-token-chip .token-badge.sol {
    background: rgba(153, 69, 255, 0.15);
    color: #b794f6;
}

.wallet-token-chip .token-badge.usdc {
    background: rgba(39, 117, 202, 0.15);
    color: #63b3ed;
}

.wallet-token-chip .token-display-logo {
    width: 14px;
    height: 14px;
}

.wallet-token-value {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.75rem;
}

.wallet-token-chip.locked {
    border: 1px solid var(--warning-light);
    background: var(--warning-light);
}

.wallet-token-chip.locked svg {
    color: var(--warning);
    flex-shrink: 0;
}

.wallet-token-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.wallet-token-spacer {
    flex: 1;
}

.wallet-updated {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    align-self: center;
}

.wallet-total-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--brand-light);
    border: 1px solid var(--brand-light);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fdba74;
    white-space: nowrap;
}

/* ==========================================================================
   Wallet Detail View
   ========================================================================== */

.wv-price-change {
    font-family: monospace;
    font-size: 0.8125rem;
}

.wv-price-change.positive {
    color: var(--success);
}

.wv-price-change.negative {
    color: var(--danger);
}

.wv-price-change.neutral {
    color: var(--text-muted);
}

.wv-locked-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: var(--warning-light);
    color: var(--warning);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wv-dex-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--brand-primary);
    text-decoration: none;
}

.wv-dex-link:hover {
    opacity: 0.8;
}

/* Unpriced tokens sub-card (inside Token Holdings) */
.wv-unpriced-card {
    margin: 0.75rem 0 0.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.wv-unpriced-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.wv-unpriced-header .hub-total-label {
    font-weight: 400;
}

.wv-unpriced-header .collapsible-chevron {
    margin-left: auto;
}

.wv-unpriced-card > .collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.wv-unpriced-card > .expanded {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.wv-unpriced-card .data-table th {
    font-size: 0.75rem;
}

.wv-unpriced-card .data-table td {
    font-size: 0.8125rem;
}

/* ==========================================================================
   Hub Modal System
   ========================================================================== */

.hub-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.hub-modal-overlay.active {
    display: flex;
}

.hub-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.hub-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.hub-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.hub-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.hub-modal-close:hover {
    color: var(--text-primary);
}

.hub-modal-body {
    padding: 1.5rem;
}

.hub-modal-footer {
    display: flex;
    gap: 0.625rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Wallet Tracker Page
   ========================================================================== */

/* Tracker summary row — reuses wallet-summary grid */
.tracker-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Clickable tracker wallet rows in the table */
.tracker-wallet-row {
    cursor: pointer;
    transition: background 0.15s;
}

.tracker-wallet-row:hover {
    background: var(--bg-hover) !important;
}

.tracker-wallet-row.tracker-row-active {
    background: var(--bg-hover);
    border-left: 3px solid var(--brand-primary);
}

.tracker-wallet-row.tracker-row-active td:first-child {
    padding-left: calc(1rem - 3px);
}

/* Detail card that expands below card/table view when a wallet is clicked */
.tracker-detail-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--brand-light);
    border-radius: 8px;
    margin: 0.75rem 0;
    overflow: hidden;
}

.tracker-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--brand-light);
}

.tracker-detail-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.tracker-detail-label {
    font-weight: 600;
    font-size: 0.9375rem;
}

.tracker-detail-address {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
}

.tracker-detail-body {
    padding: 0;
}

/* Nested transactions sub-card */
.tracker-tx-card {
    margin: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.tracker-tx-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.tracker-tx-header .collapsible-chevron {
    margin-left: auto;
}

.tracker-tx-card > .collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

.tracker-tx-card > .expanded {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

/* Status badges for transactions */
.tx-status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tx-status-badge.success {
    background: var(--success-light);
    color: var(--success);
}

.tx-status-badge.error {
    background: var(--danger-light);
    color: var(--danger);
}

@media (max-width: 640px) {
    .tracker-summary {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Wallet Tracker Groups
   ========================================================================== */

/* Group badges bar between filters and summary */
.tracker-groups {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tracker-group-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.tracker-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
    background: none;
    font-family: inherit;
    line-height: 1.4;
}

.tracker-group-badge:hover {
    opacity: 0.85;
}

.tracker-group-badge.active {
    border-color: currentColor;
    box-shadow: 0 0 0 2px currentColor;
}

.tracker-group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tracker-group-count {
    font-size: 0.6875rem;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 0.125rem;
}

.tracker-groups-manage {
    flex-shrink: 0;
}

/* Color picker grid (used in manage modal) */
.group-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.group-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    padding: 0;
    background: none;
    font-size: 0;
}

.group-color-swatch:hover {
    transform: scale(1.15);
}

.group-color-swatch.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px currentColor;
}

/* Wrapper for preset swatches + custom color row */
.group-color-picker-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Custom color row */
.group-custom-color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-custom-color-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.group-color-input {
    width: 32px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: none;
    cursor: pointer;
    padding: 1px;
}

.group-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.group-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.group-color-input::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Manage groups modal list */
.manage-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.manage-group-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.manage-group-row .tracker-group-dot {
    width: 10px;
    height: 10px;
}

.manage-group-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manage-group-wallet-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.manage-group-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

/* Inline edit state in manage modal */
.manage-group-edit-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.manage-group-edit-form input {
    flex: 1;
    padding: 0.375rem 0.625rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.manage-group-edit-form input:focus {
    border-color: var(--brand-primary);
}

/* Group checkboxes in edit wallet modal */
.edit-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.edit-group-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.edit-group-item:hover {
    background: var(--bg-hover);
}

.edit-group-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.edit-group-item-label {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Create group inline form in manage modal */
.manage-create-form {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.manage-create-form .we-field {
    margin-bottom: 0;
}

.manage-create-top {
    display: flex;
    align-items: flex-end;
    gap: 0.625rem;
}

.manage-create-name {
    flex: 1;
    min-width: 0;
}

/* Checkbox column in tracker table */
.tracker-cb-col {
    width: 36px;
    text-align: center;
    padding-left: 0.5rem !important;
    padding-right: 0 !important;
}

.tracker-cb-col input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    vertical-align: middle;
}

/* Bulk action bar */
.tracker-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--brand-light);
}

.tracker-bulk-left {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--brand-primary);
    white-space: nowrap;
}

.tracker-bulk-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tracker-bulk-select {
    padding: 0.35rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    min-width: 140px;
}

.tracker-bulk-select:focus {
    border-color: var(--brand-primary);
}

.tracker-bulk-sep {
    color: var(--border);
    font-size: 0.875rem;
    user-select: none;
}

@media (max-width: 640px) {
    .tracker-groups {
        flex-direction: column;
        align-items: stretch;
    }

    .tracker-groups-manage {
        align-self: flex-end;
    }

    .tracker-bulk-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .tracker-bulk-right {
        justify-content: flex-end;
    }
}

/* ==========================================================================
   Sortable Table Columns
   ========================================================================== */
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; transition: color 0.15s; }
.sortable-th:hover { color: var(--brand-primary); }
.sortable-th .sort-indicator { font-size: 0.7rem; opacity: 0.7; }
.sortable-th.sort-asc .sort-indicator,
.sortable-th.sort-desc .sort-indicator { opacity: 1; color: var(--brand-primary); }

/* Spin animation (used by wallet/tracker refresh buttons) */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Tracker active card highlight */
.tracker-card-active { border-color: var(--brand-primary) !important; box-shadow: 0 0 0 2px var(--brand-light) !important; }

/* Portfolio proposal filter badges */
.proposal-filter-bar { display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); align-items: center; }
.proposal-filter-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border-radius: 9999px; border: 1px solid transparent; cursor: pointer; font-size: 0.75rem; font-weight: 500; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s; background: none; font-family: inherit; color: inherit; }
.proposal-filter-badge:hover { opacity: 0.85; }
.proposal-filter-badge.active { border-color: currentColor; box-shadow: 0 0 0 2px currentColor; }
.proposal-filter-sep { width: 1px; height: 18px; background: var(--border); margin: 0 0.375rem; }

/* Portfolio proposal relevant highlight */
.proposal-relevant { border-left: 2px solid var(--accent); padding-left: 12px; }

/* ==========================================================================
   NFT Collectibles Grid
   ========================================================================== */

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

.nft-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s;
}

.nft-card:hover {
    border-color: var(--brand-light);
    transform: translateY(-1px);
}

.nft-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.nft-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nft-card-image.nft-no-image {
    background: var(--bg-secondary);
}

.nft-card-info {
    padding: 0.5rem 0.625rem;
}

.nft-card-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nft-card-symbol {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.nft-card-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

@media (max-width: 480px) {
    .nft-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }
}

/* ==========================================================================
   Proposal Transaction Tracking (v0.5.0)
   ========================================================================== */

/* ---------- TX Badge on proposal items ---------- */
.proposal-tx-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.proposal-tx-badge.tx-pending {
    background: rgba(167, 139, 250, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.25);
}

.proposal-tx-badge.tx-all-done {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-light);
}

/* ---------- Executable Transactions Card ---------- */

/* Section dividers within the card */
.exec-section {
    border-bottom: 1px solid var(--border);
}

.exec-section:last-child {
    border-bottom: none;
}

.exec-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.exec-section-label.exec-section-action {
    color: var(--warning);
    background: var(--warning-light);
}

.exec-section-label.exec-section-done {
    color: var(--success);
    background: var(--success-light);
}

.exec-section-count {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.0625rem 0.375rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    line-height: 1.4;
}

.exec-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s;
}

.exec-section-toggle:hover {
    background: var(--bg-tertiary);
}

.exec-section-toggle .collapsible-chevron {
    transition: transform 0.2s;
}

.exec-section-toggle.expanded .collapsible-chevron {
    transform: rotate(180deg);
}

.exec-hidden {
    display: none;
}

/* Proposal rows */
.exec-proposal-group {
    border-bottom: 1px solid var(--border);
}

.exec-proposal-group:last-child {
    border-bottom: none;
}

.exec-proposal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.exec-proposal-header:hover {
    background: var(--bg-tertiary);
}

.exec-proposal-header.expanded {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.exec-proposal-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.exec-tx-header {
    display: flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-bottom: 1px solid var(--border);
}

.exec-proposal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s, color 0.15s;
}

.exec-proposal-link:hover {
    opacity: 1;
    color: var(--brand-primary);
}

/* Proposal body — hidden by default, toggled by JS */
.exec-proposal-body {
    display: none;
}

.exec-proposal-body.exec-proposal-open {
    display: block;
}

/* Chevron rotation when proposal is expanded */
.exec-proposal-header.expanded .collapsible-chevron {
    transform: rotate(180deg);
}

.exec-tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
}

.exec-tx-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--border);
    border-radius: 0 6px 6px 0;
    background: var(--bg-secondary);
}

.exec-tx-item.tx-executed {
    border-left-color: var(--success);
}

.exec-tx-item.tx-pending {
    border-left-color: #a78bfa;
}

.exec-tx-status {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.exec-tx-details {
    flex: 1;
    min-width: 0;
}

.exec-tx-program {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.exec-tx-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.exec-tx-wallet-match {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-top: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: var(--warning-light);
    border: 1px solid var(--warning-light);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--warning);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .exec-proposal-header {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .exec-proposal-title {
        flex-basis: 100%;
    }

    .exec-tx-item {
        padding: 0.375rem 0.5rem;
    }

    .exec-tx-list {
        padding: 0.5rem 0.625rem;
    }
}

/* ── Alert Dismiss ─────────────────────────────────────────────── */
.alert-dismiss {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    float: right;
    line-height: 1;
    opacity: 0.6;
    padding: 0;
    margin-left: 0.5rem;
}
.alert-dismiss:hover { opacity: 1; }

