/* Pelli Live sign-in, owner dashboard and client pages. Builds on styles.css (colors, buttons, inputs). */
.portal { min-height: 100vh; }
.portal .nav { gap: 16px; }
.role-chip { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--light-teal-bg); color: var(--light-teal); }
.tabs { display: flex; gap: 6px; margin-left: auto; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); background: rgba(164, 107, 255, .16); }
.nav .tabs + .btn-ghost { margin-left: 0; }

/* Sign in */
.auth { display: grid; place-items: center; padding-block: 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { margin: 0 0 20px; font: 800 28px/1.1 var(--display); }
.auth-card .fine { margin-top: 16px; }

/* Owner and client pages */
.dash { max-width: 1200px; margin: 0 auto; padding: 28px 20px 64px; }
.dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dash-head h1 { margin: 0; font: 800 26px/1.1 var(--display); }
.dash-head .btn { margin-left: auto; }
.dash-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.card { min-width: 0; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.card + .card { margin-top: 16px; }
.card-title { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.reason { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.reason:empty { display: none; }
.empty { margin: 0; color: var(--muted); font-size: 14px; }
.btn-secondary { color: var(--text); background: rgba(164, 107, 255, .14); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-quiet { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: 600 13px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: .55; cursor: default; }
.portal .btn { min-height: 44px; padding: 0 18px; font-size: 13px; }
.portal input, .portal select { height: 44px; font-size: 14px; }
select { width: 100%; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(164, 107, 255, .3); background: rgba(11, 6, 20, .7); color: var(--text); font: 500 14px var(--body); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields .wide { grid-column: 1 / -1; }

/* Client list */
.client-list { display: grid; gap: 8px; }
.client-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.client-item[aria-current="true"] { border-color: var(--purple); background: rgba(164, 107, 255, .14); }
.client-item strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-item small { color: var(--muted); font-size: 12px; }
.dots { display: inline-flex; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -4px; }
.dots i:first-child { margin-left: 0; }
.status { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.status-active { background: rgba(126, 224, 138, .15); color: var(--green); }
.status-paused { background: rgba(255, 154, 166, .15); color: var(--error); }

/* OBS links */
.link-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.link-row + .link-row { margin-top: 8px; }
.link-row span { font-size: 13px; font-weight: 600; color: var(--lavender); }
.link-row input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
.switch-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; border: 0; background: rgba(255, 154, 166, .35); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }
.switch-row strong { font-size: 14px; }

/* Color system: the custom palette, every color as a swatch, its name and its hex code. */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 16px; margin-top: 12px; }
.swatch { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--lavender); }
.swatch input[type="color"] { width: 44px; height: 44px; padding: 3px; border-radius: 12px; cursor: pointer; }
.swatch .hex { width: 96px; padding: 0 10px; font: 500 13px ui-monospace, Menlo, monospace; }
.theme-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.preview { min-height: 120px; padding: 16px; border-radius: 14px; border: 1px dashed var(--line); background: repeating-conic-gradient(rgba(255, 255, 255, .04) 0 25%, transparent 0 50%) 0 0 / 20px 20px, var(--bg); overflow: auto; }

/* Color system samples: one small Counters tile per preset, and Custom, three across. */
.group-label { display: block; margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.theme-block { margin-top: 4px; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.theme-custom[aria-pressed="false"] { border-style: dashed; }
.theme-card { display: grid; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(11, 6, 20, .5); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.theme-card:hover { border-color: var(--line-strong); }
.theme-card[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 2px rgba(126, 224, 138, .35); }
.theme-card .mini { display: grid; place-items: center; height: 64px; border-radius: 10px; overflow: hidden; background: repeating-conic-gradient(rgba(255, 255, 255, .05) 0 25%, transparent 0 50%) 0 0 / 16px 16px, #0b0614; }
.theme-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.theme-name strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-card .dots i { width: 12px; height: 12px; }

/* Counters */
.counter-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 10px; align-items: center; }
.counter-row + .counter-row { margin-top: 8px; }
.size-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--lavender); }
.size-row input { width: 220px; height: 30px; padding: 0; accent-color: var(--purple); }
.tap-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 80px 44px; gap: 8px; align-items: center; }
.tap-row + .tap-row { margin-top: 8px; }
.tap-row strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap-row output { text-align: center; font: 800 22px var(--body); font-variant-numeric: tabular-nums; }
.tap-row .btn { padding: 0; font-size: 20px; }
.banner { margin-bottom: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 154, 166, .4); background: rgba(255, 154, 166, .1); color: var(--text); font-size: 14px; }

/* Invite requests */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
td { padding: 8px 10px; border-bottom: 1px solid rgba(164, 107, 255, .1); white-space: nowrap; }
td a { color: var(--purple-2); }
td .btn { min-height: 32px; padding: 0 12px; font-size: 11px; }

@media (max-width: 860px) {
  .dash-grid, .theme-split { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .dash { padding: 20px 16px 48px; }
  .fields { grid-template-columns: 1fr; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-row span { grid-column: 1 / -1; }
  .counter-row { grid-template-columns: minmax(0, 1fr) 90px auto; }
  .size-row input { width: 100%; }
  .tabs a { padding: 0 10px; }
  .portal .nav .role-chip { display: none; }
  /* The owner tabs drop to their own row under the logo, so they stay on phones. */
  .portal .nav { flex-wrap: wrap; }
  .portal .nav nav.tabs { display: flex; order: 3; width: 100%; margin-left: 0; }
  .portal .nav .tabs + .btn-ghost { margin-left: auto; }
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-custom { grid-column: 1 / -1; }
  .theme-card .dots { display: none; }
}
