/**
 * Trabajo24 Governance Frontend Styles
 * Kanban-style governance roadmap with glass-morphism effects
 */

/* === GOVERNANCE CONTAINER === */
.t24-governance-kanban {
    min-height: 600px;
    padding: 0;
    margin: 0 auto;
    max-width: 100%;
}

.t24-governance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.t24-governance-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* === CATEGORY FILTER TABS === */
.t24-category-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}

.t24-category-filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.t24-category-filter-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.5);
    transform: translateY(-2px);
}

.t24-category-filter-btn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* === KANBAN BOARD === */
.t24-kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
    min-height: 500px;
}

.t24-kanban-board::-webkit-scrollbar {
    height: 8px;
}

.t24-kanban-board::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.t24-kanban-board::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 4px;
}

/* === KANBAN COLUMN === */
.t24-kanban-column {
    flex: 0 0 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1rem;
    height: fit-content;
}

.t24-kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 107, 53, 0.2);
}

.t24-kanban-column-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t24-kanban-column-count {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.t24-kanban-column-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

/* === PROPOSAL CARD === */
.t24-proposal-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.t24-proposal-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 53, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
}

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

.t24-proposal-category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.t24-proposal-category-badge.design {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.t24-proposal-category-badge.development {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.t24-proposal-category-badge.finance {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.t24-proposal-category-badge.steering {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.t24-proposal-category-badge.marketing {
    background: rgba(233, 30, 99, 0.2);
    color: #f48fb1;
    border: 1px solid rgba(233, 30, 99, 0.3);
}

.t24-proposal-priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.t24-proposal-priority-badge.high {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
}

.t24-proposal-priority-badge.medium {
    background: rgba(255, 152, 0, 0.2);
    color: #ffa726;
}

.t24-proposal-priority-badge.low {
    background: rgba(158, 158, 158, 0.2);
    color: #bdbdbd;
}

.t24-proposal-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.t24-proposal-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === VOTING WIDGET === */
.t24-voting-widget {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.t24-vote-progress {
    margin-bottom: 0.75rem;
}

.t24-vote-counts {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.t24-vote-count-for {
    color: #4caf50;
}

.t24-vote-count-against {
    color: #f44336;
}

.t24-vote-count-abstain {
    color: #9e9e9e;
}

.t24-vote-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.t24-vote-progress-fill {
    height: 100%;
    display: flex;
    transition: all 0.5s ease;
}

.t24-vote-progress-for {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.t24-vote-progress-against {
    background: linear-gradient(90deg, #f44336, #ef5350);
}

.t24-vote-progress-abstain {
    background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
}

.t24-vote-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.t24-vote-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.t24-vote-btn:hover {
    transform: translateY(-2px);
}

.t24-vote-btn.for {
    border-color: rgba(76, 175, 80, 0.3);
}

.t24-vote-btn.for:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.t24-vote-btn.against {
    border-color: rgba(244, 67, 54, 0.3);
}

.t24-vote-btn.against:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
}

.t24-vote-btn.abstain {
    border-color: rgba(158, 158, 158, 0.3);
}

.t24-vote-btn.abstain:hover {
    background: rgba(158, 158, 158, 0.2);
    border-color: rgba(158, 158, 158, 0.5);
}

.t24-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.t24-vote-btn.voted {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* === PROPOSAL META === */
.t24-proposal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.t24-proposal-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t24-proposal-time-remaining {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t24-proposal-time-remaining.urgent {
    color: #f44336;
    font-weight: 600;
}

/* === QUORUM INDICATOR === */
.t24-quorum-indicator {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.t24-quorum-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.t24-quorum-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    transition: width 0.5s ease;
}

.t24-quorum-fill.reached {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.t24-quorum-text {
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* === VOTING POWER INDICATOR === */
.t24-voting-power-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.t24-voting-power-icon {
    font-size: 1.2rem;
}

.t24-voting-power-text {
    flex: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.t24-voting-power-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff6b35;
}

/* === EMPTY STATE === */
.t24-kanban-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-faint);
}

.t24-kanban-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.t24-kanban-empty-text {
    font-size: 1rem;
}

/* === LOADING STATE === */
.t24-governance-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.t24-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: t24-spin 1s linear infinite;
}

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

.t24-loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* === PROPOSAL MODAL === */
.t24-proposal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.t24-proposal-modal {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.t24-proposal-modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.t24-proposal-modal-close {
    float: right;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.t24-proposal-modal-close:hover {
    color: #fff;
}

.t24-proposal-modal-body {
    padding: 2rem;
}

.t24-proposal-modal-full-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.t24-proposal-modal-voting {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .t24-kanban-board {
        flex-direction: column;
        padding: 1rem;
    }

    .t24-kanban-column {
        flex: 1;
        min-width: 100%;
    }

    .t24-governance-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .t24-category-filters {
        padding: 0 1rem;
    }

    .t24-vote-buttons {
        flex-direction: column;
    }

    .t24-proposal-modal {
        margin: 1rem;
    }
}

/* === TOAST NOTIFICATIONS === */
.t24-toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.t24-toast {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: t24-toast-slide-in 0.3s ease;
}

@keyframes t24-toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.t24-toast.success {
    border-left: 4px solid #4caf50;
}

.t24-toast.error {
    border-left: 4px solid #f44336;
}

.t24-toast.info {
    border-left: 4px solid #ff6b35;
}

.t24-toast-icon {
    font-size: 1.2rem;
}

.t24-toast-message {
    flex: 1;
    font-size: 0.95rem;
}

.t24-toast-dismiss {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease, transform 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t24-toast-dismiss:hover {
    color: #fff;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .t24-toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .t24-toast {
        min-width: auto;
    }
}

/* === PROPOSAL MODAL TABS === */
.t24-proposal-modal-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.t24-proposal-tab {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.t24-proposal-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 107, 53, 0.3);
}

.t24-proposal-tab.active {
    color: #fff;
    border-bottom-color: #ff6b35;
}

/* === PROPOSAL HISTORY === */
.t24-proposal-history {
    padding: 1.5rem 0;
}

.t24-proposal-history-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

.t24-proposal-history-timeline {
    position: relative;
}

.t24-history-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.t24-history-connector {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.t24-history-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 50%;
    border: 2px solid rgba(30, 30, 40, 1);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
    z-index: 2;
}

.t24-history-line {
    flex: 1;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.3) 0%, rgba(255, 107, 53, 0.05) 100%);
    margin-top: 0.5rem;
}

.t24-history-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.t24-history-item.expanded .t24-history-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 107, 53, 0.2);
}

.t24-history-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.t24-history-field-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.t24-history-summary {
    flex: 1;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.t24-history-change-summary {
    color: rgba(255, 255, 255, 0.7);
}

.t24-history-expand-btn {
    background: transparent;
    border: none;
    color: rgba(255, 107, 53, 0.8);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: transform 0.3s ease;
}

.t24-history-item.expanded .t24-history-expand-btn {
    transform: rotate(0deg);
}

.t24-history-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-left: 2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.t24-history-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.t24-history-ip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.t24-history-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.t24-history-diff {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
}

.t24-history-diff-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 0.75rem;
}

.t24-history-diff-section.old {
    border-left: 3px solid rgba(244, 67, 54, 0.5);
}

.t24-history-diff-section.new {
    border-left: 3px solid rgba(76, 175, 80, 0.5);
}

.t24-history-diff-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.t24-history-diff-value {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    word-break: break-word;
}

.t24-history-diff-value em {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.t24-history-diff-arrow {
    color: rgba(255, 107, 53, 0.6);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
}

/* History Loading & Empty States */
.t24-proposal-history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 1rem;
}

.t24-proposal-history-error {
    padding: 2rem;
    text-align: center;
    color: rgba(244, 67, 54, 0.8);
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 8px;
}

.t24-proposal-history-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.t24-proposal-modal-history-tab {
    min-height: 300px;
}

/* Responsive History */
@media (max-width: 768px) {
    .t24-history-diff {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .t24-history-diff-arrow {
        transform: rotate(90deg);
        padding: 0.5rem 0;
    }

    .t24-history-item {
        padding-left: 2rem;
    }

    .t24-proposal-modal-tabs {
        padding: 0 1rem;
    }

    .t24-proposal-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
/* ====================================== */
/* === THEME SYSTEM === */
/* ====================================== */

/* CSS Custom Properties for Theme Variables */
:root {
    /* Default Dark Theme Variables */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-faint: rgba(255, 255, 255, 0.4);

    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(255, 107, 53, 0.3);

    --accent-primary: #ff6b35;
    --accent-secondary: #f7931e;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: rgba(0, 0, 0, 0.02);
    --bg-glass: rgba(255, 255, 255, 0.9);
    --bg-glass-hover: rgba(255, 255, 255, 1);

    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-faint: #999999;

    --border-primary: rgba(0, 0, 0, 0.12);
    --border-secondary: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(255, 107, 53, 0.4);

    --accent-primary: #ff6b35;
    --accent-secondary: #f7931e;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Apply theme variables to components */
.t24-governance-dashboard {
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.t24-governance-header {
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
}

.t24-governance-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.t24-kanban-column {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
}

.t24-kanban-column-title {
    color: var(--text-primary);
}

.t24-kanban-column-count {
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent-primary);
}

.t24-proposal-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
}

.t24-proposal-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.t24-proposal-title {
    color: var(--text-primary);
}

.t24-proposal-description {
    color: var(--text-muted);
}

.t24-proposal-meta {
    border-top: 1px solid var(--border-primary);
    color: var(--text-muted);
}

.t24-category-filter-btn {
    border: 1px solid var(--border-accent);
    background: var(--bg-glass);
    color: var(--text-primary);
}

.t24-category-filter-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.5);
}

.t24-vote-btn {
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    color: var(--text-primary);
}

.t24-proposal-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .t24-proposal-modal {
    background: var(--bg-secondary);
}

.t24-proposal-modal-header {
    border-bottom: 1px solid var(--border-primary);
}

.t24-proposal-modal-close {
    color: var(--text-muted);
}

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

.t24-proposal-modal-full-description {
    color: var(--text-secondary);
}

.t24-proposal-modal-tabs {
    border-bottom: 1px solid var(--border-primary);
}

.t24-proposal-tab {
    color: var(--text-muted);
}

.t24-proposal-tab:hover {
    color: var(--text-secondary);
}

.t24-proposal-tab.active {
    color: var(--text-primary);
}

.t24-history-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
}

.t24-history-summary {
    color: var(--text-secondary);
}

.t24-history-change-summary {
    color: var(--text-muted);
}

.t24-history-meta {
    color: var(--text-faint);
}

.t24-history-diff-section {
    background: var(--bg-tertiary);
}

.t24-history-diff-label {
    color: var(--text-faint);
}

.t24-history-diff-value {
    color: var(--text-secondary);
}

.t24-history-diff-value em {
    color: var(--text-faint);
}

.t24-toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.t24-loading-text {
    color: var(--text-muted);
}

.t24-voting-power-text {
    color: var(--text-secondary);
}

/* === THEME TOGGLE BUTTON === */
.t24-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.t24-theme-toggle:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.t24-theme-toggle:active {
    transform: translateY(0);
}

.t24-theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.t24-theme-toggle:hover .t24-theme-toggle-icon {
    transform: rotate(20deg);
}

/* Light theme specific adjustments */
[data-theme="light"] .t24-governance-title {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .t24-loading-spinner {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: #ff6b35;
}

[data-theme="light"] .t24-kanban-board::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .t24-voting-widget {
    border-top: 1px solid var(--border-primary);
}

[data-theme="light"] .t24-vote-progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .t24-quorum-bar {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .t24-proposal-modal-voting {
    border-top: 1px solid var(--border-primary);
}

[data-theme="light"] .t24-history-dot {
    border-color: var(--bg-secondary);
}

/* Light theme category badges with better contrast */
[data-theme="light"] .t24-proposal-category-badge.design {
    background: rgba(156, 39, 176, 0.15);
    color: #7b1fa2;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

[data-theme="light"] .t24-proposal-category-badge.development {
    background: rgba(33, 150, 243, 0.15);
    color: #1976d2;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

[data-theme="light"] .t24-proposal-category-badge.finance {
    background: rgba(76, 175, 80, 0.15);
    color: #388e3c;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

[data-theme="light"] .t24-proposal-category-badge.steering {
    background: rgba(255, 107, 53, 0.15);
    color: #e64a19;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

[data-theme="light"] .t24-proposal-category-badge.marketing {
    background: rgba(233, 30, 99, 0.15);
    color: #c2185b;
    border: 1px solid rgba(233, 30, 99, 0.3);
}

/* Light theme priority badges */
[data-theme="light"] .t24-proposal-priority-badge.high {
    background: rgba(244, 67, 54, 0.15);
    color: #d32f2f;
}

[data-theme="light"] .t24-proposal-priority-badge.medium {
    background: rgba(255, 152, 0, 0.15);
    color: #f57c00;
}

[data-theme="light"] .t24-proposal-priority-badge.low {
    background: rgba(158, 158, 158, 0.15);
    color: #616161;
}

/* Light theme overlay */
[data-theme="light"] .t24-proposal-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments for theme toggle */
@media (max-width: 768px) {
    .t24-governance-header-actions {
        flex-direction: row;
        gap: 0.75rem;
    }

    .t24-theme-toggle {
        width: 40px;
        height: 40px;
    }
}

/* Smooth transitions for theme switching */
* {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Prevent transition on page load */
.t24-governance-dashboard.no-transition * {
    transition: none !important;
}

/* ====================================== */
/* === WALLET CONNECT BUTTON === */
/* ====================================== */

.t24-wallet-connect-button {
    position: relative;
}

.t24-btn-wallet {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-accent);
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.t24-btn-wallet:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
}

.t24-btn-wallet:active {
    transform: translateY(0);
}

.t24-btn-wallet:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.t24-btn-install-wallet {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.t24-wallet-icon {
    font-size: 1.25rem;
}

.t24-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: t24-spin 0.8s linear infinite;
}

/* Connected Wallet Display */
.t24-wallet-connected {
    position: relative;
}

.t24-wallet-connected-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.t24-wallet-connected-button:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.t24-wallet-connected-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.t24-wallet-connected-icon {
    font-size: 1.1rem;
}

.t24-wallet-connected-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.t24-wallet-connected-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.t24-wallet-connected-address {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.t24-wallet-voting-power-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.t24-wallet-dropdown-arrow {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.t24-wallet-dropdown-arrow.open {
    transform: rotate(180deg);
}

/* Wallet Dropdown Menu */
.t24-wallet-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: t24-dropdown-fade-in 0.2s ease;
}

@keyframes t24-dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.t24-wallet-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

.t24-wallet-dropdown-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-secondary);
}

.t24-wallet-dropdown-section:last-of-type {
    border-bottom: none;
}

.t24-wallet-dropdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-faint);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.t24-wallet-dropdown-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.t24-wallet-dropdown-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t24-wallet-dropdown-address code {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 6px;
    word-break: break-all;
    border: 1px solid var(--border-secondary);
}

.t24-copy-button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: all 0.2s ease;
}

.t24-copy-button:hover {
    color: var(--accent-primary);
    transform: scale(1.2);
}

.t24-wallet-role-info.t24-wallet-dropdown-section {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.t24-wallet-dropdown-value.t24-has-role {
    color: #4caf50;
    font-weight: 600;
}

.t24-wallet-dropdown-value.t24-no-role {
    color: #ff9800;
    font-weight: 600;
}

.t24-wallet-dropdown-hint {
    font-size: 0.8rem;
    color: var(--text-faint);
    margin-top: 0.5rem;
    font-style: italic;
}

.t24-wallet-dropdown-divider {
    height: 1px;
    background: var(--border-secondary);
    margin: 0.5rem 0;
}

.t24-wallet-disconnect-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.3);
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.t24-wallet-disconnect-button:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
}

/* Responsive Wallet Button */
@media (max-width: 768px) {
    .t24-btn-wallet {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

    .t24-wallet-connected-button {
        padding: 0.5rem 0.75rem;
    }

    .t24-wallet-connected-info {
        display: none;
    }

    .t24-wallet-dropdown {
        min-width: 280px;
        right: -1rem;
    }
}
