* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; font-family: system-ui, "Segoe UI", Arial, sans-serif; color: #1d2430; background: #f4f5f7; }
.menu { width: 190px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 16px 10px;
        background: #17202e; color: #e8ecf2; }
.menu .brand { font-weight: 700; font-size: 1.2rem; padding: 4px 10px 16px; }
.menu .brand-icon { color: #f08a24; margin-inline-end: 6px; }
.menu a { color: inherit; text-decoration: none; padding: 10px; border-radius: 8px; }
.menu a:hover { background: #243146; }
.menu a.active { background: #f08a24; color: #fff; font-weight: 600; }
.menu .foot { margin-top: auto; font-size: .8rem; opacity: .6; padding: 0 10px; }
main { flex: 1; min-width: 0; height: 100%; }
.view { height: 100%; }
.view iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.settings { padding: 24px 32px; overflow: auto; }
.settings table { border-collapse: collapse; background: #fff; min-width: 520px; margin-bottom: 8px; }
.settings h2 { margin-top: 28px; }
.settings th, .settings td { text-align: start; padding: 8px 12px; border-bottom: 1px solid #e3e6ea; }
.settings td:nth-child(2) { direction: ltr; text-align: end; font-family: monospace; }
.settings tr.ok td:last-child { color: #1f7a3a; }
.settings tr.down td:last-child { color: #b3261e; }
.settings button { margin-top: 12px; padding: 8px 14px; border-radius: 8px; border: 1px solid #c9ced6; background: #fff; cursor: pointer; }
.muted { color: #667085; }
@media (max-width: 640px) {
  body { flex-direction: column; }
  .menu { width: auto; flex-direction: row; align-items: center; padding: 6px; overflow-x: auto; }
  .menu .brand, .menu .foot { display: none; }
  main { height: auto; flex: 1; }
}

.settings select { padding: 6px 10px; border-radius: 8px; border: 1px solid #c9ced6; background: #fff; font: inherit; }

/* Accounts, users, help and terms (2026-11-10) */
[hidden] { display: none !important; }
.menu .who { margin-top: auto; padding: 8px 10px; font-size: .85rem; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.menu .who + .foot { margin-top: 4px; }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; text-align: start; }
.menu button.link { opacity: .8; }
button.link.danger { color: #b3261e; }
button.link:disabled { opacity: .35; cursor: default; }
.message { padding: 10px 14px; border-radius: 8px; background: #eef2f7; margin: 12px 0; }
.message.ok { background: #e6f4ea; color: #1f5f32; }
.message.error { background: #fdecea; color: #8c1d18; }
.settings .stack { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.settings .stack button { align-self: flex-start; margin-top: 0; }
.settings label, .auth label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.settings input, .auth input:not([type=checkbox]), #user-filter { padding: 8px 10px; border-radius: 8px; border: 1px solid #c9ced6; font: inherit; background: #fff; }
.settings input[readonly] { background: #f0f2f5; color: #556; }
.settings h3 { margin-top: 22px; }
.settings table.users td:nth-child(2) { direction: inherit; text-align: center; font-family: inherit; }
.settings table.users td { vertical-align: top; }
.settings table.users td:nth-child(3), .settings table.users td:nth-child(4) { text-align: center; }
.settings table.users tr.disabled td { opacity: .55; }
#user-filter { min-width: 280px; margin: 8px 0 12px; }
.tag { font-size: .75rem; background: #eef2f7; border-radius: 6px; padding: 1px 6px; }

body.page { display: block; overflow: auto; min-height: 100%; }
.auth { max-width: 420px; margin: 0 auto; padding: 32px 16px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.auth .brand { font-weight: 700; font-size: 1.4rem; }
.brand-icon { color: #f08a24; margin-inline-end: 6px; }
.auth select { padding: 6px 10px; border-radius: 8px; border: 1px solid #c9ced6; background: #fff; font: inherit; }
.card { background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); display: flex; flex-direction: column; gap: 14px; }
.card h1 { margin: 0 0 4px; font-size: 1.4rem; }
.card p { margin: 0; }
.auth label.check { flex-direction: row; align-items: flex-start; gap: 8px; display: block; }
.auth label.check input { margin-inline-end: 6px; }
.hint { color: #667085; font-size: .85rem; margin-top: -8px !important; }
button.primary { padding: 10px 16px; border-radius: 8px; border: 0; background: #f08a24; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
button.primary:disabled { opacity: .6; cursor: default; }
.links, .foot { font-size: .9rem; }
.auth .foot { text-align: center; margin-top: 18px; }
a { color: #b45f0b; }
.google { margin-top: 14px; }
.or { text-align: center; color: #667085; font-size: .85rem; margin: 6px 0 12px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid #c9ced6; color: #1d2430; text-decoration: none; font-weight: 600; }
.google-btn .g { font-weight: 800; color: #4285f4; }
.doc { max-width: 760px; margin: 0 auto; padding: 24px 24px 48px; line-height: 1.55; }
.doc h2 { margin-top: 26px; font-size: 1.15rem; }
.doc .contact { background: #fff; border-radius: 12px; padding: 4px 18px 10px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.doc .email { font-weight: 700; white-space: nowrap; }
.embedded .back { display: none; }
a.primary { display: block; text-align: center; padding: 10px 16px; border-radius: 8px; background: #f08a24; color: #fff; font-weight: 600; text-decoration: none; }
#card .links { text-align: center; }

/* Rimwise logo (mark + wordmark) in the brand line (2026-11-10) */
.brand { display: flex; align-items: center; }
.brand-logo { display: block; width: auto; height: 32px; }

/* Administration: tabs (users, payments, videos and scans), their tables, chips and forms (2026-11-12) */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid #d9dde3; margin: 14px 0 18px; }
.tabs a { padding: 9px 14px; border-radius: 8px 8px 0 0; color: #445; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { background: #e9ecf1; }
.tabs a.active { color: #1d2430; font-weight: 600; border-bottom-color: #f08a24; }
.admin .tab > h2:first-child { margin-top: 0; }
.admin table { width: 100%; }
.admin td:nth-child(2) { direction: inherit; text-align: start; font-family: inherit; }
.admin td { vertical-align: middle; }
.admin td select { max-width: 240px; }
.chip { display: inline-block; font-size: .8rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: #eef2f7; white-space: nowrap; }
.chip.ok { background: #e6f4ea; color: #1f5f32; }
.chip.warn { background: #fbf3dc; color: #7a5b0c; }
.chip.bad { background: #fdecea; color: #8c1d18; }
.row-form, .filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-bottom: 12px; }
.row-form label.grow { flex: 1 1 200px; }
.row-form input[type=number] { width: 120px; }
.settings .row-form button, .settings .filters button, .settings .acts button { margin-top: 0; }
.filters { align-items: center; }
.filters input[type=search] { min-width: 240px; }
.acts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.settings .acts button.link, .settings td > button.link { border: 0; padding: 0; background: none; }
