body { min-height: 100dvh; }
.shell { width: min(560px, 100%); margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.brand-mark { display: inline-block; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2) url(/assets/yak-white.png) center 54%/72% no-repeat; flex: none; }
.brand-mark.big { width: 84px; height: 84px; border-radius: 24px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7; } }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; font: 800 18px/1 var(--font-head); text-decoration: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,240,220,.05); color: var(--text); font-size: 18px; cursor: pointer; display: grid; place-items: center; }

section.block { margin-top: 14px; padding: 20px; }
.block h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 10px; }
.small { font-size: 14px; }

/* status */
.status { padding: 22px; position: relative; overflow: hidden; }
.status::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; background: url(/assets/yak-white.png) center/contain no-repeat; opacity: .06; transform: rotate(-8deg); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font: 700 13px/1 var(--font-body); background: rgba(255,240,220,.06); }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.badge.on i { background: var(--ok); box-shadow: 0 0 0 4px rgba(95,208,139,.18); }
.badge.off i { background: var(--bad); }
.status .days { font: 800 46px/1 var(--font-head); margin: 18px 0 4px; }
.status .until { color: var(--muted); }
.status .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.meter { height: 8px; border-radius: 999px; background: rgba(255,240,220,.08); overflow: hidden; margin-top: 14px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }

.trial { padding: 20px; border-color: rgba(233,162,59,.45); background: radial-gradient(120% 120% at 0% 0%, rgba(233,162,59,.16), transparent 60%), linear-gradient(180deg, var(--surface), var(--bg-2)); }
.trial h3 { font-size: 18px; margin-bottom: 6px; }

/* connect tabs */
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: 1; min-width: max-content; padding: 10px 8px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 700 14px/1 var(--font-body); cursor: pointer; }
.tabs button.on { background: var(--surface-2); color: var(--text); }
ol.steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.linkbox { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 8px 8px 12px; }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: var(--radius-sm); width: max-content; margin: 12px auto 0; }

/* devices */
.device { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.device:first-of-type { border-top: 0; }
.device .ico { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,240,220,.06); display: grid; place-items: center; }
.device .meta { flex: 1; min-width: 0; }
.device .meta div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* partner */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.stat { padding: 12px; border-radius: var(--radius-sm); background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.stat b { display: block; font: 800 20px/1.1 var(--font-head); }
.stat span { color: var(--muted); font-size: 12px; }
.lvls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.lvls span { padding: 6px 10px; border-radius: 999px; background: rgba(233,162,59,.12); color: var(--accent-2); font-weight: 700; font-size: 13px; }

/* login */
.login { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 12px; }
.login .brand-mark.big { margin: 0 auto 10px; animation: none; }
.login h1 { font-size: 28px; }
.login p { color: var(--muted); margin: 0 0 14px; }
.login .btn { width: 100%; }
.waiting { padding: 18px; text-align: left; }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 88dvh; overflow-y: auto; z-index: 41;
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: rgba(255,240,220,.18); margin: 0 auto 14px; }
.sheet h3 { font-size: 20px; margin-bottom: 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,240,220,.04); color: var(--text); cursor: pointer; font: inherit; }
.plan.on { border-color: var(--accent); background: rgba(233,162,59,.10); }
.plan .t { font-weight: 700; font-size: 14px; }
.plan .p { font: 800 22px/1.1 var(--font-head); margin-top: 8px; }
.plan .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.providers { display: grid; gap: 8px; margin-top: 14px; }
.provider { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,240,220,.04); color: var(--text); font: 700 15px/1 var(--font-body); cursor: pointer; }
.provider.on { border-color: var(--accent); background: rgba(233,162,59,.10); }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 10px; }

.sheet .close { position: absolute; top: 14px; right: 14px; }
.toast { width: max-content; text-align: center; position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 22px; }
.foot a { color: var(--muted); }
.provider .pl { display: inline-flex; align-items: center; gap: 10px; }
.provider .pl .i, .device .ico .i { color: var(--accent); }
.icon-btn .i { width: 18px; height: 18px; }
.btn .i { width: 18px; height: 18px; }
