/* ============================================================
   TallyAg — Settings page styles
   Design reference: settings/settings.html mockup
   ============================================================ */

/* ── Settings shell ── */
.stg-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* ── Left nav ── */
.stg-nav {
  background: #F5F0E8;
  border-right: 1px solid #D4C9BA;
  overflow-y: auto;
  position: relative;
  flex-shrink: 0;
}

.stg-nav-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 24px 20px 12px;
}

.stg-context-switcher {
  margin: 0 14px 14px;
  background: #fff;
  border: 1px solid #D4C9BA;
  border-radius: 5px;
  padding: 2px;
  display: flex;
}

.stg-context-switcher button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stg-context-switcher button.active {
  background: var(--sidebar);
  color: #F5F0E8;
}

.stg-nav-group {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  padding: 20px 20px 4px;
  border-top: 1px solid var(--border-mid);
  margin-top: 8px;
}

.stg-nav-item {
  display: block;
  padding: 9px 20px 9px 17px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s;
  user-select: none;
}

.stg-nav-item:hover { background: #EDE8E0; }

.stg-nav-item.active {
  background: #EDE8E0;
  border-left-color: var(--sidebar);
  font-weight: 500;
}

.stg-nav-item.danger { color: #7A2318; }

/* ── Main content ── */
.stg-main {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.stg-page {
  display: none;
  padding: 32px 40px 60px;
  max-width: 880px;
}

.stg-page.active { display: block; }

/* ── Page header ── */
.stg-page-header {
  margin-bottom: 24px;
}

.stg-page-header h1 {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 5px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.stg-page-header .stg-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Cards ── */
.stg-card {
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.stg-card-header {
  background: #F5F0E8;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid #E8DFD0;
}

.stg-card-header .stg-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.stg-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stg-card-body.row {
  flex-direction: row;
  align-items: center;
}

.stg-card-footer {
  border-top: 1px solid #E8DFD0;
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fff;
}

.stg-card-footer.between {
  justify-content: space-between;
  align-items: center;
}

/* ── Fields ── */
.stg-field {
  display: flex;
  flex-direction: column;
}

.stg-field label,
.stg-field .stg-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

.stg-field .field-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stg-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stg-field input[type=text],
.stg-field input[type=email],
.stg-field input[type=tel],
.stg-field select,
.stg-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  border: 1px solid #D4C9BA;
  border-radius: 5px;
  transition: border-color 0.12s, box-shadow 0.12s;
  box-sizing: border-box;
}

.stg-field input:focus,
.stg-field select:focus,
.stg-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.2);
}

/* ── Buttons ── */
.stg-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid #D4C9BA;
  background: #fff;
  color: var(--text);
  transition: all 0.13s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stg-btn:hover {
  background: #EDE8E0;
  border-color: var(--text-muted);
}

.stg-btn-primary {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

.stg-btn-primary:hover {
  background: #2F4A35;
  border-color: #2F4A35;
}

.stg-btn-danger {
  color: #7A2318;
  border-color: rgba(192, 57, 43, 0.3);
}

.stg-btn-danger:hover {
  background: #F9E5E1;
  border-color: #C0392B;
}

.stg-btn-text {
  background: transparent;
  border: none;
  color: #B09255;
  padding: 6px 8px;
  font-weight: 500;
}

.stg-btn-text:hover { color: var(--rust); }

.stg-btn-sm {
  font-size: 12px;
  padding: 5px 10px;
}

/* ── Badges ── */
.stg-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.4;
}

.stg-badge-entity     { background: #EBF2EC; color: #3D5C42; }
.stg-badge-owner      { background: #FAEEDA; color: #A05700; }
.stg-badge-admin      { background: #EAF0EB; color: #27500A; }
.stg-badge-member     { background: #EDE8E0; color: #4A3728; }
.stg-badge-viewer     { background: #EDE8E0; color: #4A3728; }
.stg-badge-external   { background: #FAEEDA; color: #A05700; }
.stg-badge-success    { background: #EBF2EC; color: #3D5C42; }
.stg-badge-pending    { background: #FAEEDA; color: #A05700; }
.stg-badge-error      { background: #F9E5E1; color: #7A2318; }
.stg-badge-info       { background: #E6EEF5; color: #1A4A72; }
.stg-badge-coming-soon { background: #EEE8DF; color: var(--text-muted); }
.stg-badge-sm         { font-size: 11px; padding: 2px 8px; }

/* ── Avatar ── */
.stg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.stg-avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.stg-avatar-sage   { background: #EBF2EC; color: #3D5C42; }
.stg-avatar-amber  { background: #FAEEDA; color: #A05700; }
.stg-avatar-rust   { background: #F5E1D5; color: var(--rust); }
.stg-avatar-muted  { background: #EDE8E0; color: var(--text-muted); }

/* ── Toggle ── */
.stg-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.stg-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.stg-toggle-track {
  position: absolute;
  inset: 0;
  background: #D4C9BA;
  border-radius: 11px;
  transition: background 0.2s;
}

.stg-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.stg-toggle input:checked ~ .stg-toggle-track { background: var(--sage); }
.stg-toggle input:checked ~ .stg-toggle-thumb { left: 20px; }

.stg-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stg-toggle-row-content { flex: 1; }

.stg-toggle-row-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 3px;
}

.stg-toggle-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Divider ── */
.stg-divider {
  height: 1px;
  background: #E8DFD0;
  margin: 4px 0;
}

/* ── Data table ── */
.stg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stg-table th {
  text-align: left;
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #F5F0E8;
  border-bottom: 2px solid #E8DFD0;
}

.stg-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #E8DFD0;
}

.stg-table tr:last-child td { border-bottom: none; }
.stg-table tr:hover td { background: #F9F5ED; }

/* ── Stat grid ── */
.stg-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stg-stat-card {
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 8px;
  padding: 14px 16px;
}

.stg-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stg-stat-value {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stg-stat-value small {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.stg-stat-footer {
  font-size: 11px;
  color: #8A7960;
  margin-top: 8px;
}

/* ── Usage bar ── */
.stg-usage-bar {
  height: 5px;
  background: #E8DFD0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.stg-usage-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 3px;
  transition: width 0.3s;
}

.stg-usage-fill.warning { background: #F59E0B; }
.stg-usage-fill.danger  { background: #C0392B; }

/* ── Plan banner ── */
.stg-plan-banner {
  background: linear-gradient(135deg, #EBF2EC 0%, #E5EDE4 100%);
  border: 1px solid var(--sage);
  border-left: 4px solid var(--sage);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.stg-plan-banner.warning {
  background: linear-gradient(135deg, #FAEEDA 0%, #F5E8C8 100%);
  border-color: #A05700;
  border-left-color: #A05700;
}

.stg-plan-banner.danger {
  background: linear-gradient(135deg, #F9E5E1 0%, #F5D5CC 100%);
  border-color: #C0392B;
  border-left-color: #C0392B;
}

.stg-plan-banner-label {
  font-size: 11px;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 6px;
}

.stg-plan-banner.warning .stg-plan-banner-label { color: #A05700; }
.stg-plan-banner.danger  .stg-plan-banner-label { color: #7A2318; }

.stg-plan-banner-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.stg-plan-banner-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.stg-plan-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Section heading ── */
.stg-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 24px 0 12px;
}

.stg-section-heading h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── Entity card ── */
.stg-entity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.stg-entity-card {
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stg-entity-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(44, 24, 16, 0.08);
}

.stg-entity-card-top {
  padding: 18px 20px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stg-entity-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.stg-entity-badges-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stg-entity-edit {
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid #D4C9BA;
  background: transparent;
  color: var(--text);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.stg-entity-card:hover .stg-entity-edit {
  color: var(--rust);
  border-color: var(--rust);
}

.stg-entity-details {
  padding: 14px 20px 18px;
  border-top: 1px solid #E8DFD0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stg-entity-detail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.stg-entity-detail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.5;
}

.stg-entity-detail-label {
  color: var(--text-muted);
  width: 130px;
  flex-shrink: 0;
}

.stg-entity-footer {
  background: #F5F0E8;
  padding: 10px 20px;
  border-top: 1px solid #E8DFD0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.stg-add-entity-card {
  background: transparent;
  border: 2px dashed #D4C9BA;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s;
  width: 100%;
}

.stg-add-entity-card:hover {
  border-color: var(--sage);
  color: var(--sage);
  background: #EBF2EC;
}

/* ── Integration cards ── */
.stg-integration-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  min-height: 0;
}

.stg-integration-card.coming-soon { opacity: 0.6; }

.stg-integration-icon {
  width: 160px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.stg-integration-icon img {
  width: 160px;
  height: 60px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.stg-integration-body { flex: 1; }

.stg-integration-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.stg-integration-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stg-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.stg-status-dot.connected { background: #22C55E; }
.stg-status-dot.error     { background: #C0392B; }
.stg-status-dot.default   { background: #ccc; }

/* ── Danger zone ── */
.stg-danger-card {
  background: #fff;
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* ── Invoice rows ── */
.stg-invoice-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.7fr 0.7fr auto;
  align-items: center;
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid #E8DFD0;
  gap: 12px;
}

.stg-invoice-row:last-child { border-bottom: none; }
.stg-invoice-row:hover { background: #F9F5ED; }

/* ── Chip list ── */
.stg-chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.stg-chip {
  background: #EBF2EC;
  color: var(--sage);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stg-chip-remove {
  background: transparent;
  border: none;
  color: var(--sage);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  font-family: inherit;
}

.stg-chip-remove:hover { opacity: 1; }

/* ── Radio cards ── */
.stg-radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stg-radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #D4C9BA;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.13s;
  background: #fff;
}

.stg-radio-card:hover { border-color: var(--text-muted); }

.stg-radio-card input { margin: 0; accent-color: var(--sage); }

.stg-radio-card.selected {
  border: 2px solid var(--sage);
  background: #EBF2EC;
  padding: 11px 13px;
}

/* ── Preset pills (advisor types) ── */
.stg-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stg-preset-pill {
  background: #fff;
  border: 1px solid #D4C9BA;
  border-radius: 5px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.13s;
  font-family: inherit;
}

.stg-preset-pill:hover {
  border-color: var(--accent);
  background: #F9F5ED;
}

.stg-preset-pill.selected {
  border: 2px solid var(--sage);
  background: #EBF2EC;
  color: var(--sage);
  padding: 9px 7px;
}

.stg-preset-pill-icon {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}

/* ── Permission grid ── */
.stg-perm-grid {
  border: 1px solid #E8DFD0;
  border-radius: 5px;
  overflow: hidden;
}

.stg-perm-grid-header {
  display: grid;
  grid-template-columns: 1fr 60px 60px 60px;
  padding: 8px 14px;
  background: #F5F0E8;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #E8DFD0;
}

.stg-perm-grid-header > div:not(:first-child) { text-align: center; }

.stg-perm-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px 60px;
  padding: 10px 14px;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid #E8DFD0;
}

.stg-perm-row:last-child { border-bottom: none; }

.stg-perm-row.disabled {
  background: #F9F5ED;
  color: #8A7960;
}

.stg-perm-radio {
  text-align: center;
  cursor: pointer;
  font-size: 16px;
  color: #D4C9BA;
  user-select: none;
  line-height: 1;
}

.stg-perm-radio.selected { color: var(--sage); }
.stg-perm-row.disabled .stg-perm-radio { cursor: not-allowed; }

/* ── Ownership table ── */
.stg-ownership-table {
  width: 100%;
  border-collapse: collapse;
}

.stg-ownership-table th {
  text-align: left;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #E8DFD0;
}

.stg-ownership-table td { padding: 6px 4px; }

.stg-ownership-table input,
.stg-ownership-table select {
  font-family: inherit;
  font-size: 13px;
  padding: 5px 8px;
  background: #fff;
  color: var(--text);
  border: 1px solid #D4C9BA;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

.stg-pct-input { width: 70px !important; }

.stg-owner-remove {
  background: transparent;
  border: none;
  color: #8A7960;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
  transition: all 0.13s;
  font-family: inherit;
}

.stg-owner-remove:hover {
  color: #C0392B;
  background: #F9E5E1;
}

.stg-ownership-total {
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
}

.stg-ownership-total.correct { color: var(--sage); }
.stg-ownership-total.under   { color: #A05700; }
.stg-ownership-total.over    { color: var(--rust); }

/* ── Modal ── */
.stg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(28, 18, 8, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stg-modal-overlay.open { display: flex; }

.stg-modal-box {
  background: #fff;
  border-radius: 8px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(44, 24, 16, 0.3);
}

.stg-modal-box.sm { max-width: 520px; }

.stg-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #E8DFD0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-shrink: 0;
}

.stg-modal-header h2 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.stg-modal-header .stg-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.stg-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  font-family: inherit;
}

.stg-modal-close:hover { color: var(--text); }

.stg-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stg-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #E8DFD0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
  flex-shrink: 0;
}

.stg-modal-footer-left {
  font-size: 11px;
  color: #8A7960;
}

.stg-modal-footer-actions { display: flex; gap: 8px; }

/* ── Trial banner (app-wide) ── */
.stg-trial-banner {
  background: linear-gradient(90deg, #FAEEDA 0%, #F5E8C8 100%);
  border-bottom: 1px solid #D4A843;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: #7A4700;
}

.stg-trial-banner-text { flex: 1; }
.stg-trial-banner-text strong { font-weight: 600; }

.stg-trial-banner-actions { display: flex; align-items: center; gap: 8px; }

.stg-trial-dismiss {
  background: transparent;
  border: none;
  color: #A05700;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  font-family: inherit;
}

/* ── Upgrade modal ── */
.stg-upgrade-banner {
  background: linear-gradient(135deg, #FAEEDA 0%, #F5E8C8 100%);
  border: 1px solid #A05700;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

/* ── Card payment display ── */
.stg-card-brand {
  width: 44px;
  height: 30px;
  background: var(--sidebar);
  color: #F5F0E8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ── Misc ── */
.stg-field-note {
  background: #F9F5ED;
  border: 1px solid #E8DFD0;
  border-radius: 5px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.stg-loading {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 20px;
}

.stg-error-msg {
  background: #F9E5E1;
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #7A2318;
  font-size: 13px;
  margin-bottom: 16px;
}
