/* Sage Stage PM — Clean Bootstrap + subtle brand accents */

:root {
    --ss-brand: #8B6914;
    --ss-brand-light: #C9A227;
}

/* === Navbar === */
.ss-navbar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ss-navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ss-brand);
    text-decoration: none;
}

.ss-navbar-brand:hover { color: var(--ss-brand); }

.ss-navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.ss-hours-badge {
    font-size: 0.85rem;
    color: #495057;
    background: #f8f9fa;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.ss-hours-badge strong { color: var(--ss-brand); }

.ss-role-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.ss-role-badge.admin { background: var(--ss-brand); color: #fff; }
.ss-role-badge.client { background: #0d6efd; color: #fff; }

.ss-user-name { color: #6c757d; font-size: 0.875rem; }

.ss-nav-links { display: flex; gap: 0.25rem; }

.ss-nav-link {
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    transition: all 0.15s;
}

.ss-nav-link:hover { color: #212529; background: #f8f9fa; }
.ss-nav-link.active { color: var(--ss-brand); background: #f8f9fa; font-weight: 600; }

.ss-signout-btn {
    background: none;
    border: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}

.ss-signout-btn:hover { border-color: #dc3545; color: #dc3545; }

/* === Login === */
.ss-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f8f9fa;
    text-align: center;
}

.ss-login-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 3rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ss-login-card h1 {
    color: var(--ss-brand);
    margin-bottom: 0.5rem;
}

.ss-login-card p { color: #6c757d; margin-bottom: 2rem; }

.ss-google-btn {
    background: #fff;
    color: #333;
    border: 1px solid #dadce0;
    padding: 0.65rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: box-shadow 0.15s;
}

.ss-google-btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.ss-login-error { color: #dc3545; margin-top: 1rem; font-size: 0.9rem; }

/* === Layout === */
.ss-content { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.ss-section { margin-bottom: 1.75rem; }

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

.ss-section-header h2 { font-size: 1.2rem; margin: 0; font-weight: 600; }
.ss-section-header h4 { font-weight: 600; }

/* === Cards === */
.ss-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
}

.ss-card-accent { border-left: 3px solid var(--ss-brand); }

.ss-project-card .ss-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ss-project-card .ss-card-title { font-size: 0.9rem; font-weight: 600; margin: 0; }

.ss-priority-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: #e9ecef;
    color: #495057;
    white-space: nowrap;
    font-weight: 600;
}

.ss-priority-badge.p1 { background: var(--ss-brand); color: #fff; }
.ss-priority-badge.p2 { background: #0d6efd; color: #fff; }
.ss-priority-badge.p3 { background: #198754; color: #fff; }

.ss-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
}

.ss-status-dot.not-started { background: #adb5bd; }
.ss-status-dot.in-progress { background: #0d6efd; }
.ss-status-dot.on-hold { background: #ffc107; }
.ss-status-dot.complete { background: #198754; }

.ss-status-label { font-size: 0.8rem; color: #6c757d; }

.ss-target-date { font-size: 0.75rem; color: #adb5bd; margin-top: 0.4rem; }

/* === Progress === */
.ss-progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.6rem;
}

.ss-progress-bar { height: 100%; border-radius: 3px; transition: width 0.3s; background: #0d6efd; }
.ss-progress-label { font-size: 0.75rem; color: #6c757d; margin-top: 0.3rem; }

/* === Hours Summary === */
.ss-hours-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
}

.ss-hours-big { font-size: 2.25rem; font-weight: 700; color: var(--ss-brand); line-height: 1; }
.ss-hours-big span { font-size: 1.1rem; color: #adb5bd; font-weight: 400; }
.ss-hours-cost { font-size: 0.9rem; color: #6c757d; margin-top: 0.4rem; }

.ss-hours-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.ss-hours-progress-bar {
    height: 100%;
    background: var(--ss-brand);
    border-radius: 4px;
    transition: width 0.5s;
}

.ss-hours-progress-bar.over-budget { background: #dc3545; }

.ss-hours-breakdown { list-style: none; padding: 0; margin: 0; }

.ss-hours-breakdown li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f3f5;
}

.ss-hours-breakdown li:last-child { border-bottom: none; }
.ss-hours-breakdown .project-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 0.5rem; }
.ss-hours-breakdown .hours-val { font-weight: 600; color: var(--ss-brand); }

/* === Gantt === */
.ss-gantt-wrapper {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    overflow-x: auto;
}

.ss-gantt-controls { display: flex; gap: 0.25rem; }

.ss-gantt-controls button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.ss-gantt-controls button:hover,
.ss-gantt-controls button.active {
    background: var(--ss-brand);
    color: #fff;
    border-color: var(--ss-brand);
}

.gantt .handle-group { display: none; }
.ss-gantt-editable .gantt .handle-group { display: inline; }
.ss-gantt-editable .gantt .bar-wrapper { cursor: pointer; }

/* Project bar colors */
.gantt .bar-website-redesign .bar { fill: #C9A227; }
.gantt .bar-chris-mentor-bot .bar { fill: #0d6efd; }
.gantt .bar-interactive-roadmap .bar { fill: #198754; }
.gantt .bar-mentor-bot-factory .bar { fill: #ffc107; }
.gantt .bar-interactive-toolkit .bar { fill: #dc3545; }
.gantt .bar-sage-x .bar { fill: #6c757d; }
.gantt .bar-milestone .bar { fill: var(--ss-brand); }

/* === Timer === */
.ss-timer-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
}

.ss-timer-display {
    font-size: 2.75rem;
    font-weight: 300;
    color: #adb5bd;
    text-align: center;
    padding: 0.75rem 0;
    font-variant-numeric: tabular-nums;
}

.ss-timer-display.running { color: var(--ss-brand); font-weight: 500; }

.ss-timer-controls { display: flex; gap: 0.75rem; justify-content: center; margin-top: 0.75rem; }

/* === Buttons === */
.ss-btn {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.ss-btn-gold { background: var(--ss-brand); color: #fff; }
.ss-btn-gold:hover { background: var(--ss-brand-light); }
.ss-btn-danger { background: #dc3545; color: #fff; }
.ss-btn-danger:hover { background: #bb2d3b; }
.ss-btn-success { background: #198754; color: #fff; }
.ss-btn-info { background: #0d6efd; color: #fff; }

.ss-btn-outline {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #495057;
}

.ss-btn-outline:hover { border-color: var(--ss-brand); color: var(--ss-brand); }
.ss-btn-sm { font-size: 0.75rem; padding: 0.25rem 0.65rem; }

/* === Tables === */
.ss-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

.ss-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.ss-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.ss-table tbody tr:hover { background: #f8f9fa; }
.ss-table .mono { font-variant-numeric: tabular-nums; }

/* === Forms === */
.ss-input, .ss-select, .ss-textarea {
    background: #fff;
    border: 1px solid #ced4da;
    color: #212529;
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    width: 100%;
}

.ss-input:focus, .ss-select:focus, .ss-textarea:focus {
    outline: none;
    border-color: var(--ss-brand);
    box-shadow: 0 0 0 2px rgba(139, 105, 20, 0.15);
}

.ss-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 1.75rem;
}

.ss-textarea { resize: vertical; min-height: 80px; }
.ss-input-compact { padding: 0.25rem 0.4rem; font-size: 0.8rem; width: auto; min-width: 120px; }
.ss-label { font-size: 0.8rem; font-weight: 600; color: #495057; margin-bottom: 0.3rem; display: block; }

/* === Kanban Board === */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    min-height: 400px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.kanban-column-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kanban-column-title { flex: 1; }

.kanban-column-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: #adb5bd;
    background: #e9ecef;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
}

.kanban-column-body {
    flex: 1;
    padding: 0 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 0 0 8px 8px;
    transition: background 0.15s;
}

.kanban-column-over {
    background: #e2e6ea;
}

.kanban-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    cursor: grab;
    transition: box-shadow 0.15s, opacity 0.15s;
}

.kanban-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.kanban-card-dragging {
    opacity: 0.4;
}

.kanban-card-project {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.kanban-project-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kanban-card-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #adb5bd;
}

.kanban-card-progress {
    font-weight: 600;
    color: var(--ss-brand);
}

.kanban-progress-bar {
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.kanban-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.kanban-empty {
    text-align: center;
    padding: 2rem 0.5rem;
    font-size: 0.8rem;
    color: #ced4da;
}

@media (max-width: 992px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

/* Link-style button */
.ss-btn-link {
    background: none;
    border: none;
    color: #0d6efd;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.ss-btn-link:hover { background: #e9ecef; }

/* Dependency badges under task name */
.deps-badges-row { margin-top: 0.3rem; }

.deps-badge {
    display: inline-block;
    font-size: 0.65rem;
    background: #e9ecef;
    color: #6c757d;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.25rem;
    margin-top: 0.15rem;
}

/* Dependency dropdown */
.deps-dropdown {
    position: absolute;
    z-index: 1500;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    width: 300px;
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.deps-dropdown-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #495057;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 0.25rem;
}

.deps-dropdown-group {
    padding: 0.35rem 0.75rem 0.15rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #adb5bd;
}

.deps-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    margin: 0;
}

.deps-dropdown-item:hover { background: #f8f9fa; }
.deps-dropdown-item input[type="checkbox"] { accent-color: var(--ss-brand); }
.ss-form-row { display: flex; gap: 0.75rem; align-items: flex-end; }
.ss-form-group { flex: 1; margin-bottom: 0.6rem; }

/* === Tabs === */
.ss-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.ss-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    white-space: nowrap;
}

.ss-tab:hover { color: #212529; }
.ss-tab.active { color: var(--ss-brand); border-bottom-color: var(--ss-brand); }

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

/* === Entries === */
.ss-entry {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.6rem;
}

.ss-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.ss-entry-title { font-weight: 600; font-size: 0.9rem; }
.ss-entry-date { font-size: 0.75rem; color: #adb5bd; }
.ss-entry-body { font-size: 0.85rem; color: #6c757d; line-height: 1.5; }

/* === Badges === */
.ss-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}

.ss-badge-proposed { background: #cfe2ff; color: #084298; }
.ss-badge-approved { background: #d1e7dd; color: #0f5132; }
.ss-badge-rejected { background: #f8d7da; color: #842029; }
.ss-badge-draft { background: #e9ecef; color: #495057; }
.ss-badge-sent { background: #d1e7dd; color: #0f5132; }

/* === Notes === */
.ss-notes-editor {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 0.85rem;
    color: #212529;
    min-height: 300px;
    width: 100%;
    resize: vertical;
}

.ss-notes-editor:focus { outline: none; border-color: var(--ss-brand); box-shadow: 0 0 0 2px rgba(139,105,20,0.15); }
.ss-save-indicator { font-size: 0.75rem; color: #adb5bd; font-style: italic; }

/* === Modal === */
.ss-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ss-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.ss-modal h3 { margin-top: 0; margin-bottom: 1rem; }
.ss-modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

/* === Utilities === */
.ss-text-gold { color: var(--ss-brand); }
.ss-text-muted { color: #adb5bd; }
.ss-text-secondary { color: #6c757d; }
.ss-text-success { color: #198754; }
.ss-text-danger { color: #dc3545; }
.ss-mt-1 { margin-top: 0.5rem; }
.ss-mt-2 { margin-top: 1rem; }
.ss-mb-1 { margin-bottom: 0.5rem; }
.ss-mb-2 { margin-bottom: 1rem; }
.ss-empty-state { text-align: center; padding: 2rem; color: #adb5bd; font-size: 0.9rem; }
.ss-loading { text-align: center; padding: 2rem; color: #6c757d; }

/* === Gantt Filters === */
.ss-gantt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.ss-gantt-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.ss-gantt-filter-btn:hover { border-color: #adb5bd; }

.ss-gantt-filter-btn.active {
    background: #212529;
    color: #fff;
    border-color: #212529;
}

.ss-gantt-filter-btn:not(.active) {
    opacity: 0.7;
}

.ss-gantt-filter-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === Timer Quick Project Buttons (mobile) === */
.ss-timer-quick-projects {
    display: none;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.ss-timer-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    min-height: 44px;
    transition: all 0.15s;
}

.ss-timer-quick-btn:hover { border-color: var(--ss-brand); }
.ss-timer-quick-btn.active { background: var(--ss-brand); color: #fff; border-color: var(--ss-brand); }
.ss-timer-quick-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ss-timer-quick-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === Floating Timer Bar === */
.ss-timer-float {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #212529;
    color: #fff;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}

.ss-timer-float-project {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ss-brand-light);
}

.ss-timer-float-time {
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body.timer-running-mobile { padding-bottom: 70px; }

/* === Burndown Chart === */
.ss-burndown-canvas {
    max-height: 400px;
    width: 100%;
}

/* === Invoice === */
.ss-invoice {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.ss-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ss-brand);
}

.ss-invoice-addresses {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.ss-invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.ss-invoice-table th {
    text-align: left;
    padding: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.ss-invoice-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: top;
}

.ss-invoice-total td {
    border-top: 2px solid #212529;
    padding-top: 0.75rem;
}

.ss-badge-paid { background: #d1e7dd; color: #0f5132; }

/* === Print === */
@media print {
    body * { visibility: hidden; }
    .ss-invoice, .ss-invoice * { visibility: visible; }
    .ss-invoice { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; }
    .ss-navbar, .ss-tabs, .ss-timer-float, .ss-gantt-filters { display: none !important; }
}

/* === Visibility Helpers === */
.ss-mobile-only { display: none; }
.ss-desktop-only { display: flex; }

/* === Hamburger Button === */
.ss-navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.ss-navbar-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #495057;
    border-radius: 1px;
}

/* === Mobile Panel === */
.ss-navbar-mobile-panel {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid #dee2e6;
}

.ss-navbar-mobile-panel.open { display: flex; }

.ss-mobile-nav-links {
    display: flex;
    gap: 0.25rem;
}

.ss-mobile-user-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === Task Cards (mobile) === */
.ss-task-cards-wrap { display: none; }
.ss-task-table-wrap { display: block; }

.ss-task-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.6rem;
}

.ss-task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.ss-task-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.ss-task-card-project {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.ss-task-card-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ss-task-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.2rem;
    display: block;
}

.ss-task-card-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.ss-task-card-actions {
    margin-top: 0.6rem;
    display: flex;
    justify-content: flex-end;
}

.ss-task-card-group { margin-bottom: 1rem; }

.ss-task-card-group-header {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
    .ss-mobile-only { display: flex; }
    .ss-desktop-only { display: none !important; }
    .ss-navbar-hamburger { display: flex; }

    .ss-navbar { flex-wrap: wrap; gap: 0.5rem; }
    .ss-content { padding: 1rem; overflow-x: hidden; max-width: 100vw; }

    /* Constrain Gantt chart */
    .ss-gantt-wrapper { max-width: calc(100vw - 2rem); }
    .ss-section-header { flex-wrap: wrap; gap: 0.5rem; }
    .ss-section-header h2 { font-size: 1.05rem; }
    .ss-timer-display { font-size: 2rem; }
    .ss-hours-big { font-size: 1.75rem; }
    .ss-form-row { flex-direction: column; }

    /* Touch-friendly targets */
    .ss-btn { min-height: 44px; }
    .ss-input, .ss-select { min-height: 44px; font-size: 16px; }
    .ss-timer-controls .ss-btn { width: 100%; }

    /* Show quick project buttons, hide dropdown */
    .ss-timer-quick-projects { display: flex; }
    .ss-timer-select-group { display: none; }

    /* Gantt filters scroll */
    .ss-gantt-filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ss-gantt-filter-btn { white-space: nowrap; flex-shrink: 0; }

    /* Burndown chart */
    .ss-burndown-canvas { max-height: 280px; }

    /* Invoice */
    .ss-invoice { padding: 1rem; }
    .ss-invoice-addresses { flex-direction: column; gap: 1rem; }

    /* Task cards vs table */
    .ss-task-cards-wrap { display: block; }
    .ss-task-table-wrap { display: none; }

    /* Manual entry button full width */
    #btn-manual-add { width: 100%; }

    /* Deps dropdown overflow fix */
    .deps-dropdown { max-width: calc(100vw - 2rem); }
}
