.profile-page {
  display: grid;
  gap: 24px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.profile-card {
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.card-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-form-grid label,
.integration-card label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.profile-form-grid input,
.integration-card input {
  min-height: 40px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  padding: 8px 10px;
  color: #111827;
  font: inherit;
  background: #ffffff;
}

.profile-form-grid input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.integrations-list {
  display: grid;
  gap: 14px;
}

.chrome-extension-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.chrome-extension-panel strong {
  display: block;
  color: #334155;
  font-size: 14px;
}

.chrome-extension-panel span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.chrome-extension-panel[data-state="ready"] {
  border-color: #bbf7d0;
  background: #ecfdf3;
}

.chrome-extension-panel[data-state="ready"] strong {
  color: #047857;
}

.chrome-extension-panel[data-state="missing"] {
  border-color: #fed7aa;
  background: #fff7ed;
}

.chrome-extension-panel[data-state="missing"] strong {
  color: #9a3412;
}

.chrome-extension-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.integration-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.integration-card h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
}

.integration-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.integration-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #d6dde8;
  border-radius: 999px;
  padding: 4px 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.integration-status.is-ok {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #047857;
}

.integration-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 800;
}

.btn-primary {
  border: 1px solid #1f4f93;
  background: #1f4f93;
  color: #ffffff;
}

.btn-secondary {
  border: 1px solid #cfd8e6;
  background: #ffffff;
  color: #1f4f93;
}

.btn-danger {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.form-message {
  margin-top: 14px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17406f;
  background: #eaf2fb;
  font-weight: 700;
}

.form-message.is-error {
  color: #991b1b;
  background: #fee2e2;
}

@media (max-width: 900px) {
  .profile-form-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .card-header,
  .integration-card header,
  .chrome-extension-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .profile-card,
  .integration-card {
    padding: 16px;
  }
}
