/* The customer portal (customer.php). Builds on site.css + auth.css: the same cards, buttons and
   alerts as sign-in; mint only for "active / ok", amber and red for warnings. */

.cu-key-in { letter-spacing: .04em; font-variant-ligatures: none; }

/* sign in with a licence key or an account */
.cu-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgb(255 255 255 / .03); border: 1px solid rgb(255 255 255 / .08); }
.cu-mode a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 550; color: var(--mute); transition: color .15s, background-color .15s; }
.cu-mode a i { font-size: 11.5px; }
.cu-mode a:hover { color: var(--text); }
.cu-mode a.is-on { background: rgb(255 255 255 / .09); color: var(--text); }
.cu-by { display: grid; gap: 18px; }
.cu-by[hidden] { display: none; }
.cu-fine { margin-top: 18px; line-height: 1.55; }
.cu-out { margin: 0; }
.cu-out .auth-back { border: 0; background: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; }

.cu { display: grid; gap: 14px; width: 100%; max-width: 1080px; align-self: center; }
.cu > .alert { margin: 0; }
/* the key and what to do with it on the left, its activity on the right */
.cu-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cu-col { display: grid; gap: 14px; min-width: 0; }

.cu-card {
  padding: 22px 24px; border-radius: 18px;
  background: rgb(14 14 14 / .9); border: 1px solid rgb(255 255 255 / .09);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cu-card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.cu-card h2 > i { width: 16px; font-size: 13px; text-align: center; color: rgb(255 255 255 / .45); }
.cu-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cu-h h2 { margin: 0; }
.cu-h form { margin: 0; }
.cu-p { margin: 0; font-size: 14px; line-height: 1.6; color: rgb(255 255 255 / .62); }
.cu-empty { margin: 0; font-size: 13.5px; color: var(--mute-2); }
.cu-act { margin-top: 14px; }
.cu-act .btn i, .cu-row .btn i { margin-right: 8px; font-size: 12px; }
.cu-wait { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13.5px; color: var(--amber); }

/* app, time left, facts */
.cu-hero { padding: 24px; }
.cu-app { display: flex; align-items: center; gap: 14px; }
.cu-app > div { flex: 1; min-width: 0; }
.cu-app h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.cu-app small { display: block; margin-top: 2px; font-size: 13px; color: var(--mute); }
.cu-tile { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: #1c1c1c; box-shadow: inset 0 0 0 1px #2b2b2b; font-size: 17px; font-weight: 700; }
.cu-tile.has-img { overflow: hidden; }
.cu-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }   /* the app's logo (App settings) */
.cu-dl { flex: none; }
.cu-dl i { margin-right: 8px; font-size: 12px; }
.cu-msg { display: flex; gap: 10px; margin: 16px 0 0; padding: 11px 13px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .07); font-size: 13.5px; line-height: 1.55; color: rgb(255 255 255 / .75); }
.cu-msg i { margin-top: 3px; font-size: 12px; color: rgb(255 255 255 / .45); }
.cu-msg span { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }

.cu-time { display: grid; justify-items: start; gap: 6px; margin-top: 20px; }
.cu-time b { font-size: 30px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cu-time small { font-size: 13px; color: var(--mute); }
.cu-time .st.unused { background: rgb(255 255 255 / .08); color: rgb(255 255 255 / .75); }
.cu-time .st.bad { background: rgb(240 82 82 / .14); color: var(--red); }

.cu-keyline { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 0; }
.cu-keyline span { font-size: 12px; color: var(--mute); }
.cu-keyline b { font-size: 13px; font-weight: 500; letter-spacing: .03em; font-variant-ligatures: none; white-space: nowrap; }
.cu-keyline b.cu-user { letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }

/* an account: add a licence key */
.cu-inline { display: flex; gap: 10px; margin-top: 14px; }
.cu-inline .control { flex: 1; min-width: 0; }
.cu-inline .btn { flex: none; }
.cu-inline .btn i { margin-right: 8px; font-size: 12px; }
.cu-note { font-size: 13px; }
.cu-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 0; border: 1px solid rgb(255 255 255 / .08); border-radius: 14px; overflow: hidden; }
.cu-facts > div { padding: 11px 13px; min-width: 0; }
.cu-facts > div + div { border-left: 1px solid rgb(255 255 255 / .08); }
.cu-facts dt { font-size: 11.5px; color: var(--mute); }
.cu-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* lists: running copies, activity */
.cu-list { display: grid; margin: 0; padding: 0; list-style: none; }
.cu-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cu-list li + li { border-top: 1px solid rgb(255 255 255 / .06); }
.cu-li-main { display: grid; flex: 1; min-width: 0; }
.cu-li-main b { font-size: 14px; font-weight: 600; }
.cu-li-main small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mute); overflow-wrap: anywhere; }
.cu-li-main .mono { font-size: 12px; font-variant-ligatures: none; }
.cu-list form { margin: 0; }
.cu-list time { flex: none; font-size: 12.5px; color: var(--mute-2); font-variant-numeric: tabular-nums; }

.cu-flag { flex: none; width: 18px; height: 13px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / .12); }
.cu-flag.is-none { display: inline-grid; place-items: center; background: rgb(255 255 255 / .06); font-size: 8px; color: rgb(255 255 255 / .45); box-shadow: none; }
.cu-li-main small .cu-flag { width: 15px; height: 11px; }
.cu-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #4a4a4a; }
.cu-dot.is-on { background: var(--mint); box-shadow: 0 0 0 3px rgb(60 207 145 / .16); }

.cu-ai { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: rgb(255 255 255 / .05); font-size: 12px; color: rgb(255 255 255 / .55); }
.cu-ai.is-ok { color: var(--mint); }
.cu-ai.is-warn { color: var(--amber); }
.cu-ai.is-bad { color: var(--red); }

/* activity pages */
.cu-count { font-size: 12px; color: var(--mute-2); font-variant-numeric: tabular-nums; }
.cu-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .06); }
.cu-pager .btn i { font-size: 11px; }
.cu-pager .btn i:first-child { margin-right: 8px; }
.cu-pager .btn i:last-child:not(:first-child) { margin-left: 8px; }

/* small text buttons */
.cu-link { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 550; color: var(--mute); transition: color .15s; }
.cu-link:hover { color: var(--text); }
.cu-link i { font-size: 11px; }
.cu-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.cu-row form { margin: 0; }
.cu-more { padding: 14px 24px; }
.cu-more .auth-form { gap: 14px; padding: 6px 0; }

/* several keys */
.cu-keys { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.cu-keys form { margin: 0; flex: none; }
.cu-key-tab { display: grid; gap: 1px; padding: 8px 14px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .09); background: rgb(14 14 14 / .9); color: var(--mute); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, color .15s; }
.cu-key-tab b { font-size: 13px; font-weight: 600; }
.cu-key-tab span { font-size: 11px; font-variant-ligatures: none; }
.cu-key-tab .cu-tab-user { display: flex; align-items: center; gap: 5px; }
.cu-key-tab .cu-tab-user i { font-size: 9px; }
.cu-key-tab:hover { color: var(--text); border-color: rgb(255 255 255 / .2); }
.cu-key-tab.is-on { color: var(--text); border-color: rgb(255 255 255 / .55); }

/* confirm */
.cu-modal { width: min(420px, calc(100vw - 32px)); padding: 22px; border-radius: 18px; border: 1px solid rgb(255 255 255 / .1); background: #111; color: var(--text); }
.cu-modal::backdrop { background: rgb(0 0 0 / .6); }
.cu-modal form { margin: 0; }
.cu-modal p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; }
.cu-modal footer { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 900px) {
  .cu { max-width: 640px; }
  .cu-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cu-card, .cu-hero { padding: 18px 16px; }
  .cu-more { padding: 12px 16px; }
  .cu-facts dd { font-size: 13px; }
  .cu-time b { font-size: 26px; }
  .cu-app { flex-wrap: wrap; }
  .cu-dl { width: 100%; }
}

/* the add-ons of the key or account (App settings → Add-ons) */
.cu-addons { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.cu-addons li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #161616; box-shadow: inset 0 0 0 1px #262626; }
.cu-addons b { font-weight: 600; }
.cu-addons small { color: rgb(255 255 255 / .5); font-size: 13px; white-space: nowrap; }
