:root {
    --bg-main: #0a0e17;
    --bg-surface: #111827;
    --bg-card: rgba(22, 30, 49, 0.7);
    --bg-card-hover: rgba(30, 41, 67, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(99, 102, 241, 0.3);

    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;

    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #38bdf8;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Typography & Helpers */
.text-accent { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-sm { font-size: 0.825rem; color: var(--text-muted); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    user-select: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-main);
}
.btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-action {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    text-align: left;
    justify-content: flex-start;
}
.btn-action:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 40%, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    border-radius: 20px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-success);
    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 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stats-bar {
    display: flex;
    gap: 10px;
}
.stat-pill {
    font-size: 0.825rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-pill.online strong { color: var(--color-success); }
.stat-pill.offline strong { color: var(--text-dim); }
.stat-pill.admin strong { color: var(--color-warning); }

/* Subheader (Filter & Search) */
.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(11, 15, 25, 0.5);
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    position: relative;
    width: 380px;
    max-width: 100%;
}
.search-box input {
    width: 100%;
    padding: 9px 16px 9px 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-fast);
}
.search-box input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 0.9rem;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.tab-btn.active {
    background: var(--color-primary);
    color: #fff;
}

/* Custom Checkbox */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    transition: var(--transition-fast);
}
.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.12);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Machines Grid */
.content-area {
    padding: 28px;
    max-width: 1800px;
    margin: 0 auto;
}

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

/* PC Card */
.pc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    backdrop-filter: blur(12px);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-card);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pc-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.pc-card.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}

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

.pc-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-hostname {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.pc-user {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pc-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge.online {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge.offline {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}
.badge.admin {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge.user {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge.reboot {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Metrics summary */
.pc-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.825rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}
.metric-row strong {
    color: var(--text-main);
}

.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
    margin-bottom: 4px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #818cf8);
    border-radius: 10px;
    transition: width 0.4s ease;
}
.progress-bar-fill.warn {
    background: linear-gradient(90deg, var(--color-warning), #fbbf24);
}
.progress-bar-fill.danger {
    background: linear-gradient(90deg, var(--color-danger), #f87171);
}

/* Card Button Toolbar */
.pc-card-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Modal Windows */
.modal-overlay, .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-window {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-sm { max-width: 480px; }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1200px; }

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}
.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}
.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
}
.btn-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

/* Specs Modal Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.spec-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.spec-title { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; font-weight: 600; }
.spec-val { font-size: 1rem; font-weight: 600; color: var(--text-main); }
.spec-sub { font-size: 0.8rem; color: var(--text-muted); }

/* Disks Section */
.disks-section h3 { font-size: 0.95rem; margin-bottom: 10px; color: var(--text-muted); }
.disks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.disk-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
}

/* Task Manager Table */
.taskmgr-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.taskmgr-bar input {
    flex: 1;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}
.taskmgr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.taskmgr-table th, .taskmgr-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}
.taskmgr-table th {
    color: var(--text-dim);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.taskmgr-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.table-container {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

/* Terminal Body */
.terminal-body {
    padding: 0;
    background: #080c14;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.term-output {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #cbd5e1;
}
.term-line.cmd { color: #38bdf8; }
.term-line.error { color: #f87171; }
.term-line.info { color: #94a3b8; font-style: italic; }

.term-input-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-subtle);
    gap: 10px;
}
.term-prompt { font-family: var(--font-mono); color: var(--color-primary); font-weight: 700; }
.term-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.shell-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    outline: none;
}

/* Desktop Remote Screen */
.desktop-body {
    padding: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}
.stream-canvas-wrapper, .stream-viewport-wrapper {
    position: relative;
    width: 100%;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#desktop-canvas, .desktop-screen-img {
    max-width: 100%;
    max-height: 75vh;
    display: block;
    cursor: default;
}
#desktop-canvas.interactive, .desktop-screen-img.interactive {
    cursor: crosshair;
}

.stream-loader {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Touch Bar */
.mobile-touch-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: rgba(17, 24, 39, 0.95);
    border-top: 1px solid var(--border-subtle);
    justify-content: center;
    width: 100%;
}
.btn-touch {
    padding: 8px 12px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    touch-action: manipulation;
}
.btn-touch:hover, .btn-touch:active {
    background: var(--color-primary);
    color: #fff;
}

/* Sub Action Rows (Cursor size & Volume) */
.sub-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    margin-top: 6px;
}
.sub-label {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 110px;
}
.btn-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.volume-control-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.slider-input {
    flex: 1;
    min-width: 120px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Radio & Inputs */
.radio-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}
.input-file {
    padding: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    width: 100%;
}
.form-divider {
    text-align: center;
    position: relative;
    margin: 8px 0;
}
.form-divider:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
}
.form-divider span {
    position: relative;
    background: var(--bg-surface);
    padding: 0 10px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 700;
}

/* Toggle Switch */
.toggle-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.825rem;
    color: var(--text-muted);
}
.toggle-control input { display: none; }
.toggle-slider {
    width: 34px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    position: relative;
    transition: var(--transition-fast);
}
.toggle-slider:before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    left: 2px;
    top: 2px;
    transition: var(--transition-fast);
}
.toggle-control input:checked + .toggle-slider {
    background: var(--color-success);
}
.toggle-control input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

/* Actions Groups */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.action-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

/* Login Card */
.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.brand-logo {
    text-align: center;
    margin-bottom: 24px;
}
.logo-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
}
.brand-logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.brand-logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.form-group input {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #fff;
    outline: none;
    transition: var(--transition-fast);
}
.form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.error-msg {
    color: #f87171;
    font-size: 0.8rem;
    margin-bottom: 12px;
}
.btn-block { width: 100%; }

/* Screenshot Image Preview */
.screenshot-img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.875rem;
    z-index: 300;
    animation: toastSlide 0.3s ease;
}
@keyframes toastSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Mobile & Tablet Adaptation (Media Queries)
   ========================================================================== */

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px 18px;
    }
    .nav-left {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }
    .nav-right {
        justify-content: flex-end;
        width: 100%;
    }
    .sub-header {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 18px;
    }
    .search-box {
        width: 100%;
    }
    .filter-controls {
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .content-area {
        padding: 14px;
    }
    .machines-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .stats-bar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .stat-pill {
        justify-content: center;
    }
    .filter-tabs {
        width: 100%;
        overflow-x: auto;
    }
    .filter-tabs .tab-btn {
        flex: 1;
        text-align: center;
        white-space: nowrap;
        padding: 8px 6px;
    }
    .pc-card-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    .pc-card-actions button:last-child {
        grid-column: span 2;
    }
    .modal-overlay {
        padding: 8px;
    }
    .modal-window {
        max-height: 96vh;
        border-radius: var(--radius-md);
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-body {
        padding: 16px;
        gap: 14px;
    }
    .btn-grid {
        grid-template-columns: 1fr;
    }
    .specs-grid {
        grid-template-columns: 1fr;
    }
    .term-output {
        height: 280px;
    }
    .stream-canvas-wrapper, .stream-viewport-wrapper {
        min-height: 320px;
    }
    .toast {
        left: 14px;
        right: 14px;
        bottom: 14px;
        text-align: center;
    }
}
