/* Font face declarations */
@font-face {
    font-family: 'UKNumberPlate';
    src: url('../fonts/UKNumberPlate.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Note: Perfect DOS VGA 437 and W95FA fonts would need to be added to the fonts directory
   For now, using similar fallback fonts that are commonly available */

/* Core Palette inspired by Solaris late 90s */
:root {
    --corvaxa-blue: #0a3d82;
    --corvaxa-blue-light: #1a5fab;
    --solaris-grey: #c0c0c0;
    --solaris-grey-dark: #8f8f8f;
    --solaris-grey-light: #e0e0e0;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
    --accent-yellow: #ffd24d;
    --menu-height: 30px;
    --header-height: 30px;
    --status-height: 20px;
    --base-font-size: 16px;
    --font-size-multiplier: 1;
    font-size: var(--base-font-size);
}

/* Dark mode color scheme */
html.color-scheme-dark,
html.color-scheme-dark :root {
    --corvaxa-blue: #0d1f3d;
    --corvaxa-blue-light: #1a3d6b;
    --solaris-grey: #4a4a4a;
    --solaris-grey-dark: #2d2d2d;
    --solaris-grey-light: #1a1a1a;
    --text-light: #e0e0e0;
    --text-dark: #e0e0e0;
    --accent-yellow: #ffd24d;
    --panel-bg: #2d2d2d;
    --panel-titlebar-bg: linear-gradient(to bottom, #2a4a6b, #1a3a5b);
    --input-bg: #3a3a3a;
    --input-border: #4a4a4a;
    --border-color: #4a4a4a;
}

/* Green Screen color scheme - late 80s terminal look */
html.color-scheme-greenscreen,
html.color-scheme-greenscreen :root {
    --corvaxa-blue: #0d3d0d;
    --corvaxa-blue-light: #1a5a1a;
    --solaris-grey: #2d4d2d;
    --solaris-grey-dark: #1a3d1a;
    --solaris-grey-light: #0d2d0d;
    --text-light: #00ff00;
    --text-dark: #00ff00;
    --accent-yellow: #00ff00;
}

/* Font size preference classes - update CSS variable and html/body font-size */
html.font-size-small {
    --base-font-size: 14px;
    --font-size-multiplier: 0.875; /* 14/16 = 0.875 */
    font-size: 14px !important;
}

html.font-size-medium {
    --base-font-size: 16px;
    --font-size-multiplier: 1; /* 16/16 = 1 */
    font-size: 16px !important;
}

html.font-size-large {
    --base-font-size: 18px;
    --font-size-multiplier: 1.125; /* 18/16 = 1.125 */
    font-size: 18px !important;
}

/* Apply font size to body as well */
body.font-size-small {
    font-size: 14px !important;
}

body.font-size-medium {
    font-size: 16px !important;
}

body.font-size-large {
    font-size: 18px !important;
}

/* Global font-size scaling - rem units automatically scale with html font-size */
/* No overrides needed for rem-based sizes - they scale automatically */

*,
*::before,
*::after {
    box-sizing: border-box;
    border-radius: 0 !important;
}

html {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    font-size: 16px; /* Default base size for rem calculations */
}

/* Apply font size to html element for rem-based sizing */
html.font-size-small {
    font-size: 14px !important;
}

html.font-size-medium {
    font-size: 16px !important;
}

html.font-size-large {
    font-size: 18px !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', Monaco, monospace;
    background-color: var(--corvaxa-blue);
    color: var(--text-dark);
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    overflow-x: hidden;
}

/* Dark mode specific overrides */
html.color-scheme-dark body {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark .app-shell {
    background-color: #1a1a1a !important;
}

html.color-scheme-dark .work-area {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark .panel-titlebar {
    background: linear-gradient(to bottom, #2a4a6b, #1a3a5b);
}

html.color-scheme-dark .menu-bar {
    background: #2d2d2d;
    border-bottom-color: #4a4a4a;
}

html.color-scheme-dark .submenu {
    background: #2d2d2d;
    border-color: #4a4a4a;
}

html.color-scheme-dark .submenu a,
html.color-scheme-dark .submenu-label,
html.color-scheme-dark .submenu-button {
    color: #e0e0e0;
}

html.color-scheme-dark .submenu .active a {
    background: var(--accent-yellow) !important;
    color: #000000 !important;
}

html.color-scheme-dark .submenu a:hover,
html.color-scheme-dark .submenu a:focus,
html.color-scheme-dark .submenu button:hover,
html.color-scheme-dark .submenu button:focus {
    background: var(--accent-yellow);
    color: #000000;
}

html.color-scheme-dark input[type="text"],
html.color-scheme-dark input[type="email"],
html.color-scheme-dark input[type="password"],
html.color-scheme-dark input[type="number"],
html.color-scheme-dark textarea,
html.color-scheme-dark select {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
    color: #e0e0e0;
}

html.color-scheme-dark .panel {
    background: #2d2d2d;
    border-color: #4a4a4a;
}

html.color-scheme-dark .detail-grid dt,
html.color-scheme-dark .detail-grid dd {
    color: #e0e0e0;
}

html.color-scheme-dark .function-icon {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d);
    border-color: #4a4a4a;
}

html.color-scheme-dark .panel .function-bar {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d);
    border-bottom-color: #4a4a4a;
}

html.color-scheme-dark .function-dropdown {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
    color: #e0e0e0;
}

html.color-scheme-dark .function-dropdown:hover {
    background-color: #4a4a4a;
}

html.color-scheme-dark .function-dropdown option {
    background: #3a3a3a;
    color: #e0e0e0;
}

html.color-scheme-dark table {
    background: #2d2d2d !important;
    border-color: #4a4a4a !important;
}

html.color-scheme-dark table td,
html.color-scheme-dark table th {
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
    background: #2d2d2d !important;
}

html.color-scheme-dark table tr {
    background: #2d2d2d !important;
}

html.color-scheme-dark table tr:nth-child(even) {
    background: #3a3a3a !important;
}

html.color-scheme-dark table tr:hover {
    background: #4a4a4a !important;
}

html.color-scheme-dark .panel-body {
    background: #2d2d2d;
    color: #e0e0e0;
}

html.color-scheme-dark .subpanel {
    background: #2d2d2d;
    border-color: #4a4a4a;
}

html.color-scheme-dark .subpanel-titlebar {
    background: linear-gradient(to bottom, #2a4a6b, #1a3a5b);
    color: #e0e0e0;
}

html.color-scheme-dark .subpanel-toggle,
html.color-scheme-dark .subpanel-toggle .subpanel-toggle-icon {
    color: #000000 !important;
}

html.color-scheme-dark .subpanel-add-link,
html.color-scheme-dark .subpanel-add-link .subpanel-add-label {
    color: #000000 !important;
}

html.color-scheme-dark .subpanel-body {
    background: #2d2d2d;
    color: #e0e0e0;
}

html.color-scheme-dark a {
    color: #6ba3ff;
}

html.color-scheme-dark a:hover {
    color: #8bb5ff;
}

html.color-scheme-dark .power-button {
    background: #4a4a4a;
    border-color: #5a5a5a;
}

html.color-scheme-dark .menu-item.disabled .menu-label {
    color: #6a6a6a;
}

/* Fix menu shortcut character color when highlighted in dark mode */
html.color-scheme-dark .submenu a:hover .submenu-underline,
html.color-scheme-dark .submenu a:focus .submenu-underline,
html.color-scheme-dark .submenu .active a .submenu-underline,
html.color-scheme-dark .submenu-button:hover .submenu-underline,
html.color-scheme-dark .submenu-button:focus .submenu-underline {
    color: #000000 !important;
}

/* Additional dark mode overrides for hardcoded colors */
html.color-scheme-dark .panel {
    background: #2d2d2d !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark .split-layout {
    background: #2d2d2d !important;
}

html.color-scheme-dark .detail-grid {
    color: #e0e0e0 !important;
}

html.color-scheme-dark input,
html.color-scheme-dark textarea,
html.color-scheme-dark select {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark button:not(.function-icon):not(.subpanel-toggle):not(.submenu-button):not(.funnel-step-btn) {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d) !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark button:not(.function-icon):not(.subpanel-toggle):not(.submenu-button):hover {
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a) !important;
}

html.color-scheme-dark .list-item,
html.color-scheme-dark li {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #4a4a4a !important;
}

html.color-scheme-dark .list-item:hover,
html.color-scheme-dark li:hover {
    background: #3a3a3a !important;
}

html.color-scheme-dark .list-item.selected,
html.color-scheme-dark li.selected {
    background: #1a3d6b !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark h1,
html.color-scheme-dark h2,
html.color-scheme-dark h3,
html.color-scheme-dark h4,
html.color-scheme-dark h5,
html.color-scheme-dark h6,
html.color-scheme-dark p,
html.color-scheme-dark div,
html.color-scheme-dark span {
    color: #e0e0e0 !important;
}

html.color-scheme-dark .panel-title {
    color: #e0e0e0 !important;
}

/* Override any remaining hardcoded white/light backgrounds - be more specific */
html.color-scheme-dark .panel,
html.color-scheme-dark .subpanel,
html.color-scheme-dark table,
html.color-scheme-dark input,
html.color-scheme-dark textarea,
html.color-scheme-dark select {
    border-color: var(--solaris-grey-dark) !important;
}

html.color-scheme-dark .panel-titlebar {
    background: linear-gradient(to bottom, #2a4a6b, #1a3a5b) !important;
}

/* Ensure all text in work area is light in dark mode */
html.color-scheme-dark .work-area,
html.color-scheme-dark .work-area * {
    color: #e0e0e0 !important;
}

/* But allow links to be blue */
html.color-scheme-dark .work-area a {
    color: #6ba3ff !important;
}

html.color-scheme-dark .work-area a:hover {
    color: #8bb5ff !important;
}

/* Override any white backgrounds */
html.color-scheme-dark [style*="background: #ffffff"],
html.color-scheme-dark [style*="background:#ffffff"],
html.color-scheme-dark [style*="background-color: #ffffff"],
html.color-scheme-dark [style*="background-color:#ffffff"] {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
}

/* Override any black text */
html.color-scheme-dark [style*="color: #000000"],
html.color-scheme-dark [style*="color:#000000"],
html.color-scheme-dark [style*="color: #000"],
html.color-scheme-dark [style*="color:#000"] {
    color: #e0e0e0 !important;
}

/* Font preference classes */
body.font-boring {
    font-family: Arial, Helvetica, sans-serif;
}

body.font-masochist {
    font-family: 'Comic Sans MS', 'Comic Sans', cursive;
}

body.font-classic {
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', Monaco, monospace;
}

body.font-90s {
    font-family: 'Perfect DOS VGA 437', 'Courier New', monospace;
}

body.font-vt323 {
    font-family: 'VT323', monospace;
}

body.font-win31 {
    font-family: 'W95FA', 'MS Sans Serif', 'MS Shell Dlg', sans-serif;
}

/* Ensure all headings inherit font family */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit !important;
}

/* Ensure work-area and all its children inherit font */
.work-area {
    font-family: inherit !important;
    font-size: inherit !important;
}

.work-area * {
    font-family: inherit !important;
}

/* Exception: Allow UKNumberPlate font to be used */
.work-area .vehicle-name-plate {
    font-family: 'UKNumberPlate', sans-serif !important;
}

/* Force font on common elements that might lose it */
.work-area h1,
.work-area h2,
.work-area h3,
.work-area h4,
.work-area h5,
.work-area h6,
.work-area p,
.work-area div,
.work-area span,
.work-area input,
.work-area textarea,
.work-area select,
.work-area button,
.work-area label,
.work-area dt,
.work-area dd {
    font-family: inherit !important;
}

/* Ensure work-area and all its children inherit font-size for proper scaling */
.work-area *,
.work-area *::before,
.work-area *::after {
    font-size: inherit;
}

/* Ensure panel and its children inherit font-size */
.panel,
.panel *,
.panel *::before,
.panel *::after {
    font-size: inherit;
}

/* Ensure detail-grid and split-layout inherit font-size */
.detail-grid,
.detail-grid *,
.split-layout,
.split-layout * {
    font-size: inherit;
}

body.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--solaris-grey-light);
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    width: 100%;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    background: linear-gradient(90deg, var(--corvaxa-blue), var(--corvaxa-blue-light));
    color: var(--text-light);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    position: relative;
    flex-shrink: 0;
}

.app-header-super-admin {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

.app-title {
    padding-left: 12px;
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.app-user {
    display: flex;
    align-items: center;
    gap: 25px;
    font-style: normal;
    text-transform: none;
    padding-right: 0;
}

.username {
    font-weight: normal;
}

.logout-form {
    margin: 0;
}

.power-button {
    position: relative;
    width: 18px;
    height: var(--header-height);
    border: 2px outset var(--solaris-grey);
    background: var(--solaris-grey);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
    margin: 0;
    flex-shrink: 0;
}

.power-button:hover,
.power-button:focus {
    outline: none;
    border-color: var(--solaris-grey-dark);
}

.power-button:active {
    border-style: inset;
    box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #808080;
}

.power-icon::before {
    content: '';
    width: 8px;
    height: 2px;
    background: var(--text-dark);
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu-bar {
    height: var(--menu-height);
    background: var(--solaris-grey);
    border-bottom: 1px solid var(--solaris-grey-dark);
    font-style: italic;
    font-size: 0.7rem; /* Scales automatically with html font-size */
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    outline: none !important;
    position: relative;
    flex-shrink: 0;
}

/* Ensure menu bar and all children inherit font-size for proper scaling */
.menu-bar,
.menu-bar *,
.menu-bar *::before,
.menu-bar *::after {
    font-size: inherit;
}

.menu {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0 4px;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
}

.menu-item {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    text-align: left;
    align-items: center;
    justify-content: flex-start;
    padding: 0 23px;
}

.menu-item-right {
    position: absolute;
    right: 6px;
    margin-left: 0;
}

.menu-label {
    cursor: pointer;
    user-select: none;
    outline: none;
    display: inline-block;
    text-align: left;
    padding: 4px 6px;
    white-space: nowrap;
    font-size: inherit !important;
}

.menu-label .menu-underline {
    text-decoration: underline;
}

.menu-label:focus {
    outline: 2px solid var(--accent-yellow);
    outline-offset: -2px;
}

.menu-item.disabled .menu-label {
    tabindex: -1;
    color: var(--solaris-grey-dark);
}

.menu-item:not(.disabled):hover .submenu,
.menu-item:not(.disabled):focus-within .submenu,
.menu-item.open .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 25px;
    background: var(--solaris-grey-light);
    border: 1px solid var(--solaris-grey-dark);
    list-style: none;
    padding: 4px 0;
    margin: -1px 0 0;
    min-width: 210px;
    z-index: 10;
}

.menu-bar.menu-force-close .submenu,
.menu-bar.menu-force-close .menu-item:not(.disabled):hover .submenu,
.menu-bar.menu-force-close .menu-item.open .submenu {
    display: none !important;
}

.menu-item-right .submenu {
    left: auto;
    right: 0;
}

.submenu.submenu-wide {
    min-width: 300px;
}

.submenu.submenu-main {
    min-width: 210px;
}

.submenu li {
    margin: 0;
}

.submenu a,
.submenu-label {
    display: block;
    padding: 4px 8px;
    color: var(--text-dark);
    text-decoration: none;
    text-align: left;
    font-size: inherit;
}

.submenu a .submenu-underline,
.submenu-button .submenu-underline {
    text-decoration: underline;
}

.submenu-form {
    display: block;
    margin: 0;
    padding: 0;
}

.submenu-button {
    display: block;
    width: 100%;
    padding: 4px 8px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-dark);
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
}

.submenu a:hover,
.submenu a:focus,
.submenu button:hover,
.submenu button:focus,
.submenu .active a {
    background: var(--accent-yellow);
    color: #000000;
    outline: none;
}

.submenu a:focus,
.submenu-button:focus {
    outline: 2px solid var(--corvaxa-blue);
    outline-offset: -2px;
}

.work-area {
    flex: 1 1 auto;
    overflow: auto;
    padding: 12px;
    padding-bottom: calc(12px + var(--status-height));
    background: var(--solaris-grey-light);
    position: relative;
}

.panel-titlebar {
    background: linear-gradient(to bottom, #4A7BC8, #316AC5);
    border-bottom: 1px outset #316AC5;
    padding: 6px 12px;
    min-height: 26px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 
        inset 2px 2px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset -2px -2px 0 rgba(0, 0, 0, 0.5);
    margin: -2px -2px 0 -2px;
    position: relative;
    z-index: 2;
}

.panel-titlebar:has(+ .function-bar) {
    border-bottom: none;
}

.panel-title-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
}

.panel-title-link:hover .panel-title {
    text-decoration: underline;
}

.panel-title {
    font-weight: bold;
    font-size: 0.85rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.panel .function-bar {
    background: linear-gradient(to bottom, #e8e8e8, #d4d0c8);
    border-bottom: 1px solid #808080;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-height: 28px;
    box-shadow: inset 0 1px 0 #ffffff;
    margin: 0 -2px 0 -2px;
    position: relative;
    z-index: 1;
}

.panel .function-bar:empty {
    display: none;
}

.function-icon {
    width: 24px;
    height: 24px;
    border: 1px outset #c0c0c0;
    background: linear-gradient(to bottom, #f0f0f0, #d4d0c8);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem; /* 14px / 16px = 0.875rem - scales with html font-size */
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
}

.function-icon:hover {
    background: linear-gradient(to bottom, #ffffff, #e8e8e8);
    border-color: #808080;
}

.function-icon:active {
    border: 1px inset #c0c0c0;
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ffffff;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
}

/* Toggle button pressed state */
.function-icon.list-toggle-pressed,
.function-icon.active {
    border: 1px inset #c0c0c0;
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ffffff;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
}

.function-icon:focus {
    outline: 1px dotted #000000;
    outline-offset: 1px;
}

.function-icon .icon-new,
.function-icon .icon-save,
.function-icon .icon-print {
    display: block;
    line-height: 1;
}

.function-dropdown {
    height: 24px;
    border: 1px outset #c0c0c0;
    background: #ffffff;
    padding: 2px 20px 2px 6px;
    font-size: 0.75rem; /* 12px / 16px = 0.75rem - scales with html font-size */
    font-family: inherit;
    color: #000000;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-color: #ffffff;
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ffffff;
    min-width: 120px;
}

.function-dropdown:hover {
    background-color: #f0f0f0;
    border-color: #808080;
}

.function-dropdown:focus {
    outline: 1px dotted #000000;
    outline-offset: 1px;
    background-color: #ffffff;
}

.function-dropdown:active {
    border: 1px inset #c0c0c0;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
    background-color: #f0f0f0;
}

.function-dropdown option {
    background: #ffffff;
    color: #000000;
    padding: 2px 4px;
}

.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--status-height);
    background: var(--solaris-grey);
    border-top: 1px solid var(--solaris-grey-dark);
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    display: flex;
    align-items: center;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    z-index: 20;
    border-radius: 0 !important;
    outline: none !important;
    width: 100%;
    transition: background-color 0.3s ease;
}

.status-bar[data-flash-type="success"] {
    background: #28a745;
    color: #ffffff;
    animation: statusFlash 0.5s ease-in-out 3;
}

.status-bar[data-flash-type="error"] {
    background: #dc3545;
    color: #ffffff;
}

.status-bar[data-flash-type="info"] {
    background: #17a2b8;
    color: #ffffff;
}

@keyframes statusFlash {
    0%, 100% {
        background-color: #28a745;
    }
    50% {
        background-color: #4caf50;
    }
}

.status-text {
    padding-left: 12px;
    text-transform: uppercase;
}

.panel {
    border: 2px solid var(--solaris-grey-dark);
    background: var(--solaris-grey-light);
    box-shadow: inset 1px 1px 0 #ffffff;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.panel-header {
    background: linear-gradient(90deg, var(--solaris-grey-light), #ffffff);
    border-bottom: 2px solid var(--solaris-grey);
    padding: 6px 10px;
}

.panel-header h2 {
    margin: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* If panel has titlebar, hide the old header */
.panel:has(.panel-titlebar) .panel-header {
    display: none;
}

.panel-body {
    padding: 10px;
    background: #ffffff;
    color: #222222;
    min-height: 200px;
}

/* Ensure panel-body connects directly to titlebar when no function bar - extend white background up to cover the border */
.panel-titlebar:not(:has(+ .function-bar)) + .panel-body {
    margin-top: -4px;
    padding-top: 14px;
    position: relative;
    z-index: 1;
}

.panel-titlebar:not(:has(+ .function-bar)) + .panel-body::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: #ffffff;
    z-index: 0;
}

.split-layout {
    display: flex;
    flex-direction: column;
}

.split-layout .function-bar + .panel-body {
    margin-top: -1px;
    padding-top: 11px;
    position: relative;
    z-index: 0;
}

/* Accident Book form layout - side by side on larger screens */
.accident-form-layout {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.accident-form-fieldset {
    border: 1px solid #c0c0c0;
    padding: 15px;
    margin-bottom: 20px;
    background: #f5f5f5;
    flex: 1;
    min-width: 300px;
}

/* On smaller screens, fieldsets stack vertically */
@media (max-width: 768px) {
    .accident-form-layout {
        flex-direction: column;
    }
    
    .accident-form-fieldset {
        min-width: 100%;
    }
}

@media (min-width: 768px) {
    .split-layout .panel-body {
        display: flex;
        gap: 12px;
        padding: 10px;
    }

    .list-column {
        flex: 0 0 220px;
        border-right: 2px inset #c0c0c0;
        padding-right: 10px;
        background: #c0c0c0;
        padding: 8px;
        box-shadow: inset 1px 1px 0 #808080;
    }

    .detail-column {
        flex: 1 1 auto;
        padding-left: 10px;
    }

    /* Hide list when toggle is off */
    .split-layout.list-hidden .list-column {
        display: none;
    }

    .split-layout.list-hidden .detail-column {
        padding-left: 0;
    }
    
    /* Hide detail column when no item is selected (make list full width) */
    .split-layout.no-selection .detail-column {
        display: none !important;
    }
    
    .split-layout.no-selection .list-column {
        flex: 1 1 auto;
        border-right: none;
    }
}

.list-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Windows NT-style record list */
.record-list {
    border: 2px inset #c0c0c0;
    background: #ffffff;
    padding: 2px;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
}

.record-list a {
    display: block;
    padding: 4px 6px;
    border: 1px solid transparent;
    margin: 1px 0;
    font-size: 0.85rem;
    color: #000000;
    text-decoration: none;
    background: #ffffff;
    cursor: default;
}

/* Full-width view: show column headers */
.split-layout.no-selection .record-list-header {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(to bottom, #e8e8e8, #d4d0c8);
    border: 2px inset #c0c0c0;
    padding: 6px 2px;
    margin-bottom: 2px;
    font-weight: bold;
    font-size: 0.85rem;
    color: #000000;
    box-shadow: 
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080;
}

.split-layout.no-selection .list-header-id {
    flex: 0 0 80px;
    padding-right: 16px;
    font-weight: bold;
}

.split-layout.no-selection .list-header-company {
    flex: 0 0 200px;
    padding-left: 16px;
    padding-right: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
    font-weight: bold;
}

.split-layout.no-selection .list-header-status {
    flex: 0 0 200px;
    padding-left: 16px;
    padding-right: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
    font-weight: bold;
}

.split-layout.no-selection .list-header-title {
    flex: 1 1 auto;
    padding-left: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
    font-weight: bold;
}

.split-layout.no-selection .list-header-modified {
    flex: 0 0 180px;
    padding-left: 16px;
    padding-right: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
    font-weight: bold;
}

/* Sortable header styles */
.split-layout.no-selection .sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

.split-layout.no-selection .sortable-header:hover {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
}

.split-layout.no-selection .sortable-header::after {
    content: ' ↕';
    position: absolute;
    right: 4px;
    font-size: 0.75em;
    opacity: 0.5;
}

.split-layout.no-selection .sortable-header.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.split-layout.no-selection .sortable-header.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

/* Hide headers in normal view */
.split-layout:not(.no-selection) .record-list-header {
    display: none;
}

/* Dark mode styles for column headers */
html.color-scheme-dark .split-layout.no-selection .record-list-header {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d) !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
    box-shadow: 
        inset 1px 1px 0 #4a4a4a,
        inset -1px -1px 0 #1a1a1a !important;
}

html.color-scheme-dark .split-layout.no-selection .sortable-header:hover {
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a) !important;
}

html.color-scheme-dark .split-layout.no-selection .list-header-status,
html.color-scheme-dark .split-layout.no-selection .list-header-title,
html.color-scheme-dark .split-layout.no-selection .list-header-modified {
    border-left-color: #4a4a4a !important;
}

/* Green screen mode styles for column headers */
html.color-scheme-greenscreen .split-layout.no-selection .record-list-header {
    background: #0d3d0d !important;
    background-image: none !important;
    border: 1px solid #1a5a1a !important;
    border-style: solid !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .split-layout.no-selection .sortable-header:hover {
    background: #1a5a1a !important;
    background-image: none !important;
}

html.color-scheme-greenscreen .split-layout.no-selection .list-header-status,
html.color-scheme-greenscreen .split-layout.no-selection .list-header-title,
html.color-scheme-greenscreen .split-layout.no-selection .list-header-modified {
    border-left-color: #1a5a1a !important;
}

/* Full-width view: show columns */
.split-layout.no-selection .record-list a {
    display: flex;
    align-items: center;
    gap: 0;
}

.split-layout.no-selection .list-item-id {
    flex: 0 0 80px;
    font-weight: bold;
    color: #316AC5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 16px;
}

.split-layout.no-selection .list-item-company {
    flex: 0 0 200px;
    font-weight: bold;
    color: #316AC5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
}

.split-layout.no-selection .list-item-status {
    flex: 0 0 200px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
}

.split-layout.no-selection .list-item-title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
}

.split-layout.no-selection .list-item-modified {
    flex: 0 0 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
    border-left: 1px solid #d0d0d0;
    margin-left: 8px;
    color: #666;
}

/* Normal view: hide company and status columns, show only title */
.split-layout:not(.no-selection) .list-item-id,
.split-layout:not(.no-selection) .list-item-company,
.split-layout:not(.no-selection) .list-item-status,
.split-layout:not(.no-selection) .list-item-modified {
    display: none;
}

.split-layout:not(.no-selection) .list-item-title {
    display: inline;
}

.record-list a:hover,
.record-list a:focus {
    border: 1px outset #c0c0c0;
    background: linear-gradient(to bottom, #f0f0f0, #e8e8e8);
    color: #000000;
    box-shadow: 
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080;
}

.record-list a.active {
    border: 1px inset #c0c0c0;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
    color: #000000;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
    font-weight: bold;
}

/* Dark mode styles for left panel lists */
html.color-scheme-dark .list-column {
    background: #2d2d2d !important;
    border-right-color: #4a4a4a !important;
}

html.color-scheme-dark .record-list {
    background: #2d2d2d !important;
    border-color: #4a4a4a !important;
}

html.color-scheme-dark .record-list a {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: transparent !important;
}

html.color-scheme-dark .record-list a:hover,
html.color-scheme-dark .record-list a:focus {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d) !important;
    color: #e0e0e0 !important;
    border-color: #4a4a4a !important;
}

html.color-scheme-dark .record-list a.active {
    background: linear-gradient(to bottom, #1a3d6b, #0d1f3d) !important;
    color: #e0e0e0 !important;
    border-color: #4a4a4a !important;
}

/* Green Screen color scheme styles */
html.color-scheme-greenscreen body {
    background-color: #0d2d0d !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .app-shell {
    background-color: #0d2d0d !important;
}

html.color-scheme-greenscreen .work-area {
    background: #0d2d0d !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .app-header {
    background: #0d3d0d !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .panel-titlebar {
    background: #0d3d0d !important;
    background-image: none !important;
    color: #00ff00 !important;
    box-shadow: none !important;
    border: 1px solid #1a5a1a !important;
    border-bottom: 1px solid #1a5a1a !important;
    border-style: solid !important;
}

html.color-scheme-greenscreen .panel-titlebar .panel-title {
    color: #00ff00 !important;
    text-shadow: none !important;
}

/* Override inline styles on h3 title elements (company name, person name, etc.) */
html.color-scheme-greenscreen .detail-column h3,
html.color-scheme-greenscreen .panel-body h3 {
    background: #0d3d0d !important;
    background-image: none !important;
    color: #00ff00 !important;
    border: 1px solid #1a5a1a !important;
    border-style: solid !important;
    border-width: 1px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.color-scheme-greenscreen .menu-bar {
    background: #0d3d0d !important;
    border-bottom-color: #1a5a1a !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .submenu {
    background: #0d3d0d !important;
    border-color: #1a5a1a !important;
}

html.color-scheme-greenscreen .submenu a,
html.color-scheme-greenscreen .submenu-label,
html.color-scheme-greenscreen .submenu-button {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .submenu a:hover,
html.color-scheme-greenscreen .submenu a:focus,
html.color-scheme-greenscreen .submenu button:hover,
html.color-scheme-greenscreen .submenu button:focus {
    background: #1a5a1a !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen input[type="text"],
html.color-scheme-greenscreen input[type="email"],
html.color-scheme-greenscreen input[type="password"],
html.color-scheme-greenscreen input[type="number"],
html.color-scheme-greenscreen textarea,
html.color-scheme-greenscreen select {
    background-color: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .panel {
    background: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .panel .function-bar {
    background: #0d3d0d !important;
    border-bottom: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .function-icon {
    background: #0d3d0d !important;
    border: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .function-icon:hover {
    background: #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .function-dropdown {
    background-color: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .function-dropdown:hover {
    border: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .function-dropdown:active {
    border: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .function-dropdown option {
    background: #0d2d0d !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen table {
    background: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen table td,
html.color-scheme-greenscreen table th {
    border: 1px solid #1a5a1a !important;
    color: #00ff00 !important;
    background: #0d2d0d !important;
}

html.color-scheme-greenscreen .panel-body {
    background: #0d2d0d !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .subpanel {
    background: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    border-top-color: #1a5a1a !important;
    border-left-color: #1a5a1a !important;
    border-right-color: #1a5a1a !important;
    border-bottom-color: #1a5a1a !important;
    border-style: solid !important;
    border-width: 1px !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .subpanel-titlebar {
    background: #0d3d0d !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .subpanel-body {
    background: #0d2d0d !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen a {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen a:hover {
    color: #66ff66 !important;
}

html.color-scheme-greenscreen .list-column {
    background: #0d3d0d !important;
    border-right: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .record-list {
    background: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .record-list a {
    background: #0d2d0d !important;
    color: #00ff00 !important;
    border: none !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .record-list a:hover,
html.color-scheme-greenscreen .record-list a:focus {
    background: #1a5a1a !important;
    color: #00ff00 !important;
    border: 1px solid #2d7a2d !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .record-list a.active {
    background: #1a5a1a !important;
    color: #00ff00 !important;
    border: 1px solid #2d7a2d !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .detail-grid dt,
html.color-scheme-greenscreen .detail-grid dd {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .power-button {
    background: #0d3d0d !important;
    border: 1px solid #1a5a1a !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .power-button:hover {
    background: #1a5a1a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .menu-item.disabled .menu-label {
    color: #1a5a1a !important;
}

html.color-scheme-greenscreen .list-item,
html.color-scheme-greenscreen li {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen h1,
html.color-scheme-greenscreen h2,
html.color-scheme-greenscreen h3,
html.color-scheme-greenscreen h4,
html.color-scheme-greenscreen h5,
html.color-scheme-greenscreen h6,
html.color-scheme-greenscreen p,
html.color-scheme-greenscreen div,
html.color-scheme-greenscreen span,
html.color-scheme-greenscreen label {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .panel-title {
    color: #00ff00 !important;
    text-shadow: none !important;
}

html.color-scheme-greenscreen table tbody tr:nth-child(even) {
    background-color: #1a3d1a !important;
}

html.color-scheme-greenscreen table tbody tr:hover {
    background-color: #1a5a1a !important;
}

html.color-scheme-greenscreen .submenu a:hover .submenu-underline,
html.color-scheme-greenscreen .submenu a:focus .submenu-underline,
html.color-scheme-greenscreen .submenu .active a {
    background: #00ff00 !important;
    color: #000000 !important;
}

html.color-scheme-greenscreen .submenu .active a:hover,
html.color-scheme-greenscreen .submenu .active a:focus {
    background: #00ff00 !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .submenu .active a .submenu-underline {
    color: #000000 !important;
    background: #00ff00 !important;
}

html.color-scheme-greenscreen .submenu .active a:hover .submenu-underline,
html.color-scheme-greenscreen .submenu .active a:focus .submenu-underline {
    color: #00ff00 !important;
    background: #00ff00 !important;
}

html.color-scheme-greenscreen .submenu-button:hover .submenu-underline,
html.color-scheme-greenscreen .submenu-button:focus .submenu-underline {
    color: #00ff00 !important;
    background: #1a5a1a !important;
}

html.color-scheme-greenscreen .status-bar {
    border-top: 1px solid #1a5a1a !important;
    background: #0d3d0d !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

/* Disable all 3D effects for green screen */
html.color-scheme-greenscreen * {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Remove all gradients */
html.color-scheme-greenscreen * {
    background-image: none !important;
}

html.color-scheme-greenscreen .panel-titlebar,
html.color-scheme-greenscreen .subpanel-titlebar,
html.color-scheme-greenscreen .app-header,
html.color-scheme-greenscreen .menu-bar,
html.color-scheme-greenscreen .function-bar,
html.color-scheme-greenscreen .function-icon,
html.color-scheme-greenscreen .function-dropdown,
html.color-scheme-greenscreen button,
html.color-scheme-greenscreen input,
html.color-scheme-greenscreen select,
html.color-scheme-greenscreen textarea,
html.color-scheme-greenscreen .record-list a,
html.color-scheme-greenscreen .power-button {
    background-image: none !important;
    background: #0d3d0d !important;
    border-style: solid !important;
    border-width: 1px !important;
}

html.color-scheme-greenscreen .record-list a,
html.color-scheme-greenscreen .panel-body,
html.color-scheme-greenscreen .subpanel-body,
html.color-scheme-greenscreen .work-area,
html.color-scheme-greenscreen body,
html.color-scheme-greenscreen .app-shell {
    background-image: none !important;
    background: #0d2d0d !important;
}

/* Override white backgrounds in green screen mode */
html.color-scheme-greenscreen [style*="background: #ffffff"],
html.color-scheme-greenscreen [style*="background:#ffffff"],
html.color-scheme-greenscreen [style*="background-color: #ffffff"],
html.color-scheme-greenscreen [style*="background-color:#ffffff"] {
    background: #0d2d0d !important;
    background-color: #0d2d0d !important;
    border-color: #1a5a1a !important;
    color: #00ff00 !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .record-list a:hover,
html.color-scheme-greenscreen .record-list a:focus,
html.color-scheme-greenscreen .record-list a.active,
html.color-scheme-greenscreen .function-icon:hover,
html.color-scheme-greenscreen .power-button:hover,
html.color-scheme-greenscreen .submenu a:hover,
html.color-scheme-greenscreen .submenu a:focus {
    background-image: none !important;
    background: #1a5a1a !important;
}

html.color-scheme-greenscreen h1,
html.color-scheme-greenscreen h2,
html.color-scheme-greenscreen h3,
html.color-scheme-greenscreen h4,
html.color-scheme-greenscreen h5,
html.color-scheme-greenscreen h6,
html.color-scheme-greenscreen p,
html.color-scheme-greenscreen div,
html.color-scheme-greenscreen span,
html.color-scheme-greenscreen label,
html.color-scheme-greenscreen dt,
html.color-scheme-greenscreen dd {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .panel-title {
    color: #00ff00 !important;
    text-shadow: none !important;
}

.placeholder {
    font-style: italic;
    color: var(--solaris-grey-dark);
}

.detail-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 6px 12px;
    margin: 0 0 12px;
    font-size: 0.85rem;
}

/* Wider first column for custom fields to avoid label wrapping */
.subpanel .detail-grid {
    grid-template-columns: 260px 1fr;
}

.detail-grid dt {
    font-weight: bold;
    text-transform: uppercase;
    color: #000000;
}

.detail-grid dd {
    margin: 0;
}

.detail-grid dd a {
    color: #0000ff;
    text-decoration: underline;
}

.detail-grid dd a:hover,
.detail-grid dd a:focus {
    color: #ff0000;
    text-decoration: underline;
}

.sub-panel {
    border-top: 1px solid var(--solaris-grey);
    padding-top: 10px;
}

.sub-panel header h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--corvaxa-blue);
}

/* Windows 3.1 style subpanel component */
.subpanel {
    border-width: 2px;
    border-style: solid;
    border-top-color: #ffffff;
    border-left-color: var(--solaris-grey-light);
    border-right-color: var(--solaris-grey-dark);
    border-bottom-color: var(--solaris-grey-dark);
    background: #ffffff;
    margin: 12px 0;
    box-shadow: 
        inset -1px -1px 0 var(--solaris-grey),
        inset 1px 1px 0 var(--solaris-grey-light);
}

.subpanel.collapsed .subpanel-body {
    display: none;
}

.subpanel-titlebar {
    background: var(--corvaxa-blue);
    color: var(--text-light);
    padding: 4px 8px 4px 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--corvaxa-blue-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 18px;
}

.subpanel-titlebar h4,
.subpanel-titlebar h5,
.subpanel-titlebar h6 {
    flex: 1;
    margin: 0;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-light);
}

.subpanel-add-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: 18px;
    margin-left: auto;
    padding: 2px 8px;
    border: 1px outset #c0c0c0;
    background: linear-gradient(to bottom, #f0f0f0, #d4d0c8);
    color: #000000;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
    font-size: 0.75rem; /* Scales with html font-size */
    line-height: 1;
    font-weight: normal;
}

.subpanel-add-link:hover {
    background: linear-gradient(to bottom, #ffffff, #e8e8e8);
    border-color: #808080;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
}

.subpanel-add-link:active {
    border: 1px inset #c0c0c0;
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ffffff;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
}

.subpanel-add-link:focus {
    outline: 1px dotted #000000;
    outline-offset: 1px;
}

.subpanel-add-label {
    display: inline-block;
    line-height: 1;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subpanel-toggle {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
    cursor: pointer;
    padding: 2px 6px;
    margin-left: 4px;
    margin-right: 8px;
    font-size: 0.7rem;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080;
    font-weight: bold;
}

.subpanel-toggle:hover,
.subpanel-toggle:focus {
    background: #d4d0c8;
    border: 2px outset #c0c0c0;
    outline: none;
    box-shadow: 
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080;
}

.subpanel-toggle:active {
    background: #c0c0c0;
    border: 2px inset #c0c0c0;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
}

.subpanel-toggle-icon {
    display: inline-block;
    font-weight: bold;
}

.subpanel-toggle-icon.down::before {
    content: '▼';
}

.subpanel-toggle-icon.up::before {
    content: '▲';
}

.subpanel-body {
    padding: 8px;
    background: #ffffff;
}

.subpanel-body.scrollable {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.subpanel-body.columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.subpanel-body.columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.subpanel-body.columns-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Square widget component (based on subpanel, but fixed size and not collapsible) */
.home-widgets-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 12px 0;
}

.home-widget {
    width: 250px;
    height: 250px;
    border-width: 2px;
    border-style: solid;
    border-top-color: #ffffff;
    border-left-color: var(--solaris-grey-light);
    border-right-color: var(--solaris-grey-dark);
    border-bottom-color: var(--solaris-grey-dark);
    background: #C0C0C0;
    box-shadow: 
        inset -1px -1px 0 var(--solaris-grey),
        inset 1px 1px 0 var(--solaris-grey-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.home-widget-titlebar {
    background: var(--corvaxa-blue);
    color: var(--text-light);
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--corvaxa-blue-light);
    min-height: 32px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.home-widget-titlebar h4,
.home-widget-titlebar h5,
.home-widget-titlebar h6 {
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-light);
}

.home-widget-body {
    padding: 8px;
    background: #C0C0C0;
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-widget-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000000;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.home-widget-link:hover {
    background-color: #f0f0f0;
}

.home-widget-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 8px;
    color: #000000;
}

html.color-scheme-dark .home-widget-icon {
    color: #e0e0e0 !important;
}

html.color-scheme-greenscreen .home-widget-icon {
    filter: grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(70deg) saturate(500%) brightness(1.2);
}

html.color-scheme-dark .home-widget-body {
    background: #2d2d2d !important;
}

html.color-scheme-greenscreen .home-widget-body {
    background: #0d2d0d !important;
}

html.color-scheme-dark .home-widget {
    background: #2d2d2d !important;
    border-color: #4a4a4a !important;
    box-shadow: none !important;
}

html.color-scheme-greenscreen .home-widget {
    background: #0d2d0d !important;
    border: 1px solid #1a5a1a !important;
    border-top-color: #1a5a1a !important;
    border-left-color: #1a5a1a !important;
    border-right-color: #1a5a1a !important;
    border-bottom-color: #1a5a1a !important;
    border-style: solid !important;
    border-width: 1px !important;
    box-shadow: none !important;
}

html.color-scheme-dark .home-widget-label {
    color: #e0e0e0 !important;
}

html.color-scheme-greenscreen .home-widget-label {
    color: #00ff00 !important;
}

html.color-scheme-dark .home-widget-link {
    color: #e0e0e0 !important;
}

html.color-scheme-greenscreen .home-widget-link {
    color: #00ff00 !important;
}

html.color-scheme-dark .home-widget-link:hover {
    background-color: #3a3a3a !important;
}

html.color-scheme-greenscreen .home-widget-link:hover {
    background-color: #1a5a1a !important;
}

.home-widget-label {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    color: #000000;
}

/* Windows 95 style tabs */
.tab-container {
    border: 1px solid #808080;
    background: #c0c0c0;
    margin: 12px 0;
    padding: 2px;
}

.tab-header {
    display: flex;
    background: #c0c0c0;
    padding: 0;
    margin: 0;
    gap: 0;
    border-bottom: 1px solid #808080;
}

.tab-button {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    border-bottom: none;
    padding: 4px 16px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: normal;
    color: #000000;
    text-transform: none;
    position: relative;
    margin: 2px 1px 0 1px;
    min-width: 100px;
    text-align: center;
    font-family: 'MS Sans Serif', 'MS Shell Dlg', sans-serif;
}

.tab-button:hover {
    background: #d4d0c8;
}

.tab-button:active {
    border: 1px inset #c0c0c0;
    background: #c0c0c0;
}

.tab-button.active {
    background: #ffffff;
    border: 1px inset #c0c0c0;
    border-bottom: 1px solid #ffffff;
    margin: 0 1px -1px 1px;
    padding: 5px 16px 6px 16px;
    z-index: 1;
    position: relative;
    font-weight: normal;
}

.tab-content {
    display: none;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #808080;
    margin-top: -1px;
}

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

.subpanel-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 2px outset #c0c0c0;
    background: #ffffff;
    font-size: 0.85rem;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
}

.subpanel-body table thead {
    background: #c0c0c0;
}

.subpanel-body table thead tr {
    border-bottom: 2px inset #808080;
    box-shadow: inset 0 -1px 0 #808080;
}

.subpanel-body table th {
    text-align: left;
    padding: 4px 8px;
    font-weight: bold;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

.subpanel-body table th:last-child {
    border-right: none;
}

.subpanel-body table tbody tr {
    background: #ffffff;
    border-bottom: 1px solid #c0c0c0;
}

.subpanel-body table tbody tr:hover {
    background: #e8e8e8;
}

.subpanel-body table tbody tr:last-child {
    border-bottom: none;
}

.subpanel-body table td {
    padding: 4px 8px;
    border-right: 1px solid #c0c0c0;
    background: inherit;
}

.subpanel-body table td:last-child {
    border-right: none;
}

/* Windows NT-style table for incident lists */
.panel-body table.nt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 2px outset #c0c0c0;
    background: #ffffff;
    font-size: 0.85rem;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
}

.panel-body table.nt-table thead {
    background: #c0c0c0;
}

.panel-body table.nt-table thead tr {
    border-bottom: 2px inset #808080;
    box-shadow: inset 0 -1px 0 #808080;
}

.panel-body table.nt-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: bold;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

.panel-body table.nt-table th:last-child {
    border-right: none;
}

.panel-body table.nt-table tbody tr {
    background: #ffffff;
    border-bottom: 1px solid #c0c0c0;
}

.panel-body table.nt-table tbody tr:hover {
    background: #e8e8e8;
}

.panel-body table.nt-table tbody tr:last-child {
    border-bottom: none;
}

.panel-body table.nt-table td {
    padding: 6px 10px;
    border-right: 1px solid #c0c0c0;
    background: inherit;
}

.panel-body table.nt-table td:last-child {
    border-right: none;
}

.panel-body table.nt-table tbody tr td {
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #c0c0c0;
}

.panel-body table.nt-table tbody tr:first-child td {
    border-top: none;
}

.panel-body table.nt-table a {
    color: #0000ff;
    text-decoration: underline;
}

.panel-body table.nt-table a:hover {
    color: #ff0000;
}

.subpanel-body table td {
    padding: 4px 8px;
}

.subpanel-body table td a {
    color: #0000ff;
    text-decoration: underline;
}

.subpanel-body table td a:hover {
    color: #ff0000;
}

/* Windows NT-style form inputs */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    border: 2px inset #c0c0c0;
    background: #ffffff;
    padding: 3px 4px;
    font-family: inherit;
    font-size: inherit;
    color: #000000;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    outline: 1px dotted #000000;
    outline-offset: -1px;
    border-color: #000000;
}

input[type="text"]:disabled,
input[type="url"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="number"]:disabled,
input[type="date"]:disabled,
input[type="time"]:disabled,
textarea:disabled,
select:disabled {
    background: #c0c0c0;
    color: #808080;
    border: 2px inset #c0c0c0;
}

/* Windows NT-style buttons */
.task-save-button,
.note-submit-button,
button[type="submit"],
button[type="button"]:not(.function-icon):not(.subpanel-toggle):not(.submenu-button) {
    border: 2px outset #c0c0c0;
    background: linear-gradient(to bottom, #f0f0f0, #d4d0c8);
    padding: 4px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    color: #000000;
    cursor: pointer;
    box-shadow: 
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080;
    font-weight: normal;
    text-transform: none;
    white-space: normal;
}

.task-save-button:hover,
.note-submit-button:hover,
button[type="submit"]:hover,
button[type="button"]:not(.function-icon):not(.subpanel-toggle):not(.submenu-button):hover {
    background: linear-gradient(to bottom, #ffffff, #e8e8e8);
    border-color: #808080;
}

.task-save-button:active,
.note-submit-button:active,
button[type="submit"]:active,
button[type="button"]:not(.function-icon):not(.subpanel-toggle):not(.submenu-button):active {
    border: 2px inset #c0c0c0;
    box-shadow: 
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #ffffff;
    background: linear-gradient(to bottom, #d4d0c8, #c0c0c0);
}

.task-save-button:focus,
.note-submit-button:focus,
button[type="submit"]:focus,
button[type="button"]:not(.function-icon):not(.subpanel-toggle):not(.submenu-button):focus {
    outline: 1px dotted #000000;
    outline-offset: 1px;
}

.permission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.permission-list > li {
    margin-bottom: 10px;
    border: 1px solid var(--solaris-grey);
    padding: 6px 8px;
    background: #f9f9f9;
}

.permission-flags {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 0.8rem;
}

.permission-flags li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.note-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.note-list li {
    border-bottom: 1px dashed var(--solaris-grey);
    padding: 6px 0;
}

.note-list li:last-child {
    border-bottom: none;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--solaris-grey-dark);
    margin-bottom: 4px;
}

.note-add-form {
    margin: 0;
    padding: 0;
}

.task-edit-form {
    margin: 0;
    padding: 0;
}

.task-field-edit {
    width: 100%;
}

.task-field-edit select {
    cursor: pointer;
}

/* Funnel Steps - Illuminated Status Lights */
.funnel-steps-container {
    margin-bottom: 16px;
}

.funnel-steps-row {
    display: flex;
    gap: 3px;
    width: 100%;
    padding: 0;
}

.funnel-step-btn {
    flex: 1;
    padding: 8px 8px !important;
    border: 2px solid #808080 !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.funnel-step-label {
    line-height: 1.2;
}

.funnel-step-count {
    font-size: 1.1em;
    line-height: 1;
    font-weight: normal;
}
    position: relative;
    min-width: 0;
    background: #c0c0c0 !important;
}

.funnel-step-inactive {
    background: linear-gradient(to bottom, #a0a0a0, #808080) !important;
    color: #505050 !important;
    border-color: #606060 !important;
    box-shadow: 
        inset 1px 1px 2px rgba(0, 0, 0, 0.3),
        inset -1px -1px 2px rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

.funnel-step-inactive:hover {
    background: linear-gradient(to bottom, #b0b0b0, #909090) !important;
    border-color: #707070 !important;
    color: #606060 !important;
}

.funnel-step-active {
    background: linear-gradient(to bottom, #1a5fab, #0a3d82) !important;
    color: #ffffff !important;
    border-color: #0a3d82 !important;
    box-shadow: 
        inset 0 0 18px rgba(26, 95, 171, 0.9),
        inset 0 0 30px rgba(10, 61, 130, 0.7),
        0 0 12px rgba(10, 61, 130, 0.6),
        0 0 25px rgba(10, 61, 130, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    z-index: 1;
    position: relative;
}

.funnel-step-active:hover {
    background: linear-gradient(to bottom, #2a6fbb, #1a5fab) !important;
    box-shadow: 
        inset 0 0 20px rgba(42, 111, 187, 1),
        inset 0 0 35px rgba(26, 95, 171, 0.8),
        0 0 15px rgba(26, 95, 171, 0.7),
        0 0 30px rgba(26, 95, 171, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.funnel-step-btn:active {
    transform: scale(0.99);
}

.funnel-step-btn.disabled,
.funnel-step-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #cccccc !important;
    color: #666666 !important;
    border-color: #999999 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.funnel-step-btn.disabled:hover,
.funnel-step-btn:disabled:hover {
    background: #cccccc !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Dark mode styles for funnel-step buttons - use same as light mode */
html.color-scheme-dark .funnel-step-active {
    background: linear-gradient(to bottom, #1a5fab, #0a3d82) !important;
    color: #ffffff !important;
    border-color: #0a3d82 !important;
    box-shadow: 
        inset 0 0 18px rgba(26, 95, 171, 0.9),
        inset 0 0 30px rgba(10, 61, 130, 0.7),
        0 0 12px rgba(10, 61, 130, 0.6),
        0 0 25px rgba(10, 61, 130, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    z-index: 1;
    position: relative;
}

html.color-scheme-dark .funnel-step-active:hover {
    background: linear-gradient(to bottom, #2a6fbb, #1a5fab) !important;
    box-shadow: 
        inset 0 0 20px rgba(42, 111, 187, 1),
        inset 0 0 35px rgba(26, 95, 171, 0.8),
        0 0 15px rgba(26, 95, 171, 0.7),
        0 0 30px rgba(26, 95, 171, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

html.color-scheme-dark .funnel-step-inactive {
    background: linear-gradient(to bottom, #a0a0a0, #808080) !important;
    color: #505050 !important;
    border-color: #606060 !important;
    box-shadow: 
        inset 1px 1px 2px rgba(0, 0, 0, 0.3),
        inset -1px -1px 2px rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

html.color-scheme-dark .funnel-step-inactive:hover {
    background: linear-gradient(to bottom, #b0b0b0, #909090) !important;
    border-color: #707070 !important;
    color: #606060 !important;
}

/* Green screen mode styles for funnel-step buttons */
html.color-scheme-greenscreen .funnel-step-active {
    background: linear-gradient(to bottom, #7bff7b, #5af25a) !important;
    color: #0d3d0d !important;
    border-color: #2ea42e !important;
    box-shadow: 
        inset 0 0 18px rgba(123, 255, 123, 0.9),
        inset 0 0 30px rgba(90, 242, 90, 0.7),
        0 0 12px rgba(90, 242, 90, 0.6),
        0 0 25px rgba(90, 242, 90, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
}

html.color-scheme-greenscreen .funnel-step-active:hover {
    background: linear-gradient(to bottom, #8bff8b, #6aff6a) !important;
    box-shadow: 
        inset 0 0 20px rgba(139, 255, 139, 1),
        inset 0 0 35px rgba(106, 255, 106, 0.8),
        0 0 15px rgba(106, 255, 106, 0.7),
        0 0 30px rgba(106, 255, 106, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

html.color-scheme-greenscreen .funnel-step-inactive {
    background: linear-gradient(to bottom, #1a5a1a, #0d3d0d) !important;
    color: #00ff00 !important;
    border-color: #1a5a1a !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.color-scheme-greenscreen .funnel-step-inactive:hover {
    background: linear-gradient(to bottom, #2a7a2a, #1a5a1a) !important;
    border-color: #2a7a2a !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .funnel-step-btn {
    border-color: #1a5a1a !important;
}

/* Green screen mode: system notes background */
html.color-scheme-greenscreen li[style*="background: #d0d0d0"],
html.color-scheme-greenscreen li[style*="background:#d0d0d0"],
html.color-scheme-greenscreen li[style*="background-color: #d0d0d0"],
html.color-scheme-greenscreen li[style*="background-color:#d0d0d0"] {
    background: #0d3d0d !important;
    background-color: #0d3d0d !important;
    color: #00ff00 !important;
}

/* Dark mode styles for accident form fieldsets - placed after other rules to ensure override */
html.color-scheme-dark .accident-form-fieldset,
html.color-scheme-dark .subpanel-body .accident-form-fieldset,
html.color-scheme-dark .panel-body .accident-form-fieldset {
    background: #2d2d2d !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark .accident-form-fieldset legend,
html.color-scheme-dark .subpanel-body .accident-form-fieldset legend,
html.color-scheme-dark .panel-body .accident-form-fieldset legend {
    color: #e0e0e0 !important;
}

/* Green screen mode styles for accident form fieldsets - placed after other rules to ensure override */
html.color-scheme-greenscreen .accident-form-fieldset,
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset,
html.color-scheme-greenscreen .panel-body .accident-form-fieldset {
    background: #0d3d0d !important;
    border-color: #1a5a1a !important;
    border-style: solid !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .accident-form-fieldset legend,
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset legend,
html.color-scheme-greenscreen .panel-body .accident-form-fieldset legend {
    color: #00ff00 !important;
}

/* Override hardcoded background colors inside fieldsets - dark mode */
html.color-scheme-dark .accident-form-fieldset [style*="background: #f5f5f5"],
html.color-scheme-dark .accident-form-fieldset [style*="background:#f5f5f5"],
html.color-scheme-dark .accident-form-fieldset [style*="background-color: #f5f5f5"],
html.color-scheme-dark .accident-form-fieldset [style*="background-color:#f5f5f5"],
html.color-scheme-dark .subpanel-body .accident-form-fieldset [style*="background: #f5f5f5"],
html.color-scheme-dark .subpanel-body .accident-form-fieldset [style*="background:#f5f5f5"],
html.color-scheme-dark .subpanel-body .accident-form-fieldset [style*="background-color: #f5f5f5"],
html.color-scheme-dark .subpanel-body .accident-form-fieldset [style*="background-color:#f5f5f5"] {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark .accident-form-fieldset [style*="color: #666"],
html.color-scheme-dark .accident-form-fieldset [style*="color:#666"],
html.color-scheme-dark .subpanel-body .accident-form-fieldset [style*="color: #666"],
html.color-scheme-dark .subpanel-body .accident-form-fieldset [style*="color:#666"] {
    color: #b0b0b0 !important;
}

/* Override hardcoded background colors inside fieldsets - green screen mode */
html.color-scheme-greenscreen .accident-form-fieldset [style*="background: #f5f5f5"],
html.color-scheme-greenscreen .accident-form-fieldset [style*="background:#f5f5f5"],
html.color-scheme-greenscreen .accident-form-fieldset [style*="background-color: #f5f5f5"],
html.color-scheme-greenscreen .accident-form-fieldset [style*="background-color:#f5f5f5"],
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset [style*="background: #f5f5f5"],
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset [style*="background:#f5f5f5"],
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset [style*="background-color: #f5f5f5"],
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset [style*="background-color:#f5f5f5"] {
    background: #0d3d0d !important;
    background-color: #0d3d0d !important;
    border-color: #1a5a1a !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen .accident-form-fieldset [style*="color: #666"],
html.color-scheme-greenscreen .accident-form-fieldset [style*="color:#666"],
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset [style*="color: #666"],
html.color-scheme-greenscreen .subpanel-body .accident-form-fieldset [style*="color:#666"] {
    color: #00ff00 !important;
}

/* Instructional task wizard styles */
.wizard-step.step-completed {
    border-left: 4px solid #28a745;
    background-color: #f0f9f0;
}

.wizard-step.step-completed .step-input:disabled,
.wizard-step.step-completed .step-checkbox:disabled,
.wizard-step.step-completed .step-photo-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}


.flash-message {
    padding: 8px 12px;
    margin: 0;
    border-bottom: 1px solid var(--solaris-grey-dark);
    font-weight: bold;
    font-size: 0.85rem;
    width: 100%;
    flex-shrink: 0;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Login screen */
.login-screen {
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height on mobile to account for browser UI */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #ffffff 0, var(--solaris-grey-light) 60%, var(--solaris-grey) 100%);
    overflow: hidden; /* Prevent scrolling */
    margin: 0;
    padding: 0;
}

.login-panel {
    width: 320px;
    max-width: 90vw; /* Prevent overflow on small screens */
    padding: 20px;
    border: 2px solid var(--solaris-grey-dark);
    background: #ffffff;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    font-family: 'Lucida Sans Typewriter', 'Lucida Console', Monaco, monospace;
    box-sizing: border-box; /* Include padding in width calculation */
}

.login-panel h1 {
    margin-top: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--corvaxa-blue);
}

.login-panel label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-panel input {
    width: 100%;
    padding: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--solaris-grey-dark);
    background: var(--solaris-grey-light);
    font-family: inherit;
}

.login-panel button {
    width: 100%;
    padding: 8px;
    background: var(--corvaxa-blue);
    color: var(--text-light);
    border: 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-panel button:hover,
.login-panel button:focus {
    background: var(--corvaxa-blue-light);
}

.form-error {
    background: #7f1d1d;
    color: #ffffff;
    padding: 6px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    border: 1px solid #5b0d0d;
}

/* Status Indicator Lights - Illuminated Style */
.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #808080 !important;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.status-indicator.status-active {
    background: linear-gradient(to bottom, #6bb6ff, #4a90e2) !important;
    border-color: #2e6da4 !important;
    box-shadow: 
        inset 0 0 12px rgba(107, 182, 255, 0.9),
        inset 0 0 20px rgba(74, 144, 226, 0.7),
        0 0 8px rgba(74, 144, 226, 0.6),
        0 0 16px rgba(74, 144, 226, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
    animation: pulse-indicator 2s ease-in-out infinite;
}

.status-indicator.status-inactive {
    background: linear-gradient(to bottom, #a0a0a0, #808080) !important;
    border-color: #606060 !important;
    box-shadow: 
        inset 1px 1px 3px rgba(0, 0, 0, 0.4),
        inset -1px -1px 2px rgba(255, 255, 255, 0.1) !important;
}

@keyframes pulse-indicator {
    0%, 100% {
        box-shadow: 
            inset 0 0 12px rgba(107, 182, 255, 0.9),
            inset 0 0 20px rgba(74, 144, 226, 0.7),
            0 0 8px rgba(74, 144, 226, 0.6),
            0 0 16px rgba(74, 144, 226, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            inset 0 0 15px rgba(123, 198, 255, 1),
            inset 0 0 25px rgba(90, 160, 242, 0.8),
            0 0 12px rgba(90, 160, 242, 0.7),
            0 0 20px rgba(90, 160, 242, 0.5),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

/* Asset Photo Modal Metadata Styling */
#asset-photo-modal > div {
    background: #ffffff !important;
}

html.color-scheme-dark #asset-photo-modal > div {
    background: #2d2d2d !important;
    border-color: #4a4a4a !important;
}

html.color-scheme-dark #asset-photo-metadata {
    background: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html.color-scheme-dark #asset-photo-metadata-content {
    color: #e0e0e0 !important;
}

html.color-scheme-dark #asset-photo-metadata-content dt {
    color: #e0e0e0 !important;
}

html.color-scheme-dark #asset-photo-metadata-content dd {
    color: #c0c0c0 !important;
}

html.color-scheme-greenscreen #asset-photo-modal > div {
    background: #0d3d0d !important;
    border-color: #1a5a1a !important;
}

html.color-scheme-greenscreen #asset-photo-metadata {
    background: #0d2d0d !important;
    border-color: #1a5a1a !important;
    color: #00ff00 !important;
}

html.color-scheme-greenscreen #asset-photo-metadata-content {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen #asset-photo-metadata-content dt {
    color: #00ff00 !important;
}

html.color-scheme-greenscreen #asset-photo-metadata-content dd {
    color: #00cc00 !important;
}

