/* FÃƒÂ­bÃƒÂ­n - Amharc Stylesheet */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --overspend-color: #FF9800;
    --overspend-bg: #FFF3E0;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #95a5a6;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

/* Navigation */
.navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

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

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #2c3e50;
}

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

.btn-outline:hover {
    background-color: var(--bg-light);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Cards */
.project-card, .form-card, .action-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-code {
    display: inline-block;
    background-color: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.project-card-body {
    padding: 1rem 0;
}

.last-update {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Unmapped Transactions Alert on Dashboard */
.unmapped-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #856404;
}

.unmapped-alert .alert-icon {
    font-size: 16px;
}

.unmapped-alert .map-icon {
    font-size: 14px;
}

.unmapped-alert .alert-text {
    font-weight: 500;
}

.project-card-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Report Header */
.report-header {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-code-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.last-update-badge {
    background-color: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.summary-card.overspend {
    background-color: var(--overspend-bg);
    border: 2px solid var(--overspend-color);
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-card.overspend .summary-value {
    color: var(--overspend-color);
}

/* Report Section */
.report-section {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.report-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

thead th {
    background-color: var(--bg-light);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: var(--bg-light);
}

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

.text-center {
    text-align: center;
}

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

/* Overspend Styling */
.overspend-row {
    background-color: var(--overspend-bg);
}

.overspend-text {
    color: var(--overspend-color);
    font-weight: 600;
}

.unallocated-row {
    background-color: #fff3cd;
}

.total-row {
    font-weight: 600;
    background-color: var(--bg-light);
    border-top: 2px solid var(--border-color);
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: end;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
}

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

.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--success-color);
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #17a2b8;
}

/* Admin Actions */
.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    text-decoration: none;
    color: var(--text-primary);
}

.action-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.action-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Unmapped Codes */
.unmapped-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.code-badge {
    display: inline-block;
    background-color: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
}

/* Help Section */
.help-section {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.help-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.help-section ol {
    padding-left: 1.5rem;
}

.help-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .report-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   UPDATE: Executive Producer Features
   Added: 04/02/26
   ======================================== */

/* Executive Producer Topsheet Styles */
.topsheet-table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topsheet-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.topsheet-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.topsheet-table th.sortable:hover {
    background: #34495e;
}

.topsheet-table th.numeric {
    text-align: right;
}

.topsheet-table td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.topsheet-table td.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.topsheet-table .project-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.topsheet-table .project-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Color-coded project status rows */
.topsheet-row {
    transition: background 0.2s;
}

.topsheet-row.status-green {
    background: #d4edda;
}

.topsheet-row.status-pale-orange {
    background: #fff3cd;
}

.topsheet-row.status-medium-orange {
    background: #ffe4b5;
}

.topsheet-row.status-dark-orange {
    background: #ffd89b;
}

.topsheet-row.status-red {
    background: #f8d7da;
}

.topsheet-row:hover {
    filter: brightness(0.95);
}

.status-cell {
    text-align: center;
}

.status-indicator {
    font-size: 20px;
}

.sort-icon {
    font-size: 11px;
    color: #95a5a6;
    margin-left: 5px;
}

.topsheet-table th.sort-asc .sort-icon {
    color: #3498db;
}

.topsheet-table th.sort-desc .sort-icon {
    color: #3498db;
}

/* Legend for topsheet */
.legend {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.legend h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.legend-color {
    width: 40px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Dashboard Improvements */
.project-card-footer {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
}

.project-card-footer .btn {
    flex: 1;
    margin: 0;
}

/* Comments Column Styles */
.comment-col {
    width: 250px;
    min-width: 200px;
}

.comment-cell {
    max-width: 300px;
}

.comment-text {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
    min-height: 24px;
    display: block;
    word-wrap: break-word;
}

.comment-text:hover {
    background: #f8f9fa;
}

.comment-text.empty {
    color: #95a5a6;
    font-style: italic;
    font-size: 13px;
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 2px solid #3498db;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.comment-input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Manage Users Page Styles */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.users-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.role-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.role-admin {
    background: #3498db;
    color: white;
}

.role-executive_producer {
    background: #9b59b6;
    color: white;
}

.role-producer {
    background: #95a5a6;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.modal-header h2 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.modal-header p {
    margin: 0;
    color: #7f8c8d;
}

.project-checkboxes {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    background: #f8f9fa;
}

.project-checkbox {
    display: block;
    padding: 8px 0;
}

.project-checkbox input {
    margin-right: 8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Button Enhancements */
.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c0392b;
}

.text-danger {
    color: #e74c3c;
}

.text-muted {
    color: #95a5a6;
}

/* Form Improvements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Success/Error Messages */
.success-message {
    padding: 15px;
    margin: 20px 0;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

.error-message {
    padding: 15px;
    margin: 20px 0;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

/* Responsive Design for Topsheet */
@media (max-width: 768px) {
    .topsheet-table-container {
        overflow-x: scroll;
    }
    
    .legend-items {
        flex-direction: column;
    }
    
    .project-card-footer {
        flex-direction: column;
    }
    
    .project-card-footer .btn {
        width: 100%;
    }
}

/* Page Header Enhancements */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    margin: 0;
    flex-grow: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state p {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Admin Action Cards Grid */
.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.action-card h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

.action-card p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

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

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

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Project Name Cell in Topsheet */
.project-name-cell {
    font-weight: 500;
}

/* Variance Display */
.variance-positive {
    color: #27ae60;
}

.variance-negative {
    color: #e74c3c;
    font-weight: 600;
}

/* ========================================
   NEW FEATURES: Expandable Transactions & Sticky Headers
   Added: 16/02/2026
   ======================================== */

/* Unallocated Warning Alert */
.unallocated-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.warning-icon {
    font-size: 24px;
    line-height: 1;
}

.warning-content {
    flex: 1;
    font-size: 14px;
    color: #856404;
}

.warning-content strong {
    display: block;
    margin-bottom: 5px;
    color: #664d03;
}

.warning-link {
    display: inline-block;
    margin-left: 10px;
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.warning-link:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Sticky Table Headers */
/* Fix: Remove overflow from table-container to allow sticky positioning */
.report-section .table-container {
    overflow-x: visible;
    overflow-y: visible;
}

.budget-table {
    position: relative;
    width: 100%;
}

.budget-table thead {
    position: sticky;
    top: 70px; /* Below navbar - adjusted for actual navbar height */
    z-index: 100;
    background: var(--bg-white);
}

.budget-table thead th {
    background: var(--bg-white) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Expand/Collapse Column */
.expand-col {
    width: 40px;
    padding: 0.75rem 0.5rem !important;
}

.expand-cell {
    width: 40px;
    text-align: center;
    padding: 0.75rem 0.5rem !important;
    vertical-align: middle;
}

.expand-icon {
    display: inline-block;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #3498db;
    transition: transform 0.2s, color 0.2s;
    padding: 5px;
}

.expand-icon:hover {
    color: #2980b9;
    transform: scale(1.2);
}

.expand-icon.expanded {
    color: #27ae60;
}

/* Master Toggle Arrow in Column Header */
.expand-all-icon {
    display: inline-block;
    cursor: pointer;
    font-size: 16px;
    color: #3498db;
    transition: all 0.2s ease;
    user-select: none;
    padding: 4px 8px;
    border-radius: 4px;
}

.expand-all-icon:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.2);
}

.expand-all-icon.expanded {
    color: #27ae60;
}

/* Transaction Detail Rows - CSS Grid (No Tables) */
.transaction-detail-row {
    background: #f8f9fa;
}

.transaction-detail-cell {
    padding: 15px 20px 15px 60px !important;
}

/* Grid Container */
.transaction-grid {
    display: grid;
    grid-template-columns: 100px 80px 150px 80px 1fr 100px;
    gap: 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Headers - Always First */
.trans-header {
    background: #e9ecef;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Data Cells */
.trans-cell {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 14px;
    color: #212529;
    background: white;
}

/* Right-aligned columns */
.trans-right {
    text-align: right;
}

/* Hover effect on rows */
.trans-cell:hover {
    background: #f8f9fa;
}

/* Remove old table styles */
.transaction-table {
    display: none !important;
}

.transaction-table thead {
    display: none !important;
}

.transaction-table tbody {
    display: none !important;
}

/* Sortable Column Headers */
.budget-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.budget-table th.sortable:hover {
    background: #e9ecef !important;
}

.sort-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    color: #95a5a6;
    transition: color 0.2s;
}

.budget-table th.sortable.sort-asc .sort-icon,
.budget-table th.sortable.sort-desc .sort-icon {
    color: #3498db;
    font-weight: bold;
}

/* Button Styles */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Ensure total row doesn't get sorting styling */
.total-row {
    pointer-events: none;
}

/* Mobile Responsiveness for New Features */
@media (max-width: 768px) {
    .unallocated-warning {
        flex-direction: column;
        gap: 10px;
    }
    
    .transaction-detail-cell {
        padding: 15px 10px 15px 30px !important;
    }
    
    .budget-table thead {
        top: 60px;
    }
    
    .report-section .table-container {
        overflow-x: auto;
    }
    
    /* Adjust grid for mobile - smaller columns */
    .transaction-grid {
        grid-template-columns: 90px 70px 120px 70px 1fr 90px;
        font-size: 13px;
    }
    
    .trans-header,
    .trans-cell {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ========================================
   BUDGET NOTES MODAL STYLES
   ======================================== */

.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);display:none;align-items:center;justify-content:center;z-index:2000}
.modal{background:#fff;border-radius:8px;width:1000px;max-width:95vw;max-height:90vh;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,0.2);display:flex;flex-direction:column;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
.modal-header{padding:34px;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}
.modal-header h2{margin:0;font-size:20px;color:#1f2937}
.modal-close-btn{background:none;border:none;font-size:24px;color:#6b7280;cursor:pointer;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px}
.modal-close-btn:hover{background:#f3f4f6}
.modal-body{padding:12px 34px;overflow-y:auto;flex:1}
.note-form-row{display:grid;grid-template-columns:110px 100px 5fr 110px;gap:28px;align-items:center;margin-bottom:16px}
.note-radio-column{display:flex;flex-direction:column;align-items:flex-start}
.tooltip{display:none;position:absolute;left:0;top:100%;margin-top:4px;background:#1f2937;color:white;padding:6px 10px;border-radius:4px;font-size:12px;font-weight:400;white-space:nowrap;z-index:10}
.note-label:hover .tooltip,.note-radio-option label:hover .tooltip{display:block}
.note-label{display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:6px}
.note-radio-options{display:flex;flex-direction:column;align-items:flex-start}
.note-radio-option{display:flex;align-items:center;margin-bottom:10px}
.note-radio-option input[type="radio"]{margin-right:8px;cursor:pointer}
.note-radio-option label{margin:0;font-weight:400;font-size:14px;cursor:pointer}
.note-amount-column{display:flex;flex-direction:column;align-items:flex-start}
.note-amount-column input{padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;width:110px}
.note-amount-column input:disabled{background:#f9fafb;color:#9ca3af;cursor:not-allowed}
.note-amount-column input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,0.1)}
.note-text-column{display:flex;align-items:center}
.note-text-column textarea{padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;font-family:inherit;resize:vertical;min-height:90px;width:100%}
.note-text-column textarea:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,0.1)}
.note-buttons-column{display:flex;flex-direction:column;gap:8px}
.note-attach-btn{background:none;border:1px solid #d1d5db;border-radius:6px;padding:10px 12px;cursor:pointer;font-size:20px;color:#6b7280;height:42px;width:42px;display:flex;align-items:center;justify-content:center}
.note-attach-btn:hover{background:#f9fafb;border-color:#9ca3af}
.note-save-btn{padding:10px 20px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;height:42px;min-width:90px}
.note-save-btn:hover{background:#2563eb}
.modal-footer{padding:12px;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end}
.modal-close-footer-btn{padding:10px 20px;background:#f3f4f6;color:#374151;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer}
.modal-close-footer-btn:hover{background:#e5e7eb}
.note-col{width:100px;text-align:center}
.note-cell{text-align:center}
.note-btn{position:relative;padding:8px 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;cursor:pointer}
.note-btn:hover{background:#2563eb}

.notes-history{margin-top:24px;border-top:2px solid #e5e7eb;padding-top:24px}
.notes-history h3{font-size:16px;color:#374151;margin:0 0 16px 0;display:flex;align-items:center;gap:8px}
.note-count{background:#e5e7eb;color:#6b7280;padding:2px 8px;border-radius:12px;font-size:13px;font-weight:600}
.notes-list{display:flex;flex-direction:column;gap:12px;max-height:300px;overflow-y:auto}
.note-card{border:1px solid #e5e7eb;border-radius:8px;padding:6px 16px;background:#fafafa}
.note-card-po{border-left:4px solid #f97316}
.note-card-saving{border-left:4px solid #10b981}
.note-card-overrun{border-left:4px solid #f59e0b}
.note-card-note{border-left:4px solid #6b7280}
.note-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px}
.note-meta{display:flex;gap:12px;font-size:13px;color:#6b7280;align-items:center}
.note-amount{font-weight:600;font-size:14px}
.note-amount-positive{color:#f97316}
.note-amount-negative{color:#10b981}
.note-text{font-size:14px;color:#374151;margin:8px 0;white-space:pre-wrap}
.note-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.note-footer-left{display:flex;gap:12px;align-items:center}
.note-attachment{font-size:13px;color:#3b82f6;text-decoration:none;display:flex;align-items:center;gap:4px}
.note-attachment:hover{text-decoration:underline}
.invoiced-checkbox{display:flex;align-items:center;gap:8px;font-size:13px;color:#374151}
.invoiced-checkbox input[type="checkbox"]{cursor:pointer;width:16px;height:16px}
.invoiced-checkbox label{cursor:pointer;user-select:none}
.note-edit-btn{padding:6px 14px;background:white;color:#374151;border:1px solid #d1d5db;border-radius:6px;font-size:13px;cursor:pointer}
.note-edit-btn:hover{background:#f9fafb}
.attachments-display{margin-bottom:20px}
.attachment-list{display:flex;flex-wrap:wrap;gap:8px}
.attachment-item{display:flex;align-items:center;gap:8px;padding:6px 12px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;font-size:13px;color:#1e40af}
.attachment-item button{background:none;border:none;color:#6b7280;cursor:pointer;padding:0;font-size:16px}
.note-indicator{position:absolute;top:-4px;right:-4px;display:flex;gap:2px}
.note-dot{width:8px;height:8px;border-radius:50%;border:2px solid white}
.note-dot-po{background:#f97316}
.note-dot-saving{background:#10b981}
.note-dot-overrun{background:#f59e0b}
.note-dot-note{background:#374151}
.adjustment-saving{background-color:#d1fae5 !important;color:#065f46 !important}
.adjustment-overrun{background-color:#fed7aa !important;color:#9a3412 !important}
.expense-indicator{color:#f97316;margin-left:4px;font-size:10px}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
/* Project Notes Section */
.project-notes-section {
    margin: 24px 0;
}

.project-notes-instruction {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.project-notes-btn {
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.project-notes-btn:hover {
    background: #2563eb;
}

/* Project Notes Modal - Simplified Layout */
.note-form-simple {
    margin-bottom: 24px;
}

.note-text-area {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 16px;
}

.note-text-area:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
/* Language Toggle Button */
.lang-toggle-btn {
    padding: 6px 12px;
    background: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 12px;
}

.lang-toggle-btn:hover {
    background: #3b82f6;
    color: white;
}