/* ACARS MONITOR V4 - Clean Professional Design */

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

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

body {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    background: #0d1117;
    color: #e6edf3;
    min-height: 100vh;
    line-height: 1.4;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ========================================
   TOP BAR - Compact toolbar
   ======================================== */
.top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #161b22;
    border-bottom: 1px solid #21262d;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.logo-dot {
    width: 8px;
    height: 8px;
    background: #f0883e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
}

.divider {
    width: 1px;
    height: 20px;
    background: #30363d;
}

/* Date Selector */
.date-selector {
    position: relative;
}

.date-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.date-btn:hover {
    border-color: #f0883e;
}

.date-btn.live {
    border-color: #3fb950;
    color: #3fb950;
}

.date-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 4px;
    display: none;
    z-index: 1000;
    min-width: 140px;
}

.date-dropdown.show {
    display: block;
}

.date-option {
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.date-option:hover {
    background: #21262d;
}

.date-option.active {
    background: #f0883e20;
    color: #f0883e;
}

/* Stats */
.stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8b949e;
}

.stat-value {
    color: #e6edf3;
    font-weight: 600;
}

.stat-label {
    color: #8b949e;
}

/* Search */
.search-box {
    position: relative;
    flex: 1;
    max-width: 200px;
    min-width: 120px;
}

.search-box input {
    width: 100%;
    padding: 6px 10px 6px 28px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
    font-size: 12px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.search-box input:focus {
    outline: none;
    border-color: #f0883e;
}

.search-box::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M11.5 7a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-.82 4.74a6 6 0 1 1 1.06-1.06l3.04 3.04a.75.75 0 1 1-1.06 1.06l-3.04-3.04Z'/%3E%3C/svg%3E") no-repeat center;
}

/* Control Buttons */
.control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #8b949e;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.control-btn:hover {
    border-color: #f0883e;
    color: #e6edf3;
}

.control-btn.active {
    background: #f0883e20;
    border-color: #f0883e;
    color: #f0883e;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #30363d;
    border-radius: 3px;
    font-size: 11px;
}

.connection-status.connected {
    border-color: #3fb950;
    color: #3fb950;
}

.connection-status.disconnected {
    border-color: #f85149;
    color: #f85149;
}

.connection-status.paused {
    border-color: #f0883e;
    color: #f0883e;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Label Filter Dropdown */
.label-filter-container {
    position: relative;
}

.label-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    display: none;
    z-index: 1000;
    width: 360px;
    max-height: 500px;
    overflow-y: auto;
}

.label-dropdown.show {
    display: block;
}

.label-search {
    width: 100%;
    padding: 8px 10px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
    font-size: 12px;
    font-family: inherit;
    margin-bottom: 8px;
}

.label-search:focus {
    outline: none;
    border-color: #f0883e;
}

.label-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #21262d;
}

.label-actions button {
    flex: 1;
    padding: 4px 8px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #8b949e;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.label-actions button:hover {
    background: #30363d;
    color: #e6edf3;
}

.label-list {
    max-height: 350px;
    overflow-y: auto;
}

.label-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
}

.label-item:hover {
    background: #21262d;
}

.label-item.hidden {
    display: none;
}

.label-checkbox {
    cursor: pointer;
}

.label-code {
    font-weight: 600;
    color: #f0883e;
    min-width: 28px;
}

.label-name {
    flex: 1;
    font-size: 12px;
    color: #8b949e;
}

.label-count {
    padding: 2px 6px;
    background: #21262d;
    border-radius: 10px;
    font-size: 11px;
    color: #8b949e;
    min-width: 24px;
    text-align: center;
}

.label-count.active {
    background: #f0883e30;
    color: #f0883e;
}

/* ========================================
   KEYWORDS BAR
   ======================================== */
.keywords-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #161b22;
    border-bottom: 1px solid #21262d;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 3px;
    font-size: 11px;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.keyword-chip:hover {
    border-color: #f0883e;
    color: #e6edf3;
}

.keyword-chip.active {
    background: #f0883e20;
    border-color: #f0883e;
    color: #f0883e;
}

.keyword-chip.alert {
    background: #f8514920;
    border-color: #f85149;
    color: #f85149;
    animation: alert-pulse 2s infinite;
}

@keyframes alert-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.keyword-chip .count {
    padding: 1px 5px;
    background: rgba(0,0,0,0.3);
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
}

.add-keyword-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: transparent;
    border: 1px dashed #30363d;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.15s;
}

.add-keyword-btn:hover {
    border-color: #f0883e;
    border-style: solid;
    color: #f0883e;
}

/* ========================================
   MESSAGES AREA
   ======================================== */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

/* Conversation Card */
.conversation {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.conversation:hover {
    border-color: #30363d;
}

.conversation.new-message {
    border-color: #f0883e;
    box-shadow: 0 0 0 1px #f0883e40;
}

.conversation.alert {
    border-color: #f85149;
    border-left: 3px solid #f85149;
}

.conversation.emergency {
    border-color: #f85149;
    border-left: 3px solid #f85149;
    background: #f8514910;
    animation: emergency-glow 2s infinite;
}

@keyframes emergency-glow {
    0%, 100% { box-shadow: 0 0 0 0 #f8514940; }
    50% { box-shadow: 0 0 8px 2px #f8514940; }
}

.conversation.priority-high {
    border-left: 3px solid #f85149;
}

.conversation.priority-medium {
    border-left: 3px solid #f0883e;
}

/* Conversation Header */
.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    gap: 8px;
    flex-wrap: wrap;
}

.flight-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aircraft-id {
    font-weight: 600;
    color: #f0883e;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s;
}

.aircraft-id:hover {
    color: #ffa657;
    text-decoration: underline;
}

/* Info Badges */
.info-badge {
    padding: 2px 6px;
    background: #21262d;
    border-radius: 3px;
    font-size: 10px;
    color: #8b949e;
}

.info-badge.flight-number {
    background: #f0883e20;
    color: #f0883e;
}

.info-badge.airline-info {
    background: #388bfd20;
    color: #58a6ff;
}

.info-badge.aircraft-type {
    color: #8b949e;
}

.info-badge.message-count {
    color: #8b949e;
}

.new-badge {
    background: #f0883e;
    color: #0d1117;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.alert-badge {
    background: #f85149;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.timestamp {
    color: #8b949e;
    font-size: 11px;
}

/* Messages */
.conv-messages {
    padding: 8px 12px;
}

.message-bubble {
    padding: 8px 10px;
    margin: 4px 0;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    transition: all 0.15s;
}

.message-bubble.just-arrived {
    border-color: #f0883e;
    background: #f0883e10;
}

.message-bubble.dispatcher {
    border-left: 2px solid #f0883e;
    margin-right: 20px;
}

.message-bubble.pilot {
    border-left: 2px solid #3fb950;
    margin-left: 20px;
}

.message-bubble.atc {
    border-left: 2px solid #58a6ff;
}

/* Cockpit Printer Style - Paper effect */
.message-bubble.cockpitprinter {
    font-family: 'Courier New', 'Consolas', monospace !important;
    white-space: pre-wrap;
    word-break: break-word;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px dashed #666 !important;
    border-left: 1px dashed #666 !important;
    width: min(79ch, calc(100% - 24px));
    margin: 12px auto !important;
    padding: 12px 14px !important;
    line-height: 1.4;
    font-size: 12px;
    text-align: left;
    background: 
        repeating-linear-gradient(
            to bottom,
            #ffffff,
            #ffffff 18px,
            #f0f0f0 19px,
            #ffffff 20px
        ) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border-radius: 2px !important;
    box-sizing: border-box;
}

.message-bubble.cockpitprinter .message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: #555;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
}

.message-bubble.cockpitprinter .message-info {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.message-bubble.cockpitprinter .message-time {
    color: #666;
}

.message-bubble.cockpitprinter .message-text {
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
}

.message-bubble.cockpitprinter .message-meta {
    border-top: 1px solid #ccc;
    padding-top: 6px;
    margin-top: 8px;
    color: #555;
}

.message-bubble.cockpitprinter .msg-badge {
    background: #e8e8e8;
    color: #333;
    border: 1px solid #ccc;
}

.message-bubble.cockpitprinter .msg-badge.label {
    background: #ddd;
    color: #000;
    font-weight: bold;
}

.message-bubble.cockpitprinter .msg-label-name {
    color: #555;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    font-size: 11px;
    color: #8b949e;
    gap: 8px;
}

.message-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.msg-badge {
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
}

.msg-badge.category {
    background: #f0883e20;
    color: #f0883e;
}

.msg-badge.label {
    background: #21262d;
    color: #8b949e;
}

.msg-badge.flight {
    background: #388bfd20;
    color: #58a6ff;
}

.msg-badge.freq {
    background: #a371f720;
    color: #a371f7;
}

.msg-badge.station {
    background: #3fb95020;
    color: #3fb950;
}

.msg-badge.level {
    background: #21262d;
    color: #8b949e;
}

.msg-badge.error {
    background: #f8514920;
    color: #f85149;
}

.msg-badge.gps {
    background: #3fb95020;
    color: #3fb950;
}

.msg-badge.alt {
    background: #58a6ff20;
    color: #58a6ff;
}

.msg-badge.dir-up {
    background: #3fb95020;
    color: #3fb950;
}

.msg-badge.dir-dn {
    background: #f0883e20;
    color: #f0883e;
}

.msg-badge.dir-bi {
    background: #58a6ff20;
    color: #58a6ff;
}

.msg-badge.coords {
    background: #00ff8820;
    color: #00ff88;
    font-weight: 600;
}

.msg-label-name {
    color: #8b949e;
    font-size: 11px;
    margin-left: 4px;
}

.message-info {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.message-time {
    color: #8b949e;
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
}

.message-meta {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #21262d;
}

/* Meta badges for message info */
.meta-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid transparent;
}

.meta-category {
    background: rgba(240, 136, 62, 0.15);
    color: #f0883e;
    border-color: #f0883e;
}

.meta-coords {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border-color: #00ff88;
}

.meta-frequency {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
}

.meta-station {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.meta-level {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.meta-error {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.meta-extracted {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.message-text {
    color: #e6edf3;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    font-family: 'SF Mono', 'Consolas', 'Courier New', monospace;
    font-size: 12px;
}

/* ACARS Header/Body structure */
.acars-header {
    color: #58a6ff;
    font-weight: 600;
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid #30363d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acars-body {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Keyword Highlight */
.keyword-highlight {
    background: #f0883e;
    color: #0d1117;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* Expand Button */
.expand-button {
    padding: 8px 12px;
    background: #0d1117;
    border-top: 1px solid #21262d;
    text-align: center;
    font-size: 11px;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.15s;
}

.expand-button:hover {
    background: #161b22;
    color: #f0883e;
}

/* Empty & Loading States */
.loading, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #8b949e;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #30363d;
    border-top-color: #f0883e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state h3 {
    color: #e6edf3;
    margin-bottom: 8px;
}

/* Load More */
.load-more {
    padding: 12px;
    text-align: center;
}

.load-more button {
    padding: 8px 16px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.load-more button:hover {
    background: #30363d;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    width: 100%;
    max-width: 500px;
    margin: 16px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #21262d;
}

.modal-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
}

.close-btn {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.close-btn:hover {
    color: #e6edf3;
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.keyword-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 3px;
    transition: border-color 0.15s;
}

.keyword-item:hover {
    border-color: #30363d;
}

.keyword-item.disabled {
    opacity: 0.5;
}

.keyword-text {
    font-size: 12px;
    font-weight: 500;
    color: #e6edf3;
}

.keyword-controls {
    display: flex;
    gap: 4px;
}

.keyword-toggle, .delete-keyword {
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
    transition: color 0.15s;
}

.keyword-toggle:hover {
    color: #f0883e;
}

.delete-keyword:hover {
    color: #f85149;
}

.add-keyword {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 3px;
}

.add-keyword input {
    flex: 1;
    padding: 8px 10px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
    font-size: 12px;
    font-family: inherit;
}

.add-keyword input:focus {
    outline: none;
    border-color: #f0883e;
}

.add-keyword button {
    padding: 8px 12px;
    background: #f0883e;
    border: none;
    border-radius: 3px;
    color: #0d1117;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.add-keyword button:hover {
    background: #ffa657;
}

.modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #21262d;
}

.save-btn {
    width: 100%;
    padding: 10px;
    background: #238636;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.save-btn:hover {
    background: #2ea043;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .top-bar {
        padding: 8px 12px;
        gap: 8px;
    }

    .logo-text {
        display: none;
    }

    .stats {
        display: none;
    }

    .search-box {
        order: 10;
        flex: 1 1 100%;
        max-width: none;
        margin-top: 8px;
    }

    .divider {
        display: none;
    }

    .control-btn span:not(.status-dot):not(#pauseIcon) {
        display: none;
    }

    /* Keywords scroll collapse */
    .keywords-bar {
        padding: 8px 12px;
        gap: 6px;
        max-height: 120px;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .keywords-bar.collapsed {
        max-height: 36px;
    }

    .keyword-chip {
        font-size: 10px;
        padding: 3px 8px;
    }

    .label-dropdown {
        position: fixed;
        top: 50px;
        left: 8px;
        right: 8px;
        bottom: 60px;
        width: auto;
        max-height: none;
        z-index: 2000;
        overflow: hidden;
    }

    .label-dropdown.show {
        display: flex;
        flex-direction: column;
    }

    .label-dropdown .label-search {
        flex-shrink: 0;
    }

    .label-dropdown .label-actions {
        flex-shrink: 0;
    }

    .label-list {
        flex: 1;
        overflow-y: auto;
        max-height: none;
    }

    .messages-area {
        padding: 8px 12px;
    }

    .conversation {
        margin-bottom: 8px;
    }

    .conv-header {
        padding: 8px 10px;
    }

    .conv-messages {
        padding: 6px 10px;
    }

    .message-bubble {
        padding: 6px 8px;
        font-size: 11px;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .message-bubble.cockpitprinter {
        width: 100%;
        margin: 8px 0;
        font-size: 11px;
    }

    .modal {
        margin: 8px;
    }
}

/* Landscape mode on mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .top-bar {
        padding: 6px 12px;
    }

    .keywords-bar {
        padding: 6px 12px;
        max-height: 80px;
    }

    .keywords-bar.collapsed {
        max-height: 32px;
    }

    .label-dropdown {
        position: fixed;
        top: 40px;
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        max-height: none;
        z-index: 2000;
        overflow: hidden;
    }

    .label-dropdown.show {
        display: flex;
        flex-direction: column;
    }

    .label-search {
        flex-shrink: 0;
    }

    .label-actions {
        flex-shrink: 0;
    }

    .label-list {
        flex: 1;
        overflow-y: auto;
        max-height: none;
    }
}