/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --bg-primary: #faf9f7;
    --bg-secondary: #f5f3f0;
    --bg-tertiary: #eceae6;
    --bg-dark: #1a1a1f;

    --text-primary: #1a1a1f;
    --text-secondary: #6b6b73;
    --text-tertiary: #9b9ba3;
    --text-inverse: #faf9f7;

    --border-color: #e5e3df;
    --border-light: #f0eeea;

    /* Accent Colors */
    --copper: #c17f59;
    --copper-light: #d4a484;
    --copper-dark: #a66b47;

    --blue: #4a7bbd;
    --blue-light: #e8f0f8;
    --green: #5a9a6e;
    --green-light: #e8f5eb;
    --amber: #c9973e;
    --amber-light: #fdf5e6;
    --red: #c9615a;
    --red-light: #fdf0ef;

    /* Status */
    --status-scheduled: #4a7bbd;
    --status-progress: #c17f59;
    --status-completed: #5a9a6e;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* Spacing */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --header-height: 64px;
    --bottom-nav-height: 72px;
    --timer-bar-height: 56px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ===== Timer Bar ===== */
.timer-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--timer-bar-height);
    background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform var(--transition-slow);
    padding-top: var(--safe-area-top);
}

.timer-bar.active {
    transform: translateY(0);
}

.timer-bar-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
}

.timer-bar-job {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.timer-bar-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-bar-ref {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.timer-bar-time {
    font-family: 'Sora', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.02em;
}

.timer-bar-stop {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.timer-bar-stop:hover {
    background: rgba(255, 255, 255, 0.3);
}

.timer-bar-stop svg {
    width: 20px;
    height: 20px;
}

/* Offset content when timer is active */
body.timer-active .header {
    top: var(--timer-bar-height);
}

body.timer-active .main-content {
    padding-top: calc(var(--header-height) + var(--timer-bar-height) + 16px);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    padding-top: var(--safe-area-top);
    z-index: 100;
    transition: top var(--transition-slow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mini {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--copper), var(--copper-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-mini svg {
    width: 20px;
    height: 20px;
}

.header-title {
    display: flex;
    flex-direction: column;
}

.greeting {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.user-name {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.icon-btn:hover, .icon-btn:active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--copper);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.avatar:hover {
    border-color: var(--copper);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: calc(var(--header-height) + 16px) 16px calc(var(--bottom-nav-height) + 16px);
    transition: padding-top var(--transition-slow);
}

/* ===== Today Section ===== */
.today-section {
    margin-bottom: 24px;
}

.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.date-nav-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.date-nav-btn:hover, .date-nav-btn:active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.date-nav-btn svg {
    width: 20px;
    height: 20px;
}

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

.date-label {
    display: block;
    font-size: 0.8rem;
    color: var(--copper);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date-full {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.stats-row::-webkit-scrollbar {
    display: none;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-chip svg {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.stat-chip strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Jobs Section ===== */
.jobs-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.view-toggle-mini {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.toggle-btn {
    width: 36px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-btn:hover {
    color: var(--text-secondary);
}

.toggle-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.toggle-btn svg {
    width: 18px;
    height: 18px;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Job Card ===== */
.job-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.job-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.job-card:active {
    transform: scale(0.99);
}

.job-card.in-progress {
    border-color: var(--copper);
    border-width: 2px;
}

.job-card.in-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--copper);
}

.job-card-main {
    padding: 16px;
    display: flex;
    gap: 14px;
}

.job-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.job-time {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.job-time-end {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.job-time-divider {
    width: 1px;
    flex: 1;
    background: var(--border-color);
    margin: 4px 0;
    min-height: 16px;
}

.job-info {
    flex: 1;
    min-width: 0;
}

.job-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.job-ref {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.job-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.job-status.scheduled {
    background: var(--blue-light);
    color: var(--blue);
}

.job-status.progress {
    background: rgba(193, 127, 89, 0.15);
    color: var(--copper-dark);
}

.job-status.completed {
    background: var(--green-light);
    color: var(--green);
}

.job-customer {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.job-location svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.job-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.job-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.job-type svg {
    width: 12px;
    height: 12px;
}

.job-partner {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.partner-dot {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--copper-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Job Card Actions */
.job-card-actions {
    display: flex;
    border-top: 1px solid var(--border-light);
}

.job-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.job-action:not(:last-child) {
    border-right: 1px solid var(--border-light);
}

.job-action:hover, .job-action:active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.job-action svg {
    width: 18px;
    height: 18px;
}

.job-action.primary {
    color: var(--copper);
    font-weight: 600;
}

.job-action.primary:hover {
    background: rgba(193, 127, 89, 0.08);
}

.job-action.success {
    color: var(--green);
}

.job-action.success:hover {
    background: var(--green-light);
}

/* ===== Week Section (Desktop) ===== */
.week-section {
    display: none;
    margin-bottom: 24px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.week-day {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.week-day:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.week-day.today {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.04);
}

.week-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.week-day-name {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-day-date {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.week-day.today .week-day-date {
    color: var(--copper);
}

.week-day-jobs {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.week-day-jobs strong {
    color: var(--text-primary);
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: stretch;
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.bottom-nav .nav-item svg {
    width: 24px;
    height: 24px;
}

.bottom-nav .nav-item.active {
    color: var(--copper);
}

.bottom-nav .nav-item:active {
    opacity: 0.7;
}

/* ===== Sheet (Job Detail) ===== */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 200;
}

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

.job-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    max-height: 90dvh;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    z-index: 201;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--safe-area-bottom);
}

.job-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    padding: 12px;
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    -webkit-overflow-scrolling: touch;
}

/* Sheet Sections */
.sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sheet-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sheet-ref {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sheet-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sheet-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}

.sheet-close svg {
    width: 20px;
    height: 20px;
}

.sheet-section {
    margin-bottom: 20px;
}

.sheet-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.info-icon svg {
    width: 18px;
    height: 18px;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.info-action {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--copper);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.info-action:hover {
    background: var(--copper-dark);
}

.info-action svg {
    width: 20px;
    height: 20px;
}

.info-action.secondary {
    background: var(--blue);
}

.info-action.secondary:hover {
    background: #3d6aa8;
}

/* Timer Section */
.timer-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.timer-display {
    font-family: 'Sora', monospace;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.timer-display.active {
    color: var(--copper);
}

.timer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.timer-btn {
    flex: 1;
    max-width: 160px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.timer-btn svg {
    width: 20px;
    height: 20px;
}

.timer-btn.start {
    background: var(--green);
    color: white;
}

.timer-btn.start:hover {
    background: #4a8560;
}

.timer-btn.stop {
    background: var(--red);
    color: white;
}

.timer-btn.stop:hover {
    background: #b5524c;
}

.timer-btn.pause {
    background: var(--amber);
    color: white;
}

/* Sheet Actions */
.sheet-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.sheet-actions .btn {
    flex: 1;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

.modal-content {
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    padding-bottom: calc(16px + var(--safe-area-bottom));
}

.modal-footer .btn {
    flex: 1;
}

/* Completion Summary */
.completion-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.summary-value {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.km-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.km-input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
}

.km-input:focus {
    outline: none;
    border-color: var(--copper);
}

.km-suffix {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--copper);
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--copper);
}

/* Photo Upload */
.photo-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.photo-grid {
    display: contents;
}

.photo-item {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.photo-remove svg {
    width: 14px;
    height: 14px;
}

.add-photo-btn {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-photo-btn:hover {
    border-color: var(--copper);
    color: var(--copper);
}

.add-photo-btn svg {
    width: 24px;
    height: 24px;
}

.add-photo-btn span {
    font-size: 0.65rem;
    font-weight: 500;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--copper);
    border-color: var(--copper);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 48px;
}

.btn svg {
    width: 20px;
    height: 20px;
}

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

.btn-primary:hover {
    background: var(--copper-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

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

.btn-success:hover {
    background: #4a8560;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.empty-icon svg {
    width: 32px;
    height: 32px;
}

.empty-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

/* ===== Desktop Styles ===== */
@media (min-width: 768px) {
    :root {
        --bottom-nav-height: 0px;
    }

    .main-content {
        max-width: 1200px;
        margin: 0 auto;
        padding: calc(var(--header-height) + 32px) 32px 32px;
    }

    body.timer-active .main-content {
        padding-top: calc(var(--header-height) + var(--timer-bar-height) + 32px);
    }

    .header {
        padding: 0 32px;
    }

    .bottom-nav {
        display: none;
    }

    /* Week Section visible on desktop */
    .week-section {
        display: block;
    }

    /* Side-by-side layout */
    .today-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .date-nav {
        margin-bottom: 0;
    }

    .stats-row {
        flex: 0 0 auto;
    }

    /* Jobs grid on desktop */
    .jobs-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 16px;
    }

    /* Sheet becomes side panel on desktop */
    .job-sheet {
        left: auto;
        right: 0;
        top: 0;
        bottom: 0;
        width: 480px;
        max-width: 480px;
        max-height: none;
        border-radius: 0;
        transform: translateX(100%);
    }

    .job-sheet.open {
        transform: translateX(0);
    }

    .sheet-handle {
        display: none;
    }

    .sheet-content {
        padding: 24px;
    }

    /* Modal centered on desktop */
    .modal-overlay {
        align-items: center;
        padding: 24px;
    }

    .modal-content {
        max-width: 500px;
        max-height: 80vh;
        border-radius: var(--radius-xl);
    }

    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
}

@media (min-width: 1024px) {
    .jobs-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .jobs-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Dark Mode Support (Optional) ===== */
@media (prefers-color-scheme: dark) {
    /* Can be enabled later */
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.job-card {
    animation: slideUp 0.3s ease backwards;
}

.job-card:nth-child(1) { animation-delay: 0.05s; }
.job-card:nth-child(2) { animation-delay: 0.1s; }
.job-card:nth-child(3) { animation-delay: 0.15s; }
.job-card:nth-child(4) { animation-delay: 0.2s; }
.job-card:nth-child(5) { animation-delay: 0.25s; }

/* ===== Floating Role Switcher - Bottom Left ===== */
.floating-role-switcher {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 16px;
    z-index: 150;
}

.floating-role-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a1a1f 0%, #2d2d35 100%);
    border: 1px solid rgba(193, 127, 89, 0.3);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.floating-role-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--copper);
}

.floating-role-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--copper);
}

.floating-role-label {
    color: rgba(255, 255, 255, 0.9);
}

.floating-role-switcher.open .floating-role-toggle {
    background: var(--copper);
    border-color: var(--copper);
}

.floating-role-switcher.open .floating-role-toggle svg {
    color: white;
}

.floating-role-switcher.open .floating-role-label {
    color: white;
}

/* Floating Role Menu */
.floating-role-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 280px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.floating-role-switcher.open .floating-role-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-role-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1a1a1f 0%, #2d2d35 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.floating-role-badge {
    padding: 2px 8px;
    background: var(--copper);
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Floating Role Options */
.floating-role-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.floating-role-option:last-child {
    border-bottom: none;
}

.floating-role-option:hover {
    background: var(--bg-secondary);
}

.floating-role-option.active {
    background: rgba(193, 127, 89, 0.08);
}

.floating-role-option-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.floating-role-option-icon svg {
    width: 16px;
    height: 16px;
}

.floating-role-option-icon.admin {
    background: linear-gradient(135deg, #4a7bbd 0%, #3d6aa8 100%);
    color: white;
}

.floating-role-option-icon.technician {
    background: linear-gradient(135deg, #c17f59 0%, #a66b47 100%);
    color: white;
}

.floating-role-option-icon.partner {
    background: linear-gradient(135deg, #5a9a6e 0%, #4a8a5e 100%);
    color: white;
}

.floating-role-option-info {
    flex: 1;
    min-width: 0;
}

.floating-role-option-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 1px;
}

.floating-role-option-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-role-check {
    width: 18px;
    height: 18px;
    color: var(--copper);
}

.floating-role-check svg {
    width: 16px;
    height: 16px;
}

/* Desktop: Position above viewport bottom */
@media (min-width: 768px) {
    .floating-role-switcher {
        bottom: 24px;
        left: 24px;
    }
}

/* Mobile: Smaller toggle, menu full width */
@media (max-width: 480px) {
    .floating-role-toggle {
        padding: 10px 14px;
    }

    .floating-role-menu {
        width: calc(100vw - 32px);
    }
}
