.cred-view { display: flex; flex-direction: column; gap: 16px; }

.cred-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cred-subtitle { color: var(--text-secondary); margin: -8px 0 0 0; font-size: 14px; }
.cred-readonly-badge {
  background: rgba(125,133,144,0.2);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.cred-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cred-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.cred-filter-chip {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.cred-filter-chip:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.cred-filter-chip.is-active {
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--accent);
  border-color: var(--accent);
}
.cred-filter-chip__count {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.7;
}

.cred-add-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}
.cred-add-btn:hover { opacity: 0.88; }

.cred-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cred-form__title { margin: 0; font-size: 15px; font-weight: 600; }
.cred-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .cred-form__grid { grid-template-columns: 1fr; } }
.cred-form__field { display: flex; flex-direction: column; gap: 4px; }
.cred-form__field--wide { grid-column: 1 / -1; }
.cred-form__label { color: var(--text-secondary); font-size: 12px; }
.cred-form__field input,
.cred-form__field select,
.cred-form__field textarea {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
.cred-form__field textarea { resize: vertical; min-height: 56px; }
.cred-form__actions { display: flex; justify-content: flex-end; }
.cred-form__submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}
.cred-form__submit:hover { opacity: 0.88; }

.cred-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cred-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.cred-table th, .cred-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cred-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cred-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cred-notes {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 320px;
}

.cred-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.cred-pill__sub {
  display: inline-block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}
.cred-pill--expired       { background: rgba(248,81,73,0.22);  color: #f85149; }
.cred-pill--expiring-30d  { background: rgba(219,109,40,0.22); color: #db6d28; }
.cred-pill--expiring-90d  { background: rgba(187,128,9,0.20);  color: #d29922; }
.cred-pill--ok            { background: rgba(46,160,67,0.20);  color: #3fb950; }

.cred-actions { display: flex; gap: 6px; white-space: nowrap; }
.cred-row-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.cred-row-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.cred-row-btn--primary {
  color: var(--accent);
  border-color: var(--accent);
}
.cred-row-btn--primary:hover {
  background: color-mix(in oklab, var(--accent) 12%, transparent);
}
.cred-row-btn--danger:hover {
  color: #f85149;
  border-color: #f85149;
}

.cred-edit-row input[type="text"],
.cred-edit-row input[type="date"],
.cred-edit-row select,
.cred-edit-row textarea {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.cred-edit-row textarea { resize: vertical; min-height: 44px; }

.cred-empty {
  background-color: var(--surface);
  background-image: radial-gradient(circle, var(--dot-color) 2px, transparent 2px);
  background-size: 28px 28px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 14px;
}

.cred-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
