.csf-wrap {
  padding-top: 28px;
  padding-bottom: 48px;
}

.csf-shell {
  display: grid;
  gap: 24px;
}

.csf-hero {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.86));
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.24);
}

.csf-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.csf-stat-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.5);
}

.csf-stat-label {
  display: block;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.csf-stat-value {
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
}

.csf-toolbar,
.csf-filter-group,
.csf-field-grid,
.csf-card-head,
.csf-card-actions,
.csf-group-head,
.csf-editor-head,
.csf-editor-actions,
.csf-checkbox,
.csf-surface-nav,
.csf-surface-actions,
.csf-snapshot-head {
  display: flex;
}

.csf-toolbar,
.csf-filter-group,
.csf-field-grid,
.csf-card-head,
.csf-card-actions,
.csf-group-head,
.csf-editor-head,
.csf-editor-actions,
.csf-surface-nav,
.csf-surface-actions,
.csf-snapshot-head {
  gap: 14px;
}

.csf-toolbar,
.csf-group-head,
.csf-editor-head,
.csf-surface-nav,
.csf-snapshot-head {
  align-items: center;
  justify-content: space-between;
}

.csf-filter-group,
.csf-field-grid {
  flex-wrap: wrap;
}

.csf-surface-nav {
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.78));
}

.csf-surface-actions {
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.csf-surface-link,
.csf-surface-user {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  text-decoration: none;
}

.csf-surface-link.is-active {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(56, 189, 248, 0.3);
  color: #e0f2fe;
}

.csf-callout {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: linear-gradient(180deg, rgba(8, 23, 43, 0.94), rgba(8, 23, 43, 0.82));
  color: rgba(226, 232, 240, 0.92);
}

.csf-callout p {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.76);
}

.csf-filter,
.csf-field {
  display: grid;
  gap: 8px;
}

.csf-filter {
  flex: 1 1 220px;
}

.csf-field {
  width: 100%;
}

.csf-filter span,
.csf-field span {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.8);
}

.csf-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  font: inherit;
}

.csf-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.56);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.csf-textarea {
  min-height: 132px;
  resize: vertical;
}

.csf-layout {
  display: grid;
  gap: 24px;
}

.csf-roster-panel,
.csf-editor-card {
  display: grid;
  gap: 22px;
}

.csf-group {
  display: grid;
  gap: 14px;
}

.csf-group-title {
  margin: 8px 0 0;
  font-size: 1.18rem;
  color: #f8fafc;
}

.csf-group-count {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #bae6fd;
  text-align: center;
  font-weight: 700;
}

.csf-card-grid {
  display: grid;
  gap: 14px;
}

.csf-card,
.csf-editor-card,
.csf-empty-state {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.18);
}

.csf-card {
  display: grid;
  gap: 16px;
}

.csf-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.8);
}

.csf-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #bae6fd;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(59, 130, 246, 0.16));
}

.csf-card-titles {
  min-width: 0;
  flex: 1 1 auto;
}

.csf-card-titles h3 {
  margin: 0;
  font-size: 1.02rem;
  color: #f8fafc;
}

.csf-card-titles p {
  margin: 6px 0 0;
  color: rgba(226, 232, 240, 0.78);
}

.csf-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.csf-status {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.csf-status.is-active {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.csf-status.is-leave {
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
}

.csf-status.is-inactive {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.csf-status.is-private {
  background: rgba(244, 114, 182, 0.14);
  color: #fbcfe8;
}

.csf-status.is-command {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
}

.csf-card-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.csf-card-meta div {
  display: grid;
  gap: 4px;
}

.csf-card-meta dt {
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.64);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.csf-card-meta dd {
  margin: 0;
  color: #f8fafc;
  word-break: break-word;
}

.csf-card-notes,
.csf-empty-state p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
}

.csf-empty-state {
  text-align: center;
}

.csf-empty-state h2 {
  margin: 0 0 10px;
  color: #f8fafc;
}

.csf-editor-panel {
  position: relative;
}

.csf-editor-form {
  display: grid;
  gap: 14px;
}

.csf-checkbox {
  align-items: center;
  gap: 10px;
  color: rgba(226, 232, 240, 0.82);
}

.csf-checkbox input {
  width: 18px;
  height: 18px;
}

.csf-delete-form {
  margin-top: 14px;
}

.csf-snapshot-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.8));
}

.csf-snapshot {
  margin: 0;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
  color: #bfdbfe;
  font: 13px/1.55 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (min-width: 720px) {
  .csf-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .csf-layout {
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 420px);
    align-items: start;
  }

  .csf-editor-panel {
    position: sticky;
    top: 24px;
  }
}

@media (min-width: 1024px) {
  .csf-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    align-items: end;
  }

  .csf-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.85fr);
    align-items: start;
  }

  .csf-editor-panel {
    position: sticky;
    top: 28px;
  }
}
