:root {
    --bg-color: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #4f46e5;
    --secondary: #818cf8;
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body>main {
    flex: 1;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
}

.blob-1 {
    top: -100px;
    right: -100px;
}

.blob-2 {
    bottom: -100px;
    left: -100px;
    background: #818cf8;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: #6366f1;
}

/* Navigation */
nav {
    padding: 1.5rem 5%;
    background: rgba(10, 11, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo img {
    width: 32px;
    height: 32px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

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

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

/* Memory Alert Banner */
.memory-alert {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: alertPulse 2s infinite;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.alert-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    animation: alertPulseCritical 1s infinite;
}

@keyframes alertPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes alertPulseCritical {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 5%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

.stat-icon.active {
    color: var(--secondary);
}

.stat-icon.success {
    color: var(--success);
}

.stat-icon.warning {
    color: #f59e0b;
}

.stat-icon.cpu {
    color: #6366f1;
}

.stat-icon.process {
    color: #10b981;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Dashboard Layout */
.dashboard-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    height: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

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

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

th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 16px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e293b;
}

.badge {
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-pass {
    background: rgba(79, 70, 229, 0.1);
    color: var(--secondary);
}

/* Logs */
.logs-container {
    height: 500px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry {
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid transparent;
}

.log-info {
    border-left-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.log-error {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    color: #fda4af;
}

.log-time {
    color: var(--text-muted);
    margin-right: 10px;
    font-size: 0.75rem;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    z-index: 10;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-left: 4px;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.login-btn {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
    min-height: 1.2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn i {
    font-size: 0.8rem;
    color: #38bdf8;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.3s ease-out;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-body {
    padding: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: #f8fafc;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #38bdf8;
}

.input-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

#database-json {
    height: 400px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
}

.save-btn {
    width: 100%;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.badge-linked {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-unlinked {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

@media (max-width: 768px) {
    .nav-actions {
        display: none;
    }
}

/* Database Manager Tabs */
.tab-group {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.db-view {
    display: none;
}

.db-view.active {
    display: block;
}

/* User Grid */
.db-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.db-user-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.3s;
}

.db-user-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.user-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.user-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.user-card-info p {
    font-size: 0.8rem;
    color: #94a3b8;
}

.user-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.card-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.detail-label {
    color: #64748b;
    margin-bottom: 0.25rem;
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    word-break: break-all;
    font-family: 'Courier New', Courier, monospace;
    color: #e2e8f0;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-info {
    font-size: 0.85rem;
    color: #94a3b8;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.page-select:focus {
    border-color: #38bdf8;
}

.users-card .table-container {
    max-height: calc(100vh - 500px);
    overflow-y: auto;
}

/* Footer */
.footer {
    background: rgba(10, 11, 16, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 1.5rem 5%;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-separator {
    color: var(--glass-border);
}

/* Legal Modal Content */
.legal-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.legal-content h3 {
    color: var(--primary);
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
}

.legal-content p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.9rem;
}

.legal-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.9rem;
}

.legal-content li {
    margin-bottom: 0.25rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* User Dashboard */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.control-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.control-buttons-grid .control-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
}

.serial-tag {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0.25rem;
}

.serials-list {
    min-height: 60px;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.serial-input-group {
    display: flex;
    gap: 0.5rem;
}

.serial-input-group input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    color: #f8fafc;
    font-size: 0.9rem;
}

.serial-input-group input:focus {
    outline: none;
    border-color: #38bdf8;
}

.ad-items-list {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    min-height: 50px;
}

.ad-item-tag {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.25rem;
}

.ad-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.ad-stat span:last-child {
    color: #f8fafc;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Control Buttons */
.control-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.control-btn.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.control-btn.success:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.control-btn.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.control-btn.danger:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.control-btn.secondary {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.control-btn.secondary:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.control-btn.primary {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.control-btn.primary:hover {
    background: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked+.slider {
    background-color: var(--success);
    border-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.notification-settings {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-settings h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.notification-settings label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.notification-settings input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Compact Form Layout */
.form-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-group input {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.serial-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.serial-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    font-size: 0.85rem;
}

.serial-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.serial-row .control-btn {
    padding: 0.5rem 0.75rem;
}

/* Compact Cards */
.card.compact {
    padding: 1rem;
    min-height: auto;
}

.card.compact .card-header {
    margin-bottom: 0.75rem;
}

.card.compact .card-header h2 {
    font-size: 0.95rem;
}

/* Compact Form Row */
.form-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    font-size: 0.85rem;
}

.form-row input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Tags Row */
.tags-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tags-row label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
}

.tags-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
}

/* Compact Serial Sniper */
.serial-row.compact {
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.serial-row.compact input {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
}

.serial-row.compact .control-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

.serials-list.compact {
    min-height: 28px;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
}

#user-dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dashboard-container main {
    flex: 1;
}