/* The cabinet: the site's own tokens and components (tokens.css, app.css), laid out for one centred column. */
.account-page{min-height:100vh;display:flex;flex-direction:column}
.account-top{height:73px;border-bottom:1px solid var(--line-soft);display:flex;align-items:center;gap:15px;padding:0 30px}
.account-top .brand{padding:0}
.account-top .topbar-right{margin-left:auto}
.account-top .quiet-button .icon{width:15px;height:15px}
.account-main{width:100%;max-width:1040px;margin:0 auto;padding:0 30px 40px;flex:1}

/* Sign-in and sign-up */
.auth-wrap{display:grid;place-items:center;min-height:calc(100vh - 160px);padding:40px 0}
.auth-card{width:100%;max-width:420px;padding:30px 30px 26px;position:relative;overflow:hidden;
  background:linear-gradient(160deg,var(--accent-wash),transparent 55%),var(--surface)}
.auth-card:before{content:"";position:absolute;top:0;left:28px;right:28px;height:2px;background:var(--accent);opacity:.8}
.auth-card h1{font-size:23px;margin-top:4px}
.auth-card .lead{font-size:14px;color:var(--muted);margin:7px 0 22px;line-height:1.6}
.auth-card .segments{width:100%;margin-bottom:18px}
.auth-card .segments button{flex:1;padding:7px 9px;font-size:14px}
.field{display:block;margin-bottom:13px}
.field span{display:block;font-size:13px;color:var(--secondary);margin-bottom:7px}
.field input{width:100%;padding:11px 12px;border-radius:8px;background:var(--bg);border:1px solid var(--line);font-size:15px}
.field input:focus{border-color:var(--accent)}
.auth-card .primary-button{width:100%;padding:11px 14px;font-size:15px;margin-top:6px}
.auth-note{font-size:13px;color:var(--muted);line-height:1.7;margin-top:16px}
.form-note{font-size:13px;color:var(--green);line-height:1.6;margin-top:7px}
.auth-card .text-button{display:block;margin:14px auto 0}

/* Cabinet */
.device-banner{display:flex;align-items:center;gap:16px;margin-top:26px;padding:18px 20px;border:1px solid #ffbf4740;border-radius:var(--radius);
  background:linear-gradient(120deg,var(--accent-wash),transparent 70%),var(--surface)}
.device-banner .icon{color:var(--accent);width:24px;height:24px}
.device-banner h2{font-size:17px}
.device-banner p{font-size:13px;color:var(--secondary);margin-top:4px}
.device-banner .primary-button{margin-left:auto;padding:10px 16px;font-size:14px}
.device-banner.done{border-color:var(--line)}
.field .code-input{font-family:ui-monospace,Consolas,monospace;letter-spacing:8px;font-size:22px;text-align:center;padding:12px}
.form-sent{font-size:14px;color:var(--secondary);margin-bottom:13px}
.device-banner.done .icon{color:var(--green)}
.cabinet-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start}
.cabinet-card{padding:22px 24px}
.cabinet-card .section-line{margin-bottom:16px}
.cabinet-card h2 .icon{width:16px;height:16px;vertical-align:-3px;margin-right:7px;color:var(--muted)}
.licence-state{font-size:26px;font-weight:550;letter-spacing:-.8px;margin-top:4px}
.licence-state.active{color:var(--green)}
.cabinet-card .data-rows{margin-top:16px}
.slot-bar{display:flex;gap:4px;margin:4px 0 16px;height:6px}
.slot-bar span{flex:1;border-radius:3px;background:var(--surface-hover)}
.slot-bar span.used{background:var(--accent)}
.account-list{display:flex;flex-direction:column}
.account-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-top:1px solid var(--line-soft)}
.account-row:first-child{border-top:0}
.account-row .avatar{width:34px;height:34px;font-size:17px}
.account-row .who{flex:1;min-width:0}
.account-row .who b{font-weight:500;font-size:15px}
.account-row .who small{display:block;font-size:12px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-empty{border:1px dashed var(--line);border-radius:10px;padding:22px;text-align:center;font-size:14px;color:var(--secondary)}
.account-empty p{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.6}
.steps{display:flex;flex-direction:column;gap:14px;margin-top:4px}
.step{display:flex;gap:11px;align-items:flex-start;font-size:14px;color:var(--secondary);line-height:1.55}
.step b{display:grid;place-items:center;width:21px;height:21px;border:1px solid var(--line);border-radius:50%;font-size:12px;color:var(--accent);font-weight:600;flex:none}
.step kbd{margin:0 2px}
.right-stack{display:flex;flex-direction:column;gap:22px}

@media (max-width:820px){
  .cabinet-grid{grid-template-columns:1fr}
  .account-top,.account-main{padding-left:16px;padding-right:16px}
  .device-banner{flex-wrap:wrap}
  .device-banner .primary-button{margin-left:0;width:100%}
}

/* The site's components, a size up here: the cabinet is read, not scanned like the dashboard. */
.account-page .text-button{font-size:13px;color:var(--secondary);text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--muted)}
.account-page .text-button:hover{color:var(--accent);text-decoration-color:var(--accent)}
.account-page .eyebrow{font-size:12px}
.account-page .form-error{font-size:13px}
.account-page .pill{font-size:12px}
.account-page .data-row{font-size:14px}
.account-page .page-note{font-size:13px;line-height:1.6}
.account-page .page-heading p{font-size:14px}
.account-page .section-line h2{font-size:17px}
.account-page .round-count{font-size:13px}
.account-page .profile-name{font-size:13px}
.account-page .profile-sub{font-size:11px}
.account-page .quiet-button{font-size:13px}
.cabinet-card > .quiet-button{margin-top:14px}

/* The overview's first line: face, name, what the bot does (and the subscription for a player). */
.identity{justify-content:flex-start;align-items:center;gap:14px}
.id-account{margin-left:auto;align-self:center}
.id-account .icon{width:15px;height:15px}
.id-name{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.plan-badge{font-size:12px;font-weight:500;padding:4px 10px;border-radius:999px;border:1px solid var(--line);color:var(--secondary)}
.plan-badge.green{color:var(--green);border-color:color-mix(in srgb,var(--green) 45%,transparent);background:var(--green-wash)}
.plan-badge.amber{color:var(--accent);border-color:#ffbf4766;background:var(--accent-wash)}
/* The account at the top of the side bar: a menu item like the others, set apart by a line, its status in small type under it. */
.side-me{display:flex;align-items:center;gap:11px;padding:8px 12px;border-radius:8px;color:var(--secondary);font-size:13px;margin-bottom:17px;position:relative}
.side-me:after{content:"";position:absolute;left:4px;right:4px;bottom:-9px;border-bottom:1px solid var(--line-soft)}
.side-me:hover{background:var(--surface)}
.side-me[aria-current=page]{background:var(--accent-wash);color:var(--accent)}
.side-plan{display:block;font-size:11px;color:var(--muted);margin-top:1px;white-space:nowrap}
.side-plan.green{color:var(--green)}
.side-plan.amber{color:var(--accent)}
@media(max-width:1180px){.side-me{justify-content:center;padding:11px 15px}.side-me .nav-text,.side-plan{display:none}}
@media(max-width:730px){.side-me{order:3;margin:0;padding:8px}.side-me:after{display:none}}
.id-avatar{width:48px;height:48px;border-radius:11px;font-size:20px;flex:none}
.avatar.face{image-rendering:pixelated;object-fit:cover;padding:0;background:var(--surface-raised)}
.id-copy{min-width:0}
.id-copy h1{line-height:1.15}
.id-status{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:13px!important;color:var(--secondary)!important;margin-top:6px!important}
.id-sep{color:var(--muted)}
.id-link{color:var(--accent)}
.id-link:hover{text-decoration:underline}
/* The Аккаунт section: one column of settings, nothing floating beside it. */
.account-col{max-width:780px;margin:0 auto 30px}
.acc-section{padding:20px 24px;margin-bottom:16px}
.acc-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.acc-head h2{font-size:17px}
.acc-head p{font-size:14px;color:var(--secondary);margin-top:4px}
.acc-section .data-rows,.acc-section .slot-bar,.acc-section .steps{margin-top:16px}
.acc-section .account-list{margin-top:6px}
.acc-hint{font-size:13px;color:var(--muted);margin-top:12px;line-height:1.6}
@media(max-width:730px){.identity{flex-wrap:wrap}.id-account{margin-left:0;width:100%;justify-content:center}.id-avatar{width:42px;height:42px}.acc-section{padding:18px}.acc-head{flex-wrap:wrap}}

/* The header: on a computer the face, name and balance (seen from every section); on a phone the face and balance.
   A short page on a phone must not stretch the menu row: the extra height goes to the workspace. */
.topbar-right .profile .profile-name,.topbar-right .profile .profile-sub{display:block}
.balance{display:none}
@media(max-width:730px){.app-shell{grid-template-rows:auto 1fr}.topbar-right .profile{padding-left:10px}.topbar-right .profile .profile-name{display:none}.balance{display:flex;flex-direction:column;align-items:flex-end;padding-left:2px;line-height:1.2}.balance small{font-size:11px;color:var(--muted)}.balance b{font-size:14px;font-weight:600;color:var(--text)}}

/* The chart's hover: a guide line and a dot on the nearest sale; the tip sits beside the dot. */
.chart-shell{touch-action:pan-y}
.chart-cursor{position:absolute;inset:0;pointer-events:none}
.chart-guide{position:absolute;top:8px;bottom:26px;width:0;border-left:1px dashed var(--line)}
.chart-dot{position:absolute;width:9px;height:9px;margin:-5px 0 0 -5px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px var(--surface)}
.chart-tip{top:0;display:flex;flex-direction:column;gap:2px;white-space:nowrap}
.chart-tip .tip-sale{color:var(--secondary);font-size:12px}

/* History on a phone: each sale is a card (item and profit on top, amount, revenue and time under it), nothing to scroll sideways. */
@media(max-width:730px){
 .full-table .history-table{min-width:0;display:block}
 .history-table thead{display:none}
 .history-table tbody{display:block}
 .history-table tr{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:"item item item profit" "qty sum time time";column-gap:10px;row-gap:5px;padding:12px 2px;border-top:1px solid var(--line-soft)}
 .history-table tr:first-child{border-top:0}
 .history-table td{display:block;padding:0!important;border:0!important}
 .history-table td:nth-child(1){grid-area:item;min-width:0}
 .history-table td:nth-child(1) .item-name{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .history-table td:nth-child(4){grid-area:profit;align-self:center;text-align:right;font-size:14px;font-weight:600}
 .history-table td:nth-child(2),.history-table td:nth-child(3),.history-table td:nth-child(5){font-size:12px;color:var(--muted);padding-left:36px!important}
 .history-table td:nth-child(2){grid-area:qty}.history-table td:nth-child(2):after{content:" шт."}
 .history-table td:nth-child(3){grid-area:sum;padding-left:0!important}.history-table td:nth-child(3):before{content:"выручка "}
 .history-table td:nth-child(5){grid-area:time;padding-left:0!important;text-align:right}
}
@media(max-width:730px){.history-table td.unknown{font-size:12px;font-weight:400}}
.account-page .text-button:disabled{color:var(--muted);text-decoration:none;cursor:default}
