* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 0;
    color: #fff;
}
.dashboard {
    display: flex;
    min-height: 100vh;
}
.side-menu {
    width: 250px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(0, 217, 255, 0.2);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}
.side-menu.minimized {
    width: 70px;
}
.side-menu.minimized .menu-header h2,
.side-menu.minimized .menu-label {
    display: none;
}
.side-menu.minimized .menu-item {
    justify-content: center;
    padding: 12px 0;
}
.side-menu.minimized .menu-icon {
    font-size: 1.5rem;
}
.side-menu.minimized .toggle-icon {
    transform: rotate(180deg);
}
.menu-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu-header h2 {
    color: #00d9ff;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    transition: opacity 0.3s;
}
.menu-toggle {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 5px;
    color: #00d9ff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.menu-toggle:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: scale(1.1);
}
.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
}
.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 10px;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.menu-item:hover {
    background: rgba(0, 217, 255, 0.1);
}
.menu-item.active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 153, 204, 0.2));
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: #00d9ff;
}
.menu-icon {
    font-size: 1.2rem;
}
.menu-label {
    font-weight: 500;
}
.main-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}
.event-count {
    font-weight: bold;
    color: #00d9ff;
}
.status-bar-buttons {
    display: flex;
    gap: 10px;
}
.secondary-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}
.events-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.events-table th,
.events-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.events-table th {
    background: rgba(0, 217, 255, 0.2);
    font-weight: 600;
    color: #00d9ff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.events-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}
.events-table tr.new-event {
    animation: highlight 2s ease-out;
}
@keyframes highlight {
    0% { background: rgba(0, 255, 136, 0.3); }
    100% { background: transparent; }
}
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    text-align: left;
}
.status-enter_zone {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}
.status-entered_zone {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}
.status-exit_zone {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}
.status-exited_zone {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}
.status-dwell_in_zone {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}
.timestamp {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #aaa;
}
.uuid {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #888;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.no-events {
    text-align: center;
    padding: 50px;
    color: #888;
    font-size: 1.1rem;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.beacons-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.beacons-table th,
.beacons-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.beacons-table th {
    background: rgba(0, 217, 255, 0.2);
    font-weight: 600;
    color: #00d9ff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.beacons-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}
.no-beacons {
    text-align: center;
    padding: 50px;
    color: #888;
    font-size: 1.1rem;
}
.battery-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.battery-high {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}
.battery-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}
.battery-low {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}
.uuid-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #aaa;
}
.refresh-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.4);
}
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}
.filter-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.filter-input:focus {
    border-color: #00d9ff;
}
.filter-select {
    padding: 10px 15px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}
.filter-select option {
    background: #1a1a2e;
    color: #fff;
}
.events-table th {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.events-table th:hover {
    background: rgba(0, 217, 255, 0.3);
}
.sort-icon {
    margin-left: 5px;
    opacity: 0.3;
    font-size: 0.75rem;
}
.sort-icon.active {
    opacity: 1;
    color: #00d9ff;
}
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.dialog-overlay.show {
    display: flex;
}
.dialog {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.dialog h2 {
    color: #ff4444;
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.dialog p {
    color: #aaa;
    margin-bottom: 20px;
}
.dialog-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    outline: none;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.dialog-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.dialog-input:focus {
    border-color: #00d9ff;
}
.dialog-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}
.dialog-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.dialog-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.dialog-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}
.dialog-btn.confirm {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
}
.dialog-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.4);
}
.token-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.token-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}
.copy-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: none;
    border-radius: 5px;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}
