/* The signed-in dashboard: a grid of cards (plan, account status, get
   started, computers, refer a friend). Base tokens and buttons: app.css. */

@keyframes fill { from { transform: scaleX(0); } }
@keyframes stampin { from { opacity: 0; transform: rotate(-8deg) scale(2.2); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

.grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 56px; }
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px;
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent);
  animation: fadeup .9s var(--out) .4s both;
}
.card:nth-child(2) { animation-delay: .5s; }
.card:nth-child(3) { animation-delay: .6s; }
.card:nth-child(4) { animation-delay: .7s; }
.card:nth-child(5) { animation-delay: .8s; }
.card-wide { grid-column: 1 / -1; }
.card-h { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--dim); }
.card-h b { color: var(--paper); font-weight: 500; text-align: right; }
.card-h .live { display: inline-flex; align-items: center; gap: 7px; color: var(--safelight); }
.card-h .live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: rec 1.3s ease-in-out infinite; }

/* ---------- plan ---------- */
.plan { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.plan b { font-size: 64px; font-weight: 850; font-stretch: 118%; letter-spacing: -.04em; line-height: 1; }
.plan span { font-size: 10px; color: var(--dim); }
.stamp { position: absolute; right: 24px; top: 60px; padding: 10px 12px; border: 2px solid var(--warm); color: var(--warm); font-size: 13px; font-weight: 700; line-height: 1.1; text-align: center; transform: rotate(-8deg); animation: stampin .6s var(--out) .8s both; }
.usage { position: relative; display: block; height: 10px; overflow: hidden; background: rgba(191, 196, 203, .12); }
.usage i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transform-origin: left; background: linear-gradient(90deg, var(--warm), var(--halation)); box-shadow: 0 0 12px rgba(255, 74, 46, .6); animation: fill 1.6s var(--out) .4s both; }
.usage.is-over i { background: var(--signal); }
.usage-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 9.5px; color: var(--dim); }
.limits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.limits div { padding: 12px; border: 1px solid var(--rule); }
.limits dt { font-size: 8.5px; color: var(--dim); }
.limits dd { margin-top: 8px; font-size: 22px; font-weight: 700; font-stretch: 108%; letter-spacing: -.02em; white-space: nowrap; }

/* ---------- account status ---------- */
.status { display: flex; flex-direction: column; gap: 10px; }
.status li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.status li i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.status li.is-on i { background: var(--safelight); box-shadow: 0 0 10px var(--safelight); }
.status b { color: var(--safelight); }
.slots { display: flex; gap: 6px; }
.slots i { width: 26px; height: 20px; border: 1px solid rgba(191, 196, 203, .35); }
.slots i.on { background: var(--warm); border-color: var(--warm); box-shadow: 0 0 10px rgba(255, 178, 122, .5); }
.toggles { display: flex; flex-direction: column; gap: 18px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.toggle-name, .step-name { font-size: 17px; font-weight: 600; }
.toggle .small { margin-top: 4px; }
.sw { position: relative; flex: none; width: 58px; height: 30px; padding: 0; border: 1px solid rgba(191, 196, 203, .4); border-radius: 0; background: transparent; cursor: pointer; }
.sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--dim); transition: transform .45s var(--out), background-color .3s, box-shadow .3s; }
.sw:hover { border-color: var(--paper); }
.sw.on { border-color: var(--warm); }
.sw.on i { transform: translateX(28px); background: var(--warm); box-shadow: 0 0 14px rgba(255, 178, 122, .8); }

/* ---------- get started ---------- */
.steps { counter-reset: s; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); padding-top: 4px; font: 500 11px/1 var(--mono); color: var(--safelight); }
.steps .small { margin-top: 6px; }
.cmd { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--rule); background: #0D0E11; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12.5px; line-height: 1.6; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd code::before { content: "$ "; color: var(--dim); }
.cmd-plain code { white-space: normal; color: var(--paper); }
.cmd-plain code::before { content: none; }

/* ---------- computers ---------- */
.comp { display: flex; flex-direction: column; }
.comp li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.comp li.gone { opacity: .4; }
.mon { position: relative; display: grid; place-items: center; width: 44px; height: 34px; border: 1.5px solid var(--silver); }
.mon::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -7px; height: 1.5px; background: var(--silver); }
.mon i { width: 7px; height: 7px; border-radius: 50%; background: var(--safelight); box-shadow: 0 0 8px var(--safelight); animation: rec 1.6s ease-in-out infinite; }
.comp-body { min-width: 0; }
.comp-name { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.comp-meta { margin-top: 6px; font-size: 9px; color: var(--dim); overflow-wrap: anywhere; }
.comp-meta a { text-transform: none; letter-spacing: .04em; }
.comp-meta b { color: #FF5B4F; font-weight: 500; }

/* ---------- refer a friend ---------- */
.refer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: end; }
.refer-row .sub { margin-top: 0; }
.refer { display: flex; flex-wrap: wrap; gap: 8px; }
.refer input[type="email"] { flex: 1 1 240px; min-width: 0; min-height: 50px; padding: 0 14px; border: 1px solid rgba(191, 196, 203, .3); border-radius: 0; background: #0D0E11; color: var(--paper); font: 400 15px/1 var(--sans); }
.refer input[type="email"]:focus { outline: 2px solid var(--warm); outline-offset: -1px; }
.refer input::placeholder { color: var(--dim); }
.refer-error { padding: 12px 14px; border-left: 2px solid var(--signal); background: rgba(229, 72, 77, .08); color: #FFC9C4; font-size: 14.5px; }
.referrals { display: flex; flex-direction: column; }
.referrals li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 14px; overflow-wrap: anywhere; }
.referrals .mono { font-size: 9.5px; color: var(--dim); }
.referrals .is-joined { color: var(--safelight); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refer-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .grid { margin-top: 40px; }
  .card { padding: 20px; }
  .plan b { font-size: 52px; }
  .stamp { display: none; }
  .comp li { grid-template-columns: 44px minmax(0, 1fr); }
  .comp form { grid-column: 2; }
  .refer .btn { width: 100%; }
}
