/* Company profile tabs — Institution dashboard */

.cf-cp-panel {
  margin-top: 0.5rem;
}

.cf-cp-panel-inner {
  margin-top: 0;
}

.cf-cp-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .cf-cp-form__grid {
    grid-template-columns: 1fr;
  }
}

.cf-cp-logo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .cf-cp-logo-row {
    grid-template-columns: 1fr;
  }
}

.cf-cp-logo-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.cf-cp-preview-wrap {
  min-height: 120px;
}

.cf-cp-preview {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  overflow: hidden;
}

html[data-theme="dark"] .cf-cp-preview {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.2);
}

.cf-cp-preview__inner {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.1rem;
  align-items: center;
}

.cf-cp-preview__logo {
  max-width: 88px;
  max-height: 56px;
  object-fit: contain;
}

.cf-cp-preview__logo-ph {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-cp-preview__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.cf-cp-preview__name {
  font-size: 1rem;
  color: #0f2744;
}

html[data-theme="dark"] .cf-cp-preview__name {
  color: #f8fafc;
}

.cf-cp-preview__tag {
  font-size: 0.8rem;
  color: #0d9488;
  font-weight: 600;
}

.cf-cp-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.75rem;
  color: #64748b;
}

.cf-cp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.cf-cp-card {
  text-align: left;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

html[data-theme="dark"] .cf-cp-card {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.2);
}

.cf-cp-card:hover {
  border-color: #0d9488;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

.cf-cp-card--default {
  border-color: rgba(34, 197, 94, 0.45);
}

.cf-cp-card__name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f2744;
  margin-bottom: 0.35rem;
}

html[data-theme="dark"] .cf-cp-card__name {
  color: #f8fafc;
}

.cf-cp-card__meta {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.cf-cp-editor-modal {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  background: linear-gradient(160deg, rgba(240, 253, 250, 0.5) 0%, rgba(248, 250, 252, 0.9) 100%);
}

html[data-theme="dark"] .cf-cp-editor-modal {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
}

.cf-cp-editor-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cf-cp-editor-modal__head h4 {
  margin: 0;
  font-size: 1rem;
}

.cf-cp-delete {
  margin-top: 1rem;
}

/* Tab buttons injected before Operations */
[role="tablist"] button[data-cf-company-tab] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[role="tablist"] button[data-cf-company-tab][data-state="active"] {
  color: #0d9488;
}
