/* =========================================
   Staff App -- Application Layout Styles
   Page-level layout, shell, and page-specific styles.
   Tokens in tokens.css. Atom/molecule styles in atoms.css.
   ========================================= */

/* === RESET === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-primary);
    line-height: 1.4;
    color: var(--text-color);
    background: var(--background-start);
    height: 100dvh;
    overscroll-behavior: none;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

button {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

/* === APP SHELL === */
.app-container {
    height: 100dvh;
    display: grid;
    grid-template-rows: var(--nav-height) 1fr;
    background: var(--background-start);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* --- Top Nav (warm beige chrome -- header band, no border-bottom) --- */
.top-nav {
    height: var(--nav-height);
    background-color: var(--chrome);
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 50;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.app-title.brand-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-separator {
    color: var(--text-secondary);
    font-weight: 700;
    margin: 0 3px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.brand-app {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-color);
    position: relative;
}

/* + Repair launcher in the header. Semantic green preserved -- staff already
   associate "report a repair" with this colour from the old Repairs page. */
.header-add-repair {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 12px;
    margin-right: 4px;
    background: var(--focus-outline);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

.header-add-repair:hover,
.header-add-repair:focus-visible {
    background: var(--color-primary-hover);
    outline: none;
}

.header-add-repair:active { opacity: 0.9; }

.header-add-repair svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
    position: relative;
}

/* Bell health dot -- replaces icon-tinting via push-bell-warning class.
   Green when channel is healthy, red when test failed / permission revoked. */
.bell-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--chrome);
    background: var(--bell-dot-ok);
    transition: background 0.3s ease;
    pointer-events: none;
}

.bell-dot.err { background: var(--bell-dot-err); }

.header-icon-btn:hover,
.header-icon-btn:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    outline: none;
}

.header-icon-btn:active {
    background: rgba(0, 0, 0, 0.1);
}

.header-icon-btn .profile-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--focus-outline);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 240px;
    max-width: 92vw;
    background: var(--background-start);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.profile-menu.open {
    display: flex;
}

.profile-menu-header {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-light);
}

.profile-menu-rows {
    display: flex;
    flex-direction: column;
}

.profile-menu-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-light);
}

.profile-menu-row:last-child {
    border-bottom: none;
}

.profile-menu-label {
    font-size: 12px;
    color: var(--border-color);
}

.profile-menu-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
    word-break: break-word;
}

.profile-menu-signout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    border-top: 1px solid var(--border-light);
    color: var(--danger-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.profile-menu-signout:active {
    background: rgba(239, 68, 68, 0.08);
}

/* --- Main Content -- shares the chrome bg so the tab strip rendered at the
     top of .content-wrapper feels like part of the header band, with no
     visible seam (LEAP refresh). --- */
.main-content {
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 14px 10px;
    overflow: hidden;
    background: var(--chrome);
}

.content-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    animation: contentFadeIn 0.25s ease-in-out forwards;
    transition: opacity 0.25s ease;
}

.content-wrapper h1 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.content-wrapper p {
    color: var(--text-color);
    opacity: 0.8;
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* Bottom Nav removed in LEAP refresh -- the two-page bottom nav (My Tasks +
   Repairs) collapsed to one screen with Mine / Team / Archive tabs. */

/* === SEGMENTED SLIDER TABS ===
   Sits at the top of .content-wrapper, immediately under the header band.
   Inherits the chrome background, padded inset for the inner track. */
.task-tabs {
    position: relative;
    display: flex;
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    padding: 3px;
    height: 44px;
    margin: 8px 0 12px;
    flex-shrink: 0;
}

/* The sliding white pill -- absolute positioning, JS sets left + width on
   tab switch (TabBar.movePill). Initial left/width default to the first
   third so the pill is visible on first paint even before JS has measured;
   movePill takes over for switches. */
.tab-pill {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: calc(var(--radius-xl) - 3px);
    background: var(--color-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.task-tab {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 4px;
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: calc(var(--radius-xl) - 3px);
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.task-tab.active { color: var(--text-color); }

/* Inline count chip next to the tab label */
.tab-count {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-pill);
    padding: 1.5px 6px;
    line-height: 1.3;
    transition: background 0.18s, color 0.18s;
}

.task-tab.active .tab-count {
    background: rgba(0, 0, 0, 0.07);
    color: var(--text-secondary);
}

/* === TASK CARDS === */
.task-content-area {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.task-cards-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    transition: all 0.3s ease;
    position: relative;
    -webkit-overflow-scrolling: touch;
}


.task-cards-container::-webkit-scrollbar {
    width: 4px;
}

.task-cards-container::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 2px;
}

.task-cards-container::-webkit-scrollbar-track {
    background-color: transparent;
}

.task-card.compact {
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transform-origin: center top;
}

.task-card.compact:hover:not(.expanded) {
    background-color: rgba(255, 255, 255, 0.95);
}

/* --- Card Header --- */
.task-card-header {
    display: flex;
    flex-direction: column;
    padding: var(--sp-4) var(--sp-5);
    gap: 2px;
    background-color: var(--color-surface);
    flex-shrink: 0;
}

.task-card-title-row {
    display: flex;
    align-items: center;
}

.task-card-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
}

.task-card.compact .task-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.task-card.compact .task-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.task-location {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.3;
}

.task-reported {
    font-size: var(--text-sm);
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.3;
}

.task-field-label {
    font-weight: 600;
    opacity: 0.5;
}

/* --- Badges --- */
.task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: 2px;
}

.task-priority {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.task-priority-high {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.task-priority-urgent, .task-priority-critical {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-priority-priority {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-priority-low {
    background-color: rgba(156, 163, 175, 0.12);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.task-dept-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: capitalize;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.task-qa-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(234, 179, 8, 0.15);
    color: #b45309;
    letter-spacing: 0.03em;
}

.task-type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.task-type-badge-repair {
    background-color: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.task-type-badge-task {
    background-color: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.task-type-badge-qa {
    background-color: rgba(234, 179, 8, 0.15);
    color: #b45309;
}

.task-due-time {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    background-color: var(--border-light);
    color: var(--text-color);
    opacity: 0.8;
}

/* --- Card Meta --- */
.task-meta {
    display: flex;
    gap: 8px;
    padding: 3px 12px 8px;
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.55;
}

/* --- Card tappable --- */
.task-card.compact {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* --- Task Action Buttons (Active tab only) --- */
.task-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-shrink: 0;
}

.task-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.task-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.task-btn-start {
    background-color: var(--success-color);
    color: white;
}

.task-btn-start:hover { background-color: var(--success-hover); }
.task-btn-start:active { transform: scale(0.92); }

.task-btn-release {
    background-color: transparent;
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.task-btn-release:hover { background-color: var(--warning-color); color: white; }
.task-btn-release:active { transform: scale(0.92); background-color: var(--warning-color); color: white; }

.task-btn-hold {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    margin-right: 8px;
}

.task-btn-hold:hover { background-color: var(--border-light); }
.task-btn-hold:active { transform: scale(0.92); }

.task-card.expanded .task-btn-hold { display: flex; }
.task-card:not(.expanded) .task-btn-hold { display: none; }

/* --- Info button (unclaimed cards) --- */
.task-btn-info {
    background-color: transparent;
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

.task-btn-info svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.task-card.expanded .task-btn-info svg { transform: rotate(180deg); }

.task-btn-info:hover { background-color: rgba(59, 130, 246, 0.08); }
.task-btn-info:active { transform: scale(0.92); }

/* --- Status tints (ENH-4.3) --- */
.task-card--unclaimed {
    background-color: rgba(16, 185, 129, 0.05);
}

.task-card--active {
    background-color: rgba(245, 158, 11, 0.05);
}

.task-card--done {
    background-color: rgba(156, 163, 175, 0.06);
}


/* === EXPANDED TASK / FOCUS MODE === */
.task-card.compact.expanded {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.task-btn-stop {
    display: none;
    background-color: var(--danger-color);
    color: white;
}

.task-btn-stop:hover { background-color: var(--danger-hover); }
.task-btn-stop:active { transform: scale(0.92); }

.task-card.expanded .task-btn-start { display: none; }
.task-card.expanded .task-btn-stop { display: flex; }

.task-card.expanded .task-card-header {
    padding: var(--sp-3) var(--sp-5);
}


.task-expanded-body {
    display: none;
    flex-direction: column;
    background: var(--color-surface);
    position: relative;
}

.task-card.expanded .task-expanded-body {
    display: flex;
}

/* --- Step Content Area (natural height -- parent body scrolls) --- */
.task-step-content-area {
    flex: 0 0 auto;
    background: white;
}

.task-step-content-area::-webkit-scrollbar {
    width: 4px;
}

.task-step-content-area::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 2px;
}

.task-step-content-area::-webkit-scrollbar-track {
    background-color: transparent;
}

/* --- Steps Header / Progress --- */
.task-steps-header {
    flex-shrink: 0;
    padding: 6px 12px;
    background: white;
}

.task-full-description {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.35;
}

.task-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.task-progress-text {
    font-size: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
}

.task-progress-percentage {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

.task-progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--bg-pressed);
    border-radius: 2px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--step-active));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* === STEP RENDERER OVERRIDES ===
   Higher specificity than shared task-step-renderer.css (loaded after this file).
   All overrides scoped to .task-step-content-area to win the cascade. */

.task-step-content-area .step-container {
    background-color: var(--color-surface);
    border: none;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 10px;
}

/* Progress bar at top of step container -- compact */
.task-step-content-area .step-progress-bar {
    padding: 4px 10px 0;
    font-size: 0.7rem;
    color: var(--border-color);
}

.task-step-content-area .step-progress-bar .progress-bar-track {
    height: 3px;
    background: var(--bg-pressed);
    border-radius: 2px;
    overflow: hidden;
}

.task-step-content-area .step-progress-bar .progress-bar-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.task-step-content-area .step-header {
    padding: 8px 0 6px;
    border-bottom: 1px solid var(--border-light);
    gap: 2px;
}

.task-step-content-area .step-instruction {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.25;
}

.task-step-content-area .step-description {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.75;
    line-height: 1.35;
}

/* Step media help */
.step-media-help {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.media-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--border-light);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-help-btn:hover {
    background-color: var(--focus-outline);
}

.media-help-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-color);
    opacity: 0.8;
}

.media-help-btn:hover svg {
    stroke: white;
    opacity: 1;
}

/* Step tips */
.task-step-content-area .step-tips {
    background-color: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--info-color);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
}

.task-step-content-area .step-tips h4 {
    color: var(--info-color);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.task-step-content-area .step-tips ul {
    list-style: none;
    padding: 0;
}

.task-step-content-area .step-tips li {
    font-size: 0.78rem;
    color: var(--text-color);
    opacity: 0.8;
    position: relative;
    padding-left: 14px;
}

.task-step-content-area .step-tips li:before {
    content: '\2022';
    color: var(--info-color);
    position: absolute;
    left: 0;
}

/* Input fields (compact for mobile) */
.task-step-content-area .input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-step-content-area .input-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
}

.task-step-content-area .input-field {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--bg-pressed);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background-color: var(--color-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.task-step-content-area .input-field:focus {
    outline: none;
    border-color: var(--focus-outline);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.task-step-content-area .input-field::placeholder {
    color: var(--text-color);
    opacity: 0.4;
}

.task-step-content-area .number-input {
    font-size: 1.1rem;
}

/* Radio options (compact) */
.task-step-content-area .radio-option {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

/* Threshold alerts (scrollable within content area) */
.task-step-content-area .threshold-alert {
    margin: 8px 0;
    padding: 10px;
    border-radius: var(--radius-md);
}

/* Completion feedback (compact) */
.task-step-content-area .completion-feedback {
    padding: 30px 16px;
    min-height: auto;
}

.task-step-content-area .completion-title {
    font-size: 1.3rem;
}

/* Validation alert (compact) */
.task-step-content-area .validation-alert {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Photo capture */
.photo-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    border: 2px dashed var(--bg-pressed);
    border-radius: var(--radius-md);
    background-color: var(--bg-hover);
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-upload-btn:hover {
    border-color: var(--color-primary);
    background-color: rgba(22, 163, 74, 0.04);
}

.photo-upload-btn svg {
    width: 28px;
    height: 28px;
    stroke: var(--text-color);
    opacity: 0.5;
    margin-bottom: 4px;
}

.photo-upload-btn span {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* Step action buttons (compact, 44px touch target) */
.task-step-content-area .step-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding: 6px 10px 8px;
    border-top: 1px solid var(--border-light);
}

.task-step-content-area .step-btn {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    font-family: inherit;
}

.task-step-content-area .step-btn-primary {
    background: var(--success-color);
    color: white;
    box-shadow: none;
}

.task-step-content-area .step-btn-primary:hover {
    background: var(--success-hover);
}

.task-step-content-area .step-btn-primary:active {
    transform: scale(0.97);
}

.task-step-content-area .step-btn-secondary {
    background: var(--border-light);
    color: var(--text-color);
    border: none;
}

.task-step-content-area .step-btn-secondary:hover {
    background: var(--border-medium);
}

.task-step-content-area .step-btn-secondary.disabled {
    background: var(--bg-hover);
    color: var(--text-disabled);
    cursor: not-allowed;
}

.task-step-content-area .step-btn-secondary.disabled:hover {
    background: var(--bg-hover);
}

.task-step-content-area .step-btn-secondary.disabled svg {
    stroke: var(--text-disabled);
}

.task-step-content-area .step-btn-danger {
    background: var(--danger-color);
    color: white;
}

.task-step-content-area .step-btn-danger:hover {
    background: var(--danger-hover);
}

.task-step-content-area .step-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* === ATTENDANCE === */
.attendance-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
}

.attendance-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    background-color: var(--color-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

.attendance-button:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--focus-outline);
}

.attendance-button:active {
    transform: scale(0.96);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.attendance-button.check-in {
    border-color: var(--success-color);
}

.attendance-button.check-out {
    border-color: var(--danger-color);
}

.attendance-button.check-in:hover {
    border-color: var(--success-hover);
}

.attendance-button.check-out:hover {
    border-color: var(--danger-hover);
}

.attendance-button .attendance-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    stroke-width: 1.5;
}

.attendance-button.check-in .attendance-icon {
    stroke: var(--success-color);
}

.attendance-button.check-out .attendance-icon {
    stroke: var(--danger-color);
}

.attendance-button .attendance-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

/* === UTILITY STATES === */
.loading-state, .error-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.85rem;
}

.retry-btn {
    margin-top: 0.75rem;
    padding: 0.4rem 1.2rem;
    background: var(--focus-outline);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}

.attendance-success {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.85rem;
}

.attendance-error {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    color: var(--danger-color);
    font-weight: 500;
    font-size: 0.85rem;
}

/* === PROFILE PAGE === */

/* === SCROLLBAR (global) === */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 2px;
}

::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track);
}

/* === PAGE TRANSITIONS === */

.page-enter {
    animation: pageIn 0.2s ease-out;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === TASK SEARCH === */

.task-search-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--sp-3);
}

.task-search-bar svg {
    stroke: var(--text-secondary);
    flex-shrink: 0;
}

.task-search-input {
    flex: 1;
    border: none;
    background: none;
    font-size: var(--text-base);
    color: var(--text-color);
    outline: none;
}

.task-search-input::placeholder {
    color: var(--text-disabled);
}

/* === SIDE-BY-SIDE LAYOUTS ===
   Short field types (number, time, select) render label + input in one row.
   Radio groups render horizontally. Corrective action fields use a 2-col grid. */

/* Inline label+input for compact field types */
.task-step-content-area .input-group:has(.number-input),
.task-step-content-area .input-group:has(.time-field),
.task-step-content-area .input-group:has(.select-field) {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.task-step-content-area .input-group:has(.number-input) .input-label,
.task-step-content-area .input-group:has(.time-field) .input-label,
.task-step-content-area .input-group:has(.select-field) .input-label {
    flex-shrink: 0;
    white-space: nowrap;
}

.task-step-content-area .input-group:has(.number-input) .input-field,
.task-step-content-area .input-group:has(.time-field) .input-field,
.task-step-content-area .input-group:has(.select-field) .input-field {
    flex: 1;
    min-width: 80px;
}

.task-step-content-area .input-group:has(.number-input) .input-hint {
    flex-basis: 100%;
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.55;
}

/* Horizontal radio groups -- 2-3 options share one row */
.task-step-content-area .radio-group {
    flex-direction: row;
    gap: 6px;
}

.task-step-content-area .radio-option {
    flex: 1;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    justify-content: center;
    text-align: center;
}

.task-step-content-area .radio-option input[type="radio"] {
    margin-right: 4px;
    width: 16px;
    height: 16px;
}

.task-step-content-area .radio-label {
    font-size: 0.85rem;
}

/* Corrective action fields: textarea full-width, name+time side-by-side */
.task-step-content-area .corrective-action-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    background: rgba(234, 179, 8, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.task-step-content-area .corrective-action-fields > .input-group:first-child {
    grid-column: 1 / -1;
}

/* Number stepper component (renders when JS provides stepper markup) */
.task-step-content-area .number-stepper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.task-step-content-area .stepper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border: 1.5px solid var(--bg-pressed);
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.task-step-content-area .stepper-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.task-step-content-area .stepper-btn:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.task-step-content-area .stepper-btn:active {
    background: var(--border-light);
}

.task-step-content-area .number-stepper .number-input {
    border-radius: 0;
    text-align: center;
    flex: 1;
    min-width: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    -moz-appearance: textfield;
}

.task-step-content-area .number-stepper .number-input::-webkit-inner-spin-button,
.task-step-content-area .number-stepper .number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* === ANIMATIONS === */
@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MY REPAIRS (now lives inside Archive's "Reported by me" section) ===
   The standalone .repairs-page wrapper + header + + Report Repair button
   were removed when the bottom-nav Repairs entry collapsed into Archive.
   The card/header/expand styles below are still used by
   _renderArchiveRepairTile. */

.my-repair-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--card-shadow);
}

.my-repair-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
    user-select: none;
}

.my-repair-chevron {
    color: var(--border-color);
    display: inline-flex;
    align-items: center;
}

.my-repair-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
    min-width: 0;
}

.my-repair-stage {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--sp-1);
    white-space: nowrap;
}

.my-repair-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--border-color);
    padding-top: 4px;
}

.my-repair-priority {
    color: var(--danger-color);
    font-weight: 600;
}

/* Expanded repair detail (description + comments) */
.my-repair-expanded {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
}

.my-repair-description {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.my-repair-description-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.my-repair-description p {
    margin: 0;
    font-size: 13px;
    color: var(--text-color);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Shared comments block (My Repairs + My Tasks) */
.repair-comments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.repair-comments-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.repair-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.repair-comments-empty {
    font-size: 13px;
    color: var(--border-color);
    font-style: italic;
}

.repair-comment-entry {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-light);
}

.repair-comment-entry:last-child {
    border-bottom: none;
}

.repair-comment-handover-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--warning-color);
}

.repair-comment-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    color: var(--border-color);
}

.repair-comment-source {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.repair-comment-time {
    font-variant-numeric: tabular-nums;
}

.repair-comment-text {
    font-size: 13px;
    color: var(--text-color);
    white-space: pre-wrap;
    word-break: break-word;
}

.repair-comment-input {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

.repair-comment-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--text-color);
    resize: vertical;
    min-height: 40px;
}

.repair-comment-textarea:focus {
    outline: none;
    border-color: var(--accent-color, #3b82f6);
}

.repair-comment-submit {
    width: 44px;
    height: 44px;
    min-height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: var(--focus-outline);
    color: #fff;
    cursor: pointer;
}

.repair-comment-submit svg { stroke: #fff; }

.repair-comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Comments block inside the My Tasks expanded detail */
.task-repair-comments {
    padding: 10px;
    background: white;
}

/* Repair context -- shown above step area when expanding a repair task */
.repair-context {
    flex-shrink: 0;
    padding: 8px 10px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* --- Action bar (inside expanded card) --- */
.task-action-bar {
    flex-shrink: 0;
    background: var(--color-surface);
    padding: 8px 10px;
}

.action-bar-buttons {
    display: flex;
    gap: 8px;
}

.action-bar-right {
    justify-content: flex-end;
}

.action-bar-take {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--success-color);
    color: #fff;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.action-bar-take:active { background: var(--success-hover); }
.action-bar-take:disabled { opacity: 0.6; cursor: not-allowed; }

.action-bar-decline {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.action-bar-decline:active { background: rgba(245, 158, 11, 0.1); }

.action-bar-release {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.action-bar-release:active { background: rgba(239, 68, 68, 0.1); }

.action-bar-reason-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-bar-reason-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-color);
}

.action-bar-reason-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--border-color);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.action-bar-reason-close:active { background: var(--border-light); }

.action-bar-reason-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--text-color);
    resize: vertical;
    min-height: 60px;
}

.action-bar-reason-textarea:focus {
    outline: none;
    border-color: var(--focus-outline);
}

.action-bar-reason-confirm {
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    background: var(--focus-outline);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.action-bar-reason-confirm:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- Repair context header row (category + hold/resume inline) --- */
.repair-context-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.repair-context-header {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.25;
}

.repair-context-hold-pill {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-1) var(--sp-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 700;
    background: var(--danger-color);
    color: white;
    letter-spacing: 0.02em;
}

.repair-context-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 10.5px;
    color: var(--border-color);
    line-height: 1.3;
}

.repair-context-meta > div {
    display: inline-flex;
}

.repair-context-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.repair-context-photo-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.repair-context-photo-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--border-color);
    min-width: 50px;
    flex-shrink: 0;
}

.repair-context-photos {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
    flex: 1;
}

.repair-context-photo-thumb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-pressed);
    cursor: pointer;
    padding: 0;
}

.repair-context-photo-large {
    width: 88px;
    height: 88px;
    min-width: 88px;
    border-radius: var(--radius-md);
}

.repair-context-activity {
    font-size: 10.5px;
    color: var(--border-color);
}

.repair-context-activity summary {
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 0;
    list-style: none;
}

.repair-context-activity summary::-webkit-details-marker {
    display: none;
}

.repair-context-activity summary::before {
    content: '▸ ';
    display: inline-block;
    margin-right: 2px;
}

.repair-context-activity[open] summary::before {
    content: '▾ ';
}

.repair-context-activity ul {
    list-style: none;
    padding: 4px 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.repair-context-activity li {
    display: flex;
    gap: 8px;
}

.repair-context-activity-time {
    font-variant-numeric: tabular-nums;
    min-width: 110px;
}

/* --- Unclaimed Repair Detail (expanded) --- */
.unclaimed-detail {
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
}

.unclaimed-detail-row {
    display: flex;
    gap: var(--sp-5);
    align-items: flex-start;
}

.unclaimed-detail-photo-frame {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.unclaimed-detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.unclaimed-detail-photo-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    color: var(--text-color);
    opacity: 0.4;
    font-size: var(--text-xs);
    font-weight: 500;
}

.unclaimed-detail-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

/* Info rows beside the photo -- each row has an icon on the left and a
   labelled value on the right. Mirrors the icon-prefixed pattern from the
   collapsed card body so the expanded view feels structurally consistent. */
.detail-info-row {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
}

.detail-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 1px;
}

.detail-info-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.detail-info-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-info-value {
    font-size: var(--text-sm);
    color: var(--text-color);
    line-height: 1.4;
    word-break: break-word;
}

.detail-info-value.detail-info-empty {
    opacity: 0.5;
    font-style: italic;
}

/* QA context -- shown above step area when expanding a QA task.
   Mirrors the visual weight of repair-context so the two block types feel
   consistent. Read-only (no actions). */
.qa-context {
    flex-shrink: 0;
    padding: 8px 10px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qa-context-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.qa-context-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}

.qa-context-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
    background: var(--border-light);
    color: var(--text-color);
}

.qa-context-badge-iso {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info-color);
}

.qa-context-badge-freq {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-color);
}

.qa-context-badge-category {
    background: rgba(135, 134, 127, 0.15);
    color: var(--text-secondary);
}

.qa-context-description {
    font-size: var(--text-sm);
    color: var(--text-color);
    line-height: 1.4;
}

.qa-context-corrective {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.qa-context-corrective summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
}

.qa-context-corrective summary::-webkit-details-marker { display: none; }

.qa-context-corrective summary::before {
    content: '> ';
    display: inline-block;
    margin-right: 4px;
}

.qa-context-corrective[open] summary::before { content: 'v '; }

.qa-context-corrective-body {
    padding: 4px 0 8px;
    line-height: 1.4;
    color: var(--text-color);
}

/* === HOLD / RESUME ACTION (inline with category header) === */

.repair-hold-btn {
    min-height: 36px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--warning-color);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--warning-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.repair-hold-btn:active {
    background: rgba(245, 158, 11, 0.1);
}

.repair-resume-btn {
    min-height: 36px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    background: var(--success-color);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.repair-resume-btn:active {
    background: var(--success-hover);
}

.repair-resume-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.repair-hold-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: var(--background-start);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.repair-hold-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.repair-hold-panel-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--border-color);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.repair-hold-panel-close:active {
    background: var(--border-light);
}

.repair-hold-reasons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.repair-hold-reason-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.repair-hold-reason-option:active {
    background: var(--border-light);
}

.repair-hold-reason-option input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.repair-hold-no-reasons {
    font-size: 13px;
    color: var(--border-color);
    font-style: italic;
    padding: 8px 0;
}

.repair-hold-error {
    font-size: 12px;
    color: var(--danger-color);
    padding: 4px 0;
}

.repair-context-category-row {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.repair-context-category-row .staff-select {
    width: 100%;
    min-height: 44px;
    padding: var(--sp-4) var(--sp-5);
    font-size: var(--text-base);
}

/* On Hold chip on collapsed task card */
.task-hold-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Full-screen photo lightbox -- tap anywhere to close */
.staff-photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
}

.staff-photo-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.staff-photo-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Repair form modal */
.repair-form-modal {
    background: var(--background-start);
    border-radius: var(--radius-xl);
    padding: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
}

.repair-form-modal h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.repair-form-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rf-priority-buttons {
    display: flex;
    gap: 8px;
}

.rf-photo-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rf-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rf-photo-btn:active {
    background: rgba(22, 163, 74, 0.05);
}

.rf-photo-thumb {
    position: relative;
    width: 100%;
    max-width: 240px;
}

.rf-photo-thumb img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

.rf-photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rf-pq-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rf-pq-btn.selected {
    border-color: var(--color-primary);
    background: rgba(22, 163, 74, 0.1);
    color: var(--color-primary);
}

.report-issue-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.report-issue-modal {
    background: var(--background-start);
    border-radius: var(--radius-xl);
    padding: 16px;
    width: 100%;
    max-width: 400px;
}

.report-issue-modal h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.report-issue-field {
    margin-bottom: 8px;
}

.report-issue-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-color);
}

.report-issue-field input,
.report-issue-field textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--color-surface);
    box-sizing: border-box;
}

.report-issue-field select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--color-surface);
    box-sizing: border-box;
}

.report-issue-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.rf-room-search-row {
    display: flex;
    gap: 8px;
}

.rf-room-search-row input,
.rf-room-search-row select {
    flex: 1;
}

.report-issue-actions .btn-cancel {
    padding: 7px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
}

.report-issue-actions .btn-submit {
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--focus-outline);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.report-issue-actions .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* === UNCLAIMED TEAM REPAIRS TAB === */
.unclaimed-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
}

.unclaimed-priority {
    border-left: 4px solid var(--danger-color);
    padding-left: 10px;
}

.unclaimed-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unclaimed-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.25;
}

.unclaimed-location {
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.65;
}

.unclaimed-meta {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    align-items: center;
    flex-wrap: wrap;
}

.unclaimed-take-btn {
    padding: 10px 18px;
    min-height: 44px;
    flex-shrink: 0;
    background: var(--success-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.unclaimed-take-btn:active {
    background: var(--success-hover);
}

.unclaimed-take-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================
   TABLET BREAKPOINT (768px+)
   Restores generous sizing for tablet use.
   ========================================= */
@media (min-width: 768px) {
    :root {
        --nav-height: 56px;
        --bottom-nav-height: 64px;
    }

    body {
        line-height: 1.6;
    }

    .top-nav {
        padding: 0 24px;
    }

    .app-title {
        font-size: 1.2rem;
    }

    .breadcrumb-separator {
        font-size: 1.2rem;
    }

    #current-page {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 20px;
    }

    .content-wrapper {
        max-width: 800px;
        gap: 16px;
    }

    .content-wrapper h1 {
        font-size: 1.5rem;
    }

    .content-wrapper p {
        font-size: 1rem;
    }

    /* Bottom nav */
    .bottom-nav .nav-item .icon {
        width: 28px;
        height: 28px;
    }

    .bottom-nav .nav-item .nav-label {
        font-size: 0.75rem;
        margin-top: 2px;
    }

    /* Task tabs */
    .task-tabs {
        border-radius: var(--radius-xl);
        box-shadow: var(--card-shadow);
    }

    .task-tab {
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* Task cards */
    .task-cards-container {
        gap: 12px;
    }

    .task-card.compact {
        border-radius: var(--radius-lg);
    }

    .task-card.compact:hover:not(.expanded) {
        transform: translateY(-1px);
        box-shadow: var(--card-shadow-hover);
    }

    .task-btn {
        width: 44px;
        height: 44px;
        border-radius: var(--radius-lg);
    }

    .task-card-header {
        padding: var(--sp-6);
        gap: var(--sp-6);
    }

    .task-card.compact .task-title {
        font-size: var(--text-md);
    }

    .task-location,
    .task-reported {
        font-size: var(--text-base);
    }

    .task-badges {
        gap: 6px;
        margin-top: 6px;
    }

    .task-priority,
    .task-dept-badge,
    .task-qa-badge,
    .task-due-time {
        padding: 2px 8px;
        font-size: 0.7rem;
    }

    .task-meta {
        padding: 8px 16px 12px;
        font-size: 0.8rem;
    }

    .task-step-content-area {
        padding: 16px;
    }

    .task-steps-header {
        padding: 8px 16px;
    }

    .task-step-content-area .step-container {
        border-radius: var(--radius-xl);
        padding: 14px 16px;
        gap: 14px;
    }

    .task-step-content-area .step-header {
        padding: 14px 0 10px;
    }

    .task-step-content-area .step-instruction {
        font-size: 1.2rem;
    }

    .task-step-content-area .step-description {
        font-size: 0.9rem;
    }

    .task-step-content-area .input-field {
        padding: 14px;
        border-radius: var(--radius-lg);
        font-size: 1rem;
    }

    .task-step-content-area .step-btn {
        padding: 14px;
        min-height: 48px;
        font-size: 1rem;
    }

    .media-help-btn {
        width: 40px;
        height: 40px;
    }

    /* Side-by-side: restore stacked for tablet (more room) */
    .task-step-content-area .radio-option {
        padding: 12px 16px;
        border-radius: var(--radius-md);
    }

    .task-step-content-area .corrective-action-fields {
        padding: 12px;
    }

    .task-step-content-area .stepper-btn {
        width: 48px;
        height: 48px;
    }

    /* Attendance */
    .attendance-buttons {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        margin-top: 40px;
    }

    .attendance-button {
        width: 200px;
        height: 200px;
    }

    .attendance-button .attendance-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 12px;
    }

    .attendance-button .attendance-label {
        font-size: 1.15rem;
    }

}

/* ============================================================
   REPAIR PHOTO DISPLAY (my-repair card + notification modal)
   ============================================================ */

.my-repair-photo-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.my-repair-photo-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.my-repair-photo-more {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

/* === PUSH IN-APP BANNER === */

.push-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--sp-5) var(--sp-6);
    background: var(--color-primary);
    color: #fff;
    z-index: 100;
    animation: push-banner-in 0.25s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.push-banner-text {
    font-size: var(--text-sm);
    line-height: 1.4;
}

.push-banner-text strong {
    display: block;
    font-size: var(--text-base);
    margin-bottom: 2px;
}

@keyframes push-banner-in {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.push-bell-warning svg {
    stroke: #dc2626;
}

.push-bell-ok svg {
    stroke: #16a34a;
}

/* === HOLD MODAL === */

.hold-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.hold-modal {
    background: var(--background-start);
    border-radius: var(--radius-xl);
    padding: 16px;
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
}

.hold-modal h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.hold-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hold-modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hold-modal-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
}

.hold-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--text-color);
    box-sizing: border-box;
}

.hold-modal-input:focus {
    outline: none;
    border-color: var(--focus-outline);
}

.hold-reason-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.hold-reason-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-color);
    background: var(--color-surface);
    border: none;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}

.hold-reason-item:last-child {
    border-bottom: none;
}

.hold-reason-item:active {
    background: var(--border-light);
}

.hold-reason-item.selected {
    background: rgba(22, 163, 74, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.hold-reason-empty {
    padding: 12px;
    font-size: 13px;
    color: var(--border-color);
    font-style: italic;
}

.hold-modal .report-issue-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* ── Update pill + popover ───────────────────────────────────────────────
   Orange pulsing pill rendered into .user-controls when VersionWatcher
   detects a new deploy. Click opens a popover with whatsNew + Reload.
   Closes on outside-click. */

.update-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--warning-color);
    color: #fff;
    border: 1px solid #d97706;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    animation: update-pill-pulse 2.4s ease-in-out infinite;
    min-height: 36px;
}

.update-pill:hover,
.update-pill:focus-visible {
    background: #d97706;
    animation-play-state: paused;
    outline: none;
}

.update-pill:active {
    transform: scale(0.97);
}

.update-pill svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

@keyframes update-pill-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .update-pill { animation: none; }
}

.update-popover {
    position: fixed;
    z-index: 1000;
    min-width: 260px;
    max-width: 320px;
    background: #fff;
    color: var(--text-color);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 16px;
    font-size: 14px;
}

.update-popover-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.update-popover-body {
    margin: 0 0 12px 0;
    color: var(--text-secondary, var(--text-color));
    word-break: break-word;
    line-height: 1.4;
}

.update-popover-meta {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: var(--border-color);
}

.update-popover-actions {
    display: flex;
    justify-content: flex-end;
}

.update-popover-reload {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    min-height: 44px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.update-popover-reload:hover,
.update-popover-reload:focus-visible {
    background: var(--color-primary-hover, #15803d);
    outline: none;
}

/* ============================================================
   LEAP refresh -- card layout, urgent dot, expand-only badges,
   Archive sections. Action button styles (.task-btn-*) above
   are left intact: operators keep the same Start/Hold/Release
   colour and size they're used to.
   ============================================================ */

/* ── 4-row card body (canonical for every list row) ─────────────
   Row 1: Title (no icon, primary weight)
   Row 2: Location  (pin icon, secondary text)
   Row 3: Reported  (clock icon, secondary text, formatted date)
   Row 4: Priority  (alert icon, semantic colour) */
.task-card.compact .task-card-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-secondary);
}

/* Override .card-row's flex display so a long Category + Title can wrap
   to a second line naturally instead of getting clipped at the card edge. */
.card-row-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 2px;
}

/* Category prefix inside the title row (repair cards only). Bold + secondary
   colour so it reads as a tag without dominating the title text. */
.card-cat {
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

.card-cat-sep {
    color: var(--text-secondary);
    font-weight: 700;
    margin: 0 2px;
}

.card-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 13px;
    height: 13px;
}

.card-row-priority { font-weight: 600; }
.card-row-priority-normal   { color: var(--text-muted); font-weight: 400; }
.card-row-priority-low      { color: var(--text-muted); font-weight: 500; }
.card-row-priority-high     { color: var(--warning-color); }
.card-row-priority-urgent,
.card-row-priority-priority,
.card-row-priority-critical { color: var(--danger-color); }

.card-row-priority-urgent   .card-row-icon,
.card-row-priority-priority .card-row-icon,
.card-row-priority-critical .card-row-icon { color: var(--danger-color); }
.card-row-priority-high     .card-row-icon { color: var(--warning-color); }

/* Archive "Reported by me" tile -- shares the 4-row body, with the stage
   pill + chevron pinned above the body in their own row. */
.my-repair-card.task-card.compact {
    cursor: pointer;
}
.my-repair-stage-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 0 var(--sp-5);
    margin: var(--sp-4) 0 2px;
}
.my-repair-card .task-card-content {
    padding: 0 var(--sp-5) var(--sp-4);
}
.my-repair-card .my-repair-expanded {
    margin: 0 var(--sp-5) var(--sp-4);
}

/* Expand-only badges -- on-hold / QA / cross-dept signals dropped
   from the collapsed row per Q1, surface here when the card opens. */
.task-expanded-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-5) 0;
    flex-shrink: 0;
}

/* === ARCHIVE SECTIONS ===
   Done list on top, then a collapsible "Reported by me" group. */
.archive-section-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 12px 4px 4px;
    flex-shrink: 0;
}

.archive-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex: 1;
}

.archive-section-count {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--neutral);
    border-radius: var(--radius-pill);
    padding: 2px 7px;
}

.reported-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.reported-chev {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.reported-toggle.open .reported-chev {
    transform: rotate(180deg);
}

.archive-section-body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: 0 0 8px;
}

.archive-section-body.reported-body {
    display: none;
}

.archive-section-body.reported-body.open {
    display: flex;
}

/* ============================================================
   LEAP refresh -- bottom sheet (Report Repair + Hold pickers).
   Slides up from the bottom edge instead of centring like a
   classic modal. Same inner content + same wiring (no Lambda
   change) -- just a different shell.
   ============================================================ */

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    padding: 0;
    animation: sheet-overlay-in 0.18s ease-out;
}

.sheet-overlay.sheet-top {
    align-items: flex-start;
}

@keyframes sheet-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sheet {
    background: var(--chrome);
    padding: 14px 16px 24px;
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
}

.sheet::-webkit-scrollbar { display: none; }

/* Bottom sheet -- rounded top corners, slides up from the bottom edge.
   Hold picker uses this variant. */
.sheet-overlay.sheet-bottom .sheet {
    border-radius: 20px 20px 0 0;
    animation: sheet-slide-up-in 0.28s cubic-bezier(0.32, 0.72, 0.24, 1);
}

/* Top sheet -- rounded bottom corners, slides down from the top edge.
   Report Repair uses this variant. */
.sheet-overlay.sheet-top .sheet {
    border-radius: 0 0 20px 20px;
    animation: sheet-slide-down-in 0.28s cubic-bezier(0.32, 0.72, 0.24, 1);
}

/* Outbound animations -- triggered when JS adds .closing to the overlay
   just before remove(). The sheet travels the full distance off-screen
   (no opacity fade on the sheet -- the slide carries the dismissal).
   Backdrop opacity fades separately so the dim layer doesn't clip with
   the moving sheet. */
.sheet-overlay.sheet-bottom.closing .sheet {
    animation: sheet-slide-down-out 0.28s cubic-bezier(0.32, 0, 0.67, 0) forwards;
}
.sheet-overlay.sheet-top.closing .sheet {
    animation: sheet-slide-up-out 0.28s cubic-bezier(0.32, 0, 0.67, 0) forwards;
}
/* Backdrop fade is delayed so it only kicks in once the sheet has fully
   travelled off-screen. Without the delay, dim drops while the sheet is
   still mid-slide, which reads as the sheet "fading" instead of leaving. */
.sheet-overlay.closing {
    animation: sheet-overlay-out 0.14s ease-in 0.22s forwards;
}

@keyframes sheet-slide-up-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0);    }
}
@keyframes sheet-slide-down-in {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0);     }
}
@keyframes sheet-slide-down-out {
    from { transform: translateY(0);    }
    to   { transform: translateY(100%); }
}
@keyframes sheet-slide-up-out {
    from { transform: translateY(0);     }
    to   { transform: translateY(-100%); }
}
@keyframes sheet-overlay-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    margin: 0 auto 14px;
    flex-shrink: 0;
}

/* Handle at the bottom of a top sheet -- visual cue that pulling down
   dismisses it. (Drag-to-dismiss not wired; cancel/submit are the real exits.) */
.sheet-handle.sheet-handle-bottom {
    margin: 14px auto 0;
}

.sheet-title {
    margin: 0 0 14px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
}

.sheet-body {
    display: flex;
    flex-direction: column;
}

.sheet-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid var(--border-light);
}

/* Sheet footer buttons get a pill shape -- matches the mockup primary
   action footer treatment. Existing colour rules on
   .report-issue-actions .btn-* still drive fill / hover. */
.sheet-footer .staff-btn,
.sheet-footer button {
    flex: 1;
    min-height: 46px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
}
