﻿/* Layout and simpler actions. The original pink theme lives in style.css. */
.hidden { display: none !important; }
.page-header-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head, .section-head-actions { gap: 12px; flex-wrap: wrap; }
.stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-stat-row { margin: 16px 0 0; }
.plan-stat-row .stat-card b { font-size: 1.25rem; }
.simple-details { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; }
.simple-details summary { cursor: pointer; color: var(--text-2); font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.simple-details[open] > summary { margin-bottom: 16px; }
.simple-details > .field { margin-bottom: 0; }
.segmented { max-width: 100%; flex-wrap: wrap; }
.btn, .btn.small, .seg, .icon-btn { min-height: 44px; }
input:where(:not([type=checkbox]):not([type=radio]):not([type=range])), select, textarea { max-width: 100%; }
select { background-color: var(--glass-2); color: var(--text); border: 1px solid var(--line-2); }
.add-account-row { display: block; margin: 16px 0; max-width: 640px; padding: 20px; }
.add-account-row .field { max-width: none; }
.add-account-row .row { margin: 16px 0 0; }
.proxy-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.proxy-form input { width: 100%; }
.acct-empty { padding: 28px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; }
.acct-empty h3 { margin: 0 0 8px; font-size: 1.125rem; }
.acct-empty .hint { margin: 0; }
.acct-tools .proxy-trigger { width: auto; padding: 0 12px; }
.acct-tools .icon-btn { height: 44px; min-width: 44px; }
.row-actions { flex-wrap: wrap; }

/* Compact table actions: keep one customer to one clean row. */
#view-licenses .accounts-table td:last-child { width: 1%; white-space: nowrap; }
#view-licenses .row-actions { flex-wrap: nowrap; gap: 6px; min-width: max-content; }
#view-licenses .row-actions .btn.small {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}
#renew-license-modal .modal-body { max-width: 430px; }
#renew-license-modal .field { margin-bottom: 14px; }
#renew-license-modal .field > span { font-size: 13px; color: var(--muted); }
#renew-license-modal input,
#renew-license-modal select { width: 100%; }
#renew-license-modal .confirm-actions { margin-top: 20px; }
.custom-select-btn { min-height: 44px; }
.custom-select-menu { background: var(--panel); border-color: var(--line-2); }
.custom-select-menu button { min-height: 44px; color: var(--text-2); }
.custom-select-menu button:hover, .custom-select-menu button:focus-visible { background: var(--primary-soft); color: var(--text); }
.ctl-picker .custom-select { flex: 1 1 180px; min-width: 0; }
.ctl-picker .custom-select-btn { width: 100%; }
.acct-ready-note { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.acct-ready-note.is-ready { color: var(--ok); }
.badge.ready { color: var(--ok); background: var(--ok-soft); }

/* Selling and auto-pay share a column beside aim; status fills the row below. */
.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "selling aim" "autopay aim" "status status";
  grid-template-rows: auto auto;
  gap: 20px;
  align-items: stretch;
}
.controls-side { display: contents; }
.ctl-selling { grid-area: selling; }
.ctl-live { grid-area: status; }
.ctl-autopay { grid-area: autopay; }
.ctl-live .stat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.autopay-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.autopay-status { margin-bottom: 0; }
.autopay-status[data-status="review"], .autopay-status[data-status="paused"] { color: var(--amber); }
.autopay-status[data-status="pending"] { color: var(--primary-2); }
.ctl-aim { grid-area: aim; display: flex; flex-direction: column; min-width: 0; }
/* flex-start, not center. The aim card is stretched to the height of the
   selling + auto-pay column beside it, so its height is fixed by its
   neighbours, not its content. Centred, every panel that opens anywhere in
   this grid re-centres this column: expanding "Set exact angles" -- or even
   "Selling settings" in the other card, which grows the row -- slid the
   joystick and its readout up the card. Anchored to the top, panels expand
   downward into the card's own slack and nothing above them moves. */
.ctl-aim .look-controls { flex: 1; justify-content: flex-start; min-width: 0; }
.controls-grid .simple-details { margin: 16px 0 0; }
.card-head-row { flex-wrap: wrap; }
.card-head-row select { width: auto; }
.ctl-picker { gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ctl-picker select { width: auto; flex: 1 1 180px; }
.aim-details { width: 100%; }
.look-manual { flex-wrap: wrap; gap: 12px; }
.look-manual .field { flex: 1 1 140px; max-width: none; min-width: 0; }
.slot-field-row .field { max-width: 140px; flex: 0 0 140px; }
.gs-steps b { display: inline; }
.gs-steps p { margin-top: 6px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; background: var(--panel-2); color: var(--text); border-radius: var(--radius-xs); }
.skip-link:focus { top: 12px; }
button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }

@media (max-width: 760px) {
  .controls-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "selling" "autopay" "aim" "status"; grid-template-rows: auto; }
  .ctl-live .stat-list { grid-template-columns: minmax(0, 1fr); }
  .gs-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cb-stats { order: 4; flex-basis: 100%; }
  .cb-stats .cb-stat-expiry { display: flex !important; }
  .cb-stats .cb-stat-expiry.hidden { display: none !important; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proxy-form { grid-template-columns: minmax(0, 1fr); }
  .slot-field-row .field { flex-basis: auto; }
  .sb-row { grid-template-columns: 24px 24px minmax(0, 1fr) minmax(75px, auto); gap: 8px; }
  .sb-share { display: none; }
  .sb-bal { font-size: 1rem; }
  .sb-name { font-size: .875rem; overflow-wrap: anywhere; }
  .sb-avatar { width: 24px; height: 24px; }
  .login-tabs { flex-wrap: wrap; }
  .login-tab { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .segmented { width: 100%; }
  .seg { flex: 1 1 100%; justify-content: center; }
}
