/* Mobile-version av Ljudäxel POC */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

.dispatcher-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Skärmhantering */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* Huvudinnehåll */
.dispatcher-main {
    display: flex;
    flex: 1;
    height: calc(100vh - 80px);
    position: relative;
}

/* Toggle-knapp för vänsterpanel */
.left-panel-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    border-radius: 0 15px 15px 0;
    color: white;
    padding: 15px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.left-panel-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.toggle-arrow {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* När panelen är dold (collapsed), rotera pilen 180 grader */
.left-panel-toggle.collapsed .toggle-arrow {
    transform: rotate(180deg);
}

/* Vänster panel - Kontroller */
.left-panel {
    width: 350px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.left-panel.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-100%);
}

/* Mitten panel - Karta */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Tillåter flex att krympa */
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
}

/* När vänsterpanelen är dold, ge mittenpanelen mer plats */
.dispatcher-main:has(.left-panel.collapsed) .center-panel {
    margin-left: 0;
}

/* Sektioner */
section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

section h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #e0e0e0;
}

/* Kontroller-sektion (vänster panel) */
.controls-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
}

.controls-section h2 {
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #ffffff;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.controls-section h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #e0e0e0;
    text-align: center;
}

.controls-section .ptt-controls,
.controls-section .audio-controls,
.controls-section .group-selector {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Talgruppsväljare */
.group-select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
}

.group-select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.group-select option {
    background: #1a1a2e;
    color: #ffffff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* PTT-kontroller */
.ptt-button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.ptt-button {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, #00ff88, #00d4ff);
    color: #000000;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.ptt-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.ptt-button:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
}

.ptt-button.active {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.ptt-button.disabled {
    background: linear-gradient(45deg, #666, #888);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

.ptt-button.disabled:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.ptt-button.disabled:active {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


.ptt-icon {
    font-size: 2.5rem;
}

.ptt-text {
    font-size: 0.9rem;
    text-align: center;
}

.speaking-info-text {
    font-size: 0.8rem;
    text-align: center;
    color: #ffffff;
    margin-top: 2px;
}

.speaking-info-text.speaking {
    color: #ffff00;
    animation: pulse 1s infinite;
    font-weight: bold;
}

/* Audio status */
.audio-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.status-label {
    font-weight: 500;
    color: #a0a0a0;
}

.status-value {
    font-weight: 600;
    color: #00d4ff;
}

.status-value.connected {
    color: #00ff88;
}

.status-value.disconnected {
    color: #ff6b6b;
}

/* Ljudkontroller */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 500;
    color: #e0e0e0;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 212, 255, 0.3);
}

.control-group span {
    text-align: center;
    font-weight: 600;
    color: #00d4ff;
}

/* Karta */
.map-section {
    flex: 1;
    display: block !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.map-container {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #f0f0f0;
    position: relative;
}

/* Routing markörer */
.route-marker {
    background: transparent;
    border: none;
    font-size: 20px;
}

.start-marker {
    z-index: 1000;
}

.end-marker {
    z-index: 1000;
}

.map-container #map {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Leaflet kartstilar */
.leaflet-container {
    background: #f0f0f0 !important;
    font-family: inherit !important;
}

.leaflet-tile {
    filter: none !important;
}

/* Panel-sektioner */
.panel-section {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.panel-section.hidden {
    display: none;
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.panel-header h2 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0;
}

.panel-content {
    height: calc(100% - 60px);
    overflow-y: auto;
}

/* Menysektion stilar */
.menu-section {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.menu-section.hidden {
    display: none;
}

.status-buttons, .port-buttons {
    margin-bottom: 30px;
}

.status-buttons h3, .port-buttons h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.status-btn {
    padding: 20px 15px;
    border: 2px solid #28a745;
    background: rgba(40, 167, 69, 0.1);
    color: #ffffff;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.port-btn {
    padding: 20px 15px;
    border: 2px solid #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    color: #ffffff;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-btn:hover {
    background: rgba(40, 167, 69, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.port-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.3);
}

.status-btn:active {
    transform: translateY(0);
    background: rgba(40, 167, 69, 0.5);
}

.port-btn:active {
    transform: translateY(0);
    background: rgba(0, 212, 255, 0.5);
}

/* PTT-additional-controls stilar */
.ptt-additional-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ptt-additional-controls h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.control-buttons button {
        width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-buttons button:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.control-buttons button:active {
    transform: translateY(0);
    background: rgba(0, 212, 255, 0.5);
}

/* Logout-kontroller */
.logout-controls {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-controls h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.logout-btn:hover::before {
    left: 100%;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Bottom Navigation */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    padding: 10px 6px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    height: 100px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    color: #00d4ff;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    flex: 1;
    margin: 0 3px;
    position: relative;
    height: 80px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.nav-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.nav-btn-active {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.15) !important;
    border-color: #00d4ff !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3) !important;
}

.nav-btn-status {
    color: #00ff00 !important;
    background: rgba(0, 255, 0, 0.2) !important;
    border-color: #00ff00 !important;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3) !important;
}

.nav-btn-status:hover {
    color: #00cc00 !important;
    background: rgba(0, 255, 0, 0.3) !important;
    border-color: #00cc00 !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5) !important;
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.nav-btn:hover .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Anpassa main content för bottom navigation */
.dispatcher-main {
    padding-bottom: 100px; /* Gör plats för bottom navigation */
}

/* Popup-meddelanden */
.message-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.message-popup.hidden {
    display: none;
}

.message-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.coordinate-message-content {
    max-width: 600px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 15px;
}

.message-header h3 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(1.1);
}

.message-body {
    margin-bottom: 25px;
}

.message-body p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ffffff;
    margin: 0;
}

.coordinates-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.coordinates-info p {
    color: #00d4ff;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin: 0;
}

.message-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.acknowledge-btn, .show-map-btn {
    padding: 12px 25px;
    border: 2px solid #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    color: #ffffff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.acknowledge-btn:hover, .show-map-btn:hover {
    background: rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.show-map-btn {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.2);
}

.show-map-btn:hover {
    background: rgba(0, 255, 136, 0.4);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

/* Modal stilar */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    padding: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.1);
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0;
}

.modal-body {
    flex: 1;
    padding: 20px 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Filer lista */
.files-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.file-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-item:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.file-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.file-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ffffff;
    word-break: break-word;
}

.file-size, .file-date {
    font-size: 0.8rem;
    color: #cccccc;
}

.file-viewer {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.file-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Alarmdetaljer Modal */
.alarm-details {
    max-width: 600px;
    max-height: 80vh;
}

.alarm-details-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.alarm-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alarm-detail-label {
    font-weight: bold;
    color: #333;
    min-width: 120px;
}

.alarm-detail-value {
    color: #666;
    text-align: right;
    flex: 1;
    margin-left: 16px;
}

.alarm-detail-description {
    grid-column: 1 / -1;
    padding: 12px 16px;
    margin: 8px 0;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    font-style: italic;
    color: #856404;
}

.alarm-detail-priority {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alarm-detail-time {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Responsiv design */
@media (max-width: 768px) {
    .left-panel {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
    }
    
    .left-panel.collapsed {
        transform: translateX(-100%);
    }
    
    .dispatcher-main {
        height: calc(100vh - 80px);
    }
    
    .center-panel {
        width: 100%;
    }
    
    .nav-text {
        font-size: 0.7rem;
    }
    
    .nav-icon {
        font-size: 1.2rem;
    }
    
    .message-content {
        padding: 20px;
        margin: 20px;
    }
    
    .message-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .acknowledge-btn, .show-map-btn {
        width: 100%;
    }
    
    .files-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .file-item {
        padding: 10px;
    }
    
    .file-icon {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .status-btn {
        padding: 15px 10px;
        font-size: 0.9rem;
        min-height: 60px;
        border: 2px solid #28a745;
        background: rgba(40, 167, 69, 0.1);
    }
    
    .port-btn {
        padding: 15px 10px;
        font-size: 0.9rem;
        min-height: 60px;
        border: 2px solid #00d4ff;
        background: rgba(0, 212, 255, 0.1);
    }
}

/* Larminfo-panel */
.alarm-info-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-alarms {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 40px 20px;
}

.alarm-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.alarm-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.alarm-item.handled {
    opacity: 0.6;
    border-color: #28a745;
}

.alarm-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.show-position-btn, .alarm-details-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.show-position-btn {
    background: #00d4ff;
    color: white;
}

.show-position-btn:hover {
    background: #0099cc;
    transform: translateY(-1px);
}

.alarm-details-btn {
    background: #6c757d;
    color: white;
}

.alarm-details-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.alarm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alarm-id {
    font-weight: bold;
    color: #00d4ff;
    font-size: 1.1rem;
}

.alarm-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.alarm-status:not(.handled) {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.alarm-status.handled {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

/* Status-panel */
.status-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Port-panel */
.port-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.port-buttons, .tool-buttons {
    margin-bottom: 30px;
}

.port-buttons h3, .tool-buttons h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
}

.tool-buttons .button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tool-btn {
    padding: 15px 20px;
    border: 2px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.tool-btn:hover {
    background: rgba(255, 193, 7, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

/* Alla verktygsknappar använder samma gula färg från .tool-btn */

/* Acknowledge section */
.acknowledge-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.acknowledge-section h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 1.2rem;
}

.acknowledge-section .acknowledge-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #00ff88;
    color: #000;
    min-width: 150px;
}

.acknowledge-section .acknowledge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.status-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.acknowledge-all-btn, .clear-status-btn {
    padding: 10px 15px;
    border: 1px solid #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.acknowledge-all-btn:hover, .clear-status-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.clear-status-btn {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.clear-status-btn:hover {
    background: rgba(220, 53, 69, 0.3);
}

.status-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-status {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 40px 20px;
}

.status-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item.acknowledged {
    opacity: 0.6;
    border-color: #28a745;
}

.status-text {
    flex: 1;
    color: #ffffff;
}

.status-time {
    font-size: 0.8rem;
    color: #a0a0a0;
}

.status-actions {
    display: flex;
    gap: 5px;
}

.status-ack-btn {
    padding: 4px 8px;
    border: 1px solid #28a745;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-ack-btn:hover {
    background: rgba(40, 167, 69, 0.3);
}

/* Hem-panel */
.home-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-info {
    margin-bottom: 30px;
}

.home-info h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.home-info p {
    margin-bottom: 10px;
    color: #ffffff;
}

.home-info span {
    color: #00d4ff;
    font-weight: bold;
}

.home-controls {
    display: flex;
    flex-direction: column;
        gap: 10px;
    }
    
.refresh-status-btn, .test-connection-btn {
    padding: 12px 20px;
    border: 1px solid #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    color: #ffffff;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-status-btn:hover, .test-connection-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.test-connection-btn {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.test-connection-btn:hover {
    background: rgba(40, 167, 69, 0.3);
}

/* VOX-inställningar */
.vox-settings {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vox-settings h4 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.vox-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.vox-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #4CAF50;
}

.vox-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vox-controls .control-group {
    margin-bottom: 8px;
}

.vox-controls label {
    color: #fff;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
}

.vox-controls input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.vox-status {
    margin-top: 8px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    text-align: center;
}

.vox-status-text {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
}

.vox-status-text.active {
    color: #4CAF50;
}

.vox-status-text.speaking {
    color: #FF5722;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}