/* Account Settings — self-contained layout (no Tailwind dependency) */

.infl-account-settings-active #ips-savebar {
  display: none !important;
}

.infl-ref-profile-shell:has(#ias-app),
.max-w-2xl.mx-auto.infl-ref-profile-shell:has(#ias-app),
.max-w-3xl.mx-auto.infl-ref-profile-shell:has(#ias-app),
.max-w-2xl.mx-auto.ips-wide:has(#ias-app),
.max-w-3xl.mx-auto.ips-wide:has(#ias-app) {
  max-width: min(96rem, 100%) !important;
  width: 100%;
}

/* ── Layout frame ── */
#ias-app.ias-layout {
  width: 100%;
  min-height: min(100vh, 100%);
  box-sizing: border-box;
  background: #f8fafc;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

@media (min-width: 1024px) {
  #ias-app.ias-layout {
    flex-direction: row;
    align-items: flex-start;
    padding: 1.5rem;
  }
}

/* ── Left sidebar ── */
.ias-sidebar {
  width: 100%;
  flex-shrink: 0;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  height: fit-content;
}

@media (min-width: 1024px) {
  .ias-sidebar {
    width: 16rem;
    position: sticky;
    top: 1.5rem;
  }
}

.ias-sidebar-title {
  margin: 0 0 0.2rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ias-sidebar-subtitle {
  display: block;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.ias-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ias-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.ias-nav-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.ias-nav-btn--active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.ias-nav-btn svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

/* ── Main content column ── */
.ias-main {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

@media (min-width: 768px) {
  .ias-main {
    padding: 1.75rem;
  }
}

.ias-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.ias-panel-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ias-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ee3e96, #f26e59);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(238, 62, 150, 0.25);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.ias-btn-primary:hover {
  opacity: 0.95;
}

.ias-btn-primary:active {
  transform: scale(0.98);
}

.ias-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ias-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.ias-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.ias-avatar-trigger {
  position: relative;
  display: inline-flex;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  line-height: 0;
}

.ias-avatar-trigger:focus-visible {
  outline: 2px solid #ee3e96;
  outline-offset: 3px;
}

.ias-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.ias-avatar-overlay svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ias-avatar-trigger:hover .ias-avatar-overlay,
.ias-avatar-trigger:focus-visible .ias-avatar-overlay,
.ias-avatar-trigger.is-uploading .ias-avatar-overlay {
  opacity: 1;
}

.ias-avatar-actions {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 0.35rem;
}

.ias-btn-change-image {
  border: none;
  border-radius: 0.65rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: #0f172a;
  cursor: pointer;
}

.ias-btn-change-image:hover {
  background: #1e293b;
}

.ias-avatar-hint {
  margin: 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

.ias-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background: linear-gradient(135deg, #ee3e96, #f26e59);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.ias-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ias-avatar-edit {
  display: none;
}

.ias-identity-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ias-identity-headline {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ias-section {
  margin-top: 1.5rem;
}

.ias-section-title {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.ias-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .ias-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ias-span-2 {
  grid-column: 1 / -1;
}

.ias-panel {
  display: block;
}

.ias-panel[hidden] {
  display: none !important;
}

.ias-status {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.ias-status--ok {
  color: #059669;
}

.ias-status--err {
  color: #dc2626;
}

.ias-status--busy {
  color: #7c3aed;
}

/* ── Form controls ── */
.ias-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.ias-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ias-input:focus {
  outline: none;
  border-color: #ee3e96;
  box-shadow: 0 0 0 3px rgba(238, 62, 150, 0.12);
}

.ias-input:disabled {
  background: #f8fafc;
  color: #64748b;
}

.ias-suffix-field {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.ias-suffix-field .ias-input {
  flex: 1 1 auto;
  min-width: 0;
}

.ias-suffix-link {
  flex-shrink: 0;
  align-self: center;
  border: none;
  background: transparent;
  color: #ee3e96;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.35rem;
}

.ias-suffix-link:hover {
  text-decoration: underline;
}

.ias-prefix-field {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.ias-prefix-field:focus-within {
  border-color: #ee3e96;
  box-shadow: 0 0 0 3px rgba(238, 62, 150, 0.12);
}

.ias-prefix {
  flex-shrink: 0;
  padding: 0.55rem 0 0.55rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.ias-input--prefix {
  border: none !important;
  box-shadow: none !important;
  padding-left: 0.25rem;
}

.ias-social-table {
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  padding: 0.25rem 0.75rem;
}

.ias-social-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.ias-social-row:last-child {
  border-bottom: none;
}

@media (min-width: 640px) {
  .ias-social-row {
    grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) minmax(0, 6rem);
    gap: 0.75rem;
  }
}

.ias-social-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.ias-social-label-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ias-platform-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.ias-platform-icon--ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.ias-platform-icon--fb { background: #1877f2; }
.ias-platform-icon--yt { background: #ff0000; }
.ias-platform-icon--sc { background: #fffc00; color: #111; }
.ias-platform-icon--li { background: #0a66c2; }

.ias-lang-hint {
  margin-bottom: 0.5rem;
}

.ias-lang-grid {
  margin-bottom: 0;
}

.ias-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .ias-chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .ias-chip-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.ias-chip {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.ias-chip--active {
  border-color: #ee3e96;
  background: rgba(238, 62, 150, 0.08);
  color: #ee3e96;
  box-shadow: inset 0 0 0 1px rgba(238, 62, 150, 0.25);
}

.ias-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .ias-price-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ias-price-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.75rem;
  text-align: left;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ias-price-card--active {
  border-color: #ee3e96;
  background: rgba(238, 62, 150, 0.06);
  box-shadow: 0 0 0 1px rgba(238, 62, 150, 0.2);
}

.ias-price-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a;
}

.ias-price-range {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.ias-hint {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

.ias-portfolio-intro {
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

.ias-portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ias-portfolio-row {
  padding: 1rem;
  border: 1px solid #f1f5f9;
  border-radius: 0.85rem;
  background: #fafbfc;
}

.ias-portfolio-remove {
  margin-top: 0.65rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.ias-portfolio-remove:hover {
  color: #dc2626;
}

.ias-portfolio-add {
  margin-top: 0.25rem;
}

.ias-btn-secondary {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  cursor: pointer;
}

.ias-btn-secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.ias-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.ias-toggle-row:last-child {
  border-bottom: none;
}

.ias-toggle-row input {
  width: 1rem;
  height: 1rem;
  accent-color: #ee3e96;
}

.ias-msg {
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.ias-msg--ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.ias-msg--err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.ias-msg[hidden] {
  display: none !important;
}

/* ── Loading skeleton ── */
.ias-shell--loading {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 50vh;
  background: #f8fafc;
  padding: 1rem;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .ias-shell--loading {
    flex-direction: row;
    padding: 1.5rem;
  }
}

.ias-sk {
  background: linear-gradient(90deg, #e8eaed 0%, #f3f4f6 45%, #e8eaed 90%);
  background-size: 200% 100%;
  animation: ias-shimmer 1.35s ease-in-out infinite;
  border-radius: 1rem;
}

.ias-sk-side {
  width: 100%;
  min-height: 14rem;
}

@media (min-width: 1024px) {
  .ias-sk-side {
    width: 16rem;
    min-height: 18rem;
  }
}

.ias-sk-main {
  flex: 1;
  min-height: 24rem;
}

@keyframes ias-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1023px) {
  #ias-app.ias-layout {
    padding-bottom: 2rem;
  }
}
