/* ======================================================
   CNCBUL – Financing Pre-Check
   Corporate UI / B2B Design System
   FINAL – CLEAN & PROFESSIONAL
   ====================================================== */

/* ---------- ROOT VARIABLES ---------- */
:root {
  --cnc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --cnc-bg: #ffffff;
  --cnc-muted-bg: #f8fafc;
  --cnc-border: #d1d5db;

  --cnc-text-main: #0f172a;
  --cnc-text-muted: #6b7280;

  --cnc-primary: #0f172a;   /* Corporate dark blue */
  --cnc-accent: #f97316;    /* CNCBUL orange */

  --cnc-radius-sm: 6px;
  --cnc-radius-md: 10px;
}

/* ======================================================
   OVERLAY
   ====================================================== */
.cnc-precheck-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9998;
}

/* ======================================================
   MODAL
   ====================================================== */
.cnc-precheck-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 720px;
  max-width: 94%;
  max-height: 90vh;

  background: var(--cnc-bg);
  border-radius: var(--cnc-radius-md);
  box-shadow: 0 30px 60px rgba(0,0,0,.18);

  overflow-y: auto;
  z-index: 9999;
  font-family: var(--cnc-font);
}

/* ======================================================
   MACHINE CONTEXT
   ====================================================== */
.cnc-machine-context {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--cnc-muted-bg);
  border-bottom: 1px solid var(--cnc-border);
}

.cnc-machine-context img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--cnc-radius-sm);
  border: 1px solid var(--cnc-border);
}

.cnc-machine-meta h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cnc-text-main);
}

.cnc-machine-meta p {
  margin: 0;
  font-size: 12px;
  color: var(--cnc-text-muted);
}

/* ======================================================
   STEP INDICATOR
   ====================================================== */
.cnc-step-indicator {
  display: flex;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--cnc-border);
}

.cnc-step {
  font-size: 13px;
  color: var(--cnc-text-muted);
}

.cnc-step.active {
  font-weight: 600;
  color: var(--cnc-text-main);
}

/* ======================================================
   FORM STEPS
   ====================================================== */
.cnc-form-step {
  display: none;
  padding: 20px;
}

.cnc-form-step.active {
  display: block;
}

/* ======================================================
   FORM FIELDS
   ====================================================== */
.cnc-field {
  margin-bottom: 16px;
}

.cnc-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--cnc-text-main);
}

.cnc-field input,
.cnc-field select,
.cnc-field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;

  border-radius: var(--cnc-radius-sm);
  border: 1px solid var(--cnc-border);

  font-size: 14px;
  font-family: var(--cnc-font);
  background: #fff;
}

.cnc-field textarea {
  min-height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

.cnc-field input:focus,
.cnc-field select:focus,
.cnc-field textarea:focus {
  outline: none;
  border-color: var(--cnc-primary);
}

/* ======================================================
   ACTION BAR (STICKY)
   ====================================================== */
.cnc-actions {
  position: sticky;
  bottom: 0;

  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding: 16px;
  background: #fff;
  border-top: 1px solid var(--cnc-border);
}

/* ======================================================
   BUTTONS – GENERAL
   ====================================================== */
.cnc-btn {
  padding: 10px 20px;
  border-radius: var(--cnc-radius-sm);

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  font-family: var(--cnc-font);
}

/* Primary */
.cnc-btn-primary {
  background: var(--cnc-primary);
  color: #fff;
  border: none;
}

.cnc-btn-primary:hover {
  opacity: .9;
}

/* Secondary */
.cnc-btn-secondary {
  background: transparent;
  border: 1px solid var(--cnc-border);
  color: var(--cnc-text-main);
}

.cnc-btn-secondary:hover {
  background: #f3f4f6;
}

/* Submit (controlled by JS) */
.cnc-btn-submit {
  display: none;
}

/* ======================================================
   LEGAL TEXT
   ====================================================== */
.cnc-legal {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cnc-text-muted);
}

/* ======================================================
   VALIDATION
   ====================================================== */
.cnc-error {
  border-color: #ef4444 !important;
}

/* ======================================================
   FINANCING PRE-CHECK CARD BUTTON (CTA)
   ====================================================== */
.cnc-fpc-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: 100%;
  padding: 12px 18px;

  font-family: var(--cnc-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;

  color: var(--cnc-primary);
  background: #f1f5f9;

  border: 1.5px solid var(--cnc-primary);
  border-radius: 8px;

  text-decoration: none;
  cursor: pointer;

  transition:
    background .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    transform .15s ease;
}

.cnc-fpc-trigger::after {
  content: "→";
  font-size: 15px;
  transition: transform .25s ease;
}

.cnc-fpc-trigger:hover {
  background: var(--cnc-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.cnc-fpc-trigger:hover::after {
  transform: translateX(4px);
}

/* ======================================================
   MOBILE
   ====================================================== */
@media (max-width: 640px) {

  .cnc-precheck-modal {
    top: 0;
    left: 0;
    transform: none;

    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .cnc-actions {
    flex-direction: column;
  }

  .cnc-btn {
    width: 100%;
  }
}
/* ===============================
   CNCBUL – Request Detail Cards
   =============================== */

.cnc-detail-card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 18px;
}

.cnc-detail-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

.cnc-detail-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.cnc-detail-row:last-child {
  border-bottom: none;
}

.cnc-detail-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.cnc-detail-value {
  font-size: 14px;
  color: #111827;
}
