/* --- Global Styles & Design System --- */
:root {
    --bg-dark: #090c10;
    --bg-glass: rgba(13, 17, 23, 0.7);
    --border-glass: rgba(56, 139, 253, 0.15);
    --border-glass-hover: rgba(56, 139, 253, 0.4);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --color-primary: #58a6ff;
    --color-primary-hover: #1f6feb;
    --color-online: #39d353;
    --color-offline: #f85149;
    --color-warning: #ffb454;
    --font-stack: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-stack);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Ambient glow backgrounds */
.glow-bg {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.glow-1 {
    background: radial-gradient(circle, #388bfd 0%, rgba(56,139,253,0) 70%);
    top: -200px;
    left: -200px;
}

.glow-2 {
    background: radial-gradient(circle, #bc8cff 0%, rgba(188,140,255,0) 70%);
    bottom: -200px;
    right: -200px;
}

.app-container {
    width: 100%;
    max-width: 1280px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    z-index: 1;
}

/* --- Glassmorphic Card base --- */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 8px 32px 0 rgba(56, 139, 253, 0.1);
}

/* --- Split-Screen Authentication Section --- */
.auth-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    background-color: var(--bg-dark);
}

.auth-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.auth-image-panel {
    flex: 0 0 60%;
    background: url('background.jpeg') no-repeat center center;
    background-size: cover;
    position: relative;
    display: flex;
}

@media (max-width: 820px) {
    .auth-image-panel {
        display: none;
    }
}

.auth-image-overlay {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(9, 12, 16, 0.4) 0%, rgba(9, 12, 16, 0.95) 100%);
    display: flex;
    align-items: center;
    padding: 60px;
}

.auth-image-content {
    max-width: 520px;
}

.auth-image-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-image-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-form-panel {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-dark);
    border-left: 1px solid rgba(240, 246, 252, 0.08);
    position: relative;
}

.auth-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(56, 139, 253, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease;
}

/* --- Logo Image Styles --- */
.logo-container-large {
    margin-bottom: 24px;
    display: inline-block;
}

.logo-img-large {
    height: 54px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 16px rgba(56, 139, 253, 0.5));
}

.logo-container-small {
    display: flex;
    align-items: center;
}

.logo-img-small {
    height: 32px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 8px rgba(56, 139, 253, 0.3));
}

.auth-header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.login-form label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: var(--font-stack);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

/* Button & Spinner Styles */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #1f6feb 0%, #388bfd 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 600;
    padding: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.1s ease, filter 0.2s ease;
}

.btn-primary:hover {
    filter: brightness(1.15);
}

.btn-primary:active {
    transform: scale(0.98);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

/* Errors & Utilities */
.error-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #ff7b72;
}

.hidden {
    display: none !important;
}

/* --- Dashboard Section --- */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    animation: fadeIn 0.4s ease;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-text-small {
    font-size: 1rem;
    color: #fff;
}

.header-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-online);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-online);
    animation: pulse 1.5s infinite;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(240, 246, 252, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.btn-secondary {
    background: rgba(240, 246, 252, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(240, 246, 252, 0.15);
}

.btn-logout {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.2);
    color: #ff7b72;
    font-family: var(--font-stack);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-logout:hover {
    background: rgba(248, 81, 73, 0.25);
}

.refresh-icon {
    display: inline-block;
    transition: transform 0.5s ease;
}

.refresh-loading .refresh-icon {
    animation: spin 1s linear infinite;
}

/* Stats Overview */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.stat-icon-wrap {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(240, 246, 252, 0.05);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

/* Device Fleet Matrix */
.fleet-grid-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header-wrap h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.poll-interval-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.empty-state-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
}

.empty-state-card h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
}

/* --- Device Card Details --- */
.device-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.device-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.device-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.device-id-badge {
    font-family: monospace;
    font-size: 0.75rem;
    background: rgba(240, 246, 252, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.device-id-badge:hover {
    background: rgba(56, 139, 253, 0.15);
}

.device-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-online {
    background: rgba(57, 211, 83, 0.15);
    color: var(--color-online);
    border: 1px solid rgba(57, 211, 83, 0.25);
}

.status-offline {
    background: rgba(248, 81, 73, 0.15);
    color: var(--color-offline);
    border: 1px solid rgba(248, 81, 73, 0.25);
}

/* Telemetry Details */
.device-telemetry-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.telemetry-label {
    color: var(--text-secondary);
}

.telemetry-value {
    font-weight: 500;
}

/* CPU Progress bar wrapper */
.cpu-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cpu-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(240, 246, 252, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: var(--color-primary);
    transition: width 0.5s ease-out, background 0.3s ease;
}

/* Health Rings */
.health-subsystems {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
}

.subsystem-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.health-dot.healthy {
    background-color: var(--color-online);
    box-shadow: 0 0 6px var(--color-online);
}

.health-dot.unhealthy {
    background-color: var(--color-offline);
    box-shadow: 0 0 6px var(--color-offline);
}

.health-dot.warning {
    background-color: var(--color-warning);
    box-shadow: 0 0 6px var(--color-warning);
}

/* Footer of Card */
.device-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(240, 246, 252, 0.05);
    padding-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.btn-action-reboot {
    background: rgba(255, 180, 84, 0.1);
    border: 1px solid rgba(255, 180, 84, 0.2);
    color: var(--color-warning);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-stack);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-action-reboot:hover {
    background: rgba(255, 180, 84, 0.25);
}

.btn-action-reboot:active, .btn-action-ping:active {
    transform: scale(0.96);
}

.btn-action-ping {
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.2);
    color: var(--color-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-stack);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-action-ping:hover {
    background: rgba(56, 139, 253, 0.25);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--color-primary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 999;
    color: var(--text-primary);
    font-size: 0.9rem;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Footer --- */
.dashboard-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 20px 0;
    margin-top: auto;
}

/* --- Animations --- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

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

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

/* --- Navigation Tabs --- */
.dashboard-nav {
    display: flex;
    gap: 8px;
    background: rgba(240, 246, 252, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(240, 246, 252, 0.08);
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-stack);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(240, 246, 252, 0.05);
}

.nav-tab.active {
    color: var(--text-primary);
    background: rgba(56, 139, 253, 0.15);
    border: 1px solid rgba(56, 139, 253, 0.3);
    box-shadow: 0 0 12px rgba(56, 139, 253, 0.15);
}

/* --- Management Grid Layout --- */
.management-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    animation: fadeIn 0.4s ease;
}

.management-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.4s ease;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* --- Tables & Lists --- */
.table-container {
    padding: 12px;
    overflow-x: auto;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.management-table th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(240, 246, 252, 0.1);
}

.management-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(240, 246, 252, 0.05);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.management-table tr:hover td {
    background: rgba(240, 246, 252, 0.02);
}

/* --- Inputs & Buttons in Tables --- */
.btn-action-edit, .btn-action-delete, .btn-action-save, .btn-action-cancel {
    font-family: var(--font-stack);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
}

.btn-action-edit {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    color: var(--color-primary);
}

.btn-action-edit:hover {
    background: rgba(88, 166, 255, 0.25);
}

.btn-action-delete {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.2);
    color: #ff7b72;
}

.btn-action-delete:hover:not(:disabled) {
    background: rgba(248, 81, 73, 0.25);
}

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

.btn-action-save {
    background: rgba(57, 211, 83, 0.15);
    border: 1px solid rgba(57, 211, 83, 0.25);
    color: var(--color-online);
}

.btn-action-save:hover {
    background: rgba(57, 211, 83, 0.3);
}

.btn-action-cancel {
    background: rgba(240, 246, 252, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    color: var(--text-secondary);
}

.btn-action-cancel:hover {
    background: rgba(240, 246, 252, 0.15);
    color: var(--text-primary);
}

.inline-edit-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(88, 166, 255, 0.4);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 6px 10px;
    font-family: var(--font-stack);
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    max-width: 240px;
}

.inline-edit-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

.device-id-col {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--color-primary);
}

/* --- Forms & Container Inputs --- */
.form-container {
    padding: 24px;
}

.management-form .form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.management-form label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.management-form input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.management-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

/* --- Responsive Layout Rules --- */
@media (max-width: 900px) {
    .management-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        text-align: center;
    }
    .header-left {
        justify-content: center;
    }
    .dashboard-nav {
        justify-content: center;
        width: 100%;
    }
    .header-right {
        justify-content: center;
        width: 100%;
    }
}

/* --- Custom Modal Dialog --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* --- Activity Logs Styling Extensions --- */
.activity-time {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Custom Dark Theme Scrollbar for all table-containers */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(56, 139, 253, 0.35);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 139, 253, 0.6);
}

/* Firefox scrollbar compatibility */
.table-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 139, 253, 0.35) rgba(0, 0, 0, 0.2);
}

/* Card Selection & Clicking Glows */
.device-card {
    cursor: pointer;
    border: 1px solid var(--border-glass);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.device-card:hover {
    transform: translateY(-2px);
}

.device-card.selected {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 16px rgba(56, 139, 253, 0.35) !important;
}

/* Sortable Table Headers */
.management-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
}

.management-table th.sortable:hover {
    color: var(--text-primary);
    background: rgba(240, 246, 252, 0.03);
}

.sort-dir-icon {
    font-size: 0.75rem;
    margin-left: 6px;
    display: inline-block;
    color: var(--color-primary);
    vertical-align: middle;
    transition: transform 0.2s;
}




