/* ============================================================
   ArcherCloud – Navigation & Layout Styles
   See: docs/design/design-rules.md & design-tokens.css

   RULE: Every color must reference a token.
   No hardcoded hex values outside this file.
   ============================================================ */


/* ================================================================
   NAVIGATION SIDEBAR
   Single-panel sidebar matching the Linear mockup.
   Sits on raw --pg-bg; content area is the inset rounded rect.
   ================================================================ */

/* ── App shell ── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--pg-bg);
}

/* ── Sidebar ── */
.sidebar {
    width: 240px;
    display: flex;
    flex-direction: column;
    padding: 10px 8px;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--pg-border-hover) transparent;
    transition: width var(--duration-normal) var(--ease-out);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: var(--pg-border-hover);
    border-radius: var(--radius-sm);
}

/* ── Brand mark (non-interactive) ── */
.sidebar-brand {
    padding: 6px 4px 4px;
    display: flex;
    position: relative;
}

.sidebar-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 8px;
    pointer-events: none;
    user-select: none;
    width: 100%;
    transition: gap var(--duration-normal) var(--ease-out),
                padding var(--duration-normal) var(--ease-out);
}

.sidebar-brand-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: var(--grape-soda);
}

.sidebar-brand-icon .brand-icon-inner {
    fill: var(--alabaster);
}

.sidebar-logotype {
    height: 18px;
    width: auto;
    color: var(--pg-text);
    flex-shrink: 0;
    opacity: 1;
    transition: opacity var(--duration-normal) var(--ease-out),
                width var(--duration-normal) var(--ease-out);
}

.sidebar.collapsed .sidebar-logotype {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ── Nav section labels ── */
.nav-section-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--pg-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 18px 10px 6px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--duration-normal) var(--ease-out);
}

/* ── Collapsible section toggle ── */
.nav-section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.nav-section-toggle:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text-secondary);
}

.section-chevron {
    font-size: 9px;
    transition: transform var(--duration-normal) var(--ease-out);
}

.section-chevron.rotated {
    transform: rotate(90deg);
}

/* ── Collapsible section items ── */
.nav-section-items {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.25s var(--ease-out),
                opacity 0.2s var(--ease-out);
    opacity: 1;
}

.nav-section-items.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* ── Nav items ── */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--pg-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    position: relative;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                width var(--duration-normal) var(--ease-out),
                padding var(--duration-normal) var(--ease-out),
                border-radius var(--duration-normal) var(--ease-out),
                margin var(--duration-normal) var(--ease-out),
                gap var(--duration-normal) var(--ease-out);
}

.nav-item:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
}

.nav-item.active {
    background: var(--pg-shimmer-base);
    color: var(--pg-text);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 0 2px 2px 0;
    background: var(--grape-soda);
}

/* ── Nav icon container ── */
.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    opacity: 0.75;
}

/* MudBlazor SVG icons inside nav */
.nav-icon .mud-icon-root {
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
}

/* Custom SVG/image icons (tractor, implements) */
.nav-custom-icon {
    width: 20px;
    height: 20px;
}

.implement-wheel-inner {
    fill: var(--pg-bg);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

/* ── Nav text (hidden when collapsed) ── */
.nav-text {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--duration-normal) var(--ease-out),
                width var(--duration-normal) var(--ease-out);
}

/* ── Spacer ── */
.sidebar-spacer {
    flex: 1;
    min-height: 12px;
}

/* ── Sidebar nav scrollable area ── */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-nav > .nav-section-label:first-child {
    padding-top: 8px;
}

.sidebar-nav > .nav-item:first-child {
    margin-top: 3px;
}

/* ── Bottom section ── */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
}

/* ── Bottom action icons row ── */
.sidebar-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 4px 0 2px;
}

.sidebar-action-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--pg-border);
    background: none;
    color: var(--pg-text-tertiary);
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out);
}

/* MudBlazor icons inside action buttons */
.sidebar-action-icon .mud-icon-root {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
}

.sidebar-action-icon:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
    border-color: var(--pg-border-hover);
}

.sidebar-action-icon:focus-visible {
    outline: 2px solid var(--grape-soda);
    outline-offset: -2px;
}

.sidebar-action-icon:active {
    transform: scale(0.95);
}

.sidebar-action-icon.active {
    background: var(--pg-shimmer-base);
    color: var(--pg-text);
    border-color: var(--pg-border-hover);
}

.sidebar-action-icon.active:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
    border-color: var(--pg-border-hover);
}

/* ── Organisation / Management Group switcher (below brand) ── */
.sidebar-org-switcher {
    padding: 0 4px 6px;
}

.sidebar-org-switcher .org-dropdown-wrap {
    position: relative;
}

.sidebar-org-switcher .sec-nav-dropdown-btn {
    border: 1px solid var(--pg-border);
    padding: 5px 10px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: var(--pg-text-secondary);
    width: 100%;
    transition: border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.sidebar-org-switcher .sec-nav-dropdown-btn:hover {
    border-color: var(--pg-border-hover);
    color: var(--pg-text);
}

.sidebar-org-switcher .sec-nav-dropdown-btn span {
    font-size: 13px;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-org-switcher .sec-nav-dropdown-btn i {
    font-size: 9px;
    color: var(--pg-text-tertiary);
    flex-shrink: 0;
    transition: transform var(--duration-fast) var(--ease-out);
}

.sidebar-org-switcher .org-dropdown-wrap.open .sec-nav-dropdown-btn i {
    transform: rotate(180deg);
}

.sidebar-org-switcher .sec-nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    border-radius: var(--radius-md);
    background-color: var(--pg-surface);
    border: 1px solid var(--pg-border);
    box-shadow: var(--pg-shadow-hover);
    padding: 6px 0;
    z-index: 1100;
    margin-top: 4px;
    animation: pg-fade-in 0.12s var(--ease-out) both;
}

.sidebar-org-switcher .sec-nav-dropdown-menu a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--pg-text);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
}

.sidebar-org-switcher .sec-nav-dropdown-menu a:hover,
.sidebar-org-switcher .sec-nav-dropdown-menu a.active {
    background: var(--pg-shimmer-highlight);
}

/* ── User section ── */
.sidebar-user-section {
    position: relative;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    transition: background var(--duration-fast) var(--ease-out),
                width var(--duration-normal) var(--ease-out),
                padding var(--duration-normal) var(--ease-out),
                border-radius var(--duration-normal) var(--ease-out),
                gap var(--duration-normal) var(--ease-out);
}

.sidebar-user:hover {
    background: var(--pg-shimmer-highlight);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--grape-soda);
    border: 1px solid var(--pg-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    transition: opacity var(--duration-normal) var(--ease-out),
                width var(--duration-normal) var(--ease-out);
}

.sidebar-user-name {
    font-size: 13px;
    color: var(--pg-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.3;
}

.sidebar-user-email {
    font-size: 11px;
    color: var(--pg-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.3;
    animation: pg-fade-in 0.12s var(--ease-out) both;
}

/* ── Profile inline expand ── */
.sidebar-profile-inline {
    padding: 0 10px 4px;
    animation: pg-fade-in 0.12s var(--ease-out) both;
}

.sidebar-profile-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--pg-text-secondary);
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.sidebar-profile-logout:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
}

.sidebar-profile-divider {
    height: 1px;
    background: var(--pg-border);
    margin: 4px 0;
}

/* ── Dev Tools dropdown (bottom actions) ── */
.sidebar-bottom-actions {
    position: relative;
}

.sidebar-devtools-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-md);
    box-shadow: var(--pg-shadow-hover);
    padding: 6px 0;
    z-index: 1100;
    margin-bottom: 4px;
    display: none;
    animation: pg-fade-in 0.12s var(--ease-out) both;
}

.sidebar-devtools-dropdown.open {
    display: block;
}

.sidebar-devtools-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--pg-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.sidebar-devtools-item:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
}

.sidebar-devtools-item i,
.sidebar-devtools-item .mud-icon-root {
    font-size: 14px;
    width: 18px !important;
    height: 18px !important;
    text-align: center;
    flex-shrink: 0;
}

/* ── Nav text fade animation ── */
.nav-text,
.sidebar-user-info {
    transition: opacity var(--duration-normal) var(--ease-out),
                width var(--duration-normal) var(--ease-out);
}

/* ── Collapsed sidebar state ── */
.sidebar.collapsed {
    width: 58px;
    padding: 10px 6px;
    overflow: visible;
    z-index: 10;
}

/* Fade out section labels but preserve their space */
.sidebar.collapsed .nav-section-label {
    opacity: 0;
    pointer-events: none;
}

/* Make org switcher invisible but preserve its space */
.sidebar.collapsed .sidebar-org-switcher {
    visibility: hidden;
    pointer-events: none;
    max-height: 38px;
    overflow: hidden;
}

/* Hide profile inline and logotype */
.sidebar.collapsed .sidebar-profile-inline {
    display: none;
}

/* Fade out text labels */
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Nav items: circular when collapsed — height stays 34px, only horizontal change */
.sidebar.collapsed .nav-item {
    width: 34px;
    padding: 0 7px;
    border-radius: 50%;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    gap: 0;
    overflow: visible;
}

/* Remove active bar in collapsed state (doesn't look right on circles) */
.sidebar.collapsed .nav-item.active::before {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    padding: 6px 0 4px;
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .sidebar-brand-mark {
    padding: 6px 0;
    gap: 0;
    width: auto;
    justify-content: center;
}

/* User button: center horizontally, keep same height */
.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 0;
    width: 34px;
    margin: 0 auto;
    border-radius: 50%;
    gap: 0;
}

/* Bottom: stack vertically with proper gaps */
.sidebar.collapsed .sidebar-bottom-actions {
    flex-direction: column;
    gap: 4px;
    padding: 0;
    align-items: center;
}

.sidebar.collapsed .sidebar-bottom {
    align-items: center;
}


/* ================================================================
   MAIN CONTENT AREA
   Linear pattern: inset container with --pg-surface, rounded corners
   ================================================================ */

.content {
    flex: 1;
    min-height: 100vh;
    background: var(--pg-bg);
    display: flex;
    flex-direction: row;
    padding: 12px 12px 12px 0;
    transition: padding-left var(--duration-normal) var(--ease-out);
    position: relative;
}

.content-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 32px 40px 40px;
    background: var(--pg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--pg-border);
    overflow-y: auto;
    overflow-x: hidden;
    animation: pg-fade-in 0.3s var(--ease-out) both;
    min-width: 0;
}


/* ================================================================
   SECONDARY NAV (Settings / Dev Tools sub-navigation)
   Sits between collapsed primary sidebar and content-body.
   ================================================================ */

.sub-nav {
    position: absolute;
    left: 0;
    top: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 10px 0 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    animation: pg-fade-in 0.2s var(--ease-out) both;
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-xl);
    background: var(--pg-bg);
}

.sub-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pg-text);
    letter-spacing: -0.2px;
}

.sub-nav-back {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--pg-border);
    background: none;
    color: var(--pg-text-tertiary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out);
}

.sub-nav-back:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
    border-color: var(--pg-border-hover);
}

.sub-nav-back:active {
    transform: scale(0.95);
}

.sub-nav-back .mud-icon-root {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
}

.sub-nav-item {
    display: flex;
    align-items: center;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pg-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin: 0 8px;
    position: relative;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.sub-nav-item:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
}

.sub-nav-item.active {
    background: var(--pg-shimmer-base);
    color: var(--pg-text);
}

.sub-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 0 2px 2px 0;
    background: var(--grape-soda);
}

/* When sub-nav is present, shift content-body right to reveal nav items */
.sub-nav ~ .content-body {
    margin-left: 188px;
}


/* ================================================================
   CONTENT HEADER
   ================================================================ */

.content-header {
    padding: 16px 0;
}

.content-header-top span {
    font-size: 20px;
    font-weight: 600;
    color: var(--pg-text);
    letter-spacing: -0.3px;
}

.content-header-bottom {
    padding-top: 20px;
}

/* ── Circle icon button ── */
.circle-icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grape-soda) !important;
    color: var(--pg-accent-text) !important;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.circle-icon-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.circle-icon-btn:active {
    transform: scale(0.97);
}

/* ── Header filters ── */
.content-header-filters .btn {
    font-size: 16px;
    align-items: center;
    display: flex;
    padding: 4px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    margin-right: 10px;
    color: var(--pg-text-secondary);
    transition: color var(--duration-fast) var(--ease-out);
}

.content-header-filters .btn:hover {
    color: var(--pg-text);
}

.content-header-filters .btn.filter-dropdown-btn {
    padding: 4px 10px;
    border-radius: 30px;
}

.content-header-filters .btn.filter-dropdown-btn.active {
    background: var(--pg-shimmer-highlight) !important;
}

.content-header-filters .btn.filter-dropdown-btn .filter-count {
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pg-accent-text);
    background: var(--grape-soda);
    font-size: 11px;
    border-radius: 50%;
}

.content-header-filters .btn span {
    padding-left: 8px;
}

.content-header-filters .btn img {
    height: 16px;
}

/* ── Filter dropdown ── */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-menu {
    position: absolute;
    min-width: 160px;
    left: 0;
    top: 40px;
    border-radius: var(--radius-lg);
    background-color: var(--pg-surface);
    border: 1px solid var(--pg-border);
    box-shadow: var(--pg-shadow-hover);
    padding: 10px;
    display: none;
    z-index: 50;
}

.filter-dropdown-btn span,
.filter-dropdown-btn img {
    cursor: pointer;
}

/* ── Header search ── */
.header-search {
    position: relative;
    width: 292px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--pg-surface-raised);
    border: 1px solid var(--pg-border);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.header-search:focus-within {
    border-color: var(--pg-accent);
    box-shadow: 0 0 0 3px rgba(146,78,140,0.12);
}

.header-search .form-control,
.header-search .btn {
    position: relative;
    z-index: 50;
}

.header-search .form-control {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding-left: 15px !important;
    color: var(--pg-text);
    font-size: 13px;
}

.header-search .form-control::placeholder {
    color: var(--pg-text-tertiary);
}

.header-search-w220 {
    width: 220px;
}

/* ── Content header bottom forms ── */
.content-header-bottom .form-control,
.content-header-bottom select {
    background: transparent;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--pg-border-hover) !important;
    padding-left: 0;
    box-shadow: none !important;
    color: var(--pg-text);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.content-header-bottom .form-control:focus {
    border-bottom-color: var(--pg-accent) !important;
}

.content-header-bottom .form-control.mud-picker {
    padding: 0 !important;
}

.header-search .form-control {
    border-bottom: none !important;
}


/* ================================================================
   CARDS (c-card)
   Clean solid surfaces — no background images
   ================================================================ */

.c-card {
    border-radius: var(--radius-lg);
    background: var(--pg-surface-raised);
    border: 1px solid var(--pg-border);
    overflow: hidden;
    transition: border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.c-card:hover {
    border-color: var(--pg-border-hover);
}

.c-card-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--pg-text);
    padding: 12px 20px;
    background: var(--pg-surface-raised);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--pg-border);
}

.header-row {
    font-size: 14px;
    font-weight: 600;
    color: var(--pg-text);
    background: var(--pg-surface-raised);
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* Collapsed card */
.c-card.c-card-collapsed .c-card-header {
    border-radius: var(--radius-lg);
    border-bottom: none;
}

.c-card.c-card-collapsed .c-card-body {
    display: none;
}

/* Collapse chevron animation */
.c-card .c-card-header .collapse-card-btn i {
    transition: transform 0.2s var(--ease-out);
}

.c-card.c-card-collapsed .c-card-header .collapse-card-btn i {
    transform: rotate(-90deg);
}

.c-card .c-card-header i.bi-chevron-down {
    transition: transform 0.2s var(--ease-out);
}

.c-card.c-card-collapsed .c-card-header i.bi-chevron-down {
    transform: rotate(-90deg);
}

/* Card body */
.c-card-body {
    overflow-wrap: anywhere;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    padding: 0;
}

/* Tables inside cards */
.c-card-body table {
    margin-bottom: 0;
}

.c-card-body table,
.c-card-body table tr,
.c-card-body table tr td,
.c-card-body table tr th {
    background: transparent !important;
    border-color: var(--pg-border);
    font-weight: 400 !important;
    padding-left: 0;
    padding-right: 0;
}

.c-card-body table tr td,
.c-card-body table tr th {
    padding-top: 4px;
    padding-bottom: 4px;
}

.c-card-body table tr th div span {
    padding: 15px;
}

.c-card-body table tr td:first-child,
.c-card-body table tr th:first-child {
    padding-left: 10px;
}

.c-card-body table tr td:last-child,
.c-card-body table tr th:last-child {
    padding-right: 10px;
}

.c-card-body table tr:last-child td {
    border: none;
}

.c-card-body table tr td > div {
    padding: 5px 15px;
    font-size: 14px;
    min-height: 31px;
}

.c-card-body table tr td:first-child > div {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.c-card-body table tr td:last-child div {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.c-card-body table tr:hover td,
.c-card-body table tr.active td {
    background: var(--pg-surface-overlay) !important;
}

.c-card-body table tr.active td div {
    color: var(--pg-accent);
}

.c-card-body .form-check .form-check-input {
    margin-left: -1.3em;
}

.c-card-body table tr td .form-check {
    background: transparent !important;
    min-height: auto;
}

/* Content body card override (white in old design, now uses surface) */
.content-body .c-card {
    background: var(--pg-surface-raised) !important;
}

/* Selected card highlight */
.selected-c-card {
    box-shadow: var(--pg-shadow-hover) !important;
    border-color: var(--pg-accent) !important;
}

.selected-c-card .c-card-header {
    color: var(--pg-accent-text);
    background: var(--pg-accent);
}

.selected-c-card .c-card-header .btn {
    color: var(--pg-accent-text);
}

/* Active border */
.divActive {
    border: 2px solid var(--pg-accent);
    border-radius: var(--radius-md);
}

.c-border-color {
    border-color: var(--grape-soda);
}


/* ================================================================
   OLD FAITHFUL / DETAIL SECTIONS
   ================================================================ */

.oldfaithful-data {
    border-bottom: 1px solid var(--pg-border);
    padding: 15px 30px;
}

.oldfaithful-data select {
    border-radius: var(--radius-lg);
    border-color: transparent;
    max-width: 160px;
    background-color: var(--pg-surface) !important;
    color: var(--pg-text);
}

.oldfaithful-sections td,
.oldfaithful-sections th {
    padding-left: 30px !important;
    padding-right: 30px !important;
    vertical-align: middle;
}

.oldfaithful-sections table tr th {
    background: var(--pg-surface-raised) !important;
    color: var(--pg-text-secondary);
}

.oldfaithful-section-header {
    font-weight: bold;
    padding: 10px 30px;
    color: var(--pg-text);
}

.oldfaithful-data .form-control {
    background: transparent;
    border-color: transparent;
    border-bottom: 1px solid var(--pg-border);
    padding: 3px 0;
    border-radius: 0;
    color: var(--pg-text);
}

.oldfaithful-card .c-card-header .btn i {
    font-size: 14px;
}

.oldfaithful-card .c-card-header .btn.save {
    background: var(--jungle) !important;
    color: var(--pg-accent-text);
    border-radius: var(--radius-sm);
}

.oldfaithful-card .c-card-header .btn.cancel {
    background: var(--lobster) !important;
    color: var(--pg-accent-text);
    border-radius: var(--radius-sm);
}

.oldfaithful-card .c-card-header .btn.delete {
    background: var(--lobster) !important;
    color: var(--pg-accent-text);
    border-radius: var(--radius-sm);
}

.edit-oldfaithful-card {
    /* display: none; */
}


/* ================================================================
   FORM CONTROLS
   ================================================================ */

.form-switch .form-check-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='rgba(146, 78, 140, 1)'/%3E%3C/svg%3E");
    border-color: var(--grape-soda);
    background-color: transparent;
}

.form-check-input:checked {
    background-color: var(--grape-soda);
    border-color: var(--grape-soda);
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
}

.form-check-input[type=checkbox] {
    border-color: var(--pg-border-hover);
}

/* ── Custom checkbox ── */
.custom-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-check .form-check-input[type=checkbox] {
    border-color: var(--pg-border-hover);
    height: 20px;
    width: 20px;
    background: var(--pg-surface);
    margin-top: 0;
}

.custom-check .form-check-input:checked {
    background: var(--grape-soda);
    border-color: var(--grape-soda);
}


/* ================================================================
   MULTISELECT COMPONENT
   ================================================================ */

.multiSelect {
    position: relative;
}

.multiSelect *,
.multiSelect *::before,
.multiSelect *::after {
    box-sizing: border-box;
}

.multiSelect_dropdown {
    font-size: 14px;
    height: 38px;
    line-height: 38px;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    background-color: transparent;
    color: var(--pg-text);
    border: 0;
    border-bottom: 1px solid var(--pg-border-hover);
    font-weight: 400;
    padding: 0.5px 0;
    margin: 0;
    transition: border-color var(--duration-fast) var(--ease-out);
    cursor: pointer;
    overflow: hidden;
    display: flex;
}

.multiSelect_dropdown.-hasValue {
    padding: 0 30px 5px 5px;
    cursor: default;
}

.multiSelect_dropdown.-open {
    box-shadow: none;
    outline: none;
    padding: 0 29.5px 4.5px 4.5px;
    border: 1.5px solid var(--pg-accent);
}

.multiSelect_arrow::before,
.multiSelect_arrow::after {
    content: '';
    position: absolute;
    display: block;
    width: 2px;
    height: 8px;
    border-radius: 20px;
    border-bottom: 8px solid var(--pg-text-tertiary);
    top: 40%;
    transition: all .15s ease;
}

.multiSelect_arrow::before {
    right: 18px;
    transform: rotate(-50deg);
}

.multiSelect_arrow::after {
    right: 13px;
    transform: rotate(50deg);
}

.multiSelect_list {
    margin: 0;
    margin-bottom: 25px;
    padding: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    max-height: calc(10 * 31px);
    top: 28px;
    left: 0;
    z-index: 9999;
    right: 0;
    background: var(--pg-surface);
    border-radius: var(--radius-md);
    overflow-x: hidden;
    overflow-y: auto;
    transform-origin: 0 0;
    transition: opacity 0.1s ease, visibility 0.1s ease, transform 0.15s cubic-bezier(0.4, 0.6, 0.5, 1.32);
    transform: scale(0.8) translate(0, 4px);
    border: 1px solid var(--pg-border);
    box-shadow: var(--pg-shadow-hover);
}

.multiSelect_option {
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: translate(6px, 0);
    transition: all .15s ease;
}

.multiSelect_option.-selected {
    display: none;
}

.multiSelect_option:hover .multiSelect_text {
    color: var(--pg-accent-text);
    background: var(--pg-accent);
}

.multiSelect_text {
    cursor: pointer;
    display: block;
    padding: 5px 13px;
    color: var(--pg-text);
    font-size: 14px;
    text-decoration: none;
    outline: none;
    position: relative;
    transition: all .15s ease;
}

.multiSelect_list.-open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translate(0, 12px);
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s cubic-bezier(0.4, 0.6, 0.5, 1.32);
}

.multiSelect_list.-open + .multiSelect_arrow::before {
    transform: rotate(-130deg);
}

.multiSelect_list.-open + .multiSelect_arrow::after {
    transform: rotate(130deg);
}

.multiSelect_list.-open .multiSelect_option {
    opacity: 1;
    transform: translate(0, 0);
}

.multiSelect_list.-open .multiSelect_option:nth-child(1) { transition-delay: 10ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(2) { transition-delay: 20ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(3) { transition-delay: 30ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(4) { transition-delay: 40ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(5) { transition-delay: 50ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(6) { transition-delay: 60ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(7) { transition-delay: 70ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(8) { transition-delay: 80ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(9) { transition-delay: 90ms; }
.multiSelect_list.-open .multiSelect_option:nth-child(10) { transition-delay: 100ms; }

.multiSelect_choice {
    background: var(--pg-accent);
    color: var(--pg-accent-text);
    padding: 4px 8px;
    line-height: 17px;
    margin: 5px;
    display: inline-flex;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    gap: 5px;
    align-items: center;
}

.multiSelect_deselect {
    width: 12px;
    height: 12px;
    display: inline-block;
    stroke: var(--pg-text-tertiary);
    stroke-width: 4px;
    margin-top: -1px;
    margin-left: 2px;
    vertical-align: middle;
}

.multiSelect_choice:hover .multiSelect_deselect {
    stroke: var(--pg-text-secondary);
}

.multiSelect_noselections {
    text-align: center;
    padding: 7px;
    color: var(--pg-text-tertiary);
    font-weight: 450;
    margin: 0;
}

.multiSelect_placeholder {
    position: absolute;
    left: 0;
    font-size: 14px;
    top: 8px;
    padding: 0 4px;
    background-color: transparent;
    color: var(--pg-text);
    pointer-events: none;
    transition: all .1s ease;
}

.multiSelect_dropdown.-open + .multiSelect_placeholder,
.multiSelect_dropdown.-open.-hasValue + .multiSelect_placeholder {
    top: -11px;
    left: 17px;
    color: var(--pg-accent);
    font-size: 13px;
    opacity: 0;
}

.multiSelect_dropdown.-hasValue + .multiSelect_placeholder {
    top: -11px;
    left: 17px;
    color: var(--pg-text-secondary);
    font-size: 13px;
    opacity: 0;
}

.multiSelect_choice_close {
    width: 15px;
    height: 15px;
    background: var(--pg-surface-overlay);
    color: var(--pg-accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}


/* ================================================================
   TABLE ACTIONS & CUSTOM DROPDOWNS
   ================================================================ */

.table-action {
    padding: 6px 15px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.table-action .btn {
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 0 !important;
}

.table-action > .btn {
    color: var(--pg-text-tertiary);
    transition: color var(--duration-fast) var(--ease-out);
}

.table-action > .btn:hover {
    color: var(--pg-text);
}

.table-action-edited {
    color: var(--grape-soda) !important;
}

.custom-dropdown {
    width: 220px;
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-md);
    box-shadow: var(--pg-shadow-hover);
    position: absolute;
    left: 0;
    top: 30px;
    z-index: 1000;
    padding: 4px;
    display: none;
}

.custom-dropdown div {
    border-radius: var(--radius-sm) !important;
}

.custom-dropdown-action .btn {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pg-accent-text);
    transition: filter var(--duration-fast) var(--ease-out);
}

.custom-dropdown-action .btn:hover {
    filter: brightness(1.1);
}

.custom-dropdown-action .btn i {
    font-size: 14px;
}

.custom-dropdown-action .btn.dropdown-save {
    background: var(--jungle);
}

.custom-dropdown-action .btn.dropdown-save i {
    font-size: 12px;
}

.custom-dropdown-action .btn.dropdown-edit {
    background: var(--grape-soda);
}

.custom-dropdown-action .btn.dropdown-edit i {
    font-size: 13px;
}

.custom-dropdown-action .btn.dropdown-cancel,
.custom-dropdown-action .btn.operator-dropdown-cancel {
    background: var(--lobster);
}

.custom-dropdown-action {
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-dropdown-header {
    border-bottom: 1px solid var(--pg-border);
    padding: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--pg-text);
    border-radius: 0 !important;
}

.custom-dropdown-body {
    padding: 10px;
}

.custom-dropdown-text-item {
    line-height: 20px;
    padding: 3px 0;
}

.notes-dropdown {
    width: 250px;
}

.operational-parameters-dropdown {
    width: 300px;
}

.c-submit-btn {
    background-color: var(--pg-accent);
    border-color: var(--pg-border) !important;
    color: var(--pg-accent-text);
    border-radius: var(--radius-md);
}


/* ================================================================
   REPORT NUMBER CARDS
   Using icon palette colors
   ================================================================ */

.report-number-card {
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
}

.report-number-card:hover {
    border-color: var(--pg-border-hover);
    box-shadow: var(--pg-shadow);
}

.report-number-card .report-number-card-label {
    color: var(--pg-text-secondary);
    font-size: 14px;
    border-right: 1px solid var(--pg-border);
    justify-content: flex-end;
}

.report-number-card .report-number-card-value {
    color: var(--pg-text);
    font-size: 24px;
    font-weight: bold;
}

.report-number-card .report-number-card-value small {
    font-size: 16px;
    font-weight: 400;
}

/* Report card accent colours (icon palette) */
.report-number-card-bg-01 { background: var(--indigo); color: var(--pg-accent-text); }
.report-number-card-bg-02 { background: var(--aqua); color: var(--pg-accent-text); }
.report-number-card-bg-03 { background: var(--jungle); color: var(--pg-accent-text); }
.report-number-card-bg-04 { background: var(--horizon); color: var(--pg-accent-text); }
.report-number-card-bg-05 { background: var(--grape-soda); color: var(--pg-accent-text); }

.report-number-card .size-12 {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}


/* ================================================================
   CUSTOM TABLES (QuickGrid + custom-table)
   ================================================================ */

.custom-table {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--pg-border);
}

.custom-table table {
    border-color: var(--pg-border);
}

.custom-table thead tr {
    background: var(--pg-surface-raised);
}

.custom-table th {
    color: var(--pg-text-tertiary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-table tr:nth-child(odd) th,
.custom-table tr:nth-child(odd) td {
    background-color: var(--pg-shimmer-base);
}

.custom-table tr:nth-child(even) th,
.custom-table tr:nth-child(even) td {
    background: transparent;
}

/* QuickGrid */
.quickgrid[theme=default] > tbody > tr > td {
    padding: 6px;
}

.quickgrid[theme=default] .col-header-content {
    padding-right: 0;
}

.quickgrid {
    width: 100%;
}

.col-header-content[b-vznuo5fmpv] {
    display: block;
}

.paginator[b-3qssc0bm46] {
    padding: 0.25rem 6px;
}

table.quickgrid tr:hover td,
table.quickgrid tr.active td {
    background: var(--pg-surface-raised);
}


/* ================================================================
   CUSTOM PAGINATION
   ================================================================ */

.custom-pagination {
    background: var(--pg-surface-raised);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--pg-text-secondary);
    border-top: 1px solid var(--pg-border);
}

.custom-pagination a {
    font-size: 13px;
    color: var(--pg-text-secondary);
    text-decoration: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.custom-pagination a:hover {
    background: var(--pg-shimmer-highlight);
    color: var(--pg-text);
}

.custom-pagination a.active {
    background: var(--pg-accent);
    color: var(--pg-accent-text);
}


/* ================================================================
   LIVE VIEW
   ================================================================ */

.live-vehicles-status {
    font-size: 14px;
}

.live-vehicles-status span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.live-vehicles-status span.live {
    background: var(--jungle);
    animation: pg-pulse 2s var(--ease-in-out) infinite;
}

.live-vehicles-status span.min-ago {
    background: var(--tangerine);
}

.hr-ago {
    background: var(--lobster);
}

.live-vehicles {
    display: block;
    min-height: auto;
}

.live-vehicles .live-vehicles-card .c-card-body {
    max-height: 400px;
    overflow-y: auto;
}

.live-jobs tr th:nth-child(4),
th.w-110 {
    min-width: 110px;
}

.live-jobs tr th:nth-child(6),
th.w-60 {
    min-width: 60px;
}

.th-padding.col > div > span {
    white-space: nowrap;
}

.implements-section {
    border-left: 1px solid var(--pg-border);
    padding-left: 20px;
}


/* ================================================================
   MAP
   ================================================================ */

#map {
    position: fixed;
    height: 100%;
    width: -webkit-fill-available;
    left: 240px;
    top: 0;
    bottom: 0;
    transition: left var(--duration-normal) var(--ease-out);
}

.nav-collapsed #map {
    left: 52px;
}

.tank-l-speed-rate-container {
    display: flex;
    justify-content: flex-end;
    position: fixed;
    right: 40px;
    bottom: 30px;
}

.tank-l-speed-rate-inner-container {
    width: 400px;
}


/* ================================================================
   DATE RANGE PICKER
   ================================================================ */

.dateragepicker {
    display: flex;
    align-items: center;
}

.dateragepicker i {
    color: var(--pg-accent);
}

.dateragepicker input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    padding-left: 5px;
    color: var(--pg-text);
}


/* ================================================================
   TOOLTIPS — CSS-only branded tooltip via [data-tooltip]
   Usage: <element data-tooltip="Label text">
   Positions: default right. Add data-tooltip-pos="top|bottom|left" to override.
   ================================================================ */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    padding: 5px 10px;
    background: var(--pg-text);
    z-index: 9999;
    color: var(--pg-bg);
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1px;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
    transition: opacity var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}

/* ── Default position: right ── */
[data-tooltip]::after {
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ── Top ── */
[data-tooltip][data-tooltip-pos="top"]::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
}
[data-tooltip][data-tooltip-pos="top"]:hover::after {
    transform: translateX(-50%) translateY(0);
}

/* ── Bottom ── */
[data-tooltip][data-tooltip-pos="bottom"]::after {
    left: 50%;
    top: calc(100% + 8px);
    bottom: auto;
    transform: translateX(-50%) translateY(-4px);
}
[data-tooltip][data-tooltip-pos="bottom"]:hover::after {
    transform: translateX(-50%) translateY(0);
}

/* ── Left ── */
[data-tooltip][data-tooltip-pos="left"]::after {
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
}
[data-tooltip][data-tooltip-pos="left"]:hover::after {
    transform: translateY(-50%) translateX(0);
}

/* ── Hide tooltips on nav items when expanded (text is visible) ── */
.sidebar:not(.collapsed) .nav-item[data-tooltip]::after,
.sidebar:not(.collapsed) .sidebar-user[data-tooltip]::after,
.sidebar:not(.collapsed) .sidebar-brand[data-tooltip]::after {
    display: none;
}

/* ── Collapsed state: all tooltips appear on the right ── */
.sidebar.collapsed [data-tooltip]::after {
    left: calc(100% + 8px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) translateX(-4px);
}
.sidebar.collapsed [data-tooltip]:hover::after {
    transform: translateY(-50%) translateX(0);
}

/* ── Collapsed: dev tools dropdown opens to the right ── */
.sidebar.collapsed .sidebar-devtools-dropdown {
    left: 100%;
    bottom: 0;
    right: auto;
    width: 200px;
    margin-bottom: 0;
    margin-left: 4px;
}


/* ================================================================
   MODALS (Bootstrap)
   ================================================================ */

.modal-header h5 {
    color: var(--pg-text);
}

.modal-body {
    color: var(--pg-text);
}

/* Trouble Spots grid headers */
.trouble-spots-grid thead tr th .fw-bold {
    color: var(--pg-text) !important;
}


/* ================================================================
   CURSOR & TEXT SELECTION
   ================================================================ */

body,
.app-shell,
.content,
.sidebar,
.c-card,
.c-card-header,
.c-card-body {
    cursor: default;
}

.c-card-header,
.c-card-body,
.content-header,
.content-header-top,
.content-header-bottom,
.sidebar-nav,
table th,
table td,
.oldfaithful-data,
.custom-table,
.grid-container,
.modal-header,
.modal-footer {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.c-card-body table tr,
.c-card-body table tr td,
.c-card-body table tr th,
.custom-table tr,
.custom-table td,
.custom-table th,
table.quickgrid tr,
table.quickgrid td,
table.quickgrid th {
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.c-card-body table tr[onclick],
.c-card-body table tr:has([onclick]),
table tr.clickable,
.custom-table tr:hover {
    cursor: pointer;
}

.sidebar-nav,
.sidebar-nav a,
.navbar {
    cursor: default;
}

.sidebar-nav a:hover,
.nav-section-toggle {
    cursor: pointer;
}

/* Preserve text selection for inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
textarea,
[contenteditable="true"],
.form-control,
.mud-input input,
.mud-input-slot,
.mud-input-control input,
pre,
code {
    cursor: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

button,
.btn,
a,
[role="button"],
.form-check-input,
.form-select,
select,
.mud-button-root,
.mud-icon-button,
.circle-icon-btn {
    cursor: pointer;
}

button:disabled,
.btn:disabled,
.btn.disabled,
a.disabled,
[disabled] {
    cursor: not-allowed !important;
}

.spinner-border,
[aria-busy="true"] {
    cursor: wait;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1200px) {
    .sidebar {
        width: 58px;
        padding: 12px 6px;
        overflow: visible;
        z-index: 10;
    }

    .sidebar .nav-section-label {
        visibility: hidden;
        pointer-events: none;
    }

    .sidebar .sidebar-org-switcher {
        visibility: hidden;
        pointer-events: none;
        max-height: 38px;
        overflow: hidden;
    }

    .sidebar .sidebar-logotype {
        opacity: 0;
        width: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .sidebar .sidebar-profile-inline {
        display: none;
    }

    .sidebar .nav-text,
    .sidebar .sidebar-user-info {
        opacity: 0;
        width: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .sidebar .nav-item {
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 0;
        gap: 0;
        overflow: visible;
    }

    .sidebar .nav-item.active::before {
        display: none;
    }

    .sidebar .sidebar-user {
        justify-content: center;
        padding: 0;
        width: 34px;
        height: 34px;
        margin: 0 auto;
        border-radius: 50%;
        gap: 0;
    }

    .sidebar .sidebar-bottom-actions {
        flex-direction: column;
        gap: 4px;
        padding: 0;
        align-items: center;
    }

    .sidebar .sidebar-bottom {
        align-items: center;
    }

    #map {
        left: 58px;
    }
}
