:root {
    --primary-color: #4f46e5;
    --secondary-color: #818cf8;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-radius: 16px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
    background-image: radial-gradient(circle at top right, #1e293b, #0f172a);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-right: var(--glass-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 40px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

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

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-running {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-stopped {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Controls */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: var(--glass-border);
}

td {
    padding: 16px;
    border-bottom: var(--glass-border);
    color: var(--text-color);
}

tr:last-child td {
    border-bottom: none;
}

/* Map */
#map {
    height: 400px;
    border-radius: 12px;
    margin-top: 20px;
}

/* Printer Select */
.select-wrapper {
    position: relative;
    margin-bottom: 20px;
}

select {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    outline: none;
}

/* Sidebar QR Code */
.sidebar-qr-container {
    margin-top: auto;
    padding: 16px;
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sidebar-qr-container:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.3);
}

.sidebar-qr-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-align: center;
}

.sidebar-qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-qr-text {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.sidebar-qr-image {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 8px;
    background: white;
    padding: 8px;
    transition: transform 0.3s ease;
}

.sidebar-qr-image:hover {
    transform: scale(1.05);
}

/* Utilities */
.hidden {
    display: none;
}