/* Ebb Deck: dashboard, performance, search and account pages (classes: dash-*, acct-*). */

/* ---------------------------------------------------------------- shared */
.dash-tile { padding: 18px; }
.dash-tile .small { line-height: 1.35; margin-top: 2px; }
.dash-donut-card { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 420px) { .donut { gap: 14px; } .donut svg { width: 104px; height: 104px; } .donut .big { font-size: 19px; } }
.acct-copy { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-copy input { flex: 1 1 240px; min-width: 0; background: var(--surface); }
.acct-copy .btn { flex: none; }

/* ---------------------------------------------------------------- dashboard */
.dash-welcome h2 { font-size: 22px; margin-bottom: 4px; }
.dash-steps { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.dash-steps li div { display: flex; flex-direction: column; gap: 2px; }
.dash-step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-soft-text); font-family: var(--font-head); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .dash-steps { grid-template-columns: minmax(0, 1fr); } }

.dash-free { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; border-color: var(--line-strong); }
.dash-free-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; }
.dash-free-text p { margin: 0; }
.dash-free-count { font-size: 17px; }

.dash-main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1100px) { .dash-main-grid { grid-template-columns: minmax(0, 1fr); } }
.dash-open td { white-space: normal; }
.dash-prog { width: 180px; min-width: 120px; }
.dash-prog .bar { margin-bottom: 4px; }
.dash-empty p { margin-bottom: 14px; }
@media (max-width: 640px) {
  .dash-open thead { display: none; }
  .dash-open, .dash-open tbody, .dash-open tr, .dash-open td { display: block; width: 100%; }
  .dash-open tr { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
  .dash-open td { padding: 0; border: 0; }
  .dash-open td:nth-child(1) { grid-column: 1 / -1; }
  .dash-open td.dash-prog { width: auto; grid-column: 1 / -1; }
  .dash-open td:nth-child(4) { grid-column: 1 / -1; }
  .dash-open td:nth-child(4) .btn { width: 100%; min-height: 44px; }
}
.dash-quick { display: flex; flex-direction: column; gap: 12px; }
.dash-quick .btn { width: 100%; }
.dash-weak { border-top: 1px solid var(--line); padding-top: 14px; }
.dash-weak h3 { margin-bottom: 8px; }
.dash-weak ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.dash-weak .bar { margin: 4px 0 2px; }
.dash-weak a { color: var(--text); font-weight: 600; text-decoration: none; }
.dash-weak a:hover { color: var(--primary); text-decoration: underline; }
.dash-weak-none { margin: 0; border-top: 1px solid var(--line); padding-top: 14px; }

.dash-refer { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-color: var(--line-strong); }
.dash-refer-text { flex: 1 1 300px; }
.dash-refer-text p { margin: 4px 0 0; color: var(--text-2); }
.dash-refer-link { flex: 2 1 420px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dash-refer-link p { margin: 0; }
.dash-refer .acct-copy input { background: var(--card); }
.dash-days { color: var(--ok); }

/* ---------------------------------------------------------------- performance */
.dash-chart-card { display: flex; flex-direction: column; gap: 12px; }
.dash-chart-card p { margin: 0; }
.dash-legend { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.dash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dash-key { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--primary); }
.dash-key-avg { border-top: 2px dashed var(--muted); }
.dash-plot { position: relative; padding: 0 0 26px 46px; }
.dash-chart { width: 100%; height: 220px; display: block; overflow: visible; }
.dash-ylabels { position: absolute; left: 0; top: 0; width: 38px; height: 220px; }
.dash-ylabels span, .dash-xlabels span { position: absolute; font-size: 12px; color: var(--muted); line-height: 1; white-space: nowrap; }
.dash-ylabels span { right: 0; transform: translateY(-50%); }
.dash-xlabels { position: absolute; left: 46px; right: 0; bottom: 0; height: 18px; }
.dash-xlabels span { transform: translateX(-50%); top: 4px; }
.dash-grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dash-avg { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.dash-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dash-pt { stroke: var(--primary); stroke-width: 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dash-pt:hover { stroke-width: 14; }
@media (max-width: 640px) { .dash-chart, .dash-ylabels { height: 180px; } .dash-xl-minor { display: none; } }

.dash-subjects { display: flex; flex-direction: column; }
.dash-srow { display: grid; grid-template-columns: minmax(0, 2fr) 100px minmax(160px, 1.6fr) 130px 90px; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 15px; }
.dash-shead { background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; padding-top: 10px; padding-bottom: 10px; }
.dash-sitem { position: relative; }
.dash-sitem > .dash-srow, .dash-sdetails > summary { padding-right: 112px; grid-template-columns: minmax(0, 2fr) 100px minmax(160px, 1.6fr) 130px; }
.dash-sdetails > summary { cursor: pointer; list-style: none; min-height: 48px; }
.dash-sdetails > summary::-webkit-details-marker { display: none; }
.dash-sdetails > summary:hover { background: var(--surface); }
.dash-sname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); flex: none; transition: transform .15s; margin-right: 2px; }
.dash-sdetails[open] .dash-chev { transform: rotate(45deg); }
.dash-srow-none .dash-sname { padding-left: 18px; }
.dash-scorecell { display: flex; align-items: center; gap: 10px; }
.dash-scorecell .bar { flex: 1; min-width: 60px; }
.dash-scorecell strong { min-width: 40px; text-align: right; }
.dash-practise { position: absolute; right: 22px; top: 12px; min-height: 26px; line-height: 26px; font-weight: 600; font-size: 15px; }
.dash-shead { padding-right: 112px; grid-template-columns: minmax(0, 2fr) 100px minmax(160px, 1.6fr) 130px; }
.dash-shead > span:last-child { display: none; }
.dash-subs { padding: 0 22px 14px 48px; background: var(--surface); }
.dash-subs .tbl { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dash-subs .tbl th { background: var(--card); }
.dash-cl { display: none; }
@media (max-width: 760px) {
  .dash-shead { display: none; }
  .dash-sitem > .dash-srow, .dash-sdetails > summary { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 16px; padding-right: 90px; }
  .dash-sname { grid-column: 1 / -1; }
  .dash-srow .dash-scorecell { grid-column: 1 / -1; order: 5; }
  .dash-cl { display: inline; color: var(--muted); font-size: 14px; }
  .dash-scorecell .dash-cl { flex: none; }
  .dash-practise { right: 16px; top: 12px; min-height: 44px; line-height: 44px; margin-top: -10px; }
  .dash-subs { padding: 0 12px 12px; }
}
.dash-twins { margin-top: 4px; }
.dash-twin { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface); }
.dash-twin-ok { border-left: 4px solid var(--ok); }
.dash-twin-mark { border-left: 4px solid var(--mark-strong); }
.dash-twin-bad { border-left: 4px solid var(--bad); }
.dash-twin .stat { min-width: 44px; text-align: center; }

/* ---------------------------------------------------------------- search */
.dash-search-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.dash-sq { flex: 1 1 320px; }
.dash-ss { flex: 0 1 220px; }
.dash-st { flex: 0 1 180px; }
@media (max-width: 640px) { .dash-ss, .dash-st { flex: 1 1 140px; } .dash-search-form .btn { width: 100%; } }
#search-summary { margin: 0; }
.dash-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dash-result { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; }
.dash-result-head { gap: 8px 10px; }
.dash-result-head form { margin: 0; }
.dash-result .pill { white-space: normal; }
.dash-qlink { font-weight: 700; text-decoration: none; min-height: 32px; font-size: 17px; }
.dash-qlink:hover { text-decoration: underline; }
.dash-snippet { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.dash-snippet mark { background: var(--mark-bg); color: var(--text); padding: 0 2px; border-radius: 3px; font-weight: 600; box-shadow: inset 0 -2px 0 var(--mark-strong); }
.dash-from { font-weight: 700; color: var(--muted); font-size: 14px; }
.dash-pager { justify-content: center; }

/* ---------------------------------------------------------------- account */
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.acct-wide { grid-column: 1 / -1; }
@media (max-width: 1000px) { .acct-grid { grid-template-columns: minmax(0, 1fr); } }
.acct-card { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 80px; }
.acct-card h3.label, .acct-sublabel { margin-bottom: 8px; font-family: var(--font-body); }
.acct-passbox { background: var(--accent-soft); color: var(--text); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.acct-passname { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--accent-soft-text); }
.acct-banked { margin-top: 8px; display: flex; gap: 6px; align-items: center; font-size: 15px; color: var(--ok); font-weight: 600; }
.acct-disc { margin: 0; }
.acct-continue { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 2px solid var(--primary); border-radius: 10px; padding: 14px 16px; background: var(--card); }
.acct-continue-plan { font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.acct-continue .btn { min-height: 48px; }
.acct-plans { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .acct-plans { grid-template-columns: minmax(0, 1fr); } }
.acct-plan form { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; height: 100%; }
.acct-plan.is-selected form { border: 2px solid var(--primary); background: var(--accent-soft); }
.acct-plan-info { display: flex; flex-direction: column; line-height: 1.3; }
.acct-plan-price { font-size: 15px; color: var(--text-2); }
.acct-plan .btn { min-height: 44px; }
.acct-receipts td, .acct-receipts th { padding-left: 10px; padding-right: 10px; }
.acct-pair { gap: 16px; }
.acct-emailpw[hidden] { display: none; }
.acct-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.acct-seg { flex-wrap: wrap; }
.acct-seg span { min-height: 44px; display: flex; align-items: center; }
.acct-narrow { max-width: 240px; }
.acct-iapnote { margin: 0; }
.acct-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 900px) { .acct-app { grid-template-columns: minmax(0, 1fr); } }
.acct-app-info { display: flex; flex-direction: column; gap: 10px; }
.acct-app-info p, .acct-app-devs p { margin: 0; }
.acct-app-devs { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 901px) { .acct-app-devs { border-left: 1px solid var(--line); padding-left: 22px; } }
@media (max-width: 900px) { .acct-app-devs { border-top: 1px solid var(--line); padding-top: 16px; } }
.acct-devices { border-top: 1px solid var(--line); padding-top: 16px; }
.acct-devices p { margin: 0 0 8px; }
.acct-devlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acct-devlist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.acct-devlist li:first-child { border-top: 0; }
.acct-devlist form { margin: 0; }
.acct-devlist .btn { min-height: 44px; }
.acct-refer-head { align-items: baseline; }
.acct-refer-text { margin: 0; color: var(--text-2); }
.acct-card > p { margin: 0; }
.acct-good { color: var(--ok); }
.acct-reftbl td { white-space: nowrap; }
.acct-data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .acct-data { grid-template-columns: minmax(0, 1fr); } }
.acct-data-item { display: flex; flex-direction: column; gap: 8px; }
.acct-data-item + .acct-data-item { border-left: 1px solid var(--line); padding-left: 22px; }
@media (max-width: 900px) { .acct-data-item + .acct-data-item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; } }
.acct-data-item h3 { font-size: 16px; }
.acct-data-item p { margin: 0; }
.acct-data-item > .btn { align-self: flex-start; }
.acct-danger-form { gap: 10px; }

/* ---------------------------------------------------------------- receipt */
.acct-receipt-page { padding: 24px 16px 48px; }
.acct-receipt-actions { max-width: 760px; margin: 0 auto 16px; display: flex; justify-content: space-between; gap: 12px; }
.acct-receipt { max-width: 760px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 24px; }
.acct-receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.acct-receipt-title { text-align: right; }
.acct-receipt-title h1 { font-size: 28px; }
.acct-receipt-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; font-size: 15px; }
.acct-receipt-parties .label { margin-bottom: 4px; }
@media (max-width: 640px) { .acct-receipt { padding: 20px; } .acct-receipt-parties { grid-template-columns: minmax(0, 1fr); } .acct-receipt-title { text-align: left; } }
.acct-receipt-lines tfoot th, .acct-receipt-lines tfoot td { border-top: 2px solid var(--line-strong); padding: 12px 14px; background: none; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.acct-num { text-align: right !important; white-space: nowrap; }
.acct-receipt > p { margin: 0; }
@media print {
  .acct-receipt-actions { display: none; }
  .acct-receipt-page, .bare { background: #ffffff; padding: 0; }
  .acct-receipt { border: 0; padding: 0; background: #ffffff; }
  .acct-receipt, .acct-receipt * { color: #000000 !important; }
}
.acct-nowrap { white-space: nowrap; }
.acct-card > *, .dash-chart-card > *, .dash-quick > * { min-width: 0; }
.acct-card .tbl-wrap, .dash-main-grid .tbl-wrap, .dash-subs { position: relative; }

@media (max-width: 640px) { .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .dash-tile { padding: 14px; } }

/* Study plan on the account page */
.acct-plan-fs { gap: 10px; }
.acct-plan-fs .grid-2 { margin: 0; }

/* Date fields (sign-up, account study plan): match the other inputs in app.css */
input[type=date] {
  font: inherit; font-size: 16px; min-height: 46px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text); width: 100%;
}
input[type=date]:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); }
