$primary: #6366f1;

// ─── Shell ────────────────────────────────────────────────────────────────────
.campaigns-shell {
  display: flex;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f3f4f6;
}

// ─── List Panel ───────────────────────────────────────────────────────────────
.list-panel {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;

  h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
  }
}

.btn-new {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: $primary;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;

  &:hover { background: #4f46e5; }
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
  gap: 8px;

  &:hover { background: #f9fafb; }
  &.selected { background: #eef2ff; }
}

.item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-type-label {
  font-size: 11px;
  color: #9ca3af;
}

// ─── Status Badges ────────────────────────────────────────────────────────────
.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  background: #f3f4f6;
  color: #6b7280;

  &.draft     { background: #f3f4f6; color: #6b7280; }
  &.scheduled { background: #fef3c7; color: #d97706; }
  &.sent      { background: #d1fae5; color: #059669; }
  &.closed    { background: #fee2e2; color: #dc2626; }

  &.assigned  { background: #e0e7ff; color: $primary; }
  &.opened    { background: #fef3c7; color: #d97706; }
  &.completed { background: #d1fae5; color: #059669; }
}

.loading-state,
.empty {
  padding: 24px 16px;
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

// ─── Detail Panel ─────────────────────────────────────────────────────────────
.detail-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
}

.detail-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.field-label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 16px;
}

.field-input,
.field-select {
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;

  &:focus { border-color: $primary; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-save {
  padding: 9px 24px;
  font-size: 13px;
  font-weight: 600;
  background: $primary;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;

  &:hover { background: #4f46e5; }
}

.btn-send {
  padding: 9px 24px;
  font-size: 13px;
  font-weight: 600;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;

  &:hover { background: #059669; }
}

// ─── Assignments Table ────────────────────────────────────────────────────────
.assignments-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px;
}

.assignments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;

  th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
  }

  td {
    padding: 10px 12px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
  }

  tr:last-child td { border-bottom: none; }
  tr:hover td { background: #f9fafb; }
}

// ─── Placeholder ──────────────────────────────────────────────────────────────
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9ca3af;

  p {
    font-size: 14px;
    margin: 0;
  }
}
