/* DesoLabs Dark Theme */

/* Alpine.js cloak — hide elements until Alpine initializes */
[x-cloak] { display: none !important; }

/* Lock viewport — prevent horizontal overflow on zoom/iPad */
html, body { max-width: 100vw; }
html { height: 100%; width: 100%; touch-action: manipulation; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a1f2e; }
::-webkit-scrollbar-thumb { background: #2d3548; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d4558; }

/* Sidebar */
.sidebar { width: 260px; min-height: 100vh; flex-shrink: 0; }
.sidebar a.active { background: #242b3d; color: #60a5fa; }
.sidebar a:hover { background: #1e2536; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 0.75rem 1rem; color: #94a3b8; font-weight: 500; font-size: 0.875rem; border-bottom: 1px solid #2d3548; }
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #1e2536; }
.data-table tr:hover td { background: #1a1f2e; }

/* Badges */
.badge { padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-admin { background: #7c3aed20; color: #a78bfa; }
.badge-trainer { background: #2563eb20; color: #60a5fa; }
.badge-student { background: #05966920; color: #34d399; }
.badge-provisioned { background: #d9770620; color: #fb923c; }
.badge-active { background: #05966920; color: #34d399; }
.badge-completed { background: #2563eb20; color: #60a5fa; }
.badge-archived { background: #6b728020; color: #94a3b8; }
.badge-disabled { background: #dc262620; color: #f87171; }
.badge-scheduled { background: #d9770620; color: #fb923c; }
.badge-provisional { background: #d9770620; color: #fbbf24; }
.badge-cancelled { background: #dc262620; color: #f87171; }
.badge-vnc { background: #7c3aed20; color: #a78bfa; }
.badge-rdp { background: #2563eb20; color: #60a5fa; }
.badge-ssh { background: #059669207; color: #34d399; }

/* Buttons */
.btn { padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 500; font-size: 0.875rem; transition: all 0.15s; cursor: pointer; }
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc262620; color: #f87171; border: 1px solid #dc262640; }
.btn-danger:hover { background: #dc262640; }
.btn-ghost { color: #94a3b8; }
.btn-ghost:hover { color: #e2e8f0; background: #242b3d; }

/* Forms */
.form-input { width: 100%; padding: 0.5rem 0.75rem; background: #0f1419; border: 1px solid #2d3548; border-radius: 0.5rem; color: #e2e8f0; font-size: 0.875rem; }
.form-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px #2563eb30; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #94a3b8; margin-bottom: 0.25rem; }
.form-select { width: 100%; padding: 0.5rem 0.75rem; background: #0f1419; border: 1px solid #2d3548; border-radius: 0.5rem; color: #e2e8f0; font-size: 0.875rem; }

/* Cards */
.card { background: #1a1f2e; border: 1px solid #2d3548; border-radius: 0.75rem; padding: 1.5rem; }
.stat-card { background: #1a1f2e; border: 1px solid #2d3548; border-radius: 0.75rem; padding: 1.25rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #1a1f2e; border: 1px solid #2d3548; border-radius: 0.75rem; padding: 1.5rem; width: 100%; max-width: 28rem; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; }
.modal-content .modal-body { flex: 1; overflow-y: auto; min-height: 0; }
.modal-content .modal-footer { flex-shrink: 0; padding-top: 1rem; border-top: 1px solid #2d3548; margin-top: 0.75rem; }
.modal-content form > div.flex.justify-end:last-child,
.modal-content > div.flex.justify-end:last-child { position: sticky; bottom: -1.5rem; background: #1a1f2e; padding: 0.75rem 0; margin: 0 -1.5rem -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; border-top: 1px solid #2d3548; z-index: 1; }

/* HTMX loading indicator */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }

/* VNC */
#vnc-display { background: #000; }
#vnc-display canvas { display: block; }

/* Connection status */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-connected { background: #34d399; }
.status-connecting { background: #fbbf24; animation: pulse 1s infinite; }
.status-disconnected { background: #f87171; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Guide content styles for help panel */
.guide-content h1 { font-size: 1.3rem; font-weight: 700; color: #e2e8f0; margin: 1.2rem 0 0.5rem; }
.guide-content h2 { font-size: 1.1rem; font-weight: 600; color: #e2e8f0; margin: 1rem 0 0.4rem; }
.guide-content h3 { font-size: 1rem; font-weight: 600; color: #e2e8f0; margin: 0.8rem 0 0.3rem; }
.guide-content p { color: #94a3b8; margin: 0.4rem 0; line-height: 1.6; font-size: 0.875rem; }
.guide-content ul, .guide-content ol { padding-left: 1.2rem; margin: 0.4rem 0; color: #94a3b8; font-size: 0.875rem; }
.guide-content li { margin: 0.2rem 0; }
.guide-content ul li { list-style: disc; }
.guide-content ol li { list-style: decimal; }
.guide-content code { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; background: #242b3d; padding: 0.1rem 0.3rem; border-radius: 0.2rem; color: #60a5fa; }
.guide-content strong { color: #e2e8f0; }
