/* ==================== MAIN CONTAINER ==================== */
.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* ==================== NEW PNC FORM ==================== */
.new-pnc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.new-pnc-field {
  flex: 1;
}

.new-pnc-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.new-pnc-field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

.new-pnc-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.new-pnc-field input::placeholder {
  color: var(--text-dim);
}

/* ==================== PNC LIST ==================== */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.list-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.list-count {
  font-size: 12px;
  color: var(--text-muted);
}

.pnc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== PNC CARDS ==================== */
.pnc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pnc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.1);
}

.pnc-card-left {
  flex: 1;
  min-width: 0;
}

.pnc-card-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnc-card-id {
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
}

.pnc-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pnc-card-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pnc-card-arrow {
  color: var(--text-dim);
  font-size: 18px;
}

.pnc-card-actions {
  display: flex;
  gap: 6px;
}

.pnc-card-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.pnc-card-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pnc-card-btn.delete:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ==================== SEARCH BAR (list pages) ==================== */
.search-bar {
  margin-bottom: 12px;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* ==================== DUPLICATE DROPDOWN ==================== */
.dup-wrap {
  position: relative;
  display: inline-flex;
}

.dup-arrow {
  padding: 4px 6px !important;
  border-left: none !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

.dup-wrap > .pnc-card-btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}

.dup-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 50;
  min-width: 180px;
  margin-top: 4px;
}

.dup-wrap.open .dup-menu {
  display: block;
}

.dup-menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.dup-menu button:hover {
  background: var(--surface-2);
}

/* ==================== VIEW MODE (index) ==================== */
body.view-mode .edit-only {
  display: none !important;
}

#modeToggle.viewing {
  background: rgba(26, 86, 219, 0.08);
  border-color: var(--blue);
  color: var(--blue);
}

#pncList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}