/**
 * @file style.css
 * @purpose Design System for the Radiology Coding Tracker. Implements a "Radiology Dark Mode" 
 * to minimize eye strain in low-light reading room environments.
 * 
 * @security_context
 * - UI markers for PHI (Patient Health Information) are styled for high visibility.
 * - Accessibility (A11y) ensured for clinicians operating on high-resolution diagnostic monitors.
 * 
 * @dependencies
 * - Google Fonts: Inter/Roboto (expected via HTML import).
 * - Component Modules: Dashboard, Procedure Cards, Admin UI.
 */

/* === THEME VARIABLES (Radiology Dark Mode) === */
:root {
    /* Background colors optimized for reading room ambient lighting */
    --background-primary: #121212;
    --background-secondary: #1e1e1e;
    --background-input: #2c2c2c;
    
    /* Typography hierarchy for clinical data clarity */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #c0c0c0;
    --text-light: #ffffff;
    
    /* Operational State Indicators */
    --border-primary: #333;
    --accent-primary: #007bff;
    --accent-primary-darker: #0056b3;
    --accent-primary-shadow: rgba(0, 123, 255, 0.25);
    
    /* Medical Context Alerts */
    --error: #ff4d4d;      /* Used for Critical/STAT Findings */
    --success: #28a745;    /* Successful Audit/Log confirmation */
    --warning: #ffa500;    /* Delays or Productivity bottlenecks */
    --divider-color: #ff4d4d;

    /* Top Header Sticky Offset */
    --main-nav-height: 40px;
}

.hidden {
    display: none !important;
}

/* === UNIVERSAL CUSTOM SCROLLBARS === */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 6px;
    height: 4px;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* === GLOBAL STYLES & LAYOUT CONSTRAINTS === */
/* General Body Styles - Essential for high-density information display */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-primary);
    color: var(--text-primary);
    margin: 0;
    position: relative;
    /* Architectural Intent: Responsive scaling for 4K/UHD reading workstation monitors */
}

/* Styles for standalone auth pages (like signup), which don't have .app-body or .landing-page */
body:not(.app-body):not(.landing-page) {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    /* Prevents scrollbars from interfering with the diagnostic-style loading background */
}

/* === AUTHENTICATION & LOGIN UI === */
body:not(.app-body):not(.landing-page) main {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    z-index: 1;
    /* Ensure login form is on top of medical-themed backgrounds */
    position: relative;
}

/* Login Container */
.login-container {
    background-color: rgba(30, 30, 30, 0.9);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    /* Architectural Choice: Semi-transparency for modern, premium look */
}

h1 {
    color: var(--text-light);
    margin-bottom: 8px;
}

.login-container p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Form Styles */
#login-form,
#signup-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-tertiary);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-primary);
    background-color: var(--background-input);
    color: var(--text-primary);
    border-radius: 4px;
    box-sizing: border-box;
    /* Architectural Choice: Clean input fields to reduce cognitive load during fast entry */
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-shadow);
}

/* Password Input Toggle & Helper Text */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px !important;
}

.toggle-password-btn {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    z-index: 2;
}

.toggle-password-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.toggle-password-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
}

.password-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78em;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.hidden {
    display: none !important;
}

/* === DASHBOARD ANALYTICS & METRICS === */
.dashboard-counts-table {
    /* Architectural Choice: Preventing layout collapse on high-resolution displays 
       Supports up to 14 modalities/columns for cross-departmental tracking */
    min-width: 48em;
    border-collapse: collapse;
    table-layout: fixed;
}

.dashboard-counts-table td {
    border: 3px solid var(--text-secondary);
    padding: 1px 2px;
    text-align: center;
    font-size: 0.75em;
    vertical-align: middle;
}

.dashboard-counts-table .header-cell {
    font-weight: bold;
    background-color: var(--background-input);
    color: var(--text-secondary);
}

.dashboard-counts-table .value-cell {
    font-weight: bold;
    color: var(--text-light);
    font-size: 0.85em;
}

.dashboard-counts-table .blank-cell {
    border: none;
    background-color: transparent;
}

/* =================================
   Custom Context Menu
   ================================= */

#context-menu {
    display: none;
    position: absolute;
    z-index: 1500;
    background-color: var(--background-input);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.context-menu-item {
    padding: 8px 12px;
    background-color: var(--background-input);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s;
}

.context-menu-item:hover {
    background-color: var(--error);
    color: var(--text-light);
}

/* =================================
   Layout Controls Styles
   ================================= */

.layout-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* Stretch items to fill the width */
    gap: 8px;
    flex-shrink: 0;
    /* Prevent the container from shrinking */
    width: 250px;
    /* Give it a fixed width */
}

.saved-layouts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.layout-button {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 12px;
    background-color: var(--background-input);
    color: var(--text-primary);
    font-weight: normal;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-width 0.2s;
    text-align: center;
    font-size: 0.85em;
    box-sizing: border-box;
}

.layout-button:hover {
    background-color: var(--border-primary);
    color: var(--text-light);
}

.layout-button.active {
    border: 3px solid white;
    padding: 2px 10px;
}

/* Divider Card Styles */
.divider-card {
    background-color: var(--divider-color);
    /* The line is the background */
    border: none;
    height: 6px;
    /* This is the thickness of your line */
    min-height: 2px;
    padding: 0;
    margin: 0px 0;
    /* Use margin for symmetrical spacing */
    box-shadow: none;
    position: relative;
    cursor: default;
}


.divider-delete-btn {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    background: var(--background-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 18px;
}



.divider-delete-btn:hover {
    color: var(--error);
    border-color: var(--error);
}

/* Menu Button and Menu */
.menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.menu {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background-color: var(--background-input);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 8px;
    z-index: 100;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.menu.show {
    display: block !important;
}

.menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text-primary);
    text-decoration: none;
}

.menu a:hover {
    background-color: var(--accent-primary);
}

button {
    padding: 12px;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--accent-primary-darker);
}

/* Message container for success/error feedback */
.message {
    min-height: 1.2em;
    /* Prevents layout shift */
    font-size: 0.9em;
    margin-top: 16px;
    font-weight: bold;
}

.error-message {
    color: var(--error);
}

.success-message {
    color: var(--success);
}

/* Sign-up Link */
.auth-link {
    margin-top: 20px;
    font-size: 0.9em;
}

.auth-link a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* === SIGNUP SUCCESS NOTIFICATION & REDIRECT === */
.signup-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6px 0;
    animation: authFadeIn 0.35s ease-out;
}

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

.signup-success-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(40, 167, 69, 0.12);
    border: 1.5px solid rgba(40, 167, 69, 0.35);
    color: var(--success);
    margin-bottom: 16px;
}

.signup-success-icon {
    stroke: var(--success);
}

.signup-success-heading {
    font-size: 1.35em;
    color: var(--text-light);
    margin: 0 0 16px 0;
    font-weight: 600;
}

.signup-success-banner {
    background-color: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.signup-success-primary-msg {
    font-size: 1.05em;
    font-weight: 700;
    color: #34d399;
    margin-bottom: 8px;
    line-height: 1.4;
}

.signup-success-subtext {
    font-size: 0.88em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.45;
}

.signup-success-subtext strong {
    color: var(--text-light);
    word-break: break-all;
}

.signup-redirect-timer-text {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 0 0 14px 0;
}

.signup-redirect-timer-text span {
    font-weight: 700;
    color: var(--text-light);
}

.btn-primary-redirect {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    background-color: var(--accent-primary);
    color: #ffffff;
    font-size: 0.95em;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-primary-redirect:hover {
    background-color: var(--accent-primary-darker);
    text-decoration: none;
}

.signup-help-note {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 20px 0 0 0;
    line-height: 1.4;
}

/* Background for Login/Signup - Disabled for clean flat background */
#background-container {
    display: none !important;
}

/* =================================
   Main Application Styles
   ================================= */

/* === CORE APPLICATION SHELL & DASHBOARD WIDGETS === */
/* App-specific body styles to override login page styles */
.app-body {
    display: block;
    justify-content: initial;
    align-items: initial;
    min-height: 100vh;
    padding-top: 0;
    overflow-x: hidden;
    box-sizing: border-box;
    /* Architectural Choice: Padding removed to allow the sticky dashboard to sit flush at the top of the viewport, eliminating any scroll jump. */
}

/* Full-viewport Workstation App Shell for main dashboard and grid customization */
.app-body:has(.procedure-grid-wrapper),
.app-body.workstation-view {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Override main for app layout */
.app-body main {
    max-width: none;
    padding: 0;
}

/* Dashboard Header */
.dashboard-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    align-items: stretch;
    flex-shrink: 0;

    /* Sticky Positioning: Essential for keeping metrics visible during list review */
    position: sticky;
    top: var(--main-nav-height, 51px);
    z-index: 900;
    background-color: var(--background-secondary);
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 0px;
    min-height: 80px;
    height: auto;
    width: 100%;
    box-sizing: border-box;

    /* Clean horizontal swiping with visible horizontal scrollbar */
    -webkit-overflow-scrolling: touch;
}

.dashboard-section-left {
    display: flex;
    align-items: center;
    gap: var(--dashboard-spacing);
    /* Use the same variable for the gap */
}

.dashboard-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shift-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.shift-info-inputs,
.modality-trackers {
    display: flex;
    gap: 16px;
}

.modality-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 4px 8px;
    background-color: var(--background-input);
}

.modality-name {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--text-secondary);
}

.modality-value {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-light);
    min-width: 20px;
    text-align: center;
}

.live-metrics-section {
    flex-grow: 0;
    flex-shrink: 0;
    width: auto;
}

.metric-widget {
    text-align: center;
    justify-content: center;
}

.metric-widget .metric-item-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.dash-widget.pace-widget {
    padding: 8px;
}


.metric-title-grid {
    font-size: 0.72em;
    color: var(--text-secondary);
    font-weight: bold;
    text-transform: uppercase;
}

.metric-value-grid {
    font-size: 1.62em;
    color: var(--text-light);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1;
}

.dashboard-container input[type="text"],
.dashboard-container input[type="number"],
.dashboard-container input[type="datetime-local"],
.dashboard-container input[type="date"],
.dashboard-container input[type="time"],
.dashboard-container select {
    padding: 8px 12px;
    background-color: var(--background-input);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    border-radius: 4px;
    min-width: 150px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: inherit;
}

.dashboard-container .compact-input,
.shift-widget-input {
    min-width: 0 !important;
    width: 100% !important;
    padding: 3px 6px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    height: 28px !important;
    min-height: 28px !important;
    background-color: var(--background-input) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}

.dash-widget[data-widget-id="shift-config"],
.shift-details-widget {
    min-width: 360px;
    padding: 6px 12px;
}

.shift-info-inputs-widget {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    width: 100%;
}

.shift-info-row {
    display: flex;
    gap: 6px;
    width: 100%;
    align-items: flex-end;
}

.shift-widget-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.shift-widget-field label {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

/* Row 1: Title (wide text), Type (medium text), Length (compact number) */
.shift-widget-field.field-title {
    flex: 2.3;
    min-width: 85px;
}

.shift-widget-field.field-type {
    flex: 1.4;
    min-width: 70px;
}

.shift-widget-field.field-length {
    flex: 0.8;
    min-width: 50px;
    max-width: 72px;
}

/* Row 2: Goal/hr (compact number), $/RVU (compact number), Date (medium date), Time (compact time) */
.shift-widget-field.field-goal {
    flex: 0.85;
    min-width: 52px;
    max-width: 72px;
}

.shift-widget-field.field-dollar {
    flex: 0.85;
    min-width: 52px;
    max-width: 75px;
}

.shift-widget-field.field-date {
    flex: 1.45;
    min-width: 108px;
}

.shift-widget-field.field-time {
    flex: 1.0;
    min-width: 78px;
}

.dashboard-container input[type="text"]:focus,
.dashboard-container input[type="number"]:focus,
.dashboard-container input[type="datetime-local"]:focus,
.dashboard-container input[type="date"]:focus,
.dashboard-container input[type="time"]:focus,
.dashboard-container select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-shadow);
}

.dashboard-container input[type="number"].input-narrow {
    min-width: 120px;
    width: 120px;
}

.dashboard-container .shift-controls button {
    padding: 8px 16px;
    font-size: 0.9em;
}


#end-shift-btn {
    background-color: var(--error);
}

#end-shift-btn:hover {
    background-color: #c82333;
    /* Darker red */
}


/* === PROCEDURE GRID & CASE CARDS === */
.procedure-grid-wrapper {
    flex: 1 1 0%;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    box-sizing: border-box;
    padding: 10px 10px;
}

#doc-rvu-global-footer {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    background-color: var(--background-secondary);
    border-top: 1px solid var(--border-primary);
    text-align: center;
    box-sizing: border-box;
}

#doc-rvu-global-footer p {
    margin: 2px 0;
}

.procedure-grid {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    width: 100%;
    min-width: max-content;
    box-sizing: border-box;
    align-items: flex-start;
    zoom: var(--grid-zoom, 1);
    transform-origin: top left;
    /* Architectural Choice: Multi-column grid for high-speed "click-to-log" workflows */
}

.grid-column {
    position: relative;
    flex: 0 1 340px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 50px;
    min-width: 180px;
    max-width: 360px;
    box-sizing: border-box;
}

.grid-column[data-custom-width="true"] {
    max-width: 850px;
}

.column-resize-handle {
    position: absolute;
    top: 0;
    right: -6px;
    width: 12px;
    bottom: 0;
    cursor: col-resize;
    z-index: 15;
    user-select: none;
    touch-action: none;
}

.column-resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 2px;
    background-color: transparent;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    border-radius: 1px;
}

.column-resize-handle:hover::after,
.grid-column.is-resizing .column-resize-handle::after {
    background-color: var(--accent-primary, #0ea5e9);
    box-shadow: 0 0 6px rgba(14, 165, 233, 0.7);
}

body.column-resizing,
body.column-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}


/* Procedure Card - The atomic unit of coding workflow */
.procedure-card {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    /* Medical Context: Visual feedback on click to confirm log entry (Audit-friendly) */
}

.flash-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
    pointer-events: none;
}

.flash-effect.animate {
    animation: flash 1s ease-out;
}

@keyframes flash {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    to {
        transform: translate(-50%, -50%) scale(400);
        opacity: 0;
    }
}

.procedure-card:hover {
    box-shadow: 0 0 5px var(--accent-primary-shadow);
    /* Subtle glow effect */
}

.column-placeholder {
    background-color: transparent;
    border: 2px dashed var(--border-primary);
    border-radius: 6px;
    min-height: 38px;
    /* Matches the approximate height of a procedure card */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9em;
    user-select: none;
}

.column-placeholder::before {
    content: "Empty column";
}

body.customizing-layout .column-placeholder::before,
.procedure-grid.batch-editing .column-placeholder::before {
    content: "Drag cards here";
}

.card-header {
    text-align: left;
    margin: 0;
    min-height: 0;
    flex-grow: 1;
    /* Allows header to take available space */
    overflow: hidden;
    white-space: nowrap;
    cursor: help;
    user-select: text;
}

.card-header h3 {
    font-size: 0.85em;
    color: var(--text-light);
    margin: 0 0 2px 0;
    text-overflow: ellipsis;
    overflow: hidden;
    user-select: text;
}

.card-header p {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 0;
}

.card-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Space between count and button */
    flex-shrink: 0;
    /* Prevents controls from shrinking */
}

.case-count {
    font-size: 1em;
    font-weight: bold;
    color: var(--text-light);
    line-height: 1;
    margin: 0;
    padding: 0 4px;
}

.procedure-total-wrvu {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 4px;
}

.increment-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1em;
    line-height: 1;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* New Navigation Styles */
.main-nav {
    background-color: var(--background-secondary);
    padding: 4px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 0px;
    gap: 12px;
    min-height: 40px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
}

.main-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
    padding: 2px 4px 2px 0 !important;
    margin-right: 4px;
}

.main-nav .nav-brand:hover {
    background-color: transparent !important;
}

.main-nav .nav-brand .brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.main-nav .nav-brand .brand-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.main-nav .nav-bar-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a,
.main-nav .nav-bar-links a {
    text-decoration: none;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 13.5px;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
}

.main-nav a:hover,
.main-nav .nav-bar-links a:hover {
    background-color: var(--background-input);
    color: var(--text-light);
}

.main-nav a.active,
.main-nav .nav-bar-links a.active,
.main-nav a[aria-current="page"] {
    background-color: var(--background-input);
    border: 1px solid var(--border-primary);
    color: var(--text-light) !important;
    font-weight: bold;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Dropdown Functionality */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    /* Hidden by default */
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #21262d;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 8px;
    z-index: 1300;
    min-width: 180px;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

#main-menu-dropdown {
    left: auto;
    right: 0;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

#dynamic-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

#dynamic-nav-links:empty {
    display: none;
}

.main-nav .menu-btn {
    background: transparent;
    border: none;
    font-size: 13.5px;
    cursor: pointer;
    color: var(--accent-primary);
    padding: 4px 10px;
    box-sizing: border-box;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
}

.main-nav .menu-btn:hover {
    background-color: var(--background-input);
    color: var(--text-light);
}

/* User Initials Badge & Navigation Profile Header */
.user-initials-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--accent-primary, #0ea5e9);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.main-nav .menu-btn.has-user-badge {
    padding: 3px 10px 3px 5px;
    gap: 6px;
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background-color: var(--background-card, #1e293b);
    border-radius: 6px;
    margin: 2px 2px 4px 2px;
}

.dropdown-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent-primary, #0ea5e9);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.dropdown-user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.dropdown-user-email {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.dropdown-user-status {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--success, #10b981);
    line-height: 1.2;
}

.dropdown-menu.show {
    display: flex;
    /* Show the menu */
}

.dropdown-menu button,
.dropdown-menu a,
.dropdown-menu .dropdown-item-button {
    box-sizing: border-box !important;
    width: 100% !important;
    justify-content: flex-start !important;
    text-align: left !important;
    text-decoration: none !important;
    color: var(--accent-primary) !important;
    background: none !important;
    border: none !important;
    font-weight: bold !important;
    padding: 8px 12px !important;
    font-size: 0.95em !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: color 0.15s, background-color 0.15s !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.dropdown-menu button:hover,
.dropdown-menu a:hover,
.dropdown-menu .dropdown-item-button:hover {
    background-color: var(--background-input) !important;
    color: var(--text-light) !important;
}

.dropdown-menu button.active,
.dropdown-menu a.active,
.dropdown-menu .dropdown-item-button.active {
    color: var(--text-light) !important;
    background-color: var(--background-input) !important;
    font-weight: bold !important;
}

/* End Shift Button inside dropdown styled with crisp red text */
.dropdown-menu #end-shift-btn {
    color: var(--error) !important;
    background: none !important;
}

.dropdown-menu #end-shift-btn:hover {
    background-color: var(--error) !important;
    color: white !important;
}

/* Start Page Styles */
.start-container {
    text-align: center;
    background-color: var(--background-secondary);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#start-shift-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    margin-top: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: var(--background-secondary);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-primary);
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.procedure-modal-content {
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.procedure-table-container {
    overflow-y: auto;
    flex-grow: 1;
    margin-top: 10px;
}

.close-button {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

#start-shift-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#start-shift-form label {
    font-size: 0.9em;
    color: var(--text-tertiary);
}

#start-shift-form input {
    padding: 10px;
    border: 1px solid var(--border-primary);
    background-color: var(--background-input);
    color: var(--text-primary);
    border-radius: 4px;
}

#start-shift-form button {
    margin-top: 10px;
}

/* New Modal Styles for Start Shift */
#start-shift-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Ensure it's on top */
}

#start-shift-modal>div {
    background-color: var(--background-secondary);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
}

.modal.modal-visible,
.modal.show,
#start-shift-modal.modal-visible,
#mobile-debug-modal.modal-visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Creates a small space between the label and the input */
}

.shift-info-inputs label {
    font-size: 0.8em;
    color: var(--text-tertiary);
    /* A light grey color from the existing theme */
    font-weight: bold;
}

/* --- New styles for Navigation Bar Inputs --- */

/* Style the container for the inputs within the nav bar */
.main-nav .shift-info-inputs {
    display: flex;
    gap: 15px;
    /* Adjust spacing between each input field */
    align-items: center;
    margin-right: auto;
    /* Pushes the controls to the far right */
    margin-left: 20px;
}

/* Make the input groups (label + input) more compact */
.main-nav .input-group {
    gap: 3px;
    /* Reduce space between label and its input */
}

/* Make the input boxes themselves smaller to fit in the bar */
.main-nav input[type="text"],
.main-nav input[type="number"],
.main-nav input[type="date"],
.main-nav input[type="time"] {
    padding: 5px 8px;
    font-size: 0.9em;
    font-family: inherit;
    /* Ensures consistent font */
}

.main-nav input[type="text"],
.main-nav input[type="number"] {
    min-width: 65px;
    width: 65px;
}

.main-nav input[type="date"],
.main-nav input[type="time"] {
    min-width: 100px;
    width: 100px;
}

/* Adjust the specifically narrow inputs */
.main-nav .input-narrow {
    min-width: 65px;
    /* Reduced from 110px */
    width: 65px;
    /* Reduced from 110px */
}

/* Adjust label font size for the more compact view */
.main-nav .shift-info-inputs label {
    font-size: 0.75em;
}

.pace-widget.pace-ahead {
    border: 11px solid var(--success);
}

.pace-widget.pace-behind {
    border: 11px solid var(--warning);
}

.pace-widget.pace-neutral {
    border: 11px solid var(--border-primary);
}

.pace-set-goal-hint,
.earnings-set-rate-hint {
    font-size: 0.65em;
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease, opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.pace-set-goal-hint:hover,
.earnings-set-rate-hint:hover {
    color: var(--accent-primary-hover, #60a5fa);
    opacity: 0.85;
}

@keyframes inputPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.8);
        border-color: var(--accent-primary);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
        border-color: var(--accent-primary);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.input-pulse-highlight {
    animation: inputPulse 1s ease-in-out 2;
    border-color: var(--accent-primary) !important;
}

.column-header {
    position: relative;
    display: none;
    justify-content: center;
    /* Center the drag lines */
    align-items: center;
    padding: 0;
    /* Revert padding */
    background-color: var(--background-input);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    margin-bottom: 2px;
    box-sizing: border-box;
    cursor: default;
    /* Add grab cursor */
}

.drag-lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.drag-line {
    width: 200px;
    height: 1px;
    background-color: var(--text-secondary);
    margin: 1px 0;
}

.column-header:hover .drag-line {
    background-color: var(--text-primary);
}

.delete-column-btn {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0;
    display: none;
    line-height: 1;
}

.grid-column:hover .delete-column-btn {
    display: block;
}

.delete-column-btn:hover {
    color: var(--error);
}

/* =================================
   Selector Page Styles
   ================================= */

.procedure-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 800px;
    margin: 20px auto;
    background-color: var(--background-secondary);
    border-radius: 8px;
    overflow: hidden;
    /* Clips the corners of the rows */
}

.procedure-table th {
    font-weight: bold;
}

.procedure-table th,
.procedure-table td {
    padding: 4px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.procedure-item:last-child td {
    border-bottom: none;
}


/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-primary);
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.search-container {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    max-width: 800px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-primary);
    background-color: var(--background-input);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 1em;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-shadow);
}

.dash-widget,
.dash-static-widget {
    background-color: #000000;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
}



.dash-widget {
    cursor: grab;
}

.dash-widget:active {
    cursor: grabbing;
}

.dash-widget input[type="text"],
.dash-widget input[type="number"] {
    cursor: text;
}

.dash-widget input[type="date"],
.dash-widget input[type="time"],
.dash-widget select,
.dash-widget button,
.dash-widget .layout-button {
    cursor: pointer;
}

.dash-widget-title {
    font-size: 0.72em;
    font-weight: bold;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 4px;
}

/* Remove fixed widths from original components */
.live-metrics-section,
.layout-controls {
    width: auto;
    flex-shrink: 1;
}

.live-metrics-grid {
    width: 100%;
    /* Make it responsive inside its widget */
}

/* Styles for the new modal */
#widget-selector-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.widget-selector-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-save-btn {
    margin-top: 20px;
}

/* === ADMINISTRATIVE INTERFACE & SYSTEM MANAGEMENT === */
.admin-container {
    max-width: 800px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Context: Management of HCPCS/CPT tables and system-wide RVU updates */
}

.admin-card {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-card-title {
    color: var(--text-light);
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-primary);
    /* UI Decor: Separator for configuration sections (Audit Logs, CSV Uploads) */
}

.admin-card-desc {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.primary-btn {
    background-color: var(--accent-primary);
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.primary-btn:hover {
    background-color: var(--accent-primary-darker);
}

.success-btn {
    background-color: var(--success);
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

.success-btn:hover {
    opacity: 0.8;
}

.admin-upload-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.admin-upload-row input[type="file"] {
    background-color: var(--background-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    padding: 6px 12px;
    border-radius: 4px;
    flex: 1;
}

.admin-upload-row input[type="number"] {
    width: 100px;
    padding: 8px 12px;
    background-color: var(--background-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
}

.admin-msg-success {
    color: var(--success);
}

.admin-msg-error {
    color: var(--error);
}

.admin-msg-info {
    color: var(--accent-primary);
}

.admin-upload-status {
    margin-top: 10px;
    font-size: 0.9em;
    font-weight: bold;
}

/* =================================
   Utility Classes
   ================================= */
.hidden {
    display: none !important;
}

/* =================================
   Procedure Tooltip
   ================================= */
.procedure-tooltip {
    position: absolute;
    z-index: 2000;
    max-width: 350px;
    background-color: var(--background-secondary);
    color: var(--text-primary);
    padding: 10px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    font-size: 0.85em;
    pointer-events: none; /* Non-obtrusive to clicks */
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s;
    line-height: 1.4;
}

.procedure-tooltip .tooltip-section {
    background-color: var(--background-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.procedure-tooltip .tooltip-section:last-child {
    margin-bottom: 0;
}

.procedure-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.procedure-tooltip strong {
    color: var(--text-light);
}

/* === TOAST NOTIFICATIONS === */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9em;
    color: var(--text-light, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: toast-fade-in 0.3s forwards;
    pointer-events: auto;
}

.toast-message {
    flex: 1;
    margin-right: 12px;
    word-break: break-word;
}

.toast-close-btn {
    background: none;
    border: none;
    color: currentColor;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close-btn:hover {
    opacity: 1;
}

/* Toast Color Variations */
.toast-info {
    background-color: var(--background-secondary, #1e1e1e);
    border-left: 4px solid var(--accent-primary, #007bff);
}

.toast-success {
    background-color: var(--background-secondary, #1e1e1e);
    border-left: 4px solid var(--success, #28a745);
}

.toast-warning {
    background-color: var(--background-secondary, #1e1e1e);
    border-left: 4px solid var(--warning, #f59e0b);
}

.toast-error {
    background-color: var(--background-secondary, #1e1e1e);
    border-left: 4px solid var(--error, #ff4d4d);
}

/* Animations */
@keyframes toast-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

/* =========================================================================
   Unified Navigation Controls & Consistent Links/Buttons
   ========================================================================= */
.main-nav a,
.main-nav button:not(#end-shift-btn):not(#start-shift-btn) {
    text-decoration: none !important;
    color: var(--accent-primary) !important;
    background: none !important;
    border: none !important;
    font-weight: bold !important;
    padding: 8px 12px !important;
    font-size: 0.95em !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: color 0.2s, background-color 0.2s !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.main-nav a:hover,
.main-nav button:not(#end-shift-btn):not(#start-shift-btn):hover {
    background-color: var(--background-input) !important;
    color: var(--text-light) !important;
}

.main-nav a.active {
    color: var(--text-light) !important;
    background-color: var(--background-input) !important;
}

/* End Shift Button styled as flat red action */
.main-nav #end-shift-btn {
    text-decoration: none !important;
    color: var(--error) !important;
    background: transparent !important;
    border: 1px solid var(--error) !important;
    font-weight: bold !important;
    padding: 4px 10px !important;
    font-size: 13.5px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: color 0.2s, background-color 0.2s !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.main-nav #end-shift-btn:hover {
    background-color: var(--error) !important;
    color: white !important;
}

/* Start Shift Button styled as positive green action */
.main-nav #start-shift-btn,
.main-nav .nav-start-shift-btn {
    text-decoration: none !important;
    color: #ffffff !important;
    background-color: #238636 !important;
    border: 1px solid #2ea043 !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    font-size: 13.5px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.main-nav #start-shift-btn:hover,
.main-nav .nav-start-shift-btn:hover {
    background-color: #2ea043 !important;
    border-color: #3fb950 !important;
    color: #ffffff !important;
}

/* Dropdown Start Shift Highlighted Action Button */
.dropdown-item-button.highlighted-action-btn {
    background-color: rgba(35, 134, 54, 0.15) !important;
    color: #3fb950 !important;
    font-weight: 700 !important;
    border-left: 3px solid #2ea043 !important;
}

.dropdown-item-button.highlighted-action-btn:hover {
    background-color: #238636 !important;
    color: #ffffff !important;
}

/* Start Shift Hero Card on Productivity / Start Page */
.start-shift-hero-card {
    background: linear-gradient(135deg, rgba(35, 134, 54, 0.15), rgba(13, 17, 23, 0.95));
    border: 1px solid rgba(46, 160, 67, 0.4);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.start-shift-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.start-shift-hero-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0 0 4px 0;
}

.start-shift-hero-subtitle {
    font-size: 0.88rem;
    color: #8b949e;
    margin: 0;
    line-height: 1.4;
}

.hero-start-shift-btn {
    background-color: #238636 !important;
    color: #ffffff !important;
    border: 1px solid #2ea043 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    transition: background-color 0.15s ease, transform 0.1s ease !important;
    box-shadow: 0 2px 8px rgba(35, 134, 54, 0.4) !important;
}

.hero-start-shift-btn:hover {
    background-color: #2ea043 !important;
    border-color: #3fb950 !important;
    transform: translateY(-1px);
}

/* =================================
   Batch Layout Editing Styles
   ================================= */
.batch-editing .procedure-card,
.batch-editing .divider-card {
    position: relative;
}

/* Prevent text selection while dragging in batch edit mode */
.batch-editing {
    user-select: none;
}

/* Disable pointer events only on the interactive count & WRVU elements so users can't increment during batch edit */
.batch-editing .procedure-card .case-count,
.batch-editing .procedure-card .procedure-total-wrvu,
.batch-editing .procedure-card .card-header {
    pointer-events: none;
}

.batch-editing .procedure-card {
    padding-right: 36px !important;
    position: relative !important;
}

/* Style the increment-btn to look like a separate red X block on the right edge of the card in batch edit mode */
.batch-editing .increment-btn {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 28px !important;
    background-color: #d9534f !important;
    border: none !important;
    border-left: 1px solid var(--border-primary) !important;
    color: white !important;
    font-size: 0 !important; /* Hide the "+" text */
    padding: 0 !important;
    border-radius: 0 5px 5px 0 !important; /* Align with card right border-radius */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.batch-editing .increment-btn::after {
    content: '×' !important;
    font-size: 18px !important;
    font-weight: bold !important;
    display: inline-block !important;
    line-height: 1 !important;
    color: white !important;
}

.batch-editing .divider-delete-btn {
    display: flex !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: #d9534f !important;
    color: white !important;
    border: none !important;
    border-left: 1px solid var(--border-primary) !important;
    width: 28px !important;
    height: 100% !important;
    min-height: 20px !important; /* Ensure a good click target height for thin dividers */
    border-radius: 0 3px 3px 0 !important;
    font-weight: bold !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.batch-editing .column-header {
    display: flex !important;
    cursor: grab !important;
}

.batch-editing .divider-card {
    cursor: grab !important;
    height: 20px !important;
    background: transparent !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.batch-editing .divider-card:not(.selected-for-deletion)::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    right: 36px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 6px !important;
    background-color: var(--divider-color) !important;
}

.procedure-card.selected-for-deletion {
    background-color: rgba(56, 189, 248, 0.22) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px #38bdf8, 0 4px 14px rgba(56, 189, 248, 0.4) !important;
    outline: none !important;
}

.divider-card.selected-for-deletion {
    background-color: rgba(56, 189, 248, 0.3) !important;
    height: 20px !important;
    box-shadow: 0 0 0 2px #38bdf8 !important;
    outline: none !important;
    border-radius: 4px !important;
}

/* Touch action for smooth mobile scrolling and dragging in customize mode */
.procedure-grid.batch-editing .procedure-card,
.procedure-grid.batch-editing .divider-card {
    touch-action: pan-x pan-y pinch-zoom;
    cursor: grab;
}

/* SortableJS drag feedback classes */
.card-sortable-chosen {
    animation: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 8px rgba(56, 189, 248, 0.5) !important;
    border-color: #38bdf8 !important;
    z-index: 2000 !important;
    opacity: 0.95 !important;
}

.card-sortable-ghost {
    animation: none !important;
    opacity: 0.4 !important;
    background: rgba(56, 189, 248, 0.15) !important;
    border: 2px dashed #38bdf8 !important;
}

.card-sortable-drag {
    opacity: 1 !important;
}

.column-sortable-chosen {
    opacity: 0.8 !important;
    border: 2px dashed #38bdf8 !important;
}

.column-sortable-ghost {
    opacity: 0.3 !important;
}

.layout-button.delete-mode {
    border-color: #d9534f !important;
    color: #d9534f !important;
}

.layout-button.delete-mode:hover {
    background-color: #d9534f !important;
    color: white !important;
}

/* =================================
   Inline Customization Toolbar
   ================================= */
.customization-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
    position: sticky;
    top: var(--main-nav-height, 51px);
    z-index: 1000;
    background-color: var(--background-secondary);
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 0px;
    min-height: 80px;
    height: auto;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.customization-toolbar.hidden {
    display: none !important;
}

.toolbar-content {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: visible;
}

.toolbar-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.toolbar-subtitle {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.25;
}

.tb-layouts-container {
    display: grid;
    grid-template-rows: repeat(2, 32px);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px;
    margin: 0;
    padding: 0 0 6px 0;
    height: 76px;
    max-height: 76px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    box-sizing: border-box;
}

.tb-layouts-container .layout-button,
.tb-layouts-container .toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: 0.85em !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    border-radius: 4px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
}

.grid-config-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    height: 76px;
    max-height: 76px;
    padding: 0 0 6px 0;
    box-sizing: border-box;
}

.toolbar-actions-widget {
    padding: 10px 14px 6px 14px !important;
    position: relative;
    box-sizing: border-box;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    height: 76px;
    max-height: 76px;
    padding: 0 0 6px 0;
    width: 100%;
    box-sizing: border-box;
}

.toolbar-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    border-radius: 5px;
    border: 1px solid var(--border-primary);
    background-color: var(--background-input);
    color: var(--text-primary);
    transition: all 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.toolbar-btn:hover {
    background-color: var(--border-primary);
    color: var(--text-light);
}

.toolbar-btn.tb-primary,
.toolbar-btn.tb-btn-primary {
    background: var(--accent-primary) !important;
    color: white !important;
    border: 1px solid var(--accent-primary) !important;
    font-weight: 700;
}

.toolbar-btn.tb-primary:hover,
.toolbar-btn.tb-btn-primary:hover {
    background: var(--accent-primary-darker, #1a60b5) !important;
    border-color: var(--accent-primary-darker, #1a60b5) !important;
}

.toolbar-btn.tb-secondary,
.toolbar-btn.tb-btn-neutral {
    background-color: transparent !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.toolbar-btn.tb-secondary:hover,
.toolbar-btn.tb-btn-neutral:hover {
    background-color: var(--border-primary) !important;
    color: var(--text-light) !important;
}

.toolbar-btn.tb-btn-exit {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.toolbar-btn.tb-btn-exit:hover {
    background: var(--background-input);
    color: var(--text-light);
    border-color: var(--text-secondary);
}

.toolbar-btn.tb-btn-subtle {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.toolbar-btn.tb-btn-subtle:hover {
    background: var(--background-input);
    color: var(--text-light);
}

.toolbar-btn.tb-danger,
.toolbar-btn.tb-btn-danger {
    background: #d9534f !important;
    color: white !important;
    border: 1px solid #d9534f !important;
    box-shadow: none !important;
    cursor: pointer !important;
    font-weight: 600;
}

.toolbar-btn.tb-danger:hover,
.toolbar-btn.tb-btn-danger:hover {
    background: #c9302c !important;
    border-color: #ac2925 !important;
}

.toolbar-btn.tb-btn-danger-subtle {
    color: #f87171 !important;
}

.toolbar-btn.tb-btn-danger-subtle:hover {
    background: rgba(220, 38, 38, 0.2) !important;
    color: #ff8080 !important;
}

/* Mode Group Containers */
.tb-action-mode-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tb-action-mode-group.hidden {
    display: none !important;
}

.tb-button-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    margin-bottom: 6px;
    flex-wrap: nowrap;
}

.tb-button-row:last-child {
    margin-bottom: 0;
}

/* Button Groups (Connected Pills) */
.tb-button-group {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--background-input);
    border: 1px solid var(--border-primary);
    box-sizing: border-box;
}

.tb-button-group .toolbar-btn {
    border-radius: 0 !important;
    border: none !important;
    border-right: 1px solid var(--border-primary) !important;
    background: transparent !important;
}

.tb-button-group .toolbar-btn:last-child {
    border-right: none !important;
}

.tb-button-group .toolbar-btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-light) !important;
}

/* Selection Mode Strip Layout */
.tb-selection-strip {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 10px;
    box-sizing: border-box;
}

.tb-selection-meta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tb-selection-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.3);
    padding: 5px 11px;
    border-radius: 14px;
    white-space: nowrap;
}

.tb-selection-divider {
    width: 1px;
    height: 24px;
    background: var(--border-primary);
    flex-shrink: 0;
}

.tb-selection-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tb-selection-spacer {
    flex: 1;
    min-width: 12px;
}

.tb-selection-danger-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.batch-editing .increment-btn::after {
    content: '×' !important;
    font-size: 18px !important;
    font-weight: bold !important;
    display: inline-block !important;
    line-height: 1 !important;
    color: white !important;
}

.batch-editing .divider-delete-btn {
    display: flex !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: #d9534f !important;
    color: white !important;
    border: none !important;
    border-left: 1px solid var(--border-primary) !important;
    width: 28px !important;
    height: 100% !important;
    min-height: 20px !important; /* Ensure a good click target height for thin dividers */
    border-radius: 0 3px 3px 0 !important;
    font-weight: bold !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.batch-editing .column-header {
    display: flex !important;
    cursor: grab !important;
}

.batch-editing .divider-card {
    cursor: grab !important;
    height: 20px !important;
    background: transparent !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.batch-editing .divider-card:not(.selected-for-deletion)::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    right: 36px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 6px !important;
    background-color: var(--divider-color) !important;
}

.procedure-card.selected-for-deletion {
    background-color: #555555 !important;
    box-shadow: none !important;
    outline: none !important;
}

.divider-card.selected-for-deletion {
    background-color: #555555 !important;
    height: 20px !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 4px !important;
}

.layout-button.delete-mode {
    border-color: #d9534f !important;
    color: #d9534f !important;
}

.layout-button.delete-mode:hover {
    background-color: #d9534f !important;
    color: white !important;
}

/* ==========================================================================
   Shift Details View (Desktop & Universal Styling)
   ========================================================================== */
.shift-detail-main {
    padding: 20px 24px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.shift-detail-header-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-light, #f0f6fc);
    margin: 0 0 16px 0;
    letter-spacing: -0.3px;
}

.shift-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.shift-summary-metric-card {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.shift-summary-metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shift-summary-metric-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.2;
}

.shift-section-card {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.shift-section-card-title {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 8px;
}

.shift-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.shift-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.shift-form-label {
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.shift-form-input {
    min-height: 44px;
    height: 44px;
    padding: 8px 14px;
    background-color: var(--background-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shift-form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
    outline: none;
}

.shift-action-btn-primary {
    min-height: 44px;
    height: 44px;
    padding: 0 20px;
    background-color: var(--accent-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.shift-action-btn-primary:hover {
    background-color: #388bfd;
}

.shift-action-btn-primary:active {
    transform: scale(0.98);
}

.shift-action-btn-success {
    min-height: 44px;
    height: 44px;
    padding: 0 20px;
    background-color: var(--success, #238636);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.shift-action-btn-success:hover {
    background-color: #2ea043;
}

.shift-action-btn-success:active {
    transform: scale(0.98);
}

.shift-add-procedure-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.shift-add-procedure-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    max-width: 600px;
    min-width: 280px;
}

.shift-detail-table-card {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.shift-detail-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#shift-detail-table {
    width: 100%;
    border-collapse: collapse;
}

#shift-detail-table th {
    background-color: #161b22;
    padding: 12px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

#shift-detail-table td {
    padding: 12px 14px;
    font-size: 0.92rem;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

#shift-detail-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.shift-col-label {
    display: none;
}

.shift-cpt-badge {
    display: inline-block;
    font-weight: 800;
    color: var(--text-light);
    font-family: monospace;
    font-size: 0.95rem;
}

.shift-proc-title {
    font-weight: 600;
    color: #f0f6fc;
    line-height: 1.3;
}

.shift-proc-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.25;
}

.shift-unit-val {
    font-weight: 600;
    color: var(--text-primary);
}

.shift-total-val {
    font-weight: 800;
    color: var(--accent-primary);
    font-size: 1.05rem;
}

.shift-count-cell {
    width: 240px;
    min-width: 240px;
}

.shift-count-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

.shift-count-adjuster {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 138px;
    min-width: 138px;
    flex-shrink: 0;
}

.shift-count-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    flex-shrink: 0;
}

.shift-count-adjuster .btn-count-adjust {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 6px;
    background: var(--background-input);
    border: 1px solid var(--border-primary);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.shift-count-adjuster .btn-count-adjust:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

.shift-count-adjuster .procedure-count-input {
    width: 60px;
    height: 34px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border-radius: 6px;
    background: var(--background-input);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.btn-delete-entry {
    min-height: 34px;
    padding: 4px 14px;
    background-color: var(--error, #f85149);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-delete-entry:hover {
    background-color: #da3633;
}

.btn-delete-entry:active {
    transform: scale(0.95);
}

/* === STAGED DRAFT EDITING & UNSAVED CHANGES BANNER === */
.unsaved-changes-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #161b22;
    border: 1px solid var(--accent-primary, #58a6ff);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 12px rgba(88, 166, 255, 0.2);
    border-radius: 10px;
    padding: 12px 20px;
    max-width: 90vw;
    width: 680px;
    box-sizing: border-box;
    animation: bannerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bannerSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.unsaved-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-primary, #f0f6fc);
}

.unsaved-banner-dot {
    color: #f59e0b;
    font-size: 1.1rem;
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.unsaved-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unsaved-banner-actions button {
    white-space: nowrap;
}

.count-diff-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0;
    vertical-align: middle;
    white-space: nowrap;
}

.count-diff-badge.new-badge {
    background: rgba(40, 167, 69, 0.15);
    color: #34d399;
    border-color: rgba(40, 167, 69, 0.3);
}

.count-diff-badge.deleted-badge {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.3);
}

.btn-revert-entry {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.82rem;
    cursor: pointer;
    margin-left: 0;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-revert-entry:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.row-modified {
    background-color: rgba(245, 158, 11, 0.04);
}

.row-staged-deleted {
    opacity: 0.6;
    background-color: rgba(248, 81, 73, 0.05);
}

.row-staged-deleted .shift-proc-title {
    text-decoration: line-through;
}



.col-long { display: none; }
.procedure-table.show-col-long .col-long { display: table-cell; }

.col-consumer { display: none; }
.procedure-table.show-col-consumer .col-consumer { display: table-cell; }

.col-medium { display: none; }
.procedure-table.show-col-medium .col-medium { display: table-cell; }

.col-short { display: none; }
.procedure-table.show-col-short .col-short { display: table-cell; }

.col-custom-short { display: none; }
.procedure-table.show-col-custom-short .col-custom-short { display: table-cell; }

/* Dashboard Widget Resizing & Layout Controls Tweaks */
.resizable-widget {
    position: relative;
    padding: 10px 10px 6px 10px !important;
    box-sizing: border-box;
}

.widget-content-wrapper {
    overflow: hidden;
    height: 100%;
    width: 100%;
    min-width: 0;
}



.resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
    z-index: 10;
}

.resize-handle.left {
    left: 0;
}

.resize-handle.right {
    right: 0;
}

.dash-widget .saved-layouts-grid {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 2px;
    margin: 0;
    padding: 0 0 3px 0;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    align-content: space-between;
}

.dash-widget .saved-layouts-grid .layout-button,
.dash-widget .saved-layouts-grid .toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100% !important;
    min-height: 24px !important;
    max-height: 28px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    border-radius: 4px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
}

.dash-widget[data-widget-id="layout-controls"] {
    padding: 4px 10px !important;
    display: flex;
    flex-direction: column;
}

/* === ACTIVITY TICKER WIDGET STYLES === */
.dash-widget[data-widget-id="activity-ticker"],
.activity-ticker-widget {
    padding: 6px 10px !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden !important;
    min-height: 0;
}

.activity-ticker-widget .widget-content-wrapper {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.activity-ticker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
}

.activity-ticker-header .dash-widget-title {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-ticker-all-link {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-primary, #38bdf8);
    text-decoration: none;
    transition: opacity 0.15s ease;
    cursor: pointer;
    line-height: 1;
}

.activity-ticker-all-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.activity-ticker-feed {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(0, 0, 0, 0.2);
}

.activity-ticker-feed::-webkit-scrollbar {
    width: 4px;
}

.activity-ticker-feed::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.activity-ticker-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
}

.activity-ticker-feed::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.activity-ticker-empty {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-align: center;
    margin: auto 0;
    padding: 8px 0;
    opacity: 0.7;
    font-style: italic;
}

.activity-ticker-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid #10b981;
    line-height: 1.25;
    white-space: nowrap;
    min-width: 0;
    animation: tickerRowFadeIn 0.2s ease-out;
}

.activity-ticker-row.activity-ticker-remove {
    border-left-color: #ef4444;
    opacity: 0.65;
}

.activity-ticker-row.activity-ticker-remove .ticker-label {
    text-decoration: line-through;
}

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

.ticker-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.ticker-action {
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 10px;
    text-align: center;
}

.ticker-action-add {
    color: #10b981;
}

.ticker-action-remove {
    color: #ef4444;
}

.ticker-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.ticker-cpt {
    color: #e2e8f0;
    margin-right: 3px;
}

.ticker-desc {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.ticker-wrvu {
    font-size: 0.68rem;
    font-weight: 700;
    color: #38bdf8;
    margin-left: auto;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* === FLEXIBLE DASHBOARD SPACER WIDGET STYLES === */
.dash-widget[data-widget-id="dashboard-spacer"],
.dash-widget.dashboard-spacer-widget {
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    flex-basis: auto !important;
    min-width: 28px !important;
    max-width: none !important;
    width: auto !important;
    background-color: transparent !important;
    border: 1px dashed rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px;
    padding: 0 !important;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    align-self: stretch;
    box-sizing: border-box;
}

.dash-widget.dashboard-spacer-widget .dashboard-spacer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0.22;
    transition: opacity 0.2s ease;
    user-select: none;
    pointer-events: none;
}

.dash-widget.dashboard-spacer-widget .dashboard-spacer-indicator {
    font-size: 1.15rem;
    letter-spacing: 2px;
    color: var(--text-secondary, #94a3b8);
}

.dash-widget.dashboard-spacer-widget:hover,
.dashboard-container.is-sorting-widgets .dash-widget.dashboard-spacer-widget {
    border-color: var(--accent-primary, #3b82f6) !important;
    background-color: rgba(59, 130, 246, 0.08) !important;
}

.dash-widget.dashboard-spacer-widget:hover .dashboard-spacer-inner,
.dashboard-container.is-sorting-widgets .dash-widget.dashboard-spacer-widget .dashboard-spacer-inner {
    opacity: 0.9;
}

.dash-widget.dashboard-spacer-widget:active {
    cursor: grabbing;
}

/* === PROCEDURE MACRO STYLES === */
.macro-card {
    border-left: 3px solid #e3b341 !important;
}

/* === STARTER PRESET GRID STYLES === */
.preset-layout-button {
    border-left: 3px solid #58a6ff !important;
}

.preset-setting-item {
    border-left: 3px solid #58a6ff !important;
}

.selector-view-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 8px;
    flex-shrink: 0;
}

.selector-tab-btn,
.selector-view-switcher button,
.selector-view-switcher .toolbar-btn {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 8px 18px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    line-height: normal !important;
    border-radius: 6px !important;
    border: 1px solid var(--border-primary) !important;
    background: var(--background-secondary) !important;
    color: var(--text-secondary) !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
}

.selector-tab-btn.active,
.selector-view-switcher button.tb-primary,
.selector-view-switcher .toolbar-btn.tb-primary {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
    font-weight: 700 !important;
}

.selector-tab-btn:hover:not(.active):not(.tb-primary),
.selector-view-switcher button:hover:not(.active):not(.tb-primary),
.selector-view-switcher .toolbar-btn:hover:not(.active):not(.tb-primary) {
    background: var(--background-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

/* === RESPONSIVE MEDIA QUERIES (TABLET & MOBILE) === */
@media (max-width: 768px) {
    /* Hide desktop inline text nav links in favor of ☰ Menu */
    .nav-bar-links {
        display: none !important;
    }

    /* Top Banner Start Shift Button on Mobile */
    .nav-start-shift-btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        min-height: 36px !important;
    }

    /* Start Shift Hero Callout on Mobile */
    .start-shift-hero-card {
        padding: 14px 14px !important;
        margin-bottom: 16px !important;
    }
    .start-shift-hero-content {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .hero-start-shift-btn {
        width: 100% !important;
        justify-content: center !important;
        min-height: 48px !important;
        font-size: 1.05rem !important;
    }

    /* Productivity & Analytics Layout */
    .productivity-content {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .graph-section {
        margin-right: 0 !important;
        width: 100% !important;
    }
    .chart-container {
        height: 45vh !important;
        min-height: 280px !important;
        width: 100% !important;
    }
    .table-container {
        width: 100% !important;
        min-width: 100% !important;
    }
    #dashboard-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #dashboard-table {
        min-width: 580px;
        font-size: 0.85em;
    }
}

@media (max-width: 600px) {
    /* --- Top Navigation Bar --- */
    .main-nav {
        padding: 6px 12px;
        min-height: 48px;
        gap: 8px;
    }
    .main-nav .nav-brand .brand-title {
        font-size: 1.15rem;
    }
    .main-nav .nav-brand .brand-icon {
        width: 28px;
        height: 18px;
    }
    .nav-controls {
        gap: 6px;
    }
    .nav-controls button,
    .nav-controls .menu-btn {
        min-height: 38px;
        padding: 6px 10px;
        font-size: 0.82rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    #main-menu-dropdown {
        min-width: 220px;
        max-width: calc(100vw - 24px);
    }
    .dropdown-menu button,
    .dropdown-menu a,
    .dropdown-menu .dropdown-item-button {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
    }

    /* --- Dashboard Metrics Ribbon --- */
    .dashboard-container {
        padding: 8px 10px;
        gap: 8px;
        min-height: 64px;
        -webkit-overflow-scrolling: touch;
    }
    .dash-widget,
    .dash-static-widget {
        padding: 6px 10px;
        min-height: 52px;
    }
    .metric-title-grid {
        font-size: 0.68rem;
    }
    .metric-value-grid {
        font-size: 1.3rem;
    }
    .dash-widget.pace-widget {
        padding: 6px 8px;
    }

    /* --- Procedure Grid & Horizontal Column Carousel --- */
    .procedure-grid-wrapper {
        padding: 8px 10px;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y pinch-zoom;
    }
    .procedure-grid {
        gap: 12px;
        scroll-snap-type: x mandatory;
        padding: 4px 0;
        zoom: var(--grid-zoom, 1);
        transform-origin: top left;
    }
    .grid-column {
        flex: 0 0 calc(100vw - 20px);
        min-width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        scroll-snap-align: start;
        gap: 6px;
    }
    .column-placeholder {
        min-height: 44px;
        font-size: 0.85em;
    }

    /* --- Touch-Friendly Procedure Cards & Macros --- */
    .procedure-card {
        min-height: 52px;
        padding: 8px 12px;
        margin-bottom: 6px;
        border-radius: 8px;
        gap: 8px;
    }
    .card-header {
        min-width: 0;
        flex: 1;
    }
    .card-header h3 {
        font-size: 0.92rem;
        line-height: 1.3;
        font-weight: 600;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
        margin: 0;
    }
    .card-header p {
        font-size: 0.8rem;
        margin-top: 2px;
    }
    .card-controls {
        gap: 8px;
        flex-shrink: 0;
    }
    .case-count {
        font-size: 1.15rem;
        min-width: 26px;
        text-align: center;
        font-weight: 700;
    }
    .procedure-total-wrvu {
        font-size: 0.85rem;
        font-weight: 600;
    }
    .increment-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        font-size: 1.3rem;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* --- Layout Customization Toolbar --- */
    .customization-toolbar {
        padding: 8px 10px;
    }
    .toolbar-content {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        align-items: stretch;
    }
    .dash-static-widget.toolbar-actions-widget {
        width: 100%;
    }
    .toolbar-actions {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        width: 100%;
    }
    .toolbar-btn {
        min-height: 40px;
        font-size: 0.82rem;
        padding: 6px 12px;
    }
    .resizable-widget[data-widget-id="layout-editor-list"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .tb-layouts-container {
        height: auto !important;
        max-height: 100px;
    }

    /* --- Modals & Mobile Forms --- */
    .modal {
        padding: 10px;
        box-sizing: border-box;
    }
    .modal-content {
        margin: 6% auto;
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        padding: 18px 14px;
        border-radius: 12px;
        box-sizing: border-box;
    }
    .procedure-modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 92vh;
        padding: 16px 12px;
    }
    /* iOS Safari Input Auto-Zoom Prevention: font-size >= 16px */
    .dashboard-container input[type="text"],
    .dashboard-container input[type="number"],
    .dashboard-container input[type="datetime-local"],
    .dashboard-container input[type="date"],
    .dashboard-container input[type="time"],
    .dashboard-container select,
    .modal-content input,
    .modal-content select,
    .modal-content textarea,
    #procedure-search-bar {
        font-size: 16px !important;
        min-height: 44px;
        padding: 10px 12px;
        box-sizing: border-box;
    }
    .dashboard-container .shift-widget-input {
        min-height: 36px !important;
        height: 36px !important;
        padding: 6px 8px !important;
        font-size: 14px !important;
    }
    .dash-widget[data-widget-id="shift-config"] {
        min-width: 340px !important;
        padding: 6px 8px !important;
    }
    .selector-view-switcher button {
        min-height: 40px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    .selector-control-table {
        font-size: 0.78rem;
        overflow-x: auto;
        display: block;
    }
    .procedure-table {
        font-size: 0.85rem;
    }
    .procedure-table th,
    .procedure-table td {
        padding: 10px 8px;
    }
    .procedure-table input[type="checkbox"] {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        cursor: pointer;
    }
    #done-procedure-selector-btn {
        min-height: 48px;
        width: 100%;
        font-size: 1.05rem;
        font-weight: 700;
        background-color: #238636 !important;
        color: #ffffff !important;
    }
    .modal-actions button,
    .modal-save-btn {
        min-height: 44px;
        font-size: 0.95rem;
    }
    #start-shift-form {
        gap: 10px;
    }
    #start-shift-form label {
        font-size: 0.85em;
    }

    /* --- History, Activity & Shift Details --- */
    .shift-detail-main {
        padding: 10px 12px !important;
    }
    .shift-detail-header-title {
        font-size: 1.2rem !important;
        margin: 4px 0 10px 0 !important;
        text-align: center !important;
    }
    #history-table,
    #activity-table {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #history-table th,
    #history-table td,
    #activity-table th,
    #activity-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    #export-csv-btn {
        width: 100%;
        min-height: 48px;
        font-size: 0.95rem;
    }
    .shift-summary-grid,
    #shift-summary-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    .shift-summary-metric-card {
        padding: 10px 8px !important;
    }
    .shift-summary-metric-label {
        font-size: 0.72rem !important;
    }
    .shift-summary-metric-value {
        font-size: 1.45rem !important;
    }
    .shift-section-card,
    #shift-config-card,
    #add-procedure-card {
        padding: 14px 12px !important;
        margin-bottom: 12px !important;
    }
    .shift-section-card-title {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
        padding-bottom: 6px !important;
    }
    .shift-form-grid,
    #edit-shift-config-form {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .shift-form-label {
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        color: #8b949e !important;
        text-transform: uppercase !important;
        letter-spacing: 0.4px !important;
        margin-bottom: 3px !important;
    }
    .shift-form-input {
        min-height: 48px !important;
        height: 48px !important;
        padding: 10px 14px !important;
        font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
        font-weight: 600 !important;
        background-color: #0d1117 !important;
        border: 1.5px solid #30363d !important;
        border-radius: 8px !important;
        color: #f0f6fc !important;
    }
    .shift-form-input:focus {
        border-color: #58a6ff !important;
        box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.3) !important;
    }
    .shift-action-btn-primary,
    #save-shift-config-btn {
        min-height: 48px !important;
        height: 48px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        width: 100% !important;
    }
    .shift-add-procedure-row,
    #add-procedure-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .shift-add-procedure-controls,
    #add-procedure-card > div:last-child {
        max-width: 100% !important;
        min-width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    .shift-action-btn-success,
    #add-procedure-btn {
        min-height: 48px !important;
        height: 48px !important;
        width: 100% !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
    }

    /* --- Mobile Card View for Procedure Entries --- */
    .shift-detail-table-card {
        background: transparent !important;
        border: none !important;
        margin-bottom: 8px !important;
    }
    .shift-detail-table-wrapper {
        overflow: visible !important;
    }
    #shift-detail-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }
    #shift-detail-table thead {
        display: none !important;
    }
    #shift-detail-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    #shift-detail-table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        background-color: var(--background-secondary) !important;
        border: 1px solid var(--border-primary) !important;
        border-radius: 8px !important;
        padding: 12px 14px !important;
        gap: 8px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    }
    #shift-detail-table td {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
        border: none !important;
        font-size: 0.95rem !important;
    }
    .shift-col-label {
        display: inline-block !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        color: var(--text-secondary) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.4px !important;
    }
    #shift-detail-table td.shift-cpt-cell {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-bottom: 6px !important;
    }
    .shift-cpt-badge {
        font-size: 1.05rem !important;
        color: var(--accent-primary) !important;
    }
    #shift-detail-table td.shift-desc-cell {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        padding: 2px 0 6px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    .shift-proc-title {
        font-size: 1rem !important;
    }
    .shift-proc-sub {
        font-size: 0.82rem !important;
    }
    .shift-count-adjuster .btn-count-adjust {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        font-size: 1.25rem !important;
        border-radius: 8px !important;
    }
    .shift-count-adjuster .procedure-count-input {
        width: 65px !important;
        height: 38px !important;
        font-size: 1.05rem !important;
        border-radius: 8px !important;
    }
    .btn-delete-entry {
        min-height: 38px !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        width: 100% !important;
        padding: 6px 0 !important;
        margin-top: 4px !important;
    }
    .filter-wrapper {
        padding: 10px !important;
        margin-bottom: 15px !important;
    }
    .dropdown-button {
        min-height: 40px;
        font-size: 0.9rem;
    }

    /* --- Mobile Floating Quick Zoom Controls --- */
    .mobile-zoom-pill {
        display: flex;
        align-items: center;
        gap: 6px;
        position: fixed;
        bottom: 18px;
        right: 14px;
        z-index: 1050;
        background: rgba(22, 27, 34, 0.92);
        border: 1px solid var(--border-primary);
        border-radius: 24px;
        padding: 4px 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        user-select: none;
    }
    .mobile-zoom-btn {
        background: var(--background-input);
        border: 1px solid var(--border-primary);
        color: var(--text-primary);
        border-radius: 50%;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        font-weight: 700;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }
    .mobile-zoom-btn:active {
        background: var(--accent-primary);
        color: #fff;
    }
    .mobile-zoom-level {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--text-light);
        min-width: 44px;
        text-align: center;
        cursor: pointer;
        padding: 4px 6px;
        border-radius: 12px;
    }
    .mobile-zoom-level:active {
        background: rgba(88, 166, 255, 0.2);
    }
}

.mobile-zoom-pill {
    display: none;
}

/* === LOADING & PROGRESS INDICATOR SYSTEM (docRVU Theme) === */
@keyframes docrvu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: docrvu-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

button.is-loading,
.btn.is-loading,
.btn-primary.is-loading,
.modal-btn.is-loading {
    position: relative;
    pointer-events: none !important;
    cursor: wait !important;
    opacity: 0.85;
}

.btn-loading-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Global Top Slim Progress Bar */
#docrvu-top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 100000;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#docrvu-top-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, transparent, var(--accent-primary, #007bff), #58a6ff, #ffffff, var(--accent-primary, #007bff), transparent);
    box-shadow: 0 0 10px var(--accent-primary, #007bff), 0 0 4px #fff;
    animation: docrvu-progress-bar-anim 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes docrvu-progress-bar-anim {
    0% {
        left: -50%;
        width: 30%;
    }
    50% {
        left: 25%;
        width: 60%;
    }
    100% {
        left: 100%;
        width: 30%;
    }
}

/* Sectional / Container Loading Overlay */
.docrvu-container-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.82);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 50;
    border-radius: inherit;
    transition: opacity 0.2s ease;
}

.docrvu-spinner-lg {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-primary, #007bff);
    border-radius: 50%;
    animation: docrvu-spin 0.75s linear infinite;
}

.docrvu-loader-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary, #e0e0e0);
    letter-spacing: 0.02em;
}
