/* ─────────────────────────────────────────────
   TRY GARAGE AI — App / Dashboard Styles
───────────────────────────────────────────── */

/* ── LOADER SCREEN ── */
.loader-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-screen__inner { text-align: center; width: 280px; }
.loader-logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 2rem;
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
}
.loader-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}
.loader-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width .4s ease;
}
.loader-text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
}

/* ── MAINTENANCE BANNER ── */
.maintenance-banner {
  background: #1a0a00;
  border-bottom: 1px solid var(--accent);
  padding: 10px 32px;
  text-align: center;
  font-size: 14px;
  color: var(--accent2);
}

/* ── APP SHELL ── */
.app-body { overflow: hidden; height: 100vh; }
.app-shell {
  display: flex;
  height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 10;
}
.sidebar__logo {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar__nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
  transition: var(--transition);
  text-decoration: none;
}
.sidebar__link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar__link:hover { background: var(--bg3); color: var(--text); }
.sidebar__link--active { background: var(--accent-dim); color: var(--accent); }
.sidebar__link--active:hover { background: var(--accent-dim); color: var(--accent); }
.sidebar__bottom { padding: 12px; border-top: 1px solid var(--border); }
.pixel-balance {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.pixel-balance__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--text3);
  margin-bottom: 4px;
}
.pixel-balance__amount {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--green);
  line-height: 1;
}
.pixel-balance__expiry {
  font-family: var(--mono);
  font-size: 10px;
  color: #ff9900;
  margin-top: 4px;
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar__user-avatar {
  width: 30px;
  height: 30px;
  background: var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar__user-id {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}
.sidebar__signout { font-size: 11px; color: var(--text3); }
.sidebar__signout:hover { color: var(--accent); }

/* ── APP MAIN ── */
.app-main {
  flex: 1;
  overflow-y: auto;
  position: relative;
}
.app-header {
  display: none;
  align-items: center;
  padding: 0 16px;
  height: 52px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-toggle span { display: block; width: 18px; height: 2px; background: var(--text2); border-radius: 2px; }
.app-header__title { flex: 1; text-align: center; font-family: var(--display); font-size: 1.1rem; letter-spacing: .05em; }
.app-header__balance { font-family: var(--mono); font-size: 12px; color: var(--green); }

/* ── VIEWS ── */
.view { display: none; padding: 32px; max-width: 1100px; }
.view--active { display: block; }
.view__header { margin-bottom: 32px; }
.view__header h1 { margin-bottom: 6px; }
.view__header p { font-size: 14px; }

/* ── TRANSFORM LAYOUT ── */
.transform-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

/* ── LEFT: Image column ── */
.transform-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Upload card */
.upload-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.upload-zone { padding: 16px; }
.upload-zone__placeholder {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.upload-zone__placeholder:hover { border-color: var(--accent); background: rgba(255,69,0,.03); }
.upload-zone__placeholder svg { color: var(--text3); margin-bottom: 10px; }
.upload-zone__placeholder p { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.upload-zone__placeholder button {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-family: var(--sans); font-size: 13px;
  text-decoration: underline; padding: 0;
}
.upload-zone__placeholder span { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.upload-zone__preview { position: relative; }
.upload-zone__preview img {
  width: 100%; border-radius: var(--radius);
  max-height: 340px; object-fit: cover; display: block;
}
.upload-zone__remove {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.75); border: 1px solid var(--border2);
  color: var(--text); padding: 4px 10px;
  border-radius: var(--radius); cursor: pointer;
  font-size: 12px; font-family: var(--sans);
  transition: var(--transition);
}
.upload-zone__remove:hover { background: rgba(255,69,0,.8); border-color: var(--accent); }

/* Cost bar — sits below the image */
.cost-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  min-height: 64px;
}
.cost-bar__breakdown {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cost-bar__hint { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.cost-bar__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
}
.cost-bar__chip-val { color: var(--accent); font-weight: 600; }
.cost-bar__summary {
  flex-shrink: 0;
  text-align: right;
}
.cost-bar__total-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
}
.cost-bar__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--text3);
}
.cost-bar__total-val {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}
.cost-bar__balance {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
}

/* Result card */
.result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.result-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--text3);
}
.result-card__actions { display: flex; gap: 6px; }
.result-card__compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.compare-panel { position: relative; }
.compare-label {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,.65);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text3);
  letter-spacing: .08em;
  padding: 2px 7px;
  border-radius: 3px;
  z-index: 1;
}
.compare-panel img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* ── RIGHT: Options panel ── */
.transform-right {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 20px;
}

/* Option toggle tabs */
.opt-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.opt-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--bg3);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.opt-tab:last-child { border-right: none; }
.opt-tab:hover { background: var(--bg4); }
.opt-tab--active {
  background: var(--bg2);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.opt-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.opt-tab__name {
  font-family: var(--display);
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--text2);
  transition: var(--transition);
}
.opt-tab--active .opt-tab__name { color: var(--text); }
.opt-tab__sel {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text3);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opt-tab--active .opt-tab__sel { color: var(--accent); }
.opt-tab__cost {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--text3);
  letter-spacing: .04em;
}

/* Option panels */
.opt-panel { display: none; }
.opt-panel--active { display: block; }

/* Catalog selector inside opt-panel — 4-col fixed grid */
.opt-panel .catalog-selector { padding: 10px; }
.opt-panel .catalog-scroll {
  max-height: 300px;   /* ~3.5 rows × (68px + 6px gap) */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.opt-panel .catalog-scroll::-webkit-scrollbar { width: 4px; }
.opt-panel .catalog-scroll::-webkit-scrollbar-track { background: transparent; }
.opt-panel .catalog-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.opt-panel .catalog-scroll::-webkit-scrollbar-thumb:hover { background: var(--text3); }
.opt-panel .catalog-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-bottom: 6px;
}
.opt-panel .catalog-item__none { font-size: .9rem; }
.opt-panel .catalog-item__name { font-size: 9px; padding: 3px 4px; }

/* Resolution section */
.opt-section {
  border-top: 1px solid var(--border);
  padding: 12px;
}
.opt-section__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--text3);
  margin-bottom: 8px;
}
.opt-section--generate { padding: 14px; }
.resolution-selector { display: flex; gap: 8px; }
.res-btn {
  flex: 1;
  padding: 10px 6px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  cursor: pointer;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .05em;
  transition: var(--transition);
  text-align: center;
}
.res-btn:hover { border-color: var(--border2); color: var(--text); }
.res-btn--active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.res-btn__label, .res-btn__cost {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  margin-top: 2px;
  color: var(--text3);
}
.res-btn--active .res-btn__label { color: rgba(255,69,0,.6); }
.res-btn__cost { color: #ff9900; }

.generate-note {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  margin-top: 8px;
  font-family: var(--mono);
}

/* ── CATALOG SELECTOR (base styles) ── */
.catalog-selector {
  padding: 0 12px 12px;
}

/* Selected preview pill shown above the grid */
.catalog-selected-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,69,0,.25);
  border-radius: var(--radius);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent2);
  letter-spacing: .04em;
  min-height: 34px;
  transition: var(--transition);
}
.catalog-selected-preview.is-none {
  background: var(--bg4);
  border-color: var(--border);
  color: var(--text3);
}
.catalog-selected-preview__img {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}
.catalog-selected-preview__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
}
.catalog-selected-preview.is-none .catalog-selected-preview__dot { background: var(--border2); }
.catalog-selected-preview__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-selected-preview__count {
  font-size: 10px;
  color: var(--text3);
  white-space: nowrap;
}

/* Scrollable grid container — shows ~3 rows then scrolls */
.catalog-scroll {
  max-height: 292px;          /* ~3 rows × (90px item + 8px gap) + padding */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;         /* space for scrollbar */
  /* custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.catalog-scroll::-webkit-scrollbar { width: 4px; }
.catalog-scroll::-webkit-scrollbar-track { background: transparent; }
.catalog-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.catalog-scroll::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* fade-out at bottom to hint more content */
.catalog-scroll-wrap {
  position: relative;
}
.catalog-scroll-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 4px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--bg2));
  pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
/* hide fade when scrolled to bottom */
.catalog-scroll-wrap.at-bottom::after { display: none; }

.catalog-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  padding-bottom: 8px;    /* breathing room before fade */
}

.catalog-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg3);
  position: relative;
}
.catalog-item:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
  background: var(--bg4);
}
.catalog-item--selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent), 0 2px 12px rgba(255,69,0,.18);
}
.catalog-item__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.catalog-item__none {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg4);
  color: var(--text3);
  font-size: 1.2rem;
}
.catalog-item__name {
  padding: 4px 6px;
  font-size: 10px;
  color: var(--text2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--mono);
}
.catalog-item--selected .catalog-item__name { color: var(--accent); font-weight: 600; }
.catalog-loading { padding: 20px; color: var(--text3); font-size: 13px; font-family: var(--mono); }

/* PROCESSING OVERLAY */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,.85);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.processing-overlay__inner { text-align: center; }
.processing-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-title { font-family: var(--display); font-size: 1.6rem; margin-bottom: 8px; }
.processing-sub { font-size: 13px; color: var(--text3); font-family: var(--mono); margin-bottom: 20px; }
.processing-progress { width: 280px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.processing-progress__bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width .5s ease;
}

/* ── HISTORY ── */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.history-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.history-item:hover { border-color: var(--border2); }
.history-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.history-item__info { padding: 10px 12px; }
.history-item__date { font-family: var(--mono); font-size: 10px; color: var(--text3); }
.history-item__desc { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ── CATALOG VIEW ── */
.catalog-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.catalog-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  margin-bottom: -1px;
}
.catalog-tab--active { color: var(--text); border-bottom-color: var(--accent); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.catalog-grid-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.catalog-grid-item:hover { border-color: var(--border2); transform: translateY(-2px); }
.catalog-grid-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.catalog-grid-item__name { padding: 8px; font-size: 12px; text-align: center; color: var(--text2); }

/* ── EMBED VIEW ── */
.api-key-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 32px;
}
.api-key-card__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--text3);
  margin-bottom: 10px;
}
.api-key-card__row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.api-key-display {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-key-card__note { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.embed-docs h3 { font-size: 1rem; font-family: var(--sans); font-weight: 600; margin: 24px 0 12px; }

/* ── BILLING VIEW ── */
.balance-overview {
  background: linear-gradient(135deg, rgba(0,230,118,.08) 0%, var(--bg2) 60%);
  border: 1px solid rgba(0,230,118,.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}
.balance-overview__plan {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(255,69,0,.3);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
}
.balance-overview__label { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--text3); margin-bottom: 8px; }
.balance-overview__amount { font-family: var(--display); font-size: 3rem; color: var(--green); line-height: 1; }
.balance-overview__expiry { font-family: var(--mono); font-size: 12px; color: #ff9900; margin-top: 8px; }

/* Billing sections */
.billing-section { margin-bottom: 36px; }
.billing-section__title { font-family: var(--display); font-size: 1.4rem; letter-spacing: .06em; margin-bottom: 6px; }
.billing-section__sub { font-size: 13px; color: var(--text3); margin-bottom: 20px; }

/* Subscription plan cards in billing view */
.sub-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.sub-plan-card {
  position: relative;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}
.sub-plan-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.sub-plan-card--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 4px 20px rgba(255,69,0,.12); }
.sub-plan-card--current { border-color: var(--green); }
.sub-plan-card__badge {
  position: absolute;
  top: -1px; right: 14px;
  font-family: var(--mono); font-size: 8px; letter-spacing: .1em;
  background: var(--accent); color: #fff;
  padding: 3px 8px; border-radius: 0 0 5px 5px;
}
.sub-plan-card__current-badge {
  position: absolute;
  top: -1px; left: 14px;
  font-family: var(--mono); font-size: 8px; letter-spacing: .1em;
  background: var(--green); color: #000;
  padding: 3px 8px; border-radius: 0 0 5px 5px;
}
.sub-plan-card__name { font-family: var(--display); font-size: 1.4rem; letter-spacing: .06em; color: var(--text); }
.sub-plan-card__price { display: flex; align-items: baseline; gap: 3px; }
.sub-plan-card__amount { font-family: var(--display); font-size: 2rem; color: var(--accent); }
.sub-plan-card__per { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.sub-plan-card__units { font-family: var(--mono); font-size: 11px; color: var(--green); letter-spacing: .04em; }
.sub-plan-card__features { list-style: none; padding: 0; margin: 4px 0; flex: 1; }
.sub-plan-card__features li { font-size: 12px; color: var(--text2); padding: 3px 0; border-bottom: 1px solid var(--border); }
.sub-plan-card__features li:last-child { border-bottom: none; }
.sub-plan-card__topup { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* Top-up grid in billing view */
.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.topup-card-billing {
  position: relative;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.topup-card-billing:hover { border-color: var(--border2); transform: translateY(-2px); }
.topup-card-billing--popular { border-color: var(--accent); }
.topup-card__badge {
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 8px; letter-spacing: .08em;
  background: var(--accent); color: #fff;
  padding: 2px 8px; border-radius: 0 0 5px 5px;
  white-space: nowrap;
}
.topup-card__units { font-family: var(--display); font-size: 1.8rem; color: var(--green); }
.topup-card__label { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-bottom: 6px; }
.topup-card__price { font-family: var(--display); font-size: 1.4rem; color: var(--text); }
.topup-card__per { font-family: var(--mono); font-size: 10px; color: var(--text3); }

.payment-info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.payment-info-card h4 { margin-bottom: 16px; }
.payment-methods--billing { flex-direction: column; }
.payment-methods--billing .payment-method {
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.payment-methods--billing .payment-method__icon { flex-shrink: 0; font-size: 1.5rem; }
.payment-methods--billing p { font-size: 13px; margin: 4px 0 10px; }
.cost-reference {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.cost-reference h4 { margin-bottom: 16px; }

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ── RESPONSIVE APP ── */
@media (max-width: 900px) {
  .app-header { display: flex; }
  .sidebar {
    position: fixed;
    left: -220px;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left .25s ease;
  }
  .sidebar--open { left: 0; }
  .transform-layout { grid-template-columns: 1fr; }
  .transform-right { position: static; }
}
@media (max-width: 600px) {
  .view { padding: 12px; }
  .resolution-selector { gap: 6px; }
  .opt-tab__name { font-size: .8rem; }
  .cost-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cost-bar__summary { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
}

/* ── GOOGLE SIGN-IN SCREEN ── */
.signin-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.signin-card {
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px 32px;
  text-align: center;
}
.signin-logo {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.signin-title {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: .06em;
  color: var(--text);
  margin: 0 0 8px;
}
.signin-title strong { color: var(--accent); font-weight: inherit; }
.signin-sub {
  font-size: 13px;
  color: var(--text3);
  margin: 0 0 28px;
  line-height: 1.5;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: #333;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn-google:hover {
  background: #f8f8f8;
  border-color: #bbb;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.btn-google:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.btn-google__icon { width: 20px; height: 20px; flex-shrink: 0; }
.signin-terms {
  font-size: 11px;
  color: var(--text3);
  margin: 16px 0 0;
  line-height: 1.5;
}
.signin-screen--hidden { display: none; }

/* ── SIDEBAR USER - Google photo support ── */
.sidebar__user-avatar--photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  flex-shrink: 0;
}
.sidebar__user-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
