/* Council — app-specific styles only. Base styles in ecosystem-base.css */

/* ── Layout: .container in ecosystem-base.css ────────────────── */

/* ==========================================================================
   Council-Specific Components
   ========================================================================== */

/* Wallet Grid & Cards: see ecosystem-components.css */

/* View Toggle: see ecosystem-components.css */

/* Compact Card Grid: see ecosystem-components.css */

/* Token Tooltip: see ecosystem-components.css */

/* Wallet Table View: see ecosystem-components.css */

/* Copy Address: see ecosystem-components.css */

/* Wallet Token Chips: see ecosystem-components.css */

/* Token Badges & Display: see ecosystem-components.css */

/* Mono Link: see ecosystem-components.css */

/* Forms (we-field, we-input, we-select, .mono): see ecosystem-components.css */

/* Ecosystem Modal System: see ecosystem-components.css */

/* ── Pagination: see ecosystem-components.css ─────────────────── */

/* Collapsible Components: see ecosystem-components.css */

/* DAO View Card: see ecosystem-components.css */

/* ==========================================================================
   DAO Registry (Dashboard)
   ========================================================================== */

.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); }

@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 — styles now in ecosystem-components.css (.eco-stat-grid etc.) */

/* 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); }

/* DAO Selector Bar */
.dao-selector-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.dao-selector-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dao-selector {
    flex: 1;
    max-width: 360px;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.dao-selector:hover,
.dao-selector:focus {
    border-color: var(--brand-primary);
    outline: none;
}

/* 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: see ecosystem-components.css */

/* Treasury Label Links */
.treasury-label-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
}
.treasury-label-link:hover {
    text-decoration: underline;
}

/* sortable-th, sort-indicator: see ecosystem-components.css */

/* mono-link, token-badge, token-display: see ecosystem-components.css */

/* 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, .state-0 through .state-9: see ecosystem-components.css */

/* 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;
}

/* Proposal Tx Badges */
.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 ---------- */

.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;
}

/* exec-proposal-*, exec-tx-*: see ecosystem-components.css */

/* ---------- Back Link ---------- */
.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);
}

/* DAO 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-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);
}

/* 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 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-form-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

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

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

/* System Badge: see ecosystem-components.css */

/* Deposit styles: see ecosystem-components.css (shared with Vault) */

/* ==========================================================================
   Responsive — DAO
   ========================================================================== */

@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;
    }
    /* exec-proposal/exec-tx responsive: see ecosystem-components.css */
}

/* ==========================================================================
   Responsive — Dashboard
   ========================================================================== */

@media (max-width: 768px) {
    .container { padding: 0 12px; }

    .section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .section-header-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .proposal-item.compact {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .proposal-item-name {
        flex-basis: 100%;
        order: 3;
        white-space: normal;
    }
    .proposal-item-meta {
        order: 4;
    }
}

@media (max-width: 480px) {
    .dao-view-card-header {
        font-size: 0.8125rem;
        padding: 0.75rem 1rem;
    }

    /* deposit-table responsive: see ecosystem-components.css */

    .deposit-filter-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }
}
