body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #2d3748;
}

.header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: #2d3748;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e2e8f0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.8;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    position: relative;
    padding-right: 60px;
}

/* EVIL MODE Button */
.evil-mode-btn {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    border: 2px solid #ff0000;
    color: #ff0000;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.5s ease, background-color 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Only show when hovering directly over the button area */
.evil-mode-btn:hover {
    opacity: 1;
    background: #ff0000;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

.evil-mode-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* EVIL MODE Active State */
body.evil-mode {
    transition: background-color 2s ease;
}

body.evil-mode * {
    color: #ff0000 !important;
}

body.evil-mode th,
body.evil-mode thead,
body.evil-mode thead * {
    background-color: #8B0000 !important;
    color: #ffffff !important;
}

body.evil-mode td,
body.evil-mode tbody,
body.evil-mode tbody tr {
    background-color: #FF4500 !important;
    color: #1a1a1a !important;
}

/* Backgrounds slowly turn dark grey */
body.evil-mode,
body.evil-mode .header,
body.evil-mode .content,
body.evil-mode .container,
body.evil-mode .card,
body.evil-mode .project-card,
body.evil-mode .modal-content,
body.evil-mode .tab-content,
body.evil-mode .footer,
body.evil-mode .global-footer {
    background-color: #2a2a2a !important;
    background-image: none !important;
    transition: background-color 2s ease !important;
}

body.evil-mode .section,
body.evil-mode .form-group,
body.evil-mode .input-group,
body.evil-mode .dropdown-menu,
body.evil-mode .tab-section{
    background-color: #434343 !important;
    transition: background-color 2s ease !important;
}

/* Inputs, selects, checkboxes - all red */
body.evil-mode input[type="checkbox"],
body.evil-mode input[type="radio"] {
    accent-color: #ff0000 !important;
}

body.evil-mode select,
body.evil-mode input,
body.evil-mode textarea {
    border-color: #ff0000 !important;
    background-color: #3a3a3a !important;
    color: #ff0000 !important;
}

body.evil-mode select:focus,
body.evil-mode input:focus,
body.evil-mode textarea:focus {
    border-color: #ff0000 !important;
    outline: 2px solid #ff0000 !important;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3) !important;
}

/* Links */
body.evil-mode a {
    color: #ff0000 !important;
}

body.evil-mode a:hover {
    color: #cc0000 !important;
}

/* Buttons */
body.evil-mode button,
body.evil-mode .btn {
    background-color: #8B0000 !important;
    border-color: #ff0000 !important;
    color: #ffffff !important;
}

body.evil-mode button:hover,
body.evil-mode .btn:hover {
    background-color: #ff0000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5) !important;
}

/* Progress bars, range sliders */
body.evil-mode input[type="range"] {
    accent-color: #ff0000 !important;
}

body.evil-mode progress {
    accent-color: #ff0000 !important;
}

/* Scrollbars */
body.evil-mode ::-webkit-scrollbar-thumb {
    background: #ff0000 !important;
}

body.evil-mode ::-webkit-scrollbar-track {
    background: #2a2a2a !important;
}

.user-session {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 0.5rem;
    border-right: 1px solid #d1d5db;
    margin-right: 0.5rem;
}

.username-display {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.username-display::before {
    content: "Logged in as ";
    color: #9ca3af;
    font-weight: 400;
}

.header-title-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.header-title-link:hover {
    opacity: 0.8;
}

.header-title {
    margin: 0;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #8B0000;
    font-family: 'Segoe UI Light', 'Helvetica Neue Light', 'Thin', sans-serif;
    font-size: 1.8rem;
    cursor: pointer;
}

.header-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: #f0f0f0;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.header-back-btn:hover {
    background-color: #e2e8f0;
    border-color: #a0aec0;
}

.container {
    padding: 2rem 1rem;
    max-width: 1300px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}


.actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

/* New class for split actions */
.actions-split {
    justify-content: space-between;
    align-items: center;
}

.actions-split > div:first-child {
    display: flex;
    align-items: center;
}

.actions-split > div:last-child {
    display: flex;
    align-items: center;
}


.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #111827;
    border: 1px solid #d1d5db;
    transition: background 0.2s;
}

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


.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem; /* Increased gap for more distance */
}

/* Add concise style for compact cards */
.project-card.concise {
    padding: 1rem 1.25rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 0; /* grid handles spacing */
    cursor: pointer;
}

.project-card.concise h3 {
    font-size: 1.15rem;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.project-card.concise .project-meta {
    font-size: 0.98rem;
    color: #4b5563;
    margin-top: 0;
    line-height: 1.4;
}


.project-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.project-meta {
    font-size: 0.9rem;
    color: #4b5563;
}

.role-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-edit {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.role-view {
    background-color: #dbeafe;
    color: #0c4a6e;
    border: 1px solid #7dd3fc;
}

.project-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}


.empty-state {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.error-message {
    color: #d9534f;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: bold;
}

.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 320px;
    margin: 5vh auto 0 auto;
}

.login-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-container button,
.login-container .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.login-container button {
    background: #007bff;
    color: #fff;
    margin-bottom: 0.5rem;
}

.login-container button:hover {
    background: #0056b3;
}

.login-actions {
    margin-top: 1rem;
    text-align: center;
}

.terms-agreement {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #555;
}

.terms-agreement a {
    color: #8B0000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-agreement a:hover {
    color: #d32f2f;
    text-decoration: underline;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.form-group input[type="text"],
.form-group input[type="date"] {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: #f9fafb;
    box-sizing: border-box;
    margin-bottom: 0.25rem;
}

form button.btn-success {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    border-radius: 6px;
    background-color: #22c55e;
    color: #fff;
    border: none;
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

form button.btn-success:hover {
    background-color: #16a34a;
}

/* Account Link Button Styling */
.btn-account-link {
    background-color: #22c55e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-account-link:hover {
    background-color: #16a34a;
}

/* Account Linked Display */
.account-linked {
    color: #16a34a;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background-color: #f0fdf4;
    border-radius: 4px;
    display: inline-block;
}

/* Account Link Modal */
.account-link-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.account-link-modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.account-link-modal-content h2 {
    margin-top: 0;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.account-link-modal-content p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.account-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.account-search-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.account-link-modal-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.account-link-modal-buttons .btn {
    padding: 0.5rem 1.5rem;
}

/* Share Project Modal */
.share-project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.share-project-modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.share-project-modal-content h2 {
    margin-top: 0;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.share-project-modal-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.access-level-selection {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 4px;
}

.access-level-selection label {
    cursor: pointer;
}

.access-level-selection input[type="radio"] {
    cursor: pointer;
}

.share-project-modal-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.share-project-modal-buttons .btn {
    padding: 0.5rem 1.5rem;
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.employees-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.employee-table th, .employee-table td {
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 1rem;
}

.employee-table th {
    background: #f4f6f8;
    color: #1f2937;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

/* Sticky first column for employee table */
.employee-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f4f6f8;
}

.employee-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #ffffff;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.employee-table tr.employee-row {
    border-bottom: 1px solid #e5e7eb;
}

.employee-table tr.employee-row:last-child {
    border-bottom: none;
}

.employee-table td {
    vertical-align: middle;
}

.employee-table td:nth-child(2) {
    color: #6b7280;
    font-weight: 500;
}

.employee-add-row {
    margin-top: 2rem;
    text-align: center;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(31,41,55,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 320px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    text-align: center;
}

.invoice-modal-content {
    max-width: 820px;
    width: min(92vw, 820px);
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid #dbeafe;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.invoice-modal-content h2 {
    text-align: left;
    margin-bottom: 0.35rem;
}

.invoice-modal-subtitle {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.invoice-line-item-group {
    margin-bottom: 0.75rem;
}

.invoice-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.invoice-metric-card {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem;
}

.invoice-metric-label {
    display: block;
    color: #475569;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.invoice-metric-card strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.invoice-metric-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #334155;
    font-size: 0.85rem;
}

.invoice-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.invoice-amount-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.invoice-amount-actions .btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
}

.invoice-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

.finance-tab-shell {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.finance-tab-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.finance-tab-header h2 {
    margin: 0;
}

.finance-tab-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.finance-table-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    padding: 1rem;
}

.finance-actions {
    margin-bottom: 0.9rem;
    display: flex;
    justify-content: flex-end;
}

.deposit-table,
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

.deposit-table thead,
.invoice-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.deposit-table th,
.deposit-table td,
.invoice-table th,
.invoice-table td {
    padding: 0.75rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.92rem;
    vertical-align: middle;
}

.deposit-table th,
.invoice-table th {
    color: #1f2937;
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.deposit-table tbody tr:nth-child(even),
.invoice-table tbody tr:nth-child(even) {
    background: #fafcff;
}

.deposit-table tbody tr:hover,
.invoice-table tbody tr:hover {
    background: #f1f5f9;
}

.finance-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.finance-status-received,
.finance-status-posted,
.finance-status-paid {
    background: #dcfce7;
    color: #166534;
}

.finance-status-pending,
.finance-status-overdue {
    background: #fef3c7;
    color: #92400e;
}

.finance-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.finance-row-actions .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
}

body.evil-mode .finance-table-card {
    border-color: #7f1d1d;
}

body.evil-mode .finance-status-badge {
    background: #7f1d1d;
    color: #fef2f2;
}

@media (max-width: 720px) {
    .invoice-metrics,
    .invoice-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Filter Panel Styles */
.filters-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.filters-toggle-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.filters-toggle-btn.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.filter-panel.active {
    right: 0;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
    border-bottom: 1px solid #e5e7eb;
}

.filter-panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.filter-panel-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.filter-panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.filter-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-section-title {
    margin: 0 0 1rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.filter-checkbox-label,
.filter-radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

.filter-checkbox-label:hover,
.filter-radio-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.filter-checkbox-label:has(input:checked),
.filter-radio-label:has(input:checked) {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.filter-checkbox-label input,
.filter-radio-label input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

.filter-panel-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.filter-apply-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.filter-apply-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

.filter-reset-btn {
    padding: 0.875rem 1.25rem;
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-reset-btn:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #9ca3af;
}

/* Category filter checkboxes inside the panel */
#overviewFilters {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#overviewFilters .filter-checkbox-label {
    margin-bottom: 0.5rem;
}

#overviewFilters .filter-checkbox-label:last-child {
    margin-bottom: 0;
}

/* Project Milestone Badges */
.milestone-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.milestone-badge {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.milestone-badge:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.milestone-badge.completed {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
}

.milestone-badge.completed:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #059669;
}

.milestone-checkbox {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #10b981;
    transition: all 0.2s ease;
}

.milestone-badge.completed .milestone-checkbox {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.milestone-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.milestone-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.milestone-badge.completed .milestone-label {
    color: #065f46;
}

.milestone-date {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.milestone-finality {
    font-size: 0.72rem;
    color: #475569;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.milestone-badge.completed .milestone-date {
    color: #047857;
    font-weight: 600;
}

/* Milestone Modal */
.milestone-modal-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 480px;
    width: 90%;
    text-align: left;
}

.milestone-modal-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.milestone-modal-content p {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.milestone-date-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

#milestoneFinalizedBy,
#milestoneFinalizationMethod,
#milestoneFinalizationNote {
    margin-bottom: 0.75rem;
}

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

.milestone-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.milestone-modal-buttons .btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.milestone-modal-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.milestone-modal-buttons .btn-secondary {
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.milestone-modal-buttons .btn-secondary:hover {
    background: #f3f4f6;
    color: #374151;
}

#exportProjectForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: #e5e7eb;
    color: #1f2937;
    border: none;
    border-radius: 6px 6px 0 0;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    flex: 1;
    min-width: 120px;
}

.tab-btn.active,
.tab-btn:hover {
    background: #2563eb;
    color: #fff;
}

.tab-section {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 2rem 1.5rem;
    min-height: 200px;
}

.weekly-grid {
    display: flex;
    flex-direction: column;
    margin-top: 1.5rem;
    border-radius: 10px;
    overflow-x: auto; /* Enable horizontal scroll */
    overflow-y: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    background: #fff;
    min-width: 0;
}

.weekly-grid-header {
    display: flex;
    background: #f4f6f8;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    min-width: fit-content;
    box-sizing: border-box; /* Ensure consistent box model */
}

.weekly-grid-corner {
    width: 140px;
    min-width: 140px;
    background: #f4f6f8;
    flex-shrink: 0;
    box-sizing: border-box; /* Ensure consistent box model */
    position: sticky;
    left: 0;
    z-index: 2;
}

.weekly-grid-week {
    width: 180px;      /* Fixed width for each week column */
    min-width: 180px;
    max-width: 180px;
    flex: 0 0 180px;
    padding: 1rem 0.5rem;
    text-align: center;
    border-left: 1px solid #e5e7eb;
    box-sizing: border-box; /* Ensure consistent box model */
}

.weekly-grid-row {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    min-width: fit-content;
    box-sizing: border-box; /* Ensure consistent box model */
}

.weekly-grid-label {
    width: 140px;
    min-width: 140px;
    background: #f9fafb;
    padding: 1rem 0.75rem;
    font-weight: 500;
    color: #1f2937;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box; /* Ensure consistent box model */
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.weekly-grid-cell {
    width: 180px;      /* Fixed width for each week column */
    min-width: 180px;
    max-width: 180px;
    flex: 0 0 180px;
    padding: 1rem 0.5rem;
    text-align: center;
    border-left: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box; /* Ensure consistent box model */
}

.total-row .weekly-grid-label,
.total-row .weekly-grid-cell {
    background: #f1f5f9;
    font-weight: bold;
    color: #2563eb;
    box-sizing: border-box; /* Ensure consistent box model */
}

.total-row .weekly-grid-label {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

/* Weekly Change Order Row Styling */
.weekly-change-order-row .weekly-grid-label,
.weekly-change-order-row .weekly-grid-cell {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

.weekly-change-order-row .weekly-grid-label {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 2px 0 4px rgba(220, 38, 38, 0.1);
}

/* Style for expenses and line items tables */
.expenses-table, .line-items-table, .overview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    table-layout: auto;
}

.expenses-table th, .line-items-table th, .overview-table th,
.expenses-table td, .line-items-table td, .overview-table td {
    padding: 1rem 1.2rem;
    border: 1px solid #d1d5db; /* Add grid lines */
    text-align: left;
}

.expenses-table thead, .line-items-table thead, .overview-table thead {
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
    color: #ffffff;
    font-weight: 600;
}

.expenses-table thead tr:hover, .line-items-table thead tr:hover, .overview-table thead tr:hover,
.daily-table thead tr:hover, .employees-table thead tr:hover {
    background: transparent;
}

.expenses-table th, .line-items-table th, .overview-table th {
    background: inherit;
    color: inherit;
    font-weight: inherit;
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    border-bottom: 3px solid #1e40af;
    border: none;
    white-space: nowrap;
}

.expenses-table th.sortable, .line-items-table th.sortable, .overview-table th.sortable, .invoice-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem;
}

.expenses-table th.sortable:hover, .line-items-table th.sortable:hover, .overview-table th.sortable:hover, .invoice-table th.sortable:hover {
    opacity: 0.9;
}

.sort-indicator {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.sort-indicator.asc {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid #ffffff;
}

.sort-indicator.desc {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #ffffff;
}

.expenses-table th:first-child, .line-items-table th:first-child, .overview-table th:first-child {
    border-radius: 10px 0 0 0;
}

.expenses-table th:last-child, .line-items-table th:last-child, .overview-table th:last-child {
    border-radius: 0 10px 0 0;
}

/* Sticky first column for horizontal scrolling */
.expenses-container, .line-items-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.expenses-table th:first-child, .line-items-table th:first-child, .overview-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
}

.expenses-table td:first-child, .line-items-table td:first-child, .overview-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Maintain alternating row colors for sticky column */
.expenses-table tbody tr:nth-child(even) td:first-child,
.line-items-table tbody tr:nth-child(even) td:first-child,
.overview-table tbody tr:nth-child(even) td:first-child {
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
}

.expenses-table tbody tr:nth-child(even), .line-items-table tbody tr:nth-child(even), .overview-table tbody tr:nth-child(even) {
    background-color: #f4f6f8; /* Alternate row colors */
}

.expenses-table tbody tr:hover, .line-items-table tbody tr:hover, .overview-table tbody tr:hover {
    background-color: #e5e7eb; /* Highlight row on hover */
}

.expenses-table td, .line-items-table td, .overview-table td {
    color: #4b5563;
    font-size: 0.95rem;
}

/* Change Order Expense Styling */
.expense-row.change-order {
    background-color: #fef2f2 !important;
}

.expense-row.change-order:hover {
    background-color: #fee2e2 !important;
}

.change-order-amount {
    color: #dc2626 !important;
    font-weight: 600;
}

/* Nested bid-costs table styling to match main table headers */
.bid-costs-table thead {
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
}

.bid-costs-table thead tr:hover {
    background: transparent;
}

.bid-costs-table th {
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    background: inherit;
    border-bottom: 3px solid #1e40af;
    border: none;
    white-space: nowrap;
}

.bid-costs-table th:first-child {
    border-radius: 10px 0 0 0;
}

.bid-costs-table th:last-child {
    border-radius: 0 10px 0 0;
}

/* Bid Cost Add Button - subtle with green glow on hover */
.add-bid-cost-btn {
    display: block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: transparent;
    border: 1px dashed #9ca3af;
    color: #6b7280;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-bid-cost-btn:hover {
    background: #dcfce7;
    border-color: #22c55e;
    color: #16a34a;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

/* Bid Cost Edit Button */
.edit-bid-cost-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    background: #e5e7eb;
    border: none;
    color: #374151;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-bid-cost-btn:hover {
    background: #3b82f6;
    color: #fff;
}

/* Bid Cost Save/Delete Buttons */
.save-bid-cost-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: #22c55e;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.25rem;
    transition: all 0.2s ease;
}

.save-bid-cost-btn:hover {
    background: #16a34a;
}

.delete-bid-cost-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: #ef4444;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-bid-cost-btn:hover {
    background: #dc2626;
}

.cancel-bid-cost-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: #6b7280;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-bid-cost-btn:hover {
    background: #4b5563;
}

/* Bid cost type dropdown */
.bid-cost-type-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* Bid cost type badges */
.bid-cost-type-badge {
    text-transform: capitalize;
}

.bid-cost-type-materials {
    background: #d1fae5;
    color: #065f46;
}

.bid-cost-type-equipment {
    background: #dbeafe;
    color: #1e40af;
}

.bid-cost-type-permits {
    background: #fef3c7;
    color: #92400e;
}

.bid-cost-type-misc {
    background: #e5e7eb;
    color: #374151;
}

.bid-cost-type-subcontract {
    background: #fce7f3;
    color: #9d174d;
}

/* Bid cost inline edit inputs */
.bid-cost-row input[type="text"],
.bid-cost-row input[type="number"],
.bid-cost-row textarea {
    width: 100%;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-sizing: border-box;
}

.overview-table tfoot td {
    background-color: #f1f5f9;
    font-weight: bold;
    color: #2563eb;
}

/* Responsive styles for overview table */
.overview-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

.overview-table {
    min-width: 100%;
    table-layout: auto;
}

.overview-table th, .overview-table td {
    padding: 0.75rem 0.8rem;
    font-size: 0.85rem;
    word-wrap: break-word;
}

.overview-table th {
    white-space: nowrap;
}

/* Sticky first column specifically for overview table */
.overview-table-wrapper .overview-table th:first-child,
.overview-table-wrapper .overview-table td:first-child,
.overview-table-wrapper .overview-table tfoot td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1400px) {
    .overview-table th, .overview-table td {
        padding: 0.65rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Daily overview delete button */
.daily-labor-delete-btn {
    display: none;
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.daily-labor-delete-btn:hover {
    opacity: 0.8;
}

/* Daily table styles */
.daily-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  table-layout: auto;
}

.daily-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.daily-table th, .daily-table td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: center;
}

.daily-table th {
  white-space: nowrap;
}

.daily-table thead {
  background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
  color: #ffffff;
  font-weight: 600;
}

.daily-table th {
  background: inherit;
  color: inherit;
  font-weight: inherit;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  border-bottom: 3px solid #1e40af;
  border: none;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Sticky first column for daily table */
.daily-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
}

.daily-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.daily-table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Maintain sticky column style for alternating rows */
.daily-table tr:nth-child(even) td:first-child {
  background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
}

.daily-table tbody tr:hover {
  background-color: #e5e7eb;
}

.daily-table tfoot td {
  font-weight: bold;
  background-color: #f3f4f6;
}

.daily-table tfoot td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
  color: #ffffff;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Totals cells should align left so the hours line up with the column values */
.daily-total-cell {
    text-align: left;
    padding-left: 0.5rem;
}

/* Stronger selector to ensure totals in the table footer are left-aligned */
.daily-table tfoot td.daily-total-cell {
    text-align: left !important;
    padding-left: 0.5rem !important;
}

/* Styling for input fields */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Daily navigation styles */
.daily-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.daily-navigation button {
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.daily-navigation span {
  font-size: 1.2rem;
  font-weight: bold;
}

@media (max-width: 400px) {
    .login-container {
        width: 95vw;
        padding: 1rem;
    }
}

/* Delete project button styling */
.delete-project-btn {
    opacity: 0.3;
    transition: opacity 0.2s ease;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.delete-project-btn:hover {
    background: #b91c1c;
}

.project-card:hover .delete-project-btn {
    opacity: 1;
}

/* Project name button styling */
.project-name-btn {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.project-name-btn:hover {
    background: #1d4ed8;
}

/* Edit project button styling */
.edit-project-btn {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease;
    min-width: 2.5rem;
}

.edit-project-btn:hover {
    background: #d97706;
}

/* Assigned Employees Section Styles */
.employees-container {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.employees-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    table-layout: auto;
}

.employees-table thead {
    background: linear-gradient(135deg, #1e40af 0%, #1f2937 100%);
    color: #ffffff;
    font-weight: 600;
}

.employees-table th {
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    border-bottom: 3px solid #1e40af;
    overflow-wrap: break-word;
    word-break: break-word;
}

.employees-table th:first-child {
    border-radius: 10px 0 0 0;
}

.employees-table th:last-child {
    border-radius: 0 10px 0 0;
}

.employees-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.employees-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.employees-table tbody tr:hover {
    background-color: #f0f9ff;
    transform: scale(1.01);
    box-shadow: inset 0 0 10px rgba(37, 99, 235, 0.1);
}

.employees-table tbody tr:last-child {
    border-bottom: none;
}

.employees-table td {
    padding: 1.1rem 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    color: #374151;
    vertical-align: middle;
}

.employees-table td:nth-child(1) {
    font-weight: 600;
    color: #1f2937;
}

.employees-table td:nth-child(2),
.employees-table td:nth-child(3) {
    color: #6b7280;
    font-weight: 500;
}

.employees-table .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.employees-table .delete-employee-btn {
    background-color: #ef4444;
    color: #ffffff;
    min-width: 80px;
}

.employees-table .delete-employee-btn:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.employees-table .delete-employee-btn:active {
    transform: translateY(0);
}

.employees-add-row {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.employees-add-row #showAddEmployee {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.employees-add-row #showAddEmployee:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}

.employees-add-row #showAddEmployee:active {
    transform: translateY(0);
}

/* Empty state for no assigned employees */
.employees-container:has(.employees-table tbody tr:last-child:not(:first-child)) .empty-employee-state {
    display: none;
}

.empty-employee-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #9ca3af;
}

.empty-employee-state p {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #6b7280;
}

/* Billable Wage Rate Cell Styles */
.project-wage-cell {
    cursor: pointer;
    position: relative;
}

.project-wage-cell .wage-display {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.project-wage-cell .wage-display:hover {
    background-color: #e5e7eb;
}

.project-wage-cell .wage-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #2563eb;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
}

/* Remove Wage Button Styles */
.remove-wage-btn {
    display: none;
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.project-wage-cell:hover .remove-wage-btn {
    display: inline-block;
}

.remove-wage-btn:hover {
    opacity: 0.8;
}

/* Global Footer Styles */
.global-footer {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: #2d3748;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid #cbd5e0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-logo-link:hover .footer-logo-img {
    opacity: 1;
}

.footer-text {
    flex: 1;
    text-align: right;
}

.footer-text p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #4a5568;
    letter-spacing: 0.3px;
}

/* Shared users styling */
.shared-users-list {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: #f0f9ff;
    border-radius: 4px;
    border-left: 3px solid #0ea5e9;
    font-size: 0.875rem;
}

.shared-users-list strong {
    color: #0c4a6e;
    display: block;
    margin-bottom: 0.25rem;
}

.shared-user-pill {
    display: inline-block;
    background: #e0f2fe;
    color: #0c4a6e;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.user-role {
    font-weight: 600;
    color: #0555b0;
}

/* Project Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.file-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.file-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.file-name {
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    word-break: break-word;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.file-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.file-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.file-actions button:hover {
    opacity: 0.85;
}

.file-download-btn {
    background: #3b82f6;
    color: white;
}

.file-delete-btn {
    background: #ef4444;
    color: white;
}

/* File type icons */
.file-type-pdf { color: #ef4444; }
.file-type-doc, .file-type-docx { color: #2563eb; }
.file-type-xls, .file-type-xlsx { color: #16a34a; }
.file-type-jpg, .file-type-jpeg, .file-type-png, .file-type-gif { color: #8b5cf6; }
.file-type-txt, .file-type-csv { color: #6b7280; }

/* Upload drop zone styling */
.files-grid.drag-over {
    background: #eff6ff;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
}

/* Home dashboard refresh */
.home-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    background: linear-gradient(135deg, #f9fbfd 0%, #eef3f8 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    padding: 1.2rem 1.3rem;
}

.home-hero h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.45rem;
}

.home-hero p {
    margin: 0.35rem 0 0;
    color: #475569;
}

.home-hero-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.home-kpi-section {
    border: 1px solid #dbe2ea;
    background: linear-gradient(180deg, #f8fbfd 0%, #f2f6fb 100%);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    padding: 1rem;
}

.home-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.home-kpi-heading {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.home-kpi-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
}

.home-kpi-subtitle {
    color: #64748b;
    font-size: 0.86rem;
}

.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.7rem;
}

.home-kpi-card {
    border-radius: 12px;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.home-kpi-card span {
    color: #64748b;
    font-size: 0.82rem;
}

.home-kpi-card strong {
    color: #0f172a;
    font-size: 1.2rem;
}

.home-project-section {
    border: 1px solid #dbe2ea;
    background: linear-gradient(180deg, #f8fbfd 0%, #f1f5f9 100%);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    padding: 1rem;
}

#sharedProjectsSection {
    background: linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
    box-shadow: 0 9px 22px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.home-section-header h3,
.home-project-section h3 {
    margin: 0;
    color: #0f172a;
}

.home-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.status-filter-btn {
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 999px;
    background: #e2e8f0;
    color: #1f2937;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}

.status-filter-btn.active {
    background: #2563eb;
    color: #ffffff;
}

.show-finished-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #475569;
    font-size: 0.85rem;
}

.home-project-card {
    border: 1px solid #cfd9e6;
    background: linear-gradient(170deg, #ffffff 0%, #f6fafe 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.6rem;
}

.project-card.concise.home-project-card {
    justify-content: flex-start;
    align-items: stretch;
}

.home-project-card.finished {
    opacity: 0.72;
}

.home-current-projects-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.1rem 0.1rem 0.45rem;
    scroll-snap-type: x proximity;
}

.home-current-projects-grid .home-project-card {
    flex: 0 0 min(360px, 88vw);
    min-width: 300px;
    margin-bottom: 0;
    scroll-snap-align: start;
}

.home-shared-projects-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.1rem 0.1rem 0.45rem;
    scroll-snap-type: x proximity;
}

.home-shared-projects-grid .home-project-card {
    flex: 0 0 min(360px, 88vw);
    min-width: 300px;
    margin-bottom: 0;
    scroll-snap-align: start;
}

.home-project-top-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-height: 2.4rem;
}

.project-name-btn {
    flex: 1;
    text-align: left;
    border: 1px solid #93c5fd;
    background: linear-gradient(180deg, #e0efff 0%, #dbeafe 100%);
    color: #1e3a8a;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.edit-project-btn,
.advance-status-btn {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.75rem;
}

.edit-project-btn {
    background: #e2e8f0;
    color: #1f2937;
}

.advance-status-btn {
    background: #0ea5a4;
    color: #ffffff;
}

.home-status-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.home-health-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.home-health-on-track {
    background: #d1fae5;
    color: #065f46;
}

.home-health-attention {
    background: #fef3c7;
    color: #92400e;
}

.home-health-at-risk {
    background: #fee2e2;
    color: #991b1b;
}

.home-health-complete {
    background: #e2e8f0;
    color: #334155;
}

.status-badge,
.contract-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

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

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

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

.status-finished {
    background: #e5e7eb;
    color: #374151;
}

.contract-badge {
    background: #dcfce7;
    color: #166534;
}

.contract-badge.missing {
    background: #fee2e2;
    color: #991b1b;
}

.home-stage-tracker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
}

.home-stage-step {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.24rem 0.2rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
}

.home-stage-step.done {
    background: #dbeafe;
    color: #1e3a8a;
}

.home-stage-step.current {
    background: #2563eb;
    color: #ffffff;
}

.home-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.home-date-cell {
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.home-date-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
    font-weight: 700;
}

.home-date-cell strong {
    font-size: 0.8rem;
    color: #0f172a;
}

.home-timeline-chips {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.home-timeline-chip {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: #f1f5f9;
    color: #475569;
}

.home-timeline-chip.emphasis {
    background: #eff6ff;
    color: #1d4ed8;
}

.home-next-action {
    width: 100%;
    font-size: 0.78rem;
    color: #334155;
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 6px;
    padding: 0.42rem 0.5rem;
}

.home-finance-snapshot {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
}

.home-finance-item {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 8px;
    padding: 0.38rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.home-finance-item span {
    color: #64748b;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.home-finance-item strong {
    color: #0f172a;
    font-size: 0.84rem;
}

.home-finance-missing {
    color: #9a3412;
}

.home-edit-form-grid input,
.home-edit-form-grid select {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.38rem;
    font-size: 0.8rem;
}
.share-project-btn,
.save-project-btn,
.cancel-project-btn,
.delete-project-btn {
    border: none;
    border-radius: 6px;
    padding: 0.42rem 0.55rem;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 700;
}

.share-project-btn,
.save-project-btn {
    background: #2563eb;
    color: #ffffff;
}

.cancel-project-btn {
    background: #e2e8f0;
    color: #0f172a;
}

.delete-project-btn {
    background: #dc2626;
    color: #ffffff;
}

.payment-clear {
    color: #166534;
    font-weight: 700;
}

.project-meta-link {
    text-decoration: none;
    color: inherit;
}

.home-share-list {
    margin: 0;
    padding: 0.5rem;
    background: #f0f9ff;
    border-radius: 6px;
    border-left: 3px solid #0ea5e9;
    font-size: 0.83rem;
}

.home-not-shared {
    width: 100%;
    background: #f1f5f9;
    border-radius: 6px;
    color: #64748b;
    padding: 0.45rem;
    font-size: 0.8rem;
}

.home-edit-form-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.home-edit-start {
    padding: 0.45rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 0.82rem;
}

.home-edit-actions {
    display: flex;
    gap: 0.35rem;
}

.home-shared-info {
    margin: 0;
    padding: 0.55rem;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #78350f;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (max-width: 900px) {
    .home-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .home-kpi-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-finance-snapshot {
        grid-template-columns: 1fr;
    }
}

/* Low-glare visual pass */
body:not(.evil-mode) {
    background-color: #e8eef5;
    color: #223046;
}

body:not(.evil-mode) .header {
    background: linear-gradient(135deg, #e9eef5 0%, #dde5ef 100%);
    border-bottom-color: #ccd6e3;
}

body:not(.evil-mode) .project-card,
body:not(.evil-mode) .empty-state,
body:not(.evil-mode) .login-container,
body:not(.evil-mode) .modal-content,
body:not(.evil-mode) .finance-table-card,
body:not(.evil-mode) .filter-panel,
body:not(.evil-mode) .tab-section,
body:not(.evil-mode) .home-hero,
body:not(.evil-mode) .home-kpi-section,
body:not(.evil-mode) .home-project-section {
    background-color: #f2f6fb;
}

body:not(.evil-mode) .employee-table,
body:not(.evil-mode) .employees-table,
body:not(.evil-mode) .daily-table,
body:not(.evil-mode) .line-items-table,
body:not(.evil-mode) .expenses-table,
body:not(.evil-mode) .overview-table,
body:not(.evil-mode) .deposit-table,
body:not(.evil-mode) .invoice-table {
    background-color: #f3f7fc;
}

body:not(.evil-mode) .home-kpi-card,
body:not(.evil-mode) .home-date-cell,
body:not(.evil-mode) .home-next-action,
body:not(.evil-mode) .home-finance-item,
body:not(.evil-mode) .home-share-list,
body:not(.evil-mode) .home-not-shared,
body:not(.evil-mode) .home-edit-start {
    background-color: #edf3f9;
}