/* Remote Support Panel — CSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #4F46E5;
  --primary-h: #4338CA;
  --danger:    #DC2626;
  --success:   #16A34A;
  --bg:        #F8F7FF;
  --surface:   #FFFFFF;
  --border:    #E5E7EB;
  --text:      #111827;
  --muted:     #6B7280;
  --radius:    10px;
}

body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ── Login ───────────────────────────────────────────────────────────────────*/
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 4px 32px rgba(79,70,229,.08); }
.login-logo { margin-bottom: 16px; }
.login-card h1 { font-size: 22px; font-weight: 600; color: var(--text); }
.login-sub { color: var(--muted); margin-bottom: 28px; font-size: 13px; }
.field { text-align: left; margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; background: var(--bg); transition: border-color .15s; outline: none; }
.field input:focus { border-color: var(--primary); }

/* ── Nav ─────────────────────────────────────────────────────────────────────*/
.navbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); }
.nav-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

/* ── Layout ──────────────────────────────────────────────────────────────────*/
.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px; display: flex; flex-direction: column; gap: 24px; }

/* ── Stats ───────────────────────────────────────────────────────────────────*/
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Panel ───────────────────────────────────────────────────────────────────*/
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-header h2 { font-size: 15px; font-weight: 600; }

/* ── Table ───────────────────────────────────────────────────────────────────*/
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); background: var(--bg); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(79,70,229,.03); }

/* ── Buttons ─────────────────────────────────────────────────────────────────*/
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-h); }
.btn-danger  { background: var(--danger);  color: #fff; } .btn-danger:hover  { opacity: .9; }
.btn-ghost   { background: transparent; color: var(--muted); border-color: var(--border); } .btn-ghost:hover { background: var(--bg); }
.btn-sm      { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-full    { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Badges ──────────────────────────────────────────────────────────────────*/
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 500; }
.badge-live    { background: #DCFCE7; color: #15803D; }
.badge-session { background: #FEF9C3; color: #A16207; }
.badge-offline { background: #FEE2E2; color: #B91C1C; }

/* ── Misc ────────────────────────────────────────────────────────────────────*/
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.empty-state { padding: 40px 24px; text-align: center; color: var(--muted); }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }
code { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }

/* ── Modal ───────────────────────────────────────────────────────────────────*/
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.modal-box { position: relative; background: var(--surface); border-radius: 16px; width: min(92vw, 900px); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.control-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); margin-top: 4px; }
