/* Global Design System */
:root {
    --bg-main: #0a0a0c;
    --bg-card: rgba(25, 25, 30, 0.45);
    --bg-card-hover: rgba(35, 35, 45, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --color-accent: #3b82f6; /* Glowing blue */
    --color-accent-glow: rgba(59, 130, 246, 0.35);
    --color-success: #10b981; /* Neon green */
    --color-success-glow: rgba(16, 185, 129, 0.3);
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444; /* Neon red */
    --color-danger-glow: rgba(239, 68, 68, 0.3);
    --sidebar-width: 280px;
    --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Glassmorphism Card Utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    gap: 8px;
}
.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 15px var(--color-accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2dp);
    box-shadow: 0 0 25px var(--color-accent-glow);
    background: #4f46e5;
}
.btn-success {
    background: var(--color-success);
    color: #fff;
    box-shadow: 0 0 15px var(--color-success-glow);
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px var(--color-success-glow);
}
.btn-danger {
    background: var(--color-danger);
    color: #fff;
    box-shadow: 0 0 15px var(--color-danger-glow);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px var(--color-danger-glow);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Form inputs */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.input-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}
.input-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent-glow);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 10, 12, 0.85);
    border-right: 1px solid var(--border-glass);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
}
.brand-icon {
    font-size: 28px;
    color: var(--color-accent);
    text-shadow: 0 0 15px var(--color-accent-glow);
}
.brand-name {
    font-weight: 800;
    font-size: 20px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}
.nav-item.active a, .nav-item a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-item.active a {
    border-left: 3px solid var(--color-accent);
    border-radius: 0 10px 10px 0;
    background: rgba(59, 130, 246, 0.08);
}
.user-profile {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-weight: 600;
    font-size: 14px;
}
.user-email {
    font-size: 11px;
    color: var(--text-secondary);
}
.logout-btn {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    max-width: 1600px;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.page-title {
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.5px;
}

/* Dashboard Statistics Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1f));
    gap: 20px;
    margin-bottom: 32px;
}
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.stat-icon.primary { background: rgba(59, 130, 246, 0.15); color: var(--color-accent); }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.stat-icon.danger { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-size: 24px;
    font-weight: 700;
}
.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Devices Section */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.device-card {
    position: relative;
    cursor: pointer;
}
.device-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}
.device-status-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.status-online { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.status-offline { background: rgba(156, 163, 175, 0.15); color: var(--text-secondary); }

.device-header {
    margin-bottom: 20px;
}
.device-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.device-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.device-battery {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.battery-icon {
    font-size: 22px;
}
.battery-bar-container {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.battery-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.battery-level-text {
    font-size: 12px;
    font-weight: 600;
}

.device-storage {
    margin-bottom: 16px;
}
.storage-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.storage-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.storage-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: 3px;
}

.device-sync-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Device Details Layout (show.blade.php) */
.device-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 1280px) {
    .device-layout {
        grid-template-columns: 350px 1fr;
    }
}
.device-profile-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.device-tabs-pane {
    display: flex;
    flex-direction: column;
}
.profile-spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.profile-spec-row:last-child {
    border: none;
}
.profile-spec-label {
    color: var(--text-secondary);
}
.profile-spec-value {
    font-weight: 600;
}

/* Tabs System */
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 24px;
    gap: 12px;
}
.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}
.tab-btn:hover, .tab-btn.active {
    color: var(--text-primary);
}
.tab-btn.active {
    border-bottom-color: var(--color-accent);
}

.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Notifications Panel layout */
.notifications-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    height: 600px;
}
@media (min-width: 768px) {
    .notifications-panel {
        grid-template-columns: 240px 1fr;
    }
}
.apps-list-pane {
    border-right: 1px solid var(--border-glass);
    padding-right: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.app-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
    border: 1px solid transparent;
}
.app-list-item:hover, .app-list-item.active {
    background: rgba(255, 255, 255, 0.06);
}
.app-list-item.active {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
}
.app-info-block {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 80%;
}
.app-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
}
.app-icon-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}
.app-list-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
}
.app-list-item.active .app-badge {
    background: var(--color-accent);
}

.notifications-feed-pane {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-left: 4px;
}
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.feed-search-bar {
    width: 100%;
    margin-bottom: 12px;
}
.notification-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    transition: all 0.2s;
}
.notification-card.unread {
    border-left: 3px solid var(--color-accent);
    background: rgba(59, 130, 246, 0.02);
}
.notification-card:hover {
    background: rgba(255, 255, 255, 0.04);
}
.notification-content {
    flex-grow: 1;
}
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.notification-title {
    font-weight: 700;
    font-size: 14px;
}
.notification-time {
    font-size: 10px;
    color: var(--text-secondary);
}
.notification-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}
.notification-subtext {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 4px;
}

/* Gallery Grid Styling */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.gallery-filter-group {
    display: flex;
    gap: 8px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    cursor: pointer;
}
.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-thumb {
    transform: scale(1.08);
}
.gallery-item-video-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 10px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-item-info {
    opacity: 1;
}
.gallery-item-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}
.lightbox-media {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}
.lightbox-info {
    text-align: center;
}
.lightbox-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.lightbox-meta {
    font-size: 12px;
    color: var(--text-secondary);
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Auth Pages (login/register) */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}
.auth-panel {
    width: 100%;
    max-width: 440px;
}
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo {
    font-size: 40px;
    color: var(--color-accent);
    margin-bottom: 12px;
    display: inline-block;
    text-shadow: 0 0 20px var(--color-accent-glow);
}
.auth-title {
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}
.auth-footer a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* Sync Log Table */
.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.log-table th, .log-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.log-table th {
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.15);
}
.log-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}
.log-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}
.log-success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.log-failed { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.log-info { background: rgba(59, 130, 246, 0.15); color: var(--color-accent); }

/* Pairing UI components */
.pairing-code-display {
    background: rgba(59, 130, 246, 0.1);
    border: 1px dashed var(--color-accent);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--color-accent);
    font-family: monospace;
    margin: 20px 0;
    text-shadow: 0 0 10px var(--color-accent-glow);
}

/* User Avatar Styles */
.user-avatar-container {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid var(--border-glass);
    flex-shrink: 0;
}
.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

/* Profile Form Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 1024px) {
    .profile-grid {
        grid-template-columns: 280px 1fr;
    }
}
.avatar-upload-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.profile-avatar-preview {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--border-glass);
    margin-bottom: 20px;
    object-fit: cover;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}
.profile-avatar-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 4px solid var(--border-glass);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Responsive Layout Adjustments */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 10, 12, 0.9);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 101;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.menu-toggle-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: background-color 0.2s;
}
.menu-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-brand .brand-icon {
    font-size: 22px;
    color: var(--color-accent);
}
.mobile-brand .brand-name {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.5px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
}
.sidebar-overlay.active {
    display: block;
}

/* Media Query for Mobile/Tablets */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    .mobile-header {
        display: flex;
    }
    .sidebar {
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        height: 100vh;
        z-index: 100;
        box-shadow: 0 0 40px rgba(0,0,0,0.8);
        background: #0a0a0c;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 24px 16px;
    }
    
    /* Responsive Forms and Tables */
    .form-row, .form-grid, .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    .responsive-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: 8px;
        border: 1px solid var(--border-glass);
    }
    .responsive-table-container .log-table {
        min-width: 600px;
    }
    .devices-grid {
        grid-template-columns: 1fr !important;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .page-header .btn {
        width: 100%;
    }
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

/* Form layouts on desktop can use grid, on mobile stack */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

