* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
}

:root {
    --mdc-dark-bg: #000000;
    --mdc-dark-text: #ffc857;
}

/* Dark Mode Styles */
body.dark-mode .dispatch-index-box,
body.night-mode .dispatch-index-box {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
    border: 2px solid grey;
}

body.dark-mode .dispatch-detail-box,
body.night-mode .dispatch-detail-box {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
    border: 2px solid grey;
}

body.dark-mode .message-detail-box,
body.night-mode .message-detail-box {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
    border: 2px solid grey;
}

body.dark-mode .message-index-box,
body.night-mode .message-index-box {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
    border: 1px solid grey;
}

body.dark-mode .detail-content,
body.night-mode .detail-content {
    color: var(--mdc-dark-text);
}

body.dark-mode .mdetail-content,
body.night-mode .mdetail-content {
    color: var(--mdc-dark-text);
}

/* Ensure dispatch rows have proper text color in night mode */
body.dark-mode .dispatch-row,
body.night-mode .dispatch-row {
    color: var(--mdc-dark-text);
}

/* Ensure dispatch row cells inherit color properly */
body.dark-mode .dispatch-row > div,
body.night-mode .dispatch-row > div {
    color: inherit;
}

/* REMOVED - This was too broad and affected all elements
   Specific classes are now used for each element instead */

/* Highlight boxes keep their day mode colors in night mode (no override needed) */

/* Night mode: force black text on footer buttons and title bar */
body.dark-mode .footer-btn,
body.night-mode .footer-btn,
body.dark-mode .windows-title-bar,
body.night-mode .windows-title-bar,
body.dark-mode .windows-title-bar *:not(span[data-stack] span:nth-child(2)),
body.night-mode .windows-title-bar *:not(span[data-stack] span:nth-child(2)) {
    color: #000 !important;
}

body.dark-mode #btn-last-form span[data-stack] span,
body.night-mode #btn-last-form span[data-stack] span,
body.dark-mode #switch-index-btn span[data-stack] span,
body.night-mode #switch-index-btn span[data-stack] span {
    color: #6ec0ff !important;
}

body.dark-mode .highlight-box,
body.night-mode .highlight-box,
body.dark-mode .highlight-box-1,
body.night-mode .highlight-box-1,
body.dark-mode .highlight-box-2,
body.night-mode .highlight-box-2,
body.dark-mode .highlight-box-3,
body.night-mode .highlight-box-3,
body.dark-mode .highlight-box-4,
body.night-mode .highlight-box-4 {
    color: #000 !important;
}

/* Force uppercase across the MDC window regardless of Caps Lock */
.mdc-window,
.mdc-window * {
    text-transform: uppercase;
}

html, body {
    height: 100%;
    /* Professional MDC background with subtle gradient */
    background: linear-gradient(135deg, #0d1117 0%, #1a1f2e 40%, #161b22 100%);
    background-attachment: fixed;
    overflow: hidden;
    position: relative;
}

/* Subtle LASD badge watermark in bottom right corner */
body::after {
    content: '';
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: url('../assets/imgs/bg.png') center/contain no-repeat;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Consolas', monospace;
}

/* Windows 11-style Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(32, 32, 32, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 1000;
}

.taskbar-left {
    display: flex;
    align-items: center;
}

.taskbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.taskbar-right {
    display: flex;
    align-items: center;
}

.start-button {
    width: 40px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.start-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.start-icon {
    font-size: 16px;
    font-weight: bold;
}

.taskbar-icon {
    width: 40px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 0 4px;
}

.taskbar-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.taskbar-icon.active {
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid #0078d4;
}

.taskbar-icon-image {
    width: 20px;
    height: 20px;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tray-icon {
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.tray-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Volume icon specific styles for MDC sound control */
.volume-icon {
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.volume-icon:active {
    transform: scale(0.95);
}

/* Logout icon specific styles */
.logout-icon {
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ff6b6b !important;
}

.logout-icon:hover {
    background: rgba(255, 107, 107, 0.2) !important;
    transform: scale(1.1);
}

.logout-icon:active {
    transform: scale(0.95);
}

.system-time {
    color: #ffffff;
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.system-time:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Desktop Icon */
.desktop-icon {
    position: fixed;
    top: 50px;
    left: 50px;
    width: 64px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
    transition: background 0.2s ease;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.icon-image {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
}

.icon-label {
    color: #ffffff;
    font-size: 11px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* MDC Window Container */
.mdc-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
}

/* Windows-style title bar */
.windows-title-bar {
    width: 800px;
    height: 30px;
    background: linear-gradient(to bottom, #e6e6e6, #cccccc);
    border: 1px solid #999999;
    border-bottom: 2px solid #666666;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    font-weight: normal;
    color: #000;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    cursor: move; /* Show move cursor */
    user-select: none; /* Prevent text selection while dragging */
}

.title-icon {
    height: 16px;
    width: 16px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

.title-text {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.title-buttons {
    display: flex;
    gap: 2px;
}

.minimize-btn {
    width: 16px;
    height: 16px;
    background: linear-gradient(to bottom, #e6e6e6, #cccccc);
    border: 1px solid #999999;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    line-height: 1;
}

.minimize-btn:hover {
    background: linear-gradient(to bottom, #d4d4d4, #b8b8b8);
}

.minimize-btn:active {
    background: #aaaaaa;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.close-btn {
    width: 16px;
    height: 16px;
    background: linear-gradient(to bottom, #ff6b6b, #ff5252);
    border: 1px solid #d32f2f;
    color: white;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
}

.close-btn:hover {
    background: linear-gradient(to bottom, #ff5252, #f44336);
}

.close-btn:active {
    background: #d32f2f;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}



/* Changes Summary Styling */
.changes-summary {
    animation: fadeIn 0.5s ease-in;
}

.changes-summary .field-label {
    color: #fff598;
    font-weight: bold;
}

.changes-summary .old-value {
    color: #ff6b6b;
    text-decoration: line-through;
    margin-right: 10px;
}

.changes-summary .new-value {
    color: #4caf50;
    font-weight: bold;
}

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

/* Logout button styling */
.logout-button {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.outline {
    width: 800px;
    height: 640px;
    border: 2px solid rgb(0, 0, 0);
    border-top: none; /* Connect seamlessly with title bar */
    background-color: rgb(0, 0, 0);
    position: relative;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(8, 1fr);
}

.highlight-box {
    position: absolute;
    left: 0;
    top: 80px; /* bottom of row 1 (80px tall) */
    width: 320px; /* columns 1-4 (4 * 80px) */
    height: 12px; /* max height 12px */
    background-color: #fff598; /* yellow-ish */
}

.button-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    width: 100%;
    gap: 0;
    padding: 0;
    height: 100%;
    grid-column: 1 / -1;
    grid-row: 1;
}

.right-column {
    grid-row: 2 / span 7;
    grid-column: 10;
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 0;
    width: 100%;
    height: 100%;
}

.blue-btn {
    background-color: #1e90ff;
    color: #fff;
    border: 2px groove #1565c0;
    padding: 0;
    border-radius: 0;
    font-family: "Lucida Console", "Courier New", monospace; font-size: 13px; font-weight: normal;
    cursor: pointer;
    margin: 0;
    width: 100%;
    height: 100%;
}

.blue-btn:focus,
.blue-btn:focus-visible,
.blue-btn:active {
    outline: none;
    box-shadow: none;
}

/* per-button color overrides for 11–17 */
/* SEND button state colors - ID selector for highest specificity */
#send-btn.btn-red { background-color: #ff3b30 !important; }
#send-btn.btn-green { background-color: #34c759 !important; }
#send-btn.btn-yellow { background-color: #ffd60a !important; color: #000 !important; }
#send-btn.btn-purple { background-color: #8e44ad !important; }

/* Generic button state colors for other buttons */
.btn-red { background-color: #ff3b30 !important; }
.btn-green { background-color: #34c759 !important; }
.btn-yellow { background-color: #ffd60a !important; color: #000 !important; }
.btn-purple { background-color: #8e44ad !important; }

/* New Message button styling */
#btn-new-message {
    background-color: #fff !important;
    color: #000 !important;
}

body.dark-mode #btn-clear-disp span[data-stack="clear-disp"],
body.night-mode #btn-clear-disp span[data-stack="clear-disp"],
body.dark-mode #btn-clear-def span[data-stack="clear-def"],
body.night-mode #btn-clear-def span[data-stack="clear-def"],
body.dark-mode #btn-call-log span[data-stack="call-log"],
body.night-mode #btn-call-log span[data-stack="call-log"],
body.dark-mode #btn-other-functions span[data-stack="other-functions"],
body.night-mode #btn-other-functions span[data-stack="other-functions"] {
    color: #ffffff !important;
}

/* Messages Unread button - separate class, black text in night mode */
.msgs-unread-text {
    color: #000 !important;
}

/* Send button hover effects */
#send-btn.btn-purple:hover {
    background-color: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.4);
    transition: all 0.3s ease;
}

#send-btn.btn-purple:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(142, 68, 173, 0.6);
}

/* thin separators between adjacent buttons only */
.button-row .blue-btn:not(:first-child) {
    border-left: 1px solid #000;
}

.right-column .blue-btn:not(:first-child) {
    border-top: 1px solid #000;
}

/* stacked label for button 1 */
button span[data-stack] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    line-height: 1;
    text-align: center;
}
button span[data-stack] > span {
    display: block;
}

.nowrap { white-space: nowrap; }

.btn-small { font-size: 12px; line-height: 1; }

/* yellow highlight bars under 1–4 and 5–9 */
.highlight-box-1,
.highlight-box-2,
.highlight-box-3,
.highlight-box-4 {
    position: absolute;
    top: 79px; /* align border flush to bottom of top row */
    height: 12px;
    background-color: #fff598;
    border: 1px solid #000;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    text-transform: uppercase;
    font-size: 9px;
    line-height: 10px;
    white-space: nowrap;
    overflow: hidden;
}

.highlight-box-1 { left: 0; width: 320px; top: 79px; }
.highlight-box-2 { left: 319px; width: 398px; top: 79px; }
.highlight-box-3 { left: 0; width: 320px; top: 215px; } /* Moved up to eliminate gap */
.highlight-box-4 { left: 0; width: 320px; top: 397px; } /* Moved up to match new layout */

/* ensure separation between button 10 and 11 */
.button-row .blue-btn:nth-child(10) {
    border-bottom: 1px solid #000;
}

/* Dispatch Index content box (~400 x 120) */
.dispatch-index-box {
    position: absolute;
    left: 0;
    top: 91px; /* flush under highlight bars (no visible gap) */
    width: 320px;
    height: 125px; /* Reduced from 140px to 120px */
    border: 1px solid #000;
    background-color: #fff;
    box-sizing: border-box;
    padding: 0; /* No padding */
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap; /* prevent wrapping inside box */
    overflow-x: auto; /* Enable horizontal scroll for long content */
    overflow-y: hidden; /* Hide vertical scrollbar */
}

#dispatch-index-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0; /* No padding */
    width: max-content; /* allow list to expand with content */
    min-width: 100%; /* maintain minimum width to fill container */
}

/* Message Detail big area (text-focused; loose sizing) */
.message-detail-box {
    position: absolute;
    left: 319px; /* under highlight-box-2 */
    top: 91px;
    width: 398px;
    bottom: 0; /* extend to panel bottom to fill space */
    border: 1px solid #000;
    background-color: #fff;
    box-sizing: border-box;
    padding: 0; /* no padding - handle spacing with inner content */
    overflow: hidden; /* hide overflow on container */
}

.message-detail-box .mdetail-content {
    white-space: pre-wrap; /* preserve newlines, allow wrapping */
    color: #000;
    font-size: 14px;
    line-height: 1.2;
    padding: 8px; /* padding inside scrollable content */
    height: calc(100% - 88px); /* full height minus footer space */
    overflow-y: auto; /* content area handles its own scrolling */
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    cursor: text; /* Show text cursor when hovering */
    caret-color: #000; /* Black blinking cursor */
    outline: none; /* Remove focus outline */
}

.message-detail-box .mdetail-content.mdetail-locked {
    cursor: default;
    background-color: inherit;
}

.message-detail-box .mdetail-content:focus {
    outline: none; /* Keep no outline even when focused */
}

.new-message-form {
    position: absolute;
    top: calc(22% - 60px);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 34%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    pointer-events: auto;
    box-sizing: border-box;
}

.new-message-label {
    font-size: 12px;
    letter-spacing: 1px;
    color: #000;
    text-align: left;
    margin-bottom: 0;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Consolas', monospace;
}

.new-message-box-small {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.92);
    border: none;
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #00ff00;
}

.new-message-box {
    width: 100%;
    flex: 1;
    background: rgba(0, 0, 0, 0.92);
    border: none;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #00ff00;
    resize: vertical;
    min-height: 150px;
}

body.dark-mode .new-message-box,
body.night-mode .new-message-box,
body.dark-mode .new-message-box-small,
body.night-mode .new-message-box-small {
    background: #3c2c63;
    color: #f5f0ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
body.dark-mode .new-message-label,
body.night-mode .new-message-label {
    color: #ffc857;
}

@keyframes overlayPulse {
    0% { opacity: 0; transform: translateX(-50%) scale(0.92); }
    20% { opacity: 1; transform: translateX(-50%) scale(1); }
    60% { opacity: 0.2; }
    100% { opacity: 0; transform: translateX(-50%) scale(1); }
}

.message-detail-box .mdetail-content:empty:before {
    content: '';
    color: transparent; /* Invisible placeholder */
}

/* VEH form */
.veh-form {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    line-height: 1.2;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    height: calc(100% - 88px); /* full height minus footer space */
    overflow-y: auto; /* form handles its own scrolling */
    box-sizing: border-box;
}

/* Dark/Night Mode Support for VEH form */
body.dark-mode .veh-form,
body.night-mode .veh-form,
body.dark-mode .veh-form *:not(input):not(select):not(textarea),
body.night-mode .veh-form *:not(input):not(select):not(textarea) {
    color: var(--mdc-dark-text);
}

.message-detail-box .mdetail-content:focus::after {
    content: '▌';
    display: inline-block;
    margin-left: 4px;
    width: 6px;
    animation: mdetailCursorBlink 1s steps(2, start) infinite;
}

.message-detail-box .mdetail-content:not(:focus)::after {
    display: none;
}

@keyframes mdetailCursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* All forms in message detail box should scroll */
.want-form, .obs-form {
    height: calc(100% - 88px); /* full height minus footer space */
    overflow-y: auto; /* form handles its own scrolling */
    box-sizing: border-box;
}

/* OBS form - compact layout matching reference image */
.obs-form {
    padding: 0;
    display: block;
    font-size: 11px;
    line-height: 1.2;
    font-family: 'Consolas', monospace;
    font-weight: normal;
    color: #000;
}

/* OBS form specific field styling - matching reference image */
.obs-form .veh-label {
    display: inline-block;
    font-weight: bold;
    color: #000;
    font-family: 'Consolas', monospace;
    font-size: 11px;
}

.obs-form .veh-input {
    border: none;
    background: #00a4c5;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: #000;
    padding: 1px 3px;
    height: 18px;
    box-sizing: border-box;
}

.obs-form .veh-row-full {
    margin-bottom: 12px;
    display: block;
}

.obs-form .veh-title-stack {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

/* OBS field groups */
.obs-field-group {
    margin-bottom: 8px;
}

/* OBS labels */
.obs-label {
    display: block;
    font-weight: bold;
    font-size: 10px;
    margin-bottom: 2px;
    color: #000;
    font-family: 'Consolas', monospace;
}

/* OBS inputs - matching reference image styling */
.obs-input {
    display: inline-block;
    border: none;
    background: #00a4c5;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: #000;
    padding: 1px 3px;
    height: 18px;
    box-sizing: border-box;
}

/* Update Call form */
.update-call-form {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 11px;
    line-height: 1.2;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    background: #fff;
}

.form-static-text {
    background: #e9ecef;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.veh-title { 
    font-weight: 700; 
    font-size: 12px;
    margin-right: 8px;
    line-height: 1.1;
}
.veh-title-stack {
    display: flex;
    flex-direction: column;
    margin-right: 8px;
}
.veh-title-stack .veh-title:nth-child(2) {
    padding-left: 8px;
}
.veh-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}
.veh-sub { 
    padding-left: 10px; 
}
.veh-label {
    display: inline-block;
    width: 60px;
    margin-right: 8px;
    white-space: nowrap;
}
.veh-input { 
    border: 1px solid #000; 
    background: #d6ecff; 
    padding: 2px 4px; 
    font-family: "Lucida Console", "Courier New", monospace; font-size: 13px; font-weight: normal; 
    font-size: 11px;
}
.veh-input.one { 
    width: 20px; 
    text-align: center; 
    margin-left: -25px;
}
.veh-input.two {
    width: 22px;
    text-align: center;
    margin-left: -55px;
}
.veh-input.plate {
    width: 80px;
    margin-left: -35px;
}
.veh-input.long {
    width: 200px;
}
.veh-input.make-input {
    width: 60px;
    margin-left: 100px;
}
.veh-input.svrn-input {
    width: 50px;
    margin-left: -15px;
}
.veh-input.unedited-input {
    width: 15px;
    height: 15px;
    text-align: center;
    margin-left: -5px;
}
.veh-input.info-only-input {
    width: 15px;
    height: 15px;
    text-align: center;
    margin-left: 5px;
}
.veh-label.info-only-label {
    margin-left: 20px;
}
.veh-input.dmv-input {
    width: 15px;
    text-align: center;
    margin: 0 4px;
}
.veh-input.vin-input {
    width: 200px;
    margin-left: -20px;
}
.veh-input.eng-input {
    width: 200px;
    margin-left: -20px;
}
.veh-checkbox {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
}
.veh-row { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 4px;
}
.veh-row-full { 
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}
.veh-offset { 
    margin-left: 16px; 
}
.veh-make-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.veh-make-label {
    min-width: 150px;
}
.veh-svrn-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.veh-svrn-label {
    min-width: 60px;
}
.veh-bottom { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-top: 10px; 
}

/* Login Form */
.login-form {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 1.2;
    font-family: 'Consolas', monospace;
}


.login-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
}

.login-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.login-label {
    display: inline-block;
    min-width: 80px;
    margin-right: 4px;
    white-space: nowrap;
}

.login-input {
    border: 1px solid #000;
    background: #d6ecff;
    padding: 2px 4px;
    font-family: "Lucida Console", "Courier New", monospace; font-size: 13px; font-weight: normal;
    font-size: 11px;
    height: 18px;
}

.login-input.unit-input { width: 60px; }
.login-input.shift-input { width: 25px; }
.login-input.date-input { width: 100px; }
.login-input.dispatch-input { width: 25px; }
.login-input.class-input { width: 25px; }
.login-input.time-input { width: 50px; }
.login-input.ot-input { width: 40px; }
.login-input.deputy-input { width: 80px; }
.login-input.password-input { width: 150px; }
.login-input.name-input { width: 300px; }
.login-input.mileage-input { width: 80px; }
.login-input.vehicle-input { width: 80px; }
.login-input.equip-input { width: 80px; }
.login-input.large-input { width: 400px; height: 40px; }
.login-input.radio-input { width: 90px; }
.login-input.port-input { width: 70px; }
.login-input.patrol-input { width: 150px; }

/* Dispatch Detail content box */
.dispatch-detail-box {
    position: absolute;
    left: 0;
    top: 227px; /* moved up to eliminate gap after dispatch index */
    width: 320px;
    height: 170px;
    border: 2px solid #1e90ff; /* blue border to indicate it's interactive */
    background-color: #fff;
    box-sizing: border-box;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    line-height: 1.1;
    white-space: pre-wrap;
    overflow: hidden; /* prevent scrollbar from appearing */
    cursor: pointer; /* show pointer cursor to indicate it's clickable */
    transition: border-color 0.2s ease, box-shadow 0.2s ease; /* smooth transition for hover effects */
}

/* Hover effect for dispatch detail box */
.dispatch-detail-box:hover {
    border-color: #ff6b35; /* orange border on hover */
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.3); /* subtle glow effect */
}

/* Message Index content box */
.message-index-box {
    position: absolute;
    left: 0;
    top: 409px; /* moved up to match highlight-box-4 */
    width: 320px;
    bottom: 48px; /* extend down to the left footer, no gap */
    border: 1px solid #000;
    background-color: #fff;
    box-sizing: border-box;
    padding: 2px; /* reduced padding for more text space */
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    line-height: 1.1;
    white-space: pre-wrap; /* allow wrapping for long text */
    color: #000;
    overflow-y: auto; /* enable vertical scrollbar when content is too long */
    overflow-x: hidden; /* prevent horizontal scrollbar */
}

/* Left footer under Message Index (field + magnifier + arrow) */
.left-footer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 320px;
    height: 48px;
    display: flex;
    gap: 0;
    background: #e9e9e9;
    border: 1px solid #000;
    box-sizing: border-box;
    z-index: 1;
}
.left-footer .lf-field {
    flex: 1 1 0;
    background: #d6ecff;
    border-right: 1px solid #000;
    position: relative;
    z-index: 10;
}

.left-footer .lf-field input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: #000;
    font-size: 12px;
    padding: 4px;
    outline: none;
    z-index: 11;
    position: relative;
}
.left-footer .lf-btn {
    width: 44px;
    background: #d6ecff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #000;
}
.left-footer svg { 
    width: 18px; 
    height: 18px; 
    fill: #000; 
}

.dispatch-row {
    display: grid;
    grid-template-columns: 50px 72px 80px 50px 1fr; /* time, tag, code, status, units - fixed widths for consistent spacing */
    align-items: center;
    gap: 0; /* no gap, we'll use padding instead */
    cursor: pointer;
    min-width: 320px; /* minimum width to match container */
    width: max-content; /* allow row to expand beyond container width */
    margin: 0;
    padding: 2px 0;
}

.dispatch-row > div {
    white-space: nowrap; /* prevent text wrapping, allow horizontal expansion */
    overflow: visible; /* allow content to expand beyond cell boundaries */
    padding-right: 10px; /* default spacing for calls without 3 radio codes */
}

/* Remove padding from the last column (units) */
.dispatch-row > div:last-child {
    padding-right: 0;
}

/* When call has 3 radio codes, use tighter 8px spacing */
.dispatch-row.three-codes > div {
    padding-right: 8px;
}

.dispatch-row.three-codes > div:last-child {
    padding-right: 0;
}

/* Disable special highlight styling for dispatch rows */
#dispatch-index-list .dispatch-row.selected,
#dispatch-index-list .dispatch-row.user-active {
    background: #000000 !important;
    color: #ffffff !important;
}

.dispatch-row.user-attached {
    background-color: #e8f5e9 !important; /* A light green to indicate attachment */
    border-left: 4px solid #4CAF50;
}

body.night-mode .dispatch-row.user-attached {
    background-color: #2c3e50 !important; /* A dark blue/green for night mode */
    border-left: 4px solid #27ae60;
}


/* dispatch detail content formatting */
.detail-content {
    white-space: pre-wrap; /* preserve newlines, allow wrapping */
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 100%;
    overflow: hidden; /* prevent scrollbar - will be overridden for message index */
}

/* Message index specific styling */
.message-index-box .detail-content {
    width: 100%;
    padding: 0 2px; /* minimal padding for full width usage */
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-all; /* break long words if needed */
    overflow-y: auto; /* enable vertical scrollbar when content is too long */
    overflow-x: auto; /* enable horizontal scrollbar when content overflows */
    max-height: 100%; /* ensure it respects container height */
}

/* Message index font size */
pre#message-index-pre.detail-content {
    font-size: 15px; /* smaller font size to fit more messages */
    height: 100%; /* ensure it takes full height of container */
    overflow-y: auto; /* enable vertical scrollbar when content overflows */
    overflow-x: auto; /* enable horizontal scrollbar when content overflows */
    margin: 0; /* remove any default margins */
    padding: 0; /* remove any default padding */
    white-space: pre; /* preserve spacing and prevent text wrapping */
}

/* Message index selection highlighting */
.message-line.selected {
    background: #000000 !important;
    color: #ffffff !important;
}

/* Night mode message index highlighting - using maximum specificity */
body.night-mode .message-line.selected,
.night-mode .message-line.selected,
.message-line.selected.night-mode {
    background: #e8e8e8 !important; /* grey background */
    color: #0066cc !important; /* blue text */
}

/* Night mode dispatch row highlighting - blue over grey */
body.night-mode #dispatch-index-list .dispatch-row.selected,
.night-mode #dispatch-index-list .dispatch-row.selected,
body.night-mode #dispatch-index-list .dispatch-row.user-active,
.night-mode #dispatch-index-list .dispatch-row.user-active {
    background: #e8e8e8 !important;
    color: #0066cc !important;
}

/* Ensure attached style can still override when desired */
body #dispatch-index-list .dispatch-row.user-attached.selected,
body #dispatch-index-list .dispatch-row.user-attached.user-active {
    background: #000000 !important;
    color: #ffffff !important;
}

body.night-mode #dispatch-index-list .dispatch-row.user-attached.selected,
body.night-mode #dispatch-index-list .dispatch-row.user-attached.user-active {
    background: #e8e8e8 !important;
    color: #0066cc !important;
}

/* Night mode message index - consistent with day mode */

body.night-mode .message-index-box .detail-content {
    word-break: normal;
}

body.night-mode pre#message-index-pre.detail-content {
    font-size: 15; /* Keep same font size as day mode */
}

/* Toast Notification System */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #ff4444;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    max-width: 350px;
    word-wrap: break-word;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success {
    background-color: #28a745;
}

.toast-notification.warning {
    background-color: #ffc107;
    color: #212529;
}

.toast-notification.info {
    background-color: #17a2b8;
}

/* Account Linking Modal */
.account-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.account-modal-overlay.show {
    opacity: 1;
}

.account-modal {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: 2px solid #4a90e2;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.account-modal-overlay.show .account-modal {
    transform: scale(1);
}

.account-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.account-modal-title {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.account-modal-subtitle {
    font-size: 16px;
    color: #b8d4ff;
    margin-bottom: 20px;
}

.account-modal-body {
    margin-bottom: 25px;
}

.account-modal-label {
    display: block;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
}

.account-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #333;
    transition: border-color 0.3s ease;
}

.account-modal-input:focus {
    outline: none;
    border-color: #66b3ff;
    box-shadow: 0 0 0 3px rgba(102, 179, 255, 0.2);
}

.account-modal-example {
    font-size: 12px;
    color: #b8d4ff;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

.account-modal-info {
    font-size: 13px;
    color: #e6f2ff;
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border-left: 4px solid #4a90e2;
}

.account-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.account-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-modal-btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.account-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.account-modal-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.account-modal-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}


/* Message read/unread styling */
.message-line {
    font-weight: bold; /* Unread messages are bold */
    padding: 2px 0; /* maintain compact row height */
    margin: 0; /* remove any default margins */
    line-height: 1.1; /* keep compact line height */
    font-size: inherit; /* inherit from parent */
}

.message-line.read {
    font-weight: normal; /* Read messages are normal weight */
    opacity: 0.7; /* Slightly faded to show they've been read */
}

/* Override read opacity when message is selected */
.message-line.read.selected {
    opacity: 1.0 !important; /* Full opacity when selected */
}

/* VEH form disabled fields styling */
.disabled-field {
    cursor: not-allowed !important;
    opacity: 0.6;
    background-color: #f5f5f5 !important;
    color: #999 !important;
}

.disabled-field:hover {
    cursor: not-allowed !important;
}

/* Disabled checkboxes */
input[type="checkbox"].disabled-field {
    cursor: not-allowed !important;
    opacity: 0.6;
}

input[type="checkbox"].disabled-field:hover {
    cursor: not-allowed !important;
}

/* Unread messages button styling */
#btn-unread {
    transition: all 0.3s ease;
}

/* Green button when no unread messages */
#btn-unread.no-unread {
    background-color: #28a745;
    color: white;
}

/* Red/yellow flashing button when unread messages exist */
#btn-unread.has-unread {
    color: white;
    animation: unread-flash 2s infinite alternate;
}

@keyframes unread-flash {
    0% {
        background-color: #dc3545; /* red */
    }
    100% {
        background-color: #ffc107; /* yellow */
    }
}
.detail-content .update { 
    font-weight: 600; 
}

/* footer buttons inside message detail */
.message-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0; /* fill to bottom of panel with no gap */
    height: 48px; /* taller buttons */
    display: flex;
    gap: 0; /* buttons must touch */
    background: #e9e9e9;
    border: 1px solid #000;
    padding: 0;
    box-sizing: border-box;
    z-index: 20; /* above content */
}
.footer-btn {
    background: #d6ecff; /* faint light blue */
    color: #000;
    border: none;
    border-radius: 0;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0; /* stretch to fill, touching edges */
}

/* Footer button separators - adds visual lines around LAST FORM USED */
.footer-btn.footer-separator {
    border-left: 1px solid #000 !important;
    border-right: 1px solid #000 !important;
}
.message-footer span[data-stack] {
    font-size: 12px;
    line-height: 1.05;
    white-space: nowrap;
    gap: 0;
}

#btn-unread span[data-stack="btn-unread"] > span:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Erase Buttons */
.erase-buttons {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 88px; /* Position above the compose input */
    display: none; /* Hidden by default, shown only when forms are active */
    justify-content: center;
    gap: 0px;
    padding: 0px;
    z-index: 20; /* above content */
}

.erase-btn {
    background: #007bff;
    color: white;
    border: 2px solid #0056b3;
    padding: 8px 16px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0;
    min-width: 198px;
    height: 30px;
    text-transform: uppercase;
}

.erase-btn:hover {
    background: #0056b3;
}

.erase-btn:active {
    background: #004085;
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Haptic feedback for all buttons */
.blue-btn:active,
.footer-btn:active,
.erase-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.blue-btn,
.footer-btn,
.erase-btn {
    transition: transform 0.1s ease;
}

/* Field validation styles */
.veh-input.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.veh-input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* Field highlighting */
.field-highlight {
    border-color: #007bff !important;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
    background-color: #f8f9fa !important;
}

/* Recent entries dropdown */
.recent-entries-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-header {
    background: #f8f9fa;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 11px;
    border-bottom: 1px solid #ccc;
}

.recent-entry {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
}

.recent-entry:hover {
    background: #e9ecef;
}

.recent-vin {
    font-weight: bold;
}

.recent-plate {
    color: #6c757d;
}

/* VEH Form Buttons */
.veh-btn {
    background: #007bff;
    color: white;
    border: 2px solid #0056b3;
    padding: 6px 12px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0;
    margin-right: 8px;
    text-transform: uppercase;
    transition: transform 0.1s ease;
}

.veh-btn:hover {
    background: #0056b3;
}

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

.check-plate-btn {
    background: #28a745;
    border-color: #1e7e34;
}

.check-plate-btn:hover {
    background: #1e7e34;
}

.create-call-btn {
    background: #dc3545;
    border-color: #c82333;
}

.create-call-btn:hover {
    background: #c82333;
}



/* compose input above footer */
.message-input {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 48px; /* sits directly above taller footer (no gap) */
    height: 40px; /* slightly taller to tuck under OTHER FUNCTIONS */
    padding: 0 0; /* flush to edges */
    box-sizing: border-box;
    z-index: 20; /* above content */
}
/* Keyframe animation for blinking cursor effect */
@keyframes blink-cursor {
    0%, 49% { border-right-color: #00a4c5; }
    50%, 100% { border-right-color: transparent; }
}

.message-input input {
    width: 100%;
    height: 100%;
    border: 1px solid #000;
    padding: 0 8px;
    border-radius: 0;
    background-color: #fffacd; /* Light yellowish tint */
    text-transform: uppercase; /* Force uppercase input */
    font-family: "Lucida Console", "Courier New", monospace; font-size: 25px; font-weight: normal;
    box-sizing: border-box;
    caret-color: transparent; /* Hide default cursor */
    /* Create custom wide cursor using border */
    border-right: 4px solid #00a4c5;
    padding-right: 4px; /* Adjust padding to compensate */
    animation: blink-cursor 1s step-end infinite;
}

/* Stop animation when input loses focus */
.message-input input:not(:focus) {
    border-right-color: transparent;
    animation: none;
}

/* Hide message-input when new message form is active */
.new-message-active .message-input {
    display: none;
}

.message-input input::selection {
    background-color: #00a4c5;
    color: white;
}

.message-buttons {
    display: flex;
    gap: 8px;
    padding: 4px 8px;
    background: #fff;
    margin-top: 88px; /* Adjusted to align with the compose-input box */
}

.msg-btn {
    background: #d6ecff;
    border: 1px solid #000;
    padding: 4px 8px;
    font-family: "Lucida Console", "Courier New", monospace; font-size: 13px; font-weight: normal;
    cursor: pointer;
    border-radius: 0;
}

/* Page Builder Interface */
#builder-toolbar {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 300px;
    background: #fff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    padding: 10px;
    z-index: 10000;
    max-height: 80vh;
    overflow-y: auto;
}

.builder-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.builder-toolbar button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.builder-toolbar button:hover {
    background: #45a049;
}

.builder-properties {
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 3px;
}

.builder-properties h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.builder-properties h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #4CAF50;
}

.builder-properties label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
}

.builder-properties input {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 11px;
}

.code-output {
    margin-top: 15px;
}

.code-output h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.code-output textarea {
    width: 100%;
    height: 80px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    resize: vertical;
}

.builder-element {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    min-width: 50px;
    min-height: 20px;
}

.builder-element:hover {
    background: rgba(76, 175, 80, 0.1);
}

.builder-element input {
    border: 1px solid #ccc;
    padding: 2px 4px;
    font-size: 11px;
}

/* OBS Form Styles - Match Reference Design */
.obs-layout {
    padding: 10px;
    font-family: monospace;
    background-color: #f0f0f0;
    color: black;
}

.obs-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.obs-label-left {
    font-weight: bold;
    color: black;
    background-color: #f0f0f0;
    padding: 2px 4px;
    min-width: 60px;
    font-size: 12px;
    text-align: left;
}

.obs-label-inline {
    font-weight: bold;
    color: black;
    background-color: #f0f0f0;
    padding: 2px 4px;
    font-size: 12px;
    min-width: auto;
}

.obs-input-cyan {
    background-color: #00bcd4;
    color: black;
    border: 1px solid #00acc1;
    padding: 4px 6px;
    font-family: monospace;
    font-size: 12px;
    height: 24px;
    box-sizing: border-box;
}

.obs-input-cyan:focus {
    outline: none;
    background-color: #26c6da;
    border: 1px solid #0097a7;
}

/* Specific field widths to match reference design */
.obs-location-input {
    flex: 1;
    min-width: 300px;
}

.obs-code1-input,
.obs-code2-input,
.obs-code3-input {
    width: 80px;
}

.obs-veh-input {
    width: 120px;
}

.obs-st-input {
    width: 30px;
}

.obs-lc-input {
    width: 60px;
}

.obs-srch-input {
    width: 60px;
}

.obs-remarks-input {
    min-width: 250px;
}

.obs-line1-input,
.obs-line2-input,
.obs-line3-input,
.obs-line4-input,
.obs-line5-input,
.obs-line6-input {
    flex: 1;
    min-width: 235px;
}

.obs-1097time-input,
.obs-1098time-input {
    width: 80px;
}

.obs-date-input {
    width: 100px;
}

/* Dark mode support for OBS form */
body.dark-mode .obs-layout,
body.night-mode .obs-layout {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
}

body.dark-mode .obs-label-left,
body.dark-mode .obs-label-inline,
body.night-mode .obs-label-left,
body.night-mode .obs-label-inline {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
}

body.dark-mode .obs-input-cyan,
body.night-mode .obs-input-cyan {
    background-color: #00bcd4;
    color: black;
}

body.dark-mode .obs-input-cyan:focus,
body.night-mode .obs-input-cyan:focus {
    background-color: #26c6da;
}

/* Dark mode support for older OBS form styles */
body.dark-mode .obs-form,
body.night-mode .obs-form {
    background-color: var(--mdc-dark-bg);
    color: var(--mdc-dark-text);
}

body.dark-mode .obs-form .veh-label,
body.night-mode .obs-form .veh-label {
    color: var(--mdc-dark-text);
}

body.dark-mode .obs-form .veh-input,
body.night-mode .obs-form .veh-input {
    background: #00a4c5;
    color: black;
}

body.dark-mode .obs-label,
body.night-mode .obs-label {
    color: var(--mdc-dark-text);
}

body.dark-mode .obs-input,
body.night-mode .obs-input {
    background: #00a4c5;
    color: black;
}

body.dark-mode .obs-form .veh-title-stack,
body.night-mode .obs-form .veh-title-stack {
    border-bottom: 1px solid #666;
}

/* Additional comprehensive dark mode overrides with higher specificity */
body.dark-mode .obs-form .veh-label,
body.night-mode .obs-form .veh-label {
    color: var(--mdc-dark-text) !important;
}

body.dark-mode .obs-layout,
body.night-mode .obs-layout {
    color: var(--mdc-dark-text) !important;
}

body.dark-mode .obs-label-left,
body.night-mode .obs-label-left {
    color: var(--mdc-dark-text) !important;
    background-color: var(--mdc-dark-bg) !important;
}

body.dark-mode .obs-label-inline,
body.night-mode .obs-label-inline {
    color: var(--mdc-dark-text) !important;
    background-color: var(--mdc-dark-bg) !important;
}

/* Override any general text in OBS forms */
body.dark-mode .obs-form,
body.dark-mode .obs-form *:not(input),
body.night-mode .obs-form,
body.night-mode .obs-form *:not(input) {
    color: var(--mdc-dark-text) !important;
}

body.night-mode .want-form,
body.night-mode .want-form *:not(input):not(select) {
    color: var(--mdc-dark-text) !important;
}

/* Dark mode input fields in message detail box forms (exclude compose-input) */
body.night-mode .message-detail-box input[type="text"]:not(#compose-input),
body.night-mode .message-detail-box input[type="number"]:not(#compose-input),
body.night-mode .message-detail-box select,
body.night-mode .message-detail-box textarea {
    background-color: #163084 !important;
    color: #fff !important;
    border: none !important;
    border-right: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
}

body.night-mode .message-detail-box input[type="text"]:not(#compose-input):focus,
body.night-mode .message-detail-box input[type="number"]:not(#compose-input):focus,
body.night-mode .message-detail-box select:focus,
body.night-mode .message-detail-box textarea:focus {
    background-color: #3d2a5c !important; /* dark purple */
    color: #fff !important;
    border: none !important;
    border-right: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
    outline: none;
}

/* Universal SEND Flash Animation */
@keyframes sendFlash {
    0% { background-color: inherit; }
    50% { background-color: #ffff00; color: #000; }
    100% { background-color: inherit; }
}

.send-flash {
    animation: sendFlash 0.2s ease-in-out;
}

/* URN Input Focus Enhancement */
.urn-input:focus {
    background-color: #00bcd4 !important;
    outline: 1px solid #ffffff;
}

.urn-input.input-highlight {
    background-color: #00bcd4 !important;
}
/* Clear Dispatch Window button - separate class */
.clear-disp-text {
    color: #fff !important;
}

/* Clear Default Window button - separate class */
.clear-def-text {
    color: #fff !important;
}

/* Call & Log Functions button - separate class */
.call-log-text {
    color: #fff !important;
}

/* Other Functions button - separate class  */
.other-functions-text {
    color: #fff !important;
}

/* New Message button - always black text (button is always white) */
.new-message-text {
    color: #000 !important;
}



/* Dark/Night mode text selection (highlight) */
body.dark-mode ::selection,
body.night-mode ::selection {
    background-color: #e8e8e8 !important;  /* Light greyish background */
    color: #0066cc !important;             /* Blue text */
}

body.dark-mode ::-moz-selection,
body.night-mode ::-moz-selection {
    background-color: #e8e8e8 !important;  /* Light greyish background */
    color: #0066cc !important;             /* Blue text */
}

/* Blank Page title bar - match window content width */
#blank-page-title-bar {
    width: 100%;
}

/* GTA Map - ensure Leaflet map fills container */
#gta-map {
    z-index: 1;
}

#gta-map .leaflet-container {
    background: #93b5cf;
}
