/**
 * ============================================================================
 * COMMITTEE SYSTEM STYLES - COMPLETE REWRITE
 * ============================================================================
 * 
 * File Path:        public/css/modules/committee.css
 * Version:          2.2.0
 * Created:          Monday, October 20, 2025
 * Updated:          Thursday, October 23, 2025, 23:00 AEST
 * 
 * Purpose:
 *   Complete stylesheet for Committee system including:
 *   - Committee Functions Menu (Amber/Orange gradient)
 *   - Contact Committee Form
 *   - Committee Dashboard with Universal Search
 * 
 * Changelog:
 *   2.2.0 (2025-10-23) - Universal search bar, removed filter redundancy
 *   2.1.1 (2025-10-21) - Tab navigation responsive fix
 *   2.1.0 (2025-10-21) - Fixed Committee Functions styling
 *   2.0.0 (2025-10-20) - Initial comprehensive styles
 * 
 * Table of Contents:
 *   1. Committee Functions Menu Styles
 *   2. Contact Committee Form Styles
 *   3. Committee Dashboard Styles
 *      3.1 Dashboard Container & Header
 *      3.2 Priority Banner
 *      3.3 Universal Search Bar
 *      3.4 Tab Navigation
 *      3.5 Matter Cards
 *      3.6 Voting Interface
 *      3.7 Attachments Display
 *   4. Shared Components (Loading, Empty, Error States)
 *   5. Animations & Utilities
 *   6. Responsive Design
 *   7. Print Styles
 *   8. Accessibility
 * 
 * ============================================================================
 */


/* ============================================================================
   SECTION 1: COMMITTEE FUNCTIONS MENU STYLES
   ============================================================================ */

/* Committee Page Wrapper */
.committee-page-wrapper {
    min-height: auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 60px;
}

/* Committee Menu Container */
.main-menu-container.committee-container {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Menu Header - Amber/Orange Gradient */
.committee-container .menu-header {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.committee-container .logo h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.committee-container .building-name {
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
    opacity: 1;
    color: white;
    font-weight: 500;
}

.committee-container .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.committee-container .user-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.committee-container .role-badge.committee {
    background: rgba(254, 243, 199, 0.95);
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(251, 191, 36, 0.8);
    color: #78350f;
}

/* Logout Button */
.committee-container .logout-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-left: auto;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.committee-container .logout-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

/* Menu Content */
.committee-container .menu-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    flex: 0 1 auto;
}

.committee-container .menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 800px;
    width: 100%;
}

/* Menu Items */
.committee-container .menu-item {
    background: white;
    border: 2px solid #fbbf24;
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    position: relative;
}

.committee-container .menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
}

.committee-container .menu-item.placeholder-item {
    opacity: 0.7;
    cursor: default;
    background: #fef3c7;
}

.committee-container .menu-item.placeholder-item:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.committee-container .menu-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.committee-container .menu-content-text h3 {
    color: #92400e;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.committee-container .menu-content-text p {
    color: #78716c;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Coming Soon Badge */
.coming-soon-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

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


/* ============================================================================
   SECTION 2: CONTACT COMMITTEE FORM STYLES
   ============================================================================ */

/* Contact Committee Form Container */
.contact-committee-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Form Header */
.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.form-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.form-header p {
    margin: 0;
    opacity: 0.9;
}

/* Form Fields */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Field Errors */
.field-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.field-error.show {
    display: block;
}

/* Conditional Sections */
.conditional-section {
    display: none;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid #667eea;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-area.drag-over {
    border-color: #667eea;
    background: #e0e7ff;
    transform: scale(1.02);
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 1rem;
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2rem;
}

.file-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: #1f2937;
}

.file-details small {
    color: #6b7280;
}

.file-remove-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: #fecaca;
}

/* Submit Button */
.submit-button {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #16a34a;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    display: none;
}

.success-message.show {
    display: block;
}


/* ============================================================================
   SECTION 3: COMMITTEE DASHBOARD STYLES
   ============================================================================ */

/* 3.1 Dashboard Container & Header
   ========================================================================= */

.dashboard-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0;
}

.dashboard-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.back-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 1.5rem;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #e5e7eb;
}

.header-left h1 {
    color: #1f2937;
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.building-name {
    color: #6b7280;
    font-size: 1.1rem;
    margin: 0;
}

.header-right {
    text-align: right;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.user-name {
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 700;
}

.user-role {
    color: #718096;
    font-size: 1rem;
    font-weight: 600;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.stat-card.urgent {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.95rem;
}


/* 3.2 Priority Banner
   ========================================================================= */

.priority-banner {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.priority-banner-icon {
    font-size: 2rem;
}

.priority-banner-content {
    flex: 1;
}

.priority-banner-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.priority-banner-text {
    opacity: 0.95;
}


/* 3.3 Universal Search Bar
   ========================================================================= */

.universal-search-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    z-index: 50;
}

.search-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 900px;
}

.universal-search-input {
    flex: 1;
    max-width: 600px;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    position: relative;
    z-index: 51;
}

.search-results-counter {
    padding: 0.75rem 1.25rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    font-size: 0.95rem;
}

.search-results-counter.has-results {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.universal-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.universal-search-input::placeholder {
    color: #9ca3af;
}

.btn-clear-search {
    padding: 0.75rem 1.25rem;
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-clear-search:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}


/* 3.4 Tab Navigation
   ========================================================================= */

.dashboard-tabs {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    font-family: inherit;
}

.tab-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
}

.tab-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.tab-btn.active .tab-badge {
    background: white;
    color: #3b82f6;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}


/* 3.5 Matter Cards
   ========================================================================= */

/* Matters Grid */
.matters-grid {
    display: grid;
    gap: 1.5rem;
}

/* Matter Cards */
.matter-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.matter-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* Category Color Coding */
.matter-card.category-INC { border-left: 6px solid #dc2626; }
.matter-card.category-RFQ { border-left: 6px solid #ea580c; }
.matter-card.category-BUD { border-left: 6px solid #d97706; }
.matter-card.category-RA { border-left: 6px solid #7c3aed; }
.matter-card.category-PA { border-left: 6px solid #8b5cf6; }
.matter-card.category-GEN { border-left: 6px solid #0ea5e9; }
.matter-card.category-LEG { border-left: 6px solid #0891b2; }
.matter-card.category-INS { border-left: 6px solid #0d9488; }
.matter-card.category-MTG { border-left: 6px solid #059669; }
.matter-card.category-CON { border-left: 6px solid #65a30d; }
.matter-card.category-MNT { border-left: 6px solid #84cc16; }
.matter-card.category-RES { border-left: 6px solid #eab308; }

/* Card Header */
.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.card-header-left {
    flex: 1;
}

.matter-id {
    font-family: monospace;
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.matter-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-INC { background: #fee2e2; color: #991b1b; }
.category-RFQ { background: #ffedd5; color: #9a3412; }
.category-BUD { background: #fef3c7; color: #92400e; }
.category-RA { background: #ede9fe; color: #5b21b6; }
.category-PA { background: #f3e8ff; color: #6b21a8; }
.category-GEN { background: #e0f2fe; color: #075985; }
.category-LEG { background: #cffafe; color: #164e63; }
.category-INS { background: #ccfbf1; color: #134e4a; }
.category-MTG { background: #d1fae5; color: #065f46; }
.category-CON { background: #d9f99d; color: #3f6212; }
.category-MNT { background: #ecfccb; color: #4d7c0f; }
.category-RES { background: #fef9c3; color: #854d0e; }

.matter-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.matter-meta {
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    min-width: 120px;
}

.status-voting-open {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #f59e0b;
}

.status-pending {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #16a34a;
}

.status-rejected {
    background: #fecaca;
    color: #991b1b;
    border: 2px solid #dc2626;
}

/* Card Content */
.card-content {
    padding: 1.5rem;
}

.matter-description {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.matter-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.detail-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.detail-value.currency {
    color: #059669;
}

.detail-value.urgent {
    color: #dc2626;
}


/* 3.6 Voting Interface
   ========================================================================= */

/* Voting Section */
.voting-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #0ea5e9;
    margin-top: 1rem;
}

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

.voting-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0c4a6e;
}

.voting-deadline {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
}

.voting-progress {
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    background: white;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    transition: width 0.3s ease;
}

.progress-for {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.progress-against {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.progress-abstain {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.vote-summary {
    display: flex;
    justify-content: space-between;
    color: #475569;
    font-size: 0.9rem;
}

/* Voting Panel */
.voting-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-top: 1rem;
}

.voting-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.vote-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vote-option {
    flex: 1;
    padding: 1rem;
    border: 3px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.vote-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.vote-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.vote-label {
    font-weight: 600;
    color: #1f2937;
}

.vote-comment {
    margin-bottom: 1rem;
}

.vote-comment label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.vote-comment textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.vote-comment textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Vote Option Selected States */
.vote-option.selected-for {
    border-color: #16a34a;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.vote-option.selected-against {
    border-color: #dc2626;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.vote-option.selected-abstain {
    border-color: #6b7280;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}


/* 3.7 Attachments Display
   ========================================================================= */

.attachments-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.attachments-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Vote History Section */
.vote-history-section {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-top: 1rem;
}

.vote-history-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.vote-history-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.outcome-approved {
    color: #16a34a;
}

.outcome-rejected {
    color: #dc2626;
}

.vote-history-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 600;
}

.vote-history-summary {
    margin-bottom: 1.5rem;
}

.vote-summary-bars {
    background: white;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    transition: width 0.3s ease;
    padding: 0 0.5rem;
    white-space: nowrap;
}

.bar-for {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.bar-against {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.bar-abstain {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.vote-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vote-group {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
}

.vote-group-for {
    border-left-color: #16a34a;
}

.vote-group-against {
    border-left-color: #dc2626;
}

.vote-group-abstain {
    border-left-color: #6b7280;
}

.vote-group-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.vote-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vote-item {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.vote-item-current-user {
    background: #dbeafe;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.vote-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vote-item-name {
    font-weight: 600;
    color: #1f2937;
}

.you-badge {
    background: #3b82f6;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.vote-item-date {
    color: #6b7280;
    font-size: 0.85rem;
    margin-left: auto;
}

.vote-item-comment {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.btn-action {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-vote-submit {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.btn-vote-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-vote-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-view-details {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-documents {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-documents:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}


/* ============================================================================
   SECTION 4: SHARED COMPONENTS
   ============================================================================ */

/* Loading and Spinner Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-state p {
    color: #718096;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #6b7280;
    font-size: 1rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff5f5;
    border: 2px dashed #fc8181;
    border-radius: 15px;
    margin: 20px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-state h3 {
    margin: 0 0 10px 0;
    color: #c53030;
    font-size: 1.5rem;
}

.error-state p {
    margin: 0 0 20px 0;
    color: #e53e3e;
    font-size: 1.05rem;
}

.retry-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: inherit;
}

.retry-btn:hover {
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}


/* ============================================================================
   SECTION 5: ANIMATIONS & UTILITIES
   ============================================================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.matter-card {
    animation: fadeIn 0.3s ease-out;
}

/* Pulse Animation for Urgent Items */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.stat-card.urgent {
    animation: pulse 2s ease-in-out infinite;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }

.hidden { display: none !important; }


/* ============================================================================
   SECTION 6: RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 968px) {
    /* Committee Functions Menu */
    .committee-container .menu-grid {
        max-width: 600px;
    }
    
    .committee-container .menu-header {
        padding: 1rem 1.5rem;
    }
    
    .committee-container .logo h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Dashboard Container */
    .dashboard-container {
        padding: 1rem;
    }
    
    /* Header */
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .header-left,
    .header-right {
        text-align: center;
    }
    
    .user-info {
        align-items: center;
    }
    
    /* Statistics Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tab Navigation - Horizontally Scrollable */
    .dashboard-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 #f1f5f9;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .dashboard-tabs::-webkit-scrollbar {
        height: 6px;
    }
    
    .dashboard-tabs::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }
    
    .dashboard-tabs::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
    
    .dashboard-tabs::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
    
    .tab-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .tab-badge {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
    }
    
    /* Search Bar */
    .universal-search-bar {
        padding: 1rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-clear-search {
        width: 100%;
    }
    
    /* Matter Details */
    .matter-details {
        grid-template-columns: 1fr;
    }
    
    /* Vote Options */
    .vote-options {
        flex-direction: column;
    }
    
    /* Card Actions */
    .card-actions {
        flex-direction: column;
    }
    
    /* Contact Form */
    .contact-committee-container {
        padding: 1rem;
    }
    
    .form-header {
        padding: 1.5rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    /* Hide on Mobile */
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 640px) {
    /* Committee Functions Menu */
    .committee-container .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .committee-container .menu-content {
        padding: 1rem;
    }
    
    .committee-container .menu-item {
        padding: 1.25rem;
    }
    
    .committee-container .menu-icon {
        font-size: 2.5rem;
    }
    
    .committee-container .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .committee-container .logout-btn {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard-tabs {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .tab-badge {
        min-width: 18px;
        height: 18px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* Tablet Specific */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 0.7rem 1.3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .matter-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .dashboard-container {
        max-width: 1300px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}


/* ============================================================================
   SECTION 7: PRINT STYLES
   ============================================================================ */

@media print {
    .back-btn,
    .dashboard-tabs,
    .universal-search-bar,
    .card-actions,
    .voting-panel,
    .committee-container .logout-btn {
        display: none !important;
    }
    
    .matter-card {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .dashboard-header,
    .committee-container .menu-header {
        border-bottom: 2px solid #000;
    }
}


/* ============================================================================
   SECTION 8: ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* Focus Styles */
.tab-btn:focus,
.vote-option:focus,
.btn-action:focus,
.btn-clear-search:focus,
.universal-search-input:focus,
.committee-container .menu-item:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .matter-card,
    .committee-container .menu-item {
        border-width: 3px;
    }
    
    .status-badge {
        border-width: 3px;
    }
    
    .vote-option {
        border-width: 4px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        animation: none;
        border-top-color: transparent;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
    /* Currently not implemented, but structure is ready */
}

/* ============================================================================
   END OF COMMITTEE SYSTEM STYLES v2.2.0
   ============================================================================ */