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

/* Login Glass Plate */
.login-glass-plate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.login-glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 50px 60px;
    width: 450px;
    animation: fadeIn 0.5s ease;
}

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

.login-glass-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-glass-header .portal-logo {
    font-size: 64px;
    color: white;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: pulse-logo 3s infinite;
    display: block;
    margin-bottom: 20px;
}

.login-glass-header h1 {
    color: white;
    font-size: 36px;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-glass-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 2px;
}

.login-glass-form h2 {
    color: white;
    font-size: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-input-group label {
    display: block;
    color: white;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.login-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-input-group input:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.login-glass-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.login-glass-btn:active {
    transform: translateY(0);
}

.login-error {
    margin-top: 15px;
    padding: 10px;
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    text-align: center;
    display: none;
}

.login-error.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.login-glass-footer {
    margin-top: 30px;
    text-align: center;
}

.login-glass-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dashboard Top Bar */
.dashboard-bar {
    background: rgba(20, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.portal-logo {
    font-size: 32px;
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    animation: pulse-logo 3s infinite;
}

@keyframes pulse-logo {
    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.6));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(102, 126, 234, 0.8));
    }
}

.portal-text {
    letter-spacing: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-counts {
    display: flex;
    gap: 15px;
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-count-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.count-icon {
    font-size: 14px;
}

.count-label {
    font-size: 11px;
    color: #bbbbbb;
}

.count-number {
    font-size: 14px;
    font-weight: bold;
    color: #4caf50;
    font-family: "Courier New", monospace;
    min-width: 20px;
    text-align: right;
}

.dashboard-datetime {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 180px;
}

.datetime-date {
    font-size: 13px;
    color: #bbbbbb;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: "Courier New", monospace;
}

.datetime-time {
    font-size: 14px;
    color: white;
    font-weight: bold;
    font-family: "Courier New", monospace;
    letter-spacing: 1px;
}
.datetime-icon {
    font-size: 16px;
    color: white;
}

.dashboard-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dash-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.dash-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-icon {
    font-size: 16px;
}

.dashboard-status-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-status-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.status-badge:hover {
    background: rgba(255, 255, 255, 0.15);
}

.status-icon {
    font-size: 14px;
    cursor: pointer;
}

.status-text {
    font-size: 12px;
    color: white;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.status-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin: 0 4px;
}

.status-badge-large {
    padding: 6px 15px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}

.badge-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.badge-row.clickable {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.badge-row.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
}

#connectivityRow,
#mtlsRow,
#connectionTypeRow {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

#connectivityRow:hover,
#mtlsRow:hover,
#connectionTypeRow:hover {
    background: rgba(255, 255, 255, 0.1);
}

#connectionInfo {
    cursor: default;
}

.badge-row .status-icon {
    font-size: 14px;
    min-width: 16px;
}

.badge-row .status-text {
    font-size: 12px;
}

.status-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

#mtlsStatus {
    cursor: pointer;
}

#mtlsStatus:active {
    transform: scale(0.95);
}

#mtlsStatus.mtls-secured {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

#mtlsStatus.mtls-unsecured {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.2);
}

#connectivityStatus {
    cursor: pointer;
}

#connectivityStatus:active {
    transform: scale(0.95);
}

#connectionType {
    cursor: pointer;
}

#connectionType:active {
    transform: scale(0.95);
}

#connectionType.mobile {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.2);
}

#connectionType.web {
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.2);
}

#connectionType.wifi {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

#connectionType.fiveg {
    border-color: #ff5722;
    background: rgba(255, 87, 34, 0.2);
}

#connectionType.mesh {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
}

.status-badge.online {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

.status-badge.offline {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.2);
}

.status-badge.incidents-active {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 152, 0, 0);
    }
}

.status-icon {
    font-size: 16px;
}

.status-text {
    color: white;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dash-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.dash-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-icon {
    font-size: 16px;
}

/* Main Layout */
.main-layout {
    flex: 1;
    display: flex;
    gap: 15px;
    padding: 15px;
    overflow: hidden;
}

.left-column {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.center-column {
    flex: 1;
    display: flex;
}

.right-column {
    width: 350px;
    display: flex;
    flex-direction: column;
}

/* Bottom Events Bar */
.bottom-bar {
    background: rgba(20, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.status-bar-container {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.bottom-action-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.bottom-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.bottom-action-btn.logout-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.bottom-action-btn.logout-btn:hover {
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.5);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.bottom-action-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.incidents-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    height: 100%;
}

.incidents-list-vertical .event-item {
    flex-shrink: 0;
}

.events-widget {
    height: 100%;
}

.events-list-horizontal {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
}

.events-list-horizontal .event-item {
    min-width: 300px;
    flex-shrink: 0;
}

/* Widget Styles */
.widget {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.fixed-widget {
    flex: 1;
}

.toggle-widget {
    animation: slideIn 0.3s;
    position: absolute;
    min-width: 300px;
    min-height: 200px;
    z-index: 100;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    cursor: move;
}

.widget-title {
    font-weight: bold;
    font-size: 14px;
}

.widget-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.3s;
}

.widget-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.widget-content {
    flex: 1;
    padding: 15px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 50%,
        #667eea 50%,
        #667eea 100%
    );
    border-bottom-right-radius: 10px;
    z-index: 10;
}

.resize-handle:hover {
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 50%,
        #764ba2 50%,
        #764ba2 100%
    );
}

.resize-handle::after {
    content: "⋮⋮";
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 8px;
    color: white;
    line-height: 0.8;
    transform: rotate(-45deg);
}

/* Map Widget */
.map-widget-container {
    width: 100%;
}

.map-widget-container .widget-content {
    padding: 0;
}

#map {
    width: 100%;
    height: 100%;
}

/* Chat Widget */
#chatWidget .widget-content {
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    animation: messageSlide 0.3s;
}

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

.chat-message.system {
    background: #e3f2fd;
    color: #1976d2;
    font-style: italic;
}

.chat-message.user {
    background: #f3e5f5;
    color: #7b1fa2;
}

.chat-message.alert {
    background: #ffebee;
    color: #c62828;
    font-weight: bold;
}

.chat-input {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.chat-input button {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Search Widget */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-box button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.search-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.search-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13px;
}

.search-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.source-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.source-item input[type="checkbox"] {
    cursor: pointer;
}

/* Indexing Status */
.indexing-status {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.indexing-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.indexing-icon {
    font-size: 16px;
}

.indexing-title {
    font-weight: bold;
    font-size: 13px;
    color: #333;
}

.indexing-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.index-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.index-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.index-icon {
    font-size: 14px;
}

.index-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.index-progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.index-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.index-progress-fill.complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.index-progress-fill.indexing {
    animation: pulse-progress 1.5s infinite;
}

@keyframes pulse-progress {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.index-count {
    font-size: 11px;
    color: #666;
    font-family: "Courier New", monospace;
    font-weight: bold;
    min-width: 45px;
    text-align: right;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result {
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.search-result:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-type {
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.result-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.result-preview {
    font-size: 12px;
    color: #666;
}

/* Files Widget */
.file-upload {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.file-upload input[type="file"] {
    flex: 1;
    font-size: 13px;
}

.file-upload button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.file-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.file-icon {
    font-size: 24px;
}

.file-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.file-size {
    color: #666;
    font-size: 12px;
}

.file-action {
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

/* Push-to-Talk Widget */
.ptt-controls {
    text-align: center;
}

.ptt-mode {
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.ptt-mode label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13px;
}

.ptt-button-container {
    margin: 15px 0;
}

.ptt-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.ptt-button:hover {
    transform: scale(1.05);
}

.ptt-button.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 12px 32px rgba(239, 68, 68, 0.8);
    }
}

.ptt-icon {
    font-size: 32px;
}

.ptt-text {
    margin-top: 8px;
    font-size: 11px;
    font-weight: bold;
}

.transcription-box {
    margin-top: 15px;
}

.transcription-box h3 {
    margin-bottom: 10px;
    font-size: 13px;
    color: #333;
}

.transcription-text {
    min-height: 60px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    font-family: "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
}

.transcription-interim {
    color: #999;
    font-style: italic;
}

/* Geofencing Widget */
.geofence-config {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.config-group {
    margin-bottom: 12px;
}

.config-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 12px;
}

.config-group select,
.config-group input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.config-group input[type="range"] {
    padding: 0;
}

#radiusValue {
    color: #667eea;
    font-weight: bold;
}

.geofence-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
}

.geofence-btn:hover {
    transform: scale(1.02);
}

.geofence-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.geofence-status,
.geofence-distance {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.status-label,
.distance-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.status-text {
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.status-text.active {
    color: #4caf50;
}

.status-text.inside {
    color: #2196f3;
}

.status-text.outside {
    color: #f44336;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,
    50%,
    100% {
        opacity: 1;
    }
    25%,
    75% {
        opacity: 0.5;
    }
}

.distance-text {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
    font-family: "Courier New", monospace;
}

/* User/Teams Widget */
.user-login {
    text-align: center;
    padding: 20px;
}

.user-login h3 {
    margin-bottom: 20px;
    color: #333;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.login-btn {
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.user-profile {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.profile-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.profile-info {
    flex: 1;
}

.profile-info h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: #4caf50;
    box-shadow: 0 0 8px #4caf50;
}

.status-away {
    background: #ff9800;
    box-shadow: 0 0 8px #ff9800;
}

.status-busy {
    background: #f44336;
    box-shadow: 0 0 8px #f44336;
}

.status-offline {
    background: #9e9e9e;
}

.user-status span {
    font-size: 13px;
    color: #666;
}

.user-role {
    display: inline-block;
    padding: 4px 12px;
    background: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: #667eea;
    border: 1px solid #667eea;
}

.profile-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px;
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

.logout-btn {
    border-color: #f44336;
    color: #f44336;
}

.logout-btn:hover {
    background: #f44336;
    color: white;
}

.teams-section,
.team-members-section {
    margin-bottom: 15px;
}

.teams-section h3,
.team-members-section h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.teams-list,
.members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-item {
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.team-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.team-item.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.team-name {
    font-weight: bold;
    color: #333;
    font-size: 13px;
    margin-bottom: 4px;
}

.team-members-count {
    font-size: 11px;
    color: #666;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.member-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
    color: #333;
    font-size: 13px;
    margin-bottom: 2px;
}

.member-role {
    font-size: 11px;
    color: #666;
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Cameras Widget */
.cameras-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.camera-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.camera-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.camera-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.cameras-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.camera-item {
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.camera-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.camera-item.active {
    border-color: #4caf50;
    background: #e8f5e9;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.camera-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.camera-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.camera-status.online {
    background: #e8f5e9;
    color: #4caf50;
}

.camera-status.offline {
    background: #ffebee;
    color: #f44336;
}

.camera-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.camera-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.camera-action-btn {
    flex: 1;
    padding: 6px;
    background: #f8f9fa;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.3s;
}

.camera-action-btn:hover {
    background: #667eea;
    color: white;
}

/* Import/Export Widget */
.io-section {
    margin-bottom: 20px;
}

.io-section h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.io-section p {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.io-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.io-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.io-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.io-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.io-btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.io-stats,
.io-info {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.io-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

/* Map Layer Widget */
.layer-section {
    margin-bottom: 20px;
}

.layer-section h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
}

.layer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.layer-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.layer-item input[type="checkbox"],
.layer-item input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.layer-name {
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.layer-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

/* Camera Popup Styles */
.leaflet-popup-content {
    margin: 0;
    padding: 0;
    min-width: 320px;
}

.camera-popup {
    padding: 0;
}

.camera-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 14px;
}

.camera-feed {
    width: 320px;
    height: 240px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.camera-feed img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-feed-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-size: 48px;
}

.camera-popup-info {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.camera-popup-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.camera-popup-location {
    font-size: 11px;
    color: #999;
}

.camera-feed-live {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f44336;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    animation: pulse-live 2s infinite;
}

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

/* Events/Incidents Widget */
.event-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.event-item.event-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.event-item.event-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.event-item.event-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.event-item.event-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.event-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-time {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    font-family: "Courier New", monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.event-icon {
    font-size: 20px;
    min-width: 24px;
}

.event-title {
    font-weight: bold;
    color: #333;
    font-size: 13px;
    flex: 1;
}

.event-location {
    font-size: 12px;
    color: #555;
    font-weight: 500;
    padding-left: 34px;
}

.event-coordinates {
    font-size: 10px;
    color: #999;
    font-family: "Courier New", monospace;
    padding-left: 34px;
}

.event-details {
    flex: 1;
}

.event-description {
    font-size: 11px;
    color: #666;
    font-family: "Courier New", monospace;
}

/* Leaflet Draw Controls Styling */
.leaflet-draw-toolbar a {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #667eea !important;
    transition: all 0.3s;
}

.leaflet-draw-toolbar a:hover {
    background-color: #667eea !important;
    transform: scale(1.1);
}

.leaflet-draw-actions a {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #667eea !important;
    color: #667eea !important;
    font-weight: bold;
}

.leaflet-draw-actions a:hover {
    background-color: #667eea !important;
    color: white !important;
}

.leaflet-draw-toolbar .leaflet-draw-draw-polyline {
    background-position: center !important;
}

.leaflet-draw-section {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-draw-tooltip {
    background: rgba(102, 126, 234, 0.95) !important;
    border: 2px solid white !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-draw-tooltip-single {
    margin-top: -12px !important;
}

.leaflet-draw-tooltip:before {
    border-top-color: rgba(102, 126, 234, 0.95) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Skins Widget */
.skins-section {
    margin-bottom: 20px;
}

.skins-section h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.skins-section p {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.skins-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.skin-item {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s;
    background: white;
}

.skin-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.skin-preview {
    width: 100%;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.skin-preview-top {
    height: 15px;
    background: #667eea;
}

.skin-preview-content {
    display: flex;
    height: 85px;
}

.skin-preview-left,
.skin-preview-right {
    width: 30%;
    background: #f0f0f0;
}

.skin-preview-center {
    flex: 1;
    background: #e8e8e8;
}

.skin-dark .skin-preview-top {
    background: #1a1a1a;
}

.skin-dark .skin-preview-left,
.skin-dark .skin-preview-right {
    background: #2a2a2a;
}

.skin-dark .skin-preview-center {
    background: #333333;
}

.skin-tactical .skin-preview-center {
    width: 100%;
}

.skin-compact .skin-preview-left {
    display: none;
}

.skin-name {
    font-weight: bold;
    font-size: 13px;
    color: #333;
    margin-bottom: 3px;
}

.skin-description {
    font-size: 11px;
    color: #666;
}

.current-skin-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.current-skin-icon {
    font-size: 24px;
}

.current-skin-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

/* Mobile Device View */
body.mobile-device-view {
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

body.mobile-device-view::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 50%, #34495e 0%, #2c3e50 100%);
    z-index: -1;
}

body.mobile-device-view > * {
    transform-origin: top center;
}

/* iPhone Frame */
body.mobile-device-view::after {
    content: "";
    position: fixed;
    width: 375px;
    height: 812px;
    border: 12px solid #1a1a1a;
    border-radius: 50px;
    box-shadow:
        0 0 0 2px #333,
        0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 999999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Notch */
body.mobile-device-view .dashboard-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10000;
}

/* Scale content to fit in mobile view */
body.mobile-device-view {
    transform: scale(0.46);
    transform-origin: center center;
    width: 815px;
    height: 1765px;
    margin: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.46);
}

/* Adjust for mobile viewport */
body.mobile-device-view .main-layout {
    flex-direction: column;
    gap: 0;
    padding: 10px;
    max-width: 100%;
    overflow: hidden;
}

/* Hide search widget in mobile view */
body.mobile-device-view #searchWidget {
    display: none !important;
}

/* Hide incidents list in mobile view */
body.mobile-device-view .right-column {
    display: none !important;
}

/* Adjust left column to only show chat */
body.mobile-device-view .left-column {
    width: 100%;
    height: 200px;
    min-height: 200px;
}

/* Make chat more compact in mobile */
body.mobile-device-view #chatWidget {
    height: 100%;
}

body.mobile-device-view #chatWidget .chat-messages {
    font-size: 11px;
}

body.mobile-device-view #chatWidget .chat-input input {
    font-size: 12px;
}

/* Make map take more space */
body.mobile-device-view .center-column {
    flex: 1;
    min-height: 300px;
    max-height: 400px;
}

/* Simplify dashboard in mobile */
body.mobile-device-view .dashboard-buttons {
    display: none;
}

body.mobile-device-view .user-counts {
    display: none;
}

body.mobile-device-view .dashboard-datetime {
    font-size: 11px;
}

body.mobile-device-view .dashboard-title {
    font-size: 16px;
}

body.mobile-device-view .portal-logo {
    font-size: 24px;
}

/* Hide bottom bar in mobile */
body.mobile-device-view .bottom-bar {
    display: none;
}
