.ipc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .ipc-grid { grid-template-columns: 1fr; }
}

.ipc-main, .ipc-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ipc-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 16px 20px !important;
}
@media (max-width: 700px) {
  .ipc-stats { grid-template-columns: repeat(2, 1fr); }
}

.stat-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.stat-val {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ipc-list {
  padding: 0;
}

.ipc-empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.ipc-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line2, #e7edf5);
}
.ipc-item:last-child { border-bottom: none; }

.ipc-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.ipc-range {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  word-break: break-all;
}

.ipc-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ipc-status.s-pending { background: #fef3c7; color: #92400e; }
.ipc-status.s-ok      { background: #dcfce7; color: #15803d; }
.ipc-status.s-no      { background: #fee2e2; color: #b91c1c; }

.ipc-row2 {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.ipc-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line2, #e7edf5);
  font-size: 13px;
}
.ipc-pager a {
  color: var(--blue, #2563eb);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s;
}
.ipc-pager a:hover { background: #eef2f6; }
.ipc-pager .current {
  color: #475569;
  padding: 4px 10px;
}
.ipc-pager .disabled {
  color: #cbd5e1;
  padding: 4px 10px;
  cursor: not-allowed;
}

/* Form */
.ipc-field {
  margin-bottom: 12px;
}
.ipc-field label {
  display: block;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
  font-weight: 500;
}
.ipc-field label .req { color: #dc2626; }
.ipc-field input,
.ipc-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #c9d3de;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.ipc-field input:focus,
.ipc-field textarea:focus {
  border-color: var(--blue, #2563eb);
}
.ipc-field .hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

.ipc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ipc-captcha-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ipc-captcha-row input {
  flex: 1;
}
.ipc-captcha-row img {
  width: 120px;
  height: 38px;
  border: 1px solid #c9d3de;
  border-radius: 6px;
  cursor: pointer;
  background: #f8fafc;
  flex-shrink: 0;
}

.ipc-submit-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ipc-submit-row .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  flex: 1;
  justify-content: center;
}

.ipc-res {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.ipc-res.ok  { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.ipc-res.err { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

.ipc-rules .card-body { padding: 12px 16px !important; }
