/*
 * tm-account.css  v4  -  Tech Mart account pages
 * Mobile-first, minimal. Everything lives under .tm-wrap so it cannot leak
 * into the rest of the theme. Accent: #22a06b (text/buttons use the darker #1a8056).
 * Upload to: catalog/view/theme/default/stylesheet/tm-account.css
 */

/* ---------- base ---------- */
.tm-wrap {
    --ink: #000; --text: #222; --muted: #6a6a6a; --line: #e6e6e6; --soft: #f6f6f6;
    --accent: #22a06b; --accent-d: #1a8056; --accent-soft: #e9f6f0;
    --err: #c62828; --err-soft: #fdeeee; --r: 10px;
    display: block !important; overflow-x: clip;
    width: 100%; max-width: 1140px; margin: 0 auto; padding: var(--tm-top, 12px) 16px 40px;
    color: var(--text); font-size: 15px; line-height: 1.5;
}
.tm-wrap *, .tm-wrap *::before, .tm-wrap *::after { box-sizing: border-box; }
.tm-wrap img { max-width: 100%; height: auto; }
@media (max-width: 767px) { .tm-wrap { padding-top: var(--tm-top, 48px); } }
@media (min-width: 768px) { .tm-wrap { padding: var(--tm-top, 16px) 24px 56px; } }

/* ---------- breadcrumbs (own markup, so no theme rule can hide them) ---------- */
.tm-crumbs { display: block; padding: 14px 0 10px; font-size: 13px; line-height: 1.4; }
.tm-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.tm-crumbs li { display: inline-flex; align-items: center; min-width: 0; margin: 0; padding: 0; }
.tm-crumbs li + li::before { content: "/"; margin: 0 8px; color: #999; }
.tm-crumbs a { color: #000; text-decoration: none; overflow-wrap: anywhere; }
.tm-crumbs a:hover { color: var(--accent-d); text-decoration: underline; }
.tm-crumbs li:last-child a { font-weight: 600; }
@media (max-width: 767px) { .tm-wrap .tm-crumbs { display: none !important; } }
@media (min-width: 768px) { .tm-wrap .tm-backlink { display: none; } }

/* back link shown above the title of every inner page */
.tm-wrap .tm-backlink { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ink); text-decoration: none; }
.tm-wrap .tm-backlink:hover { color: var(--accent-d); }
.tm-wrap .tm-backlink svg { flex: 0 0 auto; }

/* ---------- layout ---------- */
.tm-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.tm-layout > #content, .tm-main { flex: 1 1 0; min-width: 0; min-height: 0 !important; }
.tm-layout > [class*="col-"] { flex: 0 0 240px; width: 240px; max-width: 100%; float: none; padding: 0; }

/* ---------- headings, text, alerts ---------- */
.tm-wrap h1.tm-title { margin: 0 0 20px; font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--ink); }
@media (min-width: 768px) { .tm-wrap h1.tm-title { font-size: 28px; } }
.tm-wrap .tm-lead { margin: -10px 0 22px; color: var(--muted); font-size: 15px; }
.tm-wrap h2, .tm-wrap h3 { margin: 28px 0 12px; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.tm-wrap p { line-height: 1.55; }
.tm-wrap .text-danger { margin-top: 6px; font-size: 13px; color: var(--err); }

.tm-wrap .tm-alert { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--err); border-radius: var(--r); background: var(--err-soft); color: var(--err); font-size: 14px; }
.tm-wrap .tm-alert--ok { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); }
.tm-wrap .tm-alert .material-icons { font-size: 20px; }

/* ---------- narrow form container (login, register, forgotten, reset ...) ---------- */
.tm-wrap .tm-auth { width: 100%; max-width: 440px; margin: 8px auto 32px; }
.tm-wrap .tm-auth--wide { max-width: 520px; }
@media (min-width: 600px) {
    .tm-wrap .tm-auth { margin-top: 16px; padding: 36px; border: 1px solid var(--line); border-radius: 16px; }
}

/* ---------- form controls ---------- */
.tm-wrap .tm-field { margin: 0 0 18px; }
.tm-wrap .tm-field > label, .tm-wrap .tm-legend { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.tm-wrap .tm-field.is-required > label::after, .tm-wrap .tm-field.required > label::after { content: " *"; color: var(--err); }
.tm-wrap .tm-input { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cfcfcf; border-radius: var(--r); background: #fff; font: inherit; font-size: 16px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.tm-wrap .tm-input::placeholder { color: #9a9a9a; }
.tm-wrap .tm-input:hover { border-color: #999; }
.tm-wrap .tm-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 160, 107, .2); }
.tm-wrap .tm-input.has-error { border-color: var(--err); }
.tm-wrap .tm-hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.tm-wrap .tm-error { margin-top: 6px; font-size: 13px; color: var(--err); }

.tm-wrap .tm-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
@media (min-width: 480px) { .tm-wrap .tm-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tm-wrap .tm-pw { position: relative; }
.tm-wrap .tm-pw .tm-input { padding-right: 68px; }
.tm-wrap .tm-toggle { position: absolute; top: 0; right: 0; height: 48px; padding: 0 14px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tm-wrap .tm-toggle:hover { color: var(--accent-d); }
.tm-wrap .tm-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r); }

.tm-wrap .tm-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.tm-wrap .tm-labelrow label { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.tm-wrap .tm-labelrow a { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; }
.tm-wrap .tm-labelrow a:hover { color: var(--accent-d); }

/* yes / no switch */
.tm-wrap .tm-choice { display: inline-flex; border: 1px solid #cfcfcf; border-radius: var(--r); overflow: hidden; }
.tm-wrap .tm-choice label { position: relative; margin: 0; cursor: pointer; }
.tm-wrap .tm-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tm-wrap .tm-choice span { display: block; min-width: 84px; padding: 12px 24px; background: #fff; text-align: center; font-size: 14px; font-weight: 600; color: var(--text); }
.tm-wrap .tm-choice label + label span { border-left: 1px solid #cfcfcf; }
.tm-wrap .tm-choice input:checked + span { background: var(--accent-d); color: #fff; }
.tm-wrap .tm-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }

/* captcha: keep the Google frame at its real size (the theme was stretching it to 552px tall) */
.tm-wrap .tm-captcha { display: flow-root; max-width: 100%; margin: 4px 0 18px; }
.tm-wrap .tm-captcha fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.tm-wrap .tm-captcha legend { display: none; }
.tm-wrap .tm-captcha .form-group { margin: 0; padding: 0; }
.tm-wrap .tm-captcha [class*="col-sm-"] { float: none; width: auto; padding: 0; }
.tm-wrap .tm-captcha label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tm-wrap .g-recaptcha { width: 304px; max-width: 100%; height: 78px; overflow: hidden; }
.tm-wrap .g-recaptcha iframe { width: 304px !important; height: 78px !important; max-width: none; }
@media (max-width: 340px) { .tm-wrap .g-recaptcha { transform: scale(.9); transform-origin: 0 0; } }

.tm-wrap .tm-agree { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.tm-wrap .tm-agree input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.tm-wrap .tm-agree p { margin: 0; }
.tm-wrap .tm-agree a { font-weight: 600; text-decoration: underline; color: var(--ink); }

/* ---------- buttons ---------- */
.tm-wrap .tm-submit, .tm-wrap .tm-outline, .tm-wrap .tm-back, .tm-wrap .tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 24px; border-radius: var(--r); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.tm-wrap .tm-submit { width: 100%; border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.tm-wrap .tm-submit:hover, .tm-wrap .tm-submit:focus { border-color: var(--accent-d); background: var(--accent-d); color: #fff; }
.tm-wrap .tm-outline { width: 100%; border: 2px solid var(--ink); background: #fff; color: var(--ink); }
.tm-wrap .tm-outline:hover, .tm-wrap .tm-outline:focus { border-color: var(--accent-d); background: var(--accent-d); color: #fff; }
.tm-wrap .tm-back, .tm-wrap .tm-btn { border: 1px solid #cfcfcf; background: #fff; color: var(--ink); font-weight: 600; }
.tm-wrap .tm-back:hover, .tm-wrap .tm-btn:hover { border-color: var(--accent); color: var(--accent-d); }
.tm-wrap .tm-btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.tm-wrap .tm-submit:focus-visible, .tm-wrap .tm-outline:focus-visible, .tm-wrap .tm-back:focus-visible, .tm-wrap .tm-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.tm-wrap .tm-actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 8px; }
@media (min-width: 600px) {
    .tm-wrap .tm-actions { flex-direction: row; justify-content: space-between; }
    .tm-wrap .tm-actions .tm-submit { width: auto; min-width: 170px; }
    .tm-wrap .tm-auth .tm-actions .tm-submit { flex: 1 1 auto; }
}
.tm-wrap .tm-page .tm-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

.tm-wrap .tm-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: var(--muted); font-size: 14px; }
.tm-wrap .tm-divider::before, .tm-wrap .tm-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.tm-wrap .tm-login { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--muted); }
.tm-wrap .tm-login a { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* ---------- full-width content pages ---------- */
.tm-wrap .tm-page { margin: 8px 0 40px; }
.tm-wrap .tm-narrow { max-width: 520px; }
.tm-wrap .tm-page p a, .tm-wrap .tm-page td a:not(.btn) { color: var(--ink); font-weight: 600; text-decoration: underline; }

/* old Bootstrap-style forms (edit, address form, return form ...) restyled */
.tm-legacy .form-horizontal { max-width: 640px; }
.tm-legacy fieldset { min-width: 0; margin: 0 0 8px; padding: 0; border: 0; }
.tm-legacy legend { display: block; width: 100%; margin: 8px 0 18px; padding: 0 0 10px; border: 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; color: var(--ink); }
.tm-legacy .form-horizontal .form-group { display: block; margin: 0 0 18px; }
.tm-legacy .form-horizontal .form-group > label, .tm-legacy .form-horizontal .control-label { display: block; float: none; width: 100%; margin: 0 0 6px; padding: 0; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); }
.tm-legacy .form-horizontal .form-group [class*="col-sm-"] { float: none; width: 100%; padding: 0; }
.tm-legacy .form-group.required .control-label::before, .tm-legacy .form-group.required > label::before { content: none; }
.tm-legacy .form-group.required > label::after, .tm-legacy .form-group.required .control-label::after { content: " *"; color: var(--err); }
.tm-legacy .form-control { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cfcfcf; border-radius: var(--r); background: #fff; box-shadow: none; font-size: 16px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.tm-legacy textarea.form-control { height: auto; padding: 12px 14px; }
.tm-legacy select.form-control { padding: 0 10px; }
.tm-legacy .form-control:hover { border-color: #999; }
.tm-legacy .form-control:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 160, 107, .2); }
.tm-legacy .radio, .tm-legacy .checkbox { margin: 8px 0; }
.tm-legacy input[type="radio"], .tm-legacy input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }
.tm-legacy .input-group { display: flex; width: 100%; }
.tm-legacy .input-group .form-control { flex: 1 1 auto; min-width: 0; border-radius: var(--r) 0 0 var(--r); }
.tm-legacy .input-group-btn { display: flex; width: auto; }
.tm-legacy .input-group-btn > .btn { height: 48px; border-radius: 0 var(--r) var(--r) 0; }

/* Bootstrap buttons inside content pages */
.tm-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--r); font-size: 14px; font-weight: 600; line-height: 1.2; text-shadow: none; box-shadow: none; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.tm-page .btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.tm-page .btn-primary:hover, .tm-page .btn-primary:focus, .tm-page .btn-primary:active { background: var(--accent-d); border-color: var(--accent-d); color: #fff; }
.tm-page .btn-default, .tm-page .btn-info { background: #fff; border-color: #cfcfcf; color: var(--ink); }
.tm-page .btn-default:hover, .tm-page .btn-default:focus, .tm-page .btn-info:hover, .tm-page .btn-info:focus { background: #fff; border-color: var(--accent); color: var(--accent-d); }
.tm-page .btn-danger { background: #fff; border-color: #e3b5b5; color: var(--err); }
.tm-page .btn-danger:hover, .tm-page .btn-danger:focus { background: var(--err); border-color: var(--err); color: #fff; }
.tm-page input[type="submit"].btn { min-height: 48px; padding: 0 28px; font-size: 15px; }
.tm-page .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.tm-page .buttons { display: flex; flex-direction: column-reverse; gap: 10px; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.tm-page .buttons::before, .tm-page .buttons::after { display: none; }
.tm-page .buttons .pull-left, .tm-page .buttons .pull-right { float: none; }
.tm-page .buttons .btn, .tm-page .buttons input[type="submit"] { width: 100%; min-height: 48px; }
@media (min-width: 600px) {
    .tm-page .buttons { flex-direction: row; align-items: center; justify-content: space-between; }
    .tm-page .buttons .btn, .tm-page .buttons input[type="submit"] { width: auto; }
    .tm-page .buttons .pull-right:only-child { margin-left: auto; }
}

/* ---------- tables ---------- */
.tm-page .table-responsive { margin: 0 0 20px; border: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tm-page .table { width: 100%; max-width: 100%; margin: 0 0 20px; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; border-radius: 12px; overflow: hidden; background: #fff; }
.tm-page .table-responsive > .table { margin-bottom: 0; }
.tm-page .table > thead > tr > td, .tm-page .table > thead > tr > th { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--soft); font-size: 13px; font-weight: 700; color: var(--ink); }
.tm-page .table > tbody > tr > td, .tm-page .table > tbody > tr > th, .tm-page .table > tfoot > tr > td { padding: 12px 14px; border: 0; border-top: 1px solid #eee; vertical-align: middle; font-size: 14px; }
.tm-page .table > tbody > tr:first-child > td { border-top: 0; }
.tm-page .table > tfoot > tr > td { background: #fafafa; }
.tm-page .table-hover > tbody > tr:hover { background: var(--accent-soft); }
.tm-page .table img { max-width: 64px; height: auto; border-radius: 8px; }
.tm-page .table .btn { min-height: 36px; padding: 0 12px; }

/* on phones the table becomes a stack of cards (needs tm-account.js; without it the table just scrolls sideways) */
@media (max-width: 640px) {
    .tm-page .table-responsive:has(> table.tm-stack) { overflow: visible; }
    .tm-page table.tm-stack, .tm-page table.tm-stack tbody, .tm-page table.tm-stack tfoot, .tm-page table.tm-stack tr, .tm-page table.tm-stack td { display: block; width: 100%; }
    .tm-page table.tm-stack { border: 0; background: transparent; border-radius: 0; overflow: visible; }
    .tm-page table.tm-stack thead { display: none; }
    .tm-page table.tm-stack tr { margin: 0 0 12px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .tm-page table.tm-stack > tbody > tr > td, .tm-page table.tm-stack > tfoot > tr > td { padding: 8px 0; border: 0; border-top: 1px solid #f0f0f0; background: transparent; text-align: left !important; }
    .tm-page table.tm-stack > tbody > tr > td:first-child, .tm-page table.tm-stack > tfoot > tr > td:first-child { border-top: 0; }
    .tm-page table.tm-stack td[data-label]::before { content: attr(data-label); display: block; margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
    .tm-page table.tm-stack td { overflow-wrap: anywhere; white-space: normal !important; }
    .tm-page table.tm-stack td:not([data-label]) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
    .tm-page table.tm-stack td:not([data-label]) > .btn { flex: 1 1 140px; width: auto; min-width: 0; min-height: 44px; }
    .tm-page table.tm-stack tfoot tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
    .tm-page table.tm-stack > tfoot > tr > td { width: auto; padding: 6px 0; border-top: 0; }
    .tm-page table.tm-stack > tfoot > tr > td:last-child { text-align: right !important; }
    .tm-page table.tm-stack td:empty { display: none; }
}

/* ---------- pagination / result counts ---------- */
.tm-page .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; }
.tm-page .row > [class*="col-"] { float: none; width: auto; padding: 0; }
.tm-page .row .text-right, .tm-page .row .text-left { font-size: 13px; color: var(--muted); }
.tm-page .pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tm-page .pagination > li { float: none; }
.tm-page .pagination > li > a, .tm-page .pagination > li > span { float: none; display: block; min-width: 40px; padding: 8px 12px; border: 1px solid #d6d6d6; border-radius: 8px !important; text-align: center; color: var(--ink); }
.tm-page .pagination > li > a:hover { border-color: var(--accent); color: var(--accent-d); background: #fff; }
.tm-page .pagination > .active > span, .tm-page .pagination > .active > span:hover { background: var(--accent-d); border-color: var(--accent-d); color: #fff; }

/* ---------- address cards, empty state ---------- */
.tm-page .tm-cards { display: grid; gap: 12px; margin: 0 0 8px; }
.tm-page .tm-item { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tm-page .tm-item:hover { border-color: var(--accent); }
.tm-page .tm-item-text { line-height: 1.6; overflow-wrap: anywhere; }
.tm-page .tm-item-actions { display: flex; gap: 8px; }
.tm-page .tm-item-actions .btn { flex: 1 1 0; }
@media (min-width: 600px) {
    .tm-page .tm-item { flex-direction: row; align-items: center; justify-content: space-between; padding: 18px 20px; }
    .tm-page .tm-item-actions { flex: 0 0 auto; }
    .tm-page .tm-item-actions .btn { flex: 0 0 auto; }
}
.tm-page .tm-empty { padding: 28px 16px; border: 1px dashed #d0d0d0; border-radius: 12px; text-align: center; color: var(--muted); }

/* ---------- orders list ---------- */
.tm-orders { display: grid; gap: 12px; margin: 0 0 8px; }
.tm-order { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.tm-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--soft); }
.tm-order-id { font-weight: 700; color: var(--ink); }
.tm-order-date { font-size: 13px; color: var(--muted); }
.tm-chip { display: inline-block; flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; background: #ececec; font-size: 12px; font-weight: 700; line-height: 1.3; color: #444; white-space: nowrap; }
.tm-chip.complete, .tm-chip.completed, .tm-chip.delivered, .tm-chip.shipped { background: var(--accent-soft); color: var(--accent-d); }
.tm-chip.canceled, .tm-chip.cancelled, .tm-chip.failed, .tm-chip.denied, .tm-chip.voided, .tm-chip.refunded, .tm-chip.expired { background: var(--err-soft); color: var(--err); }
.tm-order-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.tm-order-item { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tm-order-item img { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 8px; background: var(--soft); object-fit: cover; }
.tm-order-name { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tm-order-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.tm-order-side { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tm-order-total { font-size: 18px; font-weight: 700; color: var(--ink); }
@media (min-width: 640px) {
    .tm-order-body { flex-direction: row; align-items: center; justify-content: space-between; }
    .tm-order-side { flex: 0 0 auto; gap: 24px; }
}

/* ---------- account dashboard ---------- */
.tm-hero { display: flex; flex-direction: column; gap: 16px; padding: 8px 0 24px; border-bottom: 1px solid var(--line); }
.tm-hero-user { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tm-avatar { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.tm-hello { margin: 0; font-size: 13px; color: var(--muted); }
.tm-name { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.tm-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.tm-stat { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--accent-soft); }
.tm-stat .material-icons { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--accent); font-size: 20px; }
.tm-stat small { display: block; font-size: 11px; line-height: 1.2; color: var(--muted); }
.tm-stat strong { display: block; font-size: 17px; line-height: 1.2; color: var(--accent-d); }
@media (min-width: 640px) {
    .tm-hero { flex-direction: row; align-items: center; justify-content: space-between; }
    .tm-name { font-size: 26px; }
}

.tm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 0; }
@media (min-width: 640px) { .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .tm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.tm-wrap .tm-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; text-decoration: none !important; transition: transform .15s, border-color .15s, box-shadow .15s; }
.tm-wrap .tm-tile:hover, .tm-wrap .tm-tile:focus { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, .07); }
.tm-wrap .tm-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tm-tile .material-icons { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 26px; transition: background .15s, color .15s; }
.tm-tile:hover .material-icons, .tm-tile:focus .material-icons { background: var(--accent); color: #fff; }
.tm-wrap .tm-tile-label { font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.tm-tile--out .material-icons { background: #f0f0f0; color: #333; }
.tm-wrap .tm-tile--out:hover, .tm-wrap .tm-tile--out:focus { border-color: var(--ink); }
.tm-tile--out:hover .material-icons, .tm-tile--out:focus .material-icons { background: var(--ink); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .tm-wrap *, .tm-wrap *::before, .tm-wrap *::after { transition: none !important; }
    .tm-wrap .tm-tile:hover { transform: none; }
}
