/* Xpress Remote+ styles. Self-hosted system fonts; no external requests. */
:root {
  --ink: #101828; --ink-2: #36404F; --muted: #5B6676; --line: #E2E7ED; --line-2: #EEF1F4;
  --bg: #F5F7F9; --card: #FFFFFF; --navy: #0B1F33; --navy-2: #17344F; --navy-text: #C5D0DC;
  --accent: #0E6E60; --accent-dark: #09493F; --accent-soft: #E8F5F1; --accent-line: #B9E1D6;
  --ok-bg: #DFF3EC; --ok: #0B5E4C; --warn-bg: #FDEFD8; --warn: #7A4A00; --off-bg: #EEF1F4; --danger: #A1281F;
  --radius: 12px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2 { font-family: "Space Grotesk", Inter, "Segoe UI", sans-serif; margin: 0; }
h1 { font-size: 28px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; font-family: inherit; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spread { justify-content: space-between; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .grid2, .grid4 { grid-template-columns: minmax(0, 1fr); } }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 10px; border: 1px solid #C9D1DA; background: #fff; color: var(--ink); font: inherit; font-size: 14px;
  font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: #F8FAFB; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font-weight: 500; }
.btn-link.danger { color: var(--danger); }
label { font-size: 13px; font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
  height: 42px; border: 1px solid #C9D1DA; border-radius: 8px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; }
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 400; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
fieldset { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
legend { font-size: 15px; font-weight: 600; padding: 0 6px; }
.code-input { font-size: 24px; letter-spacing: 0.3em; text-align: center; height: 56px; font-weight: 600; }

/* Alerts and badges */
.alert { border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.alert-error { background: #FDECEA; color: #7A1A12; border: 1px solid #F4C4BE; }
.alert-ok { background: var(--accent-soft); color: var(--ok); border: 1px solid var(--accent-line); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #F3D19A; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-off { background: var(--off-bg); color: var(--ink-2); }
.secret { word-break: break-all; background: var(--line-2); border-radius: 8px; padding: 10px 12px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; padding: 12px 16px; }
td { padding: 13px 16px; border-top: 1px solid var(--line-2); vertical-align: top; }
td form { display: inline; }

/* Sign-in layout */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-side { flex: 1 1 380px; background: var(--navy); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side h1 { font-size: 38px; line-height: 1.15; max-width: 440px; }
.auth-side p { color: var(--navy-text); max-width: 440px; font-size: 17px; }
.auth-main { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 720px) { .auth-side { padding: 28px 20px; } .auth-side h1 { font-size: 28px; } }

.brand { display: flex; align-items: center; gap: 12px; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; font-size: 19px; color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: #14A38B; display: flex; align-items: center; justify-content: center; }

/* Customer layout */
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--line-2); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.page { max-width: 1120px; margin: 0 auto; padding: 36px 24px; display: flex; flex-direction: column; gap: 24px; }
.tile { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--accent); color: var(--ink); }
.tile-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--navy); }

/* Admin layout */
.admin { min-height: 100vh; display: flex; flex-wrap: wrap; }
.admin-nav { flex: 1 1 220px; max-width: 250px; background: var(--navy); color: var(--navy-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.admin-nav a { padding: 10px 12px; border-radius: 8px; color: var(--navy-text); text-decoration: none; }
.admin-nav a.active, .admin-nav a:hover { background: var(--navy-2); color: #fff; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 720px) { .admin-nav { max-width: none; flex-direction: row; flex-wrap: wrap; } .admin-main { padding: 20px 16px; } }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 26px; font-weight: 600; }

/* Session page */
.session-page { height: 100vh; display: flex; flex-direction: column; background: #1B2633; overflow: hidden; }
.session-bar { background: var(--navy); color: #E4EAF0; padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-size: 13px; }
.session-bar .btn { min-height: 32px; padding: 0 12px; background: #12304D; border-color: #2B4157; color: #E4EAF0; font-size: 13px; }
.session-bar .btn:hover { background: #17344F; }
.session-bar .btn-primary { background: var(--accent); border-color: #14A38B; }
.session-body { flex: 1; display: flex; min-height: 0; }
/* isolation: Guacamole draws its canvases at z-index -1; keep them above the page background. */
#display { flex: 1; min-width: 0; position: relative; overflow: hidden; outline: none; isolation: isolate; }
#display > div { margin: 0 auto; }
.session-panel { width: 320px; max-width: 90vw; background: #fff; border-left: 1px solid #C9D1DA; padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.session-panel[hidden] { display: none; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11, 31, 51, 0.82); color: #fff; text-align: center; padding: 24px; }
.overlay[hidden] { display: none; }
.print-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.print-item.new { border-color: var(--accent-line); background: #F2FAF7; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
