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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e90ff 0%, #00788a 35%, #0066cc 70%, #004c8c 100%);
    background-size: 400% 400%;
    animation: gradientWave 12.75s ease infinite;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

@keyframes gradientWave {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
    flex: 1 0 auto;
    position: relative;
    z-index: 1;
}

/* Login Screen */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.logo h1 {
    color: #0066cc;
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
}

.logo p {
    color: #666;
    font-size: 14px;
}

/* Navigation */
.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 40px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.navbar h2 {
    color: #0066cc;
    font-size: 20px;
    margin: 0;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-right span {
    color: #666;
    font-weight: 500;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #0066cc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    scrollbar-color: #0066cc #f3f4f6;
}

.tabs::-webkit-scrollbar {
    height: 6px;
}

.tabs::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.tabs::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 3px;
}

.tab {
    background: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 10px 14px;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.85);
}

.tab.active {
    background: white;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #0066cc;
}

.tab-content {
    display: none;
}

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

/* Cards */
.card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.card-header {
    padding: 14px 16px;
    border-bottom: 2px solid #0066cc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.03) 0%, rgba(0, 102, 204, 0.03) 100%);
}

.card-header h3 {
    color: #0066cc;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-body {
    padding: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 4px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    font-size: 13px;
    transition: all 0.2s;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.12);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

.required {
    color: #ef4444;
}

.help-text {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 3px;
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    margin-right: 6px;
    margin-bottom: 8px;
}

.btn:last-child {
    margin-right: 0;
}

.btn + .btn {
    margin-left: 0;
}

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

.btn-primary {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4169e1 0%, #0052a3 100%);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #1a1a1a;
    border: 2px solid #e5e7eb;
}

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

.btn-danger {
    background: #d13438;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-danger:hover {
    background: #a72828;
    box-shadow: 0 2px 6px rgba(209, 52, 56, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    margin-right: 5px;
    border-radius: 2px;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #4169e1 0%, #0052a3 100%);
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f9fafb;
}

th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #0066cc;
    font-size: 12px;
    border-bottom: 2px solid #0066cc;
    letter-spacing: 0.3px;
}

td {
    padding: 6px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    vertical-align: middle;
}

td small,
td .small-text {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 2px;
    line-height: 1.3;
}

tbody tr:hover {
    background: #fafafa;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-controls input,
.filter-controls select {
    padding: 8px;
    font-size: 13px;
}

/* Messages */
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin: 10px 0;
    display: none;
}

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

.success-message {
    color: #10b981;
    font-size: 14px;
    margin: 10px 0;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Calendar View (Client) - GitHub Style */
.month-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 10px;
    max-width: 600px;
}

.calendar-day {
    aspect-ratio: 2;
    min-height: 24px;
    max-height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    background: #f9fafb;
    position: relative;
    transition: all 0.2s;
    cursor: default;
}

.calendar-day.has-work {
    cursor: pointer;
}

.calendar-day.has-work:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 153, 255, 0.3);
    z-index: 1;
}

.calendar-day.selected {
    box-shadow: 0 0 0 2px #0066cc;
    transform: scale(1.05);
    z-index: 2;
}

.calendar-day.empty {
    background: transparent;
    border-color: transparent;
}

.calendar-day.has-work {
    background: #0099ff;
    border-color: #0099ff;
}

.calendar-day.has-work.intensity-low {
    background: #bae6ff;
    border-color: #bae6ff;
}

.calendar-day.has-work.intensity-medium {
    background: #7dd3fc;
    border-color: #7dd3fc;
}

.calendar-day.has-work.intensity-high {
    background: #38bdf8;
    border-color: #38bdf8;
}

.calendar-day.has-work.intensity-very-high {
    background: #0099ff;
    border-color: #0099ff;
}

.calendar-day-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 500;
    color: #666;
}

.calendar-day.has-work .calendar-day-number {
    color: white;
    font-weight: 600;
}

.calendar-header {
    display: contents;
}

.calendar-header-day {
    font-weight: 600;
    text-align: center;
    padding: 2px;
    color: #666;
    font-size: 10px;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.calendar-legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid #e5e7eb;
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.stat-card {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 4px;
    text-align: center;
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

/* Chart Containers */
canvas {
    max-height: 280px !important;
    height: 280px !important;
}

.card-body canvas {
    margin: 0 auto;
    display: block;
}

/* Unified View Layout */
.unified-view {
    display: grid;
    grid-template-columns: 650px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.unified-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.unified-right {
    min-height: 400px;
}

.calendar-section {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.projects-summary {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.daily-detail {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    min-height: 400px;
}

.daily-detail-placeholder {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 14px;
}

.daily-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.daily-detail-date {
    font-size: 18px;
    font-weight: 700;
    color: #0066cc;
}

.daily-detail-hours {
    font-size: 18px;
    font-weight: 700;
    color: #0099ff;
}

.daily-detail-entry {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.daily-detail-project {
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 8px;
    font-size: 14px;
}

.daily-detail-description {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 14px;
}

/* Projects List (Client) */
.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.projects-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: #0099ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 153, 255, 0.15);
}

.project-card-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.project-card-compact:hover {
    border-color: #0099ff;
    background: #f0f9ff;
}

.project-card-compact-name {
    font-weight: 600;
    color: #0066cc;
    font-size: 14px;
}

.project-card-compact-hours {
    font-weight: 700;
    color: #0099ff;
    font-size: 14px;
}

.project-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 10px;
}

.project-card-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

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

.project-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #0099ff;
}

.project-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.project-card-dates {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

/* Alert/Confirm modals should appear above other modals */
#alertModal {
    z-index: 2000;
}

.modal.active,
.modal[style*="display: flex"] {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #0066cc;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.entry-info {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #0099ff;
}

.entry-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.entry-info strong {
    color: #0066cc;
    margin-right: 8px;
}

/* Cost Management */
.cost-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cost-summary-item {
    background: white;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cost-summary-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.cost-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.cost-filter {
    min-width: 200px;
}

/* Responsive */
@media (max-width: 1024px) {
    .unified-view {
        grid-template-columns: 1fr;
    }

    .unified-right {
        min-height: 300px;
    }

    .projects-list {
        grid-template-columns: 1fr;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #0099ff;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px 20px;
    margin-top: auto;
    text-align: center;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 4px 0;
    color: #666;
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.footer-links a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 12px;
}

.footer-links a:hover {
    color: #0099ff;
    text-decoration: underline;
}

.footer-separator {
    color: #ccc;
    margin: 0 5px;
    font-size: 12px;
}

.footer-version {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.footer-beta-warning {
    font-size: 11px;
    color: #f59e0b;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.footer-beta-warning a {
    color: #f59e0b;
    text-decoration: underline;
}

.footer-beta-warning a:hover {
    color: #d97706;
}

/* Hide beta warning on login screen */
#loginScreen.active ~ .footer .footer-beta-warning {
    display: none;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 5000;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 5px 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-text strong {
    font-size: 16px;
    color: #0066cc;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-wrap: wrap;
        position: relative;
    }

    .nav-left {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex: 1;
    }

    .nav-right {
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 24px;
        height: 24px;
    }

    .mobile-menu-toggle span {
        height: 2px;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-right-content {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        padding: 15px;
        margin-top: 10px;
        min-width: 200px;
        z-index: 100;
        flex-direction: column;
        gap: 10px;
    }

    .nav-right-content.active {
        display: flex;
    }

    .nav-right-content button {
        width: 100%;
    }

    .nav-right-content .profile-btn {
        display: none;
    }

    .nav-right-content .profile-dropdown {
        width: 100%;
    }

    .nav-right-content .profile-dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        display: block;
    }

    .navbar h2 {
        font-size: 16px;
    }

    .nav-logo {
        height: 32px;
    }

    .container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .tab {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .card {
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .card-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-header h3 {
        font-size: 16px;
    }

    .card-body {
        padding: 15px;
    }

    .filter-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    .filter-controls input,
    .filter-controls select,
    .filter-controls button {
        flex: 1 1 auto;
        min-width: 90px;
        max-width: 150px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Tables - Add horizontal scroll wrapper */
    .card-body {
        overflow-x: auto;
    }

    table {
        font-size: 12px;
        min-width: 600px;
    }

    th, td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-danger,
    .btn-edit {
        padding: 5px 10px;
        font-size: 11px;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-value {
        font-size: 20px;
    }

    canvas {
        max-height: 220px !important;
        height: 220px !important;
    }

    .cost-summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cost-summary-item {
        padding: 15px;
    }

    .cost-summary-value {
        font-size: 24px;
    }

    .unified-left {
        gap: 20px;
    }

    .calendar-section,
    .projects-summary,
    .daily-detail {
        padding: 15px;
    }

    .calendar-grid {
        max-width: 100%;
    }

    .calendar-day {
        min-height: 32px;
        max-height: 40px;
    }

    .calendar-day-number {
        font-size: 10px;
    }

    .project-card {
        padding: 15px;
    }

    .project-card-name {
        font-size: 18px;
    }

    .project-stat-value {
        font-size: 20px;
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header,
    .modal-body {
        padding: 15px;
    }

    .toast-container {
        right: 10px;
        left: 10px;
        top: 70px;
        max-width: none;
    }

    .toast {
        padding: 12px 16px;
    }

    .login-container {
        margin: 50px auto;
        padding: 30px 25px;
    }

    .logo-img {
        width: 100px;
    }

    .logo h1 {
        font-size: 24px;
    }

    /* Footer mobile */
    .footer {
        padding: 20px 15px;
    }

    .footer-content p {
        font-size: 13px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-separator {
        display: none;
    }

    /* Cookie consent mobile */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cookie-icon {
        font-size: 32px;
    }

    .cookie-text p {
        font-size: 13px;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-actions .btn {
        width: 100%;
    }
}

/* Mobile phones - 480px and below */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .navbar {
        padding: 12px 15px;
    }

    .navbar h2 {
        font-size: 14px;
        line-height: 1.3;
    }

    .nav-logo {
        height: 28px;
    }

    .container {
        padding: 0 10px;
        margin: 15px auto;
    }

    .tabs {
        gap: 3px;
        margin-bottom: 15px;
    }

    .tab {
        padding: 8px 12px;
        font-size: 14px;
    }

    .card {
        border-radius: 6px;
        margin-bottom: 12px;
    }

    .card-header {
        padding: 12px;
    }

    .card-header h3 {
        font-size: 15px;
    }

    .card-body {
        padding: 12px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
        width: auto;
    }

    form .btn-primary,
    form .btn-secondary {
        width: 100%;
    }

    .filter-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .filter-controls button,
    .filter-controls input,
    .filter-controls select {
        flex: 0 0 auto;
        width: auto !important;
        padding: 6px 10px;
        font-size: 12px;
    }

    .filter-controls input[type="date"] {
        min-width: 110px;
    }

    .card-body .btn-secondary,
    .card-body .btn-primary {
        width: auto !important;
    }

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

    label {
        font-size: 13px;
        margin-bottom: 4px;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        padding: 10px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .help-text {
        font-size: 11px;
    }

    /* Enhanced table mobile support */
    table {
        font-size: 11px;
        min-width: 550px;
    }

    th {
        padding: 8px 6px;
        font-size: 11px;
    }

    td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .btn-danger,
    .btn-edit,
    .btn-secondary {
        padding: 4px 8px;
        font-size: 12px;
        width: auto;
    }

    /* Chart optimizations for mobile */
    canvas {
        max-height: 300px !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Calendar optimizations for small phones */
    .calendar-grid {
        gap: 1px;
    }

    .calendar-day {
        min-height: 36px;
        max-height: 44px;
        border-width: 1px;
    }

    .calendar-day-number {
        font-size: 11px;
    }

    .calendar-header-day {
        font-size: 9px;
        padding: 4px 2px;
    }

    .month-selector {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .month-selector button {
        width: 100%;
    }

    #currentMonth {
        margin: 8px 0 !important;
        text-align: center;
        font-size: 14px;
    }

    /* Summary stats */
    .stat-card {
        padding: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    /* Cost summary */
    .cost-summary-item {
        padding: 12px;
    }

    .cost-summary-label {
        font-size: 12px;
    }

    .cost-summary-value {
        font-size: 20px;
    }

    /* Projects */
    .project-card {
        padding: 12px;
    }

    .project-card-name {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .project-stat-value {
        font-size: 18px;
    }

    .project-stat-label {
        font-size: 11px;
    }

    /* Daily detail */
    .daily-detail-date,
    .daily-detail-hours {
        font-size: 16px;
    }

    .daily-detail-project {
        font-size: 13px;
    }

    .daily-detail-description {
        font-size: 13px;
    }

    .daily-detail-placeholder {
        padding: 40px 15px;
        font-size: 13px;
    }

    /* Modals */
    .modal-content {
        width: 98%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .modal-header {
        padding: 12px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .modal-body {
        padding: 12px;
    }

    .entry-info {
        padding: 12px;
        font-size: 13px;
    }

    .entry-info p {
        font-size: 13px;
    }

    /* Toast notifications */
    .toast-container {
        top: 60px;
        right: 8px;
        left: 8px;
    }

    .toast {
        padding: 10px 12px;
    }

    .toast-title {
        font-size: 13px;
    }

    .toast-message {
        font-size: 12px;
    }

    /* Login screen */
    .login-container {
        margin: 30px auto;
        padding: 25px 20px;
        max-width: 95%;
    }

    .logo-img {
        width: 80px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo p {
        font-size: 13px;
    }

    /* Action buttons in tables */
    tbody td:last-child {
        white-space: nowrap;
    }

    /* Improve touch targets */
    button,
    .btn,
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tab {
        min-height: 40px;
    }

    .modal-close {
        min-width: 44px;
        min-height: 44px;
    }

    /* Chart responsiveness */
    canvas {
        max-height: 300px !important;
    }
}

/* Payment Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

/* Voided Payment Rows */
.voided-payment {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Role Badges */
.status-employee {
    background-color: #e0e7ff;
    color: #3730a3;
}

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

.status-client {
    background-color: #dcfce7;
    color: #166534;
}

.status-admin {
    background-color: #fce7f3;
    color: #9f1239;
}

/* Filter Group in Card Header */
.card-header .filter-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.card-header .filter-group label {
    font-weight: normal;
    font-size: 14px;
    margin: 0;
}

.card-header .filter-group select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-profile-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: #0099ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.nav-profile-picture img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.profile-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.profile-dropdown.active .profile-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

    text-align: left;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 2px;
}

.autocomplete-dropdown.active {
    display: block;
    animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s ease;
}

.autocomplete-item:first-child {
    border-radius: 8px 8px 0 0;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: #f9fafb;
}

.autocomplete-item strong {
    color: #111827;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.autocomplete-item small {
    color: #6b7280;
    font-size: 12px;
}

input[type="text"]:focus + input[type="hidden"] + .autocomplete-dropdown {
    border-color: #0099ff;
}

.form-group input[type="text"].has-autocomplete {
    transition: border-color 0.2s ease;
}

/* Project Assistant Chat */
.chat-project-wrapper {
    margin-bottom: 4px;
}

.chat-project-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-project-item:hover {
    background: #f9fafb;
}

.chat-project-item:active {
    transform: scale(0.98);
}

.chat-project-item.active {
    background: #f0f9ff;
    border-left-color: #3b82f6;
}

.project-arrow {
    font-size: 10px;
    color: #9ca3af;
    cursor: pointer;
    user-select: none;
    width: 12px;
    display: inline-block;
}

.chat-sessions-list {
    padding-left: 20px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.chat-session-item {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.chat-session-item:hover {
    background: #f3f4f6;
}

.chat-session-item.active {
    background: #e0f2fe;
    border-left: 2px solid #3b82f6;
}

.chat-session-item.new-chat {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    color: #3b82f6;
    font-weight: 500;
    justify-content: center;
}

.chat-session-item.new-chat:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
}

.session-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.session-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.session-indicator.pulsing {
    background: #3b82f6;
    animation: pulse 2s ease-in-out infinite;
}

.session-indicator.saved {
    background: #10b981;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.session-time {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
    pointer-events: none;
}

.session-delete {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.session-delete:hover {
    color: #ef4444;
}

/* ===== Chat Interface (ChatGPT-inspired) ===== */
.chat-container {
    display: flex;
    height: calc(100vh - 200px);
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

/* Mobile Header */
.chat-mobile-header {
    display: none;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.chat-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.chat-mobile-toggle:hover {
    background: #f3f4f6;
}

.chat-mobile-toggle span:first-child {
    font-size: 20px;
}

/* Sidebar */
.chat-sidebar {
    width: 280px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    background: white;
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .chat-sidebar.hidden {
        width: 0;
        min-width: 0;
        border-right: none;
        overflow: hidden;
    }
}

.chat-toggle-btn {
    padding: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.chat-toggle-btn svg {
    color: #666;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.chat-sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    line-height: 1;
}

.chat-sidebar-close:hover {
    color: #333;
}

.chat-project-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: white;
    scroll-behavior: smooth;
}

/* Chat Input */
.chat-input-container {
    padding: 16px 20px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-wrapper textarea {
    flex: 1;
    min-height: 44px;
    max-height: 200px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    transition: border-color 0.2s;
}

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

.chat-input-wrapper textarea::placeholder {
    color: #9ca3af;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.chat-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: inline-block;
    animation: blink 1.4s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 60px);
        flex-direction: column;
    }

    .chat-mobile-header {
        display: flex;
    }

    .chat-main {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
    }

    .chat-input-container {
        padding: 12px;
        border-top: 1px solid #e5e7eb;
    }

    .chat-input {
        font-size: 16px !important;
        padding: 10px 12px !important;
    }

    .chat-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }

    .chat-sidebar.open {
        transform: translateX(0);
    }

    .chat-sidebar-close {
        display: block;
    }

    .chat-sidebar-header {
        padding: 16px;
    }

    .chat-main {
        width: 100%;
    }

    .chat-header {
        padding: 16px;
    }

    .chat-messages {
        padding: 16px;
    }

    .chat-input-container {
        padding: 12px 16px 16px;
    }

    .chat-input-wrapper textarea {
        font-size: 16px;
    }
}



/* Clean, consistent chat message styling */
.ai-message-bubble {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ai-message-content {
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
}

/* Tight, consistent spacing for markdown elements */
.ai-message-bubble h1,
.ai-message-bubble h2,
.ai-message-bubble h3 {
    color: #111827;
    margin: 12px 0 6px 0;
    line-height: 1.3;
}

.ai-message-bubble h1:first-child,
.ai-message-bubble h2:first-child,
.ai-message-bubble h3:first-child {
    margin-top: 0;
}

.ai-message-bubble h1 {
    font-size: 1.2em;
    font-weight: 700;
}

.ai-message-bubble h2 {
    font-size: 1.1em;
    font-weight: 600;
}

.ai-message-bubble h3 {
    font-size: 1em;
    font-weight: 600;
}

.ai-message-bubble p {
    margin: 8px 0;
}

.ai-message-bubble p:first-child {
    margin-top: 0;
}

.ai-message-bubble p:last-child {
    margin-bottom: 0;
}

.ai-message-bubble ul,
.ai-message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-message-bubble li {
    margin: 4px 0;
}

.ai-message-bubble strong {
    color: #111827;
    font-weight: 600;
}

.ai-message-bubble code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: #be123c;
}

.ai-message-bubble pre {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 10px 0;
}

.ai-message-bubble pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.85em;
}

.ai-message-bubble blockquote {
    border-left: 3px solid #3b82f6;
    padding-left: 12px;
    margin: 10px 0;
    color: #6b7280;
}

.user-message-bubble {
    background: #3b82f6;
    color: white;
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 70%;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .ai-message-bubble,
    .user-message-bubble {
        max-width: 90%;
        font-size: 14px;
    }
}

.suggestion-button {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: left;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.suggestion-button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.suggestion-button:active:not(:disabled) {
    transform: translateY(0);
}

.suggestion-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .suggestion-button {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* File Tree Sidebar */
.file-tree-sidebar {
    width: 300px;
    border-left: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
}

.file-tree-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.file-tree-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.file-tree-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    font-size: 13px;
}

.file-tree-item {
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-tree-item:hover {
    background: #e5e7eb;
}

.file-tree-folder {
    font-weight: 500;
    color: #6b7280;
}

.file-tree-folder-wrapper {
    margin-bottom: 4px;
}

.folder-arrow {
    font-size: 10px;
    color: #9ca3af;
    min-width: 12px;
    display: inline-block;
    user-select: none;
}

.folder-icon {
    font-size: 14px;
    line-height: 1;
}

.file-icon {
    font-size: 13px;
    line-height: 1;
    opacity: 0.7;
}

.folder-children {
    margin-left: 0;
}

.file-tree-file {
    color: #374151;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 12px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-icon-small {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 18px;
    color: #9ca3af;
    line-height: 1;
}

.btn-icon-small:hover {
    color: #374151;
}

@media (max-width: 1024px) {
    .file-tree-sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .file-tree-sidebar {
        position: absolute;
        right: -300px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 50;
        box-shadow: -2px 0 8px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
    }

    .file-tree-sidebar.open {
        right: 0;
    }
}

