/* Theme 2.0: My account. Owner: Account/Auth agent. Tokens and t2-* components only: no hex, weights 400/500/700, panel gap 6px.
   Panes are visible stacked without JS; account.js adds .ac-js and turns them into tabs. */

.ac { padding-bottom: 48px; }
.ac [hidden] { display: none !important; }
.ac a:not(.t2-btn) { text-decoration: underline; text-underline-offset: 3px; }

.ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ac-head .t2-body { margin-top: 6px; color: var(--t2); }
.ac-plan-badge { padding: 6px 12px; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }

.ac-trial, .ac-complete, .ac-empty, .ac-followed { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: var(--gap); }
.ac-trial .t2-body, .ac-complete .t2-body { margin-top: 4px; color: var(--t2); }
.ac-followed .t2-body { margin: 0; color: var(--tx); }
.ac-empty { flex-direction: column; align-items: flex-start; padding: 32px; }

/* Overview: the shared activity component fills the pane; the fallback shows only until it has data (and without JS) */
.ac-ov-empty { display: grid; gap: 4px; }
.ac-ov-empty .t2-body { color: var(--t2); margin: 0 0 8px; }
.ma:not([hidden]) + .ac-ov-empty { display: none; }

/* tabs */
.ac-tabbar { margin: 18px 0 14px; overflow-x: auto; border-bottom: 1px solid var(--grid); scrollbar-width: none; }
.ac-tabbar::-webkit-scrollbar { display: none; }
.ac-tabs { gap: 22px; white-space: nowrap; padding-bottom: 0; }
.ac-tabs button { padding: 8px 0 10px; font-size: 14px; }

/* panes */
.ac-panes { display: block; }
.ac-pane { display: grid; gap: var(--gap); margin-bottom: var(--gap); align-content: start; }
.ac-js .ac-pane { display: none; margin-bottom: 0; }
.ac-js .ac-pane.is-active { display: grid; }

/* definition rows */
.ac-rows { margin: 0; padding: 0; }
.ac-row { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--grid); }
.ac-row:first-child { border-top: 0; }
.ac-row dt { color: var(--td); font-size: 13px; }
.ac-row dd { margin: 0; color: var(--tx); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.ac-rows--2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.ac-rows--2 .ac-row:nth-child(2) { border-top: 0; }
.ac-empty-v { color: var(--td); }
.ac-inline { margin-left: 8px; height: 30px; padding: 0 12px; }
.ac-note { font-size: 13px; color: var(--t2); }
.ac-foot { margin-top: 12px; }

/* photo */
.ac-photo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--grid); }
.ac-photo__t { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.ac-avatar { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--seg); border: 1px solid var(--pbd); }
.ac-av-init { font-size: 16px; font-weight: 500; color: var(--t2); }
.ac-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ac-avatar.has-img .ac-av-init { display: none; }

/* forms */
.ac-form { display: grid; gap: 16px; margin-top: 12px; }
.ac-grid { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 12px; }
.ac-grid--2 { grid-template-columns: 1fr 1fr; }
.ac-actions { margin-top: 4px; align-items: center; }
.t2-field select.t2-input { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--td) 50%), linear-gradient(135deg, var(--td) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.t2-field select.t2-input option, .t2-field select.t2-input optgroup { color: var(--tx); background: var(--panelsolid); }
.ac-uok { color: var(--gain); }
.ac-ubad { color: var(--loss); }

/* plan */
.ac-planname { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.ac-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--t2); }
.ac-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--td); }
.ac-status--active .ac-status__dot { background: var(--gainfill); }
.ac-status--trial .ac-status__dot { background: var(--r2); }
.ac-status--cancelled .ac-status__dot, .ac-status--past_due .ac-status__dot { background: var(--lossfill); }
.ac-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 32px; }
.ac-meter__t { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--t2); margin-bottom: 8px; }

/* preferences */
.ac-prefs { display: grid; }
.ac-pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--grid); }
.ac-pref:first-child { border-top: 0; }
.ac-pref > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* watchlist and comparison lists */
.ac-li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--grid); }
.ac-li:first-child { border-top: 0; }
.ac-li__n { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ac-li__n a { color: var(--tx); font-size: 14px; font-weight: 500; }
.ac-none { color: var(--t2); font-size: 14px; padding: 6px 0; }
.ac-pay { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.ac-pay:first-child { border-top: 0; }

/* danger */
.ac-btn-danger { color: var(--loss); border-color: var(--loss); }
.ac-btn-danger:hover { color: var(--loss); background: color-mix(in srgb, var(--loss) 12%, transparent); }

/* modals */
.ac-modal { width: min(520px, calc(100vw - 48px)); display: grid; gap: 12px; }
.ac-modal .t2-title { padding-right: 40px; }
.ac-steps { display: flex; gap: 6px; margin-bottom: 4px; }
.ac-steps i { width: 28px; height: 4px; border-radius: 2px; background: var(--track); }
.ac-steps i.is-on { background: var(--ink); }
.ac-wstep { display: none; gap: 12px; }
.ac-wstep.is-active { display: grid; }
.ac-roles { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
  .ac-modal .t2-modal-x { width: 44px; height: 44px; top: 8px; right: 8px; }     /* 44px tap on phones */
  .ac-row { grid-template-columns: 1fr; gap: 2px; }
  .ac-grid, .ac-grid--2, .ac-rows--2, .ac-meters { grid-template-columns: 1fr; }
  .ac-rows--2 .ac-row:nth-child(2) { border-top: 1px solid var(--grid); }
  .ac-li, .ac-pay { grid-template-columns: 1fr auto; }
  .ac-li__d { grid-column: 1; }
}

/* Menus review: under 900px inputs are 16px (no iOS zoom) and links/buttons in lists are at least 36px high */
@media (max-width: 899px) {
  .ac-form .t2-input, .ac-form select.t2-input, .t2-field .t2-input, #t2Modal-welcome .t2-input, #t2Modal-acconfirm .t2-input { font-size: 16px; }
  .ac-li__n a { display: inline-flex; align-items: center; min-height: 36px; }
  .ac-pane .t2-panel-head .t2-btn, .ac-pane .ac-actions .t2-btn, .ac-li .t2-btn, .ac-li button { min-height: 36px; }
  .ac-pane a.t2-btn { display: inline-flex; align-items: center; }
}

/* Luke/GM: primary and secondary buttons in the same action row (page, welcome, confirm modals) are equal: 44px, same radius and text */
.ac-actions .t2-btn { height: 44px; min-height: 44px; padding: 0 20px; border-radius: var(--rad-btn-l); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 480px) { .ac-actions .t2-btn { flex: 1 1 140px; padding: 0 12px; } }

/* Tab strip: ONE straight 2px indicator, drawn with ::after (no border, so no corner can curl it), straight hairline, inset focus ring.
   Cause of the curled ends: a border-bottom on a button that a legacy theme rule gives a border-radius. Radius is forced to 0 here (!important beats the leak). */
.ac-tabbar { padding-top: 2px; border-radius: 0 !important; }
.ac-tabs { border-radius: 0; }
.ac-tabs button { position: relative; border: 0 !important; border-radius: 0 !important; box-shadow: none; background: none; -webkit-appearance: none; appearance: none; margin-bottom: -1px; outline: 0; }
.ac-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 0; background: transparent; pointer-events: none; }
.ac-tabs button[aria-selected="true"]::after { background: var(--tx); }
.ac-tabs button:focus:not(:focus-visible) { outline: 0; }
.ac-tabs button:focus-visible { outline: 2px solid var(--r3); outline-offset: -3px; border-radius: 0 !important; }
