/* ============================================================================
   APIIP Investment Proposals - Custom Styles
   Supplements pitch_discussions.css for proposal-specific components
   ============================================================================ */

/* Override site-wide decorative .btn::before line from style.css */
.proposal-section .btn::before {
    display: none;
}

/* ---- Layout ---- */
.proposal-section {
    padding: 36px 0 72px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f7f8fc 50%, #eef2f7 100%);
    min-height: 70vh;
    font-family: 'Google Sans', 'Google Sans Flex', sans-serif !important;
    font-weight: 400;
}

.proposal-section *:not(.stat-value) {
    font-family: inherit !important;
}

.proposal-container,
.dashboard-container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Top Bar ---- */
.proposal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 18px 28px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(30,41,59,0.18);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.proposal-topbar h4 {
    margin: 0;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.proposal-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.proposal-topbar-right .btn {
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    padding: 8px 18px;
    transition: all 0.2s;
}

.proposal-topbar-right .btn-outline {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}
.proposal-topbar-right .btn-outline:hover {
    background: rgba(255,255,255,0.2);
}

.proposal-topbar-right .btn-danger {
    background: #ef4444;
    border: none;
    color: #fff;
}
.proposal-topbar-right .btn-danger:hover {
    background: #dc2626;
}

.admin-label {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* ---- Tabs ---- */
.proposal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: white;
    color: #4a5568;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f7fafc;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f7fafc;
}

.tab-content {
    display: none;
}

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

/* ---- Form Wrapper ---- */
.proposal-form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 5px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.form-group label .required {
    color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

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

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

.readonly-field {
    background: #f7fafc !important;
    color: #718096 !important;
    cursor: not-allowed;
}

.helper-text {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

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

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

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e6fffa;
}

.file-upload-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.file-upload-text {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 5px;
}

.file-upload-hint {
    font-size: 12px;
    color: #718096;
}

.file-input {
    display: none;
}

.uploaded-files {
    margin-top: 10px;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name {
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: #718096;
}

.remove-file {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.remove-file:hover {
    background: #c53030;
}

/* ---- Checkbox ---- */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

/* ---- Form Actions ---- */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

/* ---- Info Box ---- */
.info-box {
    background: #bee3f8;
    border-left: 4px solid #4299e1;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.info-box-title {
    font-weight: 500;
    color: #2c5282;
    margin-bottom: 5px;
}

.info-box-text {
    font-size: 14px;
    color: #2d3748;
    line-height: 1.5;
}

/* ---- KPI Stats Cards ---- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    padding: 22px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.06);
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1E3A8A;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.stat-card.stat-review {
    border-left-color: #F59E0B;
}

.stat-card.stat-approved {
    border-left-color: #10B981;
}

.stat-card.stat-investment {
    border-left-color: #0F766E;
}

/* Icon container */
.stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EFF6FF;
    color: #1E3A8A;
}

.stat-review .stat-icon {
    background: #FFFBEB;
    color: #B45309;
}

.stat-approved .stat-icon {
    background: #ECFDF5;
    color: #065F46;
}

.stat-investment .stat-icon {
    background: #F0FDFA;
    color: #0F766E;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-body {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.stat-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    line-height: 1.3;
}

/* ---- Controls Bar ---- */
.controls-bar {
    background: #fff;
    padding: 16px 20px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #f8fafc;
}

.search-box input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    color: #334155;
}

.filter-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* ---- Status Chips ---- */
.status-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.status-chip {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
}

.status-chip:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
}

.status-chip.active {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.status-chip .count {
    background: rgba(0,0,0,0.06);
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.status-chip.active .count {
    background: rgba(255,255,255,0.25);
}

/* ---- Table ---- */
.table-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

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

thead {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-bottom: 2px solid #e2e8f0;
}

th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

td {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
}

tr {
    transition: background 0.15s;
}

tr:hover td {
    background: #f8fafc;
}

.proposal-id {
    font-weight: 600;
    color: #6366f1;
    font-size: 13px;
}

/* Status badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    letter-spacing: 0.2px;
}

.status-submitted {
    background: #dbeafe;
    color: #1e40af;
}

.status-under_review {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Priority badges */
.priority-high {
    color: #dc2626;
    font-weight: 600;
}

.priority-medium {
    color: #d97706;
    font-weight: 600;
}

.priority-low {
    color: #059669;
    font-weight: 600;
}

/* ---- Action Buttons ---- */
.actions-cell {
    display: flex;
    gap: 6px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.action-view {
    background: #f1f5f9;
    color: #475569;
}

.action-view:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.action-approve {
    background: #d1fae5;
    color: #065f46;
}

.action-approve:hover {
    background: #a7f3d0;
}

.action-reject {
    background: #fee2e2;
    color: #991b1b;
}

.action-reject:hover {
    background: #fecaca;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
}

.pagination-info {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 4px;
}

.page-btn {
    padding: 7px 12px;
    border: 1.5px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    color: #475569;
}

.page-btn:hover {
    background: #f8fafc;
    border-color: #c7d2fe;
}

.page-btn.active {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: white;
    border-color: #6366f1;
    box-shadow: 0 2px 6px rgba(99,102,241,0.3);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.success-modal,
.detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
    text-align: center;
    padding: 35px;
    animation: slideDown 0.3s ease;
}

.detail-modal {
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    padding: 0;
}

.detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-radius: 20px 20px 0 0;
}

.detail-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
}

.modal-close {
    background: #f1f5f9;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.detail-modal .modal-body {
    padding: 28px;
}

.detail-modal .modal-footer {
    padding: 18px 28px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    background: #fafbfc;
    border-radius: 0 0 20px 20px;
}

.success-icon {
    font-size: 56px;
    color: #48bb78;
    margin-bottom: 15px;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -55%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ---- Detail sections ---- */
.detail-section {
    margin-bottom: 20px;
}

.detail-section h5 {
    font-size: 14px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.detail-item {
    font-size: 14px;
}

.detail-label {
    color: #718096;
    font-size: 12px;
    margin-bottom: 2px;
}

.detail-value {
    color: #2d3748;
    font-weight: 500;
}

/* ---- My Proposals List ---- */
.my-proposals-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.proposal-card {
    padding: 18px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: background 0.2s;
}

.proposal-card:hover {
    background: #f7fafc;
}

.proposal-card-left h5 {
    font-size: 16px;
    color: #2d3748;
    margin: 0 0 4px;
}

.proposal-card-left p {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

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

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #718096;
}

.empty-state h4 {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 8px;
}

/* ---- Admin remarks textarea ---- */
.remarks-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 10px;
}

.remarks-input:focus {
    border-color: #667eea;
    outline: none;
}

/* ---- Status History ---- */
.history-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

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

.history-date {
    color: #718096;
    white-space: nowrap;
    min-width: 120px;
}

.history-change {
    color: #2d3748;
}

/* ---- Document Items ---- */
.doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f7fafc;
    transition: border-color 0.2s;
}

.doc-item:hover {
    border-color: #667eea;
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.doc-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.doc-name {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    word-break: break-all;
}

.doc-meta {
    font-size: 12px;
    color: #718096;
    margin-top: 2px;
}

.doc-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px;
}

.doc-btn {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.doc-btn-view {
    background: #ebf4ff;
    color: #3182ce;
}

.doc-btn-view:hover {
    background: #3182ce;
    color: white;
}

.doc-btn-download {
    background: #f0fff4;
    color: #38a169;
}

.doc-btn-download:hover {
    background: #38a169;
    color: white;
}

.doc-btn-pdf {
    background: #f0e6ff;
    color: #667eea;
}

.doc-btn-pdf:hover {
    background: #667eea;
    color: white;
}

/* ---- Clickable proposal cards ---- */
.proposal-card-clickable {
    cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .proposal-form-wrapper {
        padding: 20px;
    }
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        min-width: 100%;
    }
    .detail-row {
        grid-template-columns: 1fr;
    }
    .table-container {
        overflow-x: auto;
    }
    table {
        min-width: 900px;
    }
    .doc-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .doc-actions {
        margin-left: 0;
    }
}

/* ---- Toast Notifications ---- */
#toast-container {
    pointer-events: none;
}
#toast-container > div {
    pointer-events: auto;
}

/* ---- Tablet ---- */
@media (max-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Additional Mobile Breakpoints ---- */
@media (max-width: 480px) {
    .proposal-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }
    .proposal-topbar-right {
        width: 100%;
        justify-content: flex-start;
    }
    .stats-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 16px 18px;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .status-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }
    .status-chip {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .filter-group {
        width: 100%;
    }
    .filter-select {
        flex: 1;
    }
    .proposal-tabs .tab-btn {
        font-size: 13px;
        padding: 12px 10px;
    }
    .detail-modal {
        width: 95%;
        max-height: 90vh;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
    .pagination {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .admin-topbar .proposal-topbar-right {
        flex-wrap: wrap;
    }
    .admin-topbar .proposal-topbar-right span {
        display: none;
    }
    .chart-card-header {
        padding: 14px 16px 10px;
    }
    .chart-card-body {
        padding: 8px 12px 14px;
    }
}

/* ---- Print Styles ---- */
@media print {
    .proposal-topbar,
    .proposal-tabs,
    .controls-bar,
    .status-filters,
    .pagination,
    .form-actions,
    .modal-overlay,
    .detail-modal,
    .success-modal,
    #toast-container,
    .inner-banner-sec,
    .file-upload-area,
    nav[aria-label="breadcrumb"] {
        display: none !important;
    }
    .proposal-section {
        background: white;
        padding: 0;
    }
    .proposal-form-wrapper,
    .my-proposals-list,
    .table-container,
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    .tab-content {
        display: block !important;
    }
    table {
        min-width: auto !important;
    }
    body {
        font-size: 12pt;
        color: black;
    }
    a {
        text-decoration: none;
        color: black;
    }
}

/* ---- Focus States for Accessibility ---- */
.tab-btn:focus-visible,
.action-btn:focus-visible,
.page-btn:focus-visible,
.status-chip:focus-visible,
.filter-select:focus-visible,
.btn:focus-visible,
.modal-close:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.file-upload-area:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ============================================================================
   ANALYTICS CHARTS
   Structural CSS mirrors KPI cards: same bg, border, shadow, radius
   ============================================================================ */

.analytics-dashboard {
    padding: 0 0 28px 0;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.charts-row:has(.chart-card-wide) {
    grid-template-columns: 1.5fr 1fr;
}

/* Doughnut chart needs a taller container so legend doesn't crush the ring */
.charts-row .chart-card:not(.chart-card-wide) .chart-card-body {
    /* inherited default; overridden for top-row doughnut below */
}

.charts-row-top .chart-card:not(.chart-card-wide) .chart-card-body {
    height: 340px;
}

/* Exact same structural styles as .stat-card */
.chart-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.06);
    border: 1px solid #E5E7EB;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.chart-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.chart-card-header {
    padding: 18px 24px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.chart-title-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.chart-card-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    letter-spacing: -0.15px;
    text-transform: uppercase;
}

.chart-subtitle {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

/* Canvas container — explicit dimensions prevent Retina blur */
.chart-card-body {
    padding: 16px 20px 20px;
    height: 280px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* Canvas itself: fill container exactly so Chart.js reads correct pixel size */
.chart-card-body canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 1024px) {
    .charts-row,
    .charts-row:has(.chart-card-wide) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .chart-card-body {
        height: 240px;
    }
    .chart-card-header {
        padding: 14px 16px 12px;
    }
    .chart-card-body {
        padding: 12px 14px 16px;
    }
}
