.smart-panel { background: linear-gradient(135deg,#f8fafc,#eef2ff); border:1px solid #e5e7eb; border-radius:22px; padding:18px; margin-bottom:16px; }
.smart-title { display:flex; gap:12px; align-items:flex-start; margin-bottom:14px; }
.smart-title .icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:#111827; color:#fff; font-size:20px; flex:0 0 auto; }
.smart-title h2 { margin:0; font-size:20px; }
.smart-title p { margin:4px 0 0; color:#6b7280; font-size:14px; line-height:1.45; }
.smart-check-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.smart-check { display:flex; gap:8px; align-items:center; padding:10px 12px; border:1px solid #e5e7eb; background:#fff; border-radius:14px; cursor:pointer; min-height:44px; }
.smart-check input { width:18px; height:18px; margin:0; }
.smart-check span { font-size:13px; font-weight:600; color:#111827; }
.smart-check:has(input:checked) { border-color:#2563eb; background:#eff6ff; box-shadow:0 0 0 3px rgba(37,99,235,.10); }
.smart-edu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.smart-edu-card { background:#fff; border:1px solid #e5e7eb; border-radius:18px; padding:14px; }
.smart-edu-card h3 { margin:0 0 12px; font-size:16px; }
.smart-mini-help { font-size:12px; color:#6b7280; margin:6px 0 0; line-height:1.4; }
.smart-profile-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.smart-profile-box textarea { min-height:130px; }
.smart-repeater-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.smart-repeater-row { background:#fff; border:1px solid #e5e7eb; border-radius:18px; padding:14px; margin-bottom:12px; }
.smart-row-top { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.smart-row-top b { font-size:14px; }
.smart-public-wrap { max-width:980px; margin:0 auto; padding:18px; }
.smart-public-hero { background:linear-gradient(135deg,#111827,#2563eb); color:#fff; border-radius:26px; padding:26px; margin:16px 0; }
.smart-public-hero h1 { margin:0; font-size:30px; }
.smart-public-hero p { margin:8px 0 0; color:#dbeafe; line-height:1.55; }
@media (max-width:900px){ .smart-check-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .smart-edu-grid{grid-template-columns:1fr;} }
@media (max-width:560px){ .smart-check-grid{grid-template-columns:1fr;} .smart-panel{padding:14px;border-radius:18px;} .smart-title h2{font-size:18px;} .smart-public-wrap{padding:10px;} .smart-public-hero{padding:20px;border-radius:20px;} .smart-public-hero h1{font-size:24px;} }


/* ============================================================
   V27 FORM POLISH
   Tujuan: semua kotak input terlihat sama rapi di Android/desktop.
   ============================================================ */
.form-shell,
.smart-public-wrap {
  --field-bg: #ffffff;
  --field-border: #d9e1ec;
  --field-border-focus: #2563eb;
  --field-text: #111827;
  --field-muted: #6b7280;
  --field-radius: 16px;
  --field-shadow: 0 1px 2px rgba(15,23,42,.04);
  --field-shadow-focus: 0 0 0 4px rgba(37,99,235,.13);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 750;
  color: #334155;
  letter-spacing: .01em;
}

.form-shell input:not([type="checkbox"]):not([type="radio"]),
.form-shell select,
.form-shell textarea,
.smart-public-wrap input:not([type="checkbox"]):not([type="radio"]),
.smart-public-wrap select,
.smart-public-wrap textarea {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1.5px solid var(--field-border);
  border-radius: var(--field-radius);
  background: var(--field-bg);
  color: var(--field-text);
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.35;
  outline: none;
  box-shadow: var(--field-shadow);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .08s ease;
}

.form-shell input::placeholder,
.form-shell textarea::placeholder,
.smart-public-wrap input::placeholder,
.smart-public-wrap textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.form-shell input:not([type="checkbox"]):not([type="radio"]):focus,
.form-shell select:focus,
.form-shell textarea:focus,
.smart-public-wrap input:not([type="checkbox"]):not([type="radio"]):focus,
.smart-public-wrap select:focus,
.smart-public-wrap textarea:focus {
  border-color: var(--field-border-focus);
  box-shadow: var(--field-shadow-focus);
  background: #fff;
}

.form-shell textarea,
.smart-public-wrap textarea {
  min-height: 112px;
  resize: vertical;
}

.form-shell input[type="date"] {
  padding-right: 12px;
}

.form-shell input[type="file"],
.smart-public-wrap input[type="file"] {
  padding: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.form-shell input[type="file"]::file-selector-button,
.smart-public-wrap input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  padding: 10px 12px;
  margin-right: 12px;
  font-weight: 700;
  cursor: pointer;
}

.form-shell select,
.smart-public-wrap select {
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.smart-panel {
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}

.smart-title .icon {
  box-shadow: 0 8px 18px rgba(15,23,42,.16);
}

.grid input,
.grid select,
.grid textarea {
  min-width: 0;
}

/* Kotak pilihan dibuat seimbang dengan kotak input biasa */
.smart-check {
  min-height: 48px;
  border-radius: 16px;
  border-color: #d9e1ec;
  box-shadow: 0 1px 2px rgba(15,23,42,.035);
}
.smart-check:hover { border-color: #93c5fd; }

/* Repeater item juga dibuat seperti kotak modern */
.smart-repeater-row,
.smart-edu-card {
  border-color: #d9e1ec;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}

@media (max-width: 640px) {
  .form-shell input:not([type="checkbox"]):not([type="radio"]),
  .form-shell select,
  .form-shell textarea,
  .smart-public-wrap input:not([type="checkbox"]):not([type="radio"]),
  .smart-public-wrap select,
  .smart-public-wrap textarea {
    min-height: 52px;
    font-size: 16px; /* mencegah auto-zoom iPhone/Android tertentu */
    border-radius: 15px;
  }

  .form-group { margin-bottom: 14px; }
  .smart-panel { border-radius: 20px; }
  .smart-check { min-height: 50px; }
}

/* Section position layout panel */
.section-layout-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section-layout-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 210px 110px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}
.section-layout-name strong {
  display: block;
  font-size: 14px;
  color: #111827;
  margin-bottom: 3px;
}
.section-layout-name span {
  display: block;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.35;
}
.section-order-input input {
  min-width: 0;
}
.form-help {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 820px) {
  .section-layout-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}


/* ============================================================
   SECTION LAYOUT UI V2
   Panel posisi kiri/kanan dibuat lebih mudah dan tidak membingungkan.
   ============================================================ */

.section-layout-panel-v2 {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.section-layout-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.section-layout-help-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
}

.section-layout-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-layout-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.section-layout-card.is-sidebar {
  border-color: #2563eb;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.section-layout-card.is-main {
  border-color: #16a34a;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.section-layout-card.is-hidden {
  border-color: #cbd5e1;
  background: #f8fafc;
  opacity: .78;
}

.section-layout-card-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.section-layout-name strong {
  display: block;
  font-size: 15px;
  color: #111827;
  margin-bottom: 4px;
}

.section-layout-name span {
  display: block;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.4;
}

.section-layout-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.section-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid #d9e1ec;
  border-radius: 14px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, transform .08s ease;
}

.section-choice:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
}

.section-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.section-choice.is-left.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.13);
}

.section-choice.is-right.is-active {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(22,163,74,.13);
}

.section-choice.is-hidden.is-active {
  border-color: #64748b;
  background: #64748b;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(100,116,139,.12);
}

.section-layout-card-side {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
}

.section-order-label {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}

.section-order-control {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 6px;
  align-items: center;
}

.section-order-control input[data-section-order] {
  min-height: 42px;
  padding: 8px 8px;
  text-align: center;
  border-radius: 13px;
}

.section-order-btn {
  width: 36px;
  height: 42px;
  border: 1.5px solid #d9e1ec;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
}

.section-order-btn:hover {
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-1px);
}

.section-layout-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.section-layout-summary-col {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
}

.section-layout-summary-col h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #0f172a;
}

.section-layout-summary-col.is-muted {
  background: #f8fafc;
}

.section-summary-list {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

@media (max-width: 900px) {
  .section-layout-card {
    grid-template-columns: 1fr;
  }

  .section-layout-card-side {
    justify-content: flex-start;
  }

  .section-layout-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section-layout-choice-group {
    grid-template-columns: 1fr;
  }

  .section-choice {
    justify-content: flex-start;
  }

  .section-layout-toolbar .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================
   PELAMAR FORM SMART V2
   Output template selector + safer save actions.
   ============================================================ */

.smart-form-hero {
  gap: 16px;
  align-items: center;
}

.smart-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.smart-output-panel {
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.template-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.template-output-row select {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #d9e1ec;
  padding: 10px 12px;
  width: 100%;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
}

.template-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-bottom: 22px;
}

.smart-bottom-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 14px;
  margin-left: -14px;
  margin-right: -14px;
  background: rgba(248, 250, 252, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
  border-radius: 16px 16px 0 0;
}

.smart-cv-form.is-saving {
  opacity: .94;
}

.smart-cv-form.is-saving button[type="submit"] {
  pointer-events: none;
}

@media (max-width: 900px) {
  .smart-form-hero {
    align-items: flex-start;
  }

  .smart-form-actions,
  .template-output-actions {
    width: 100%;
    justify-content: stretch;
  }

  .smart-form-actions .btn,
  .template-output-actions .btn,
  .smart-bottom-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .template-output-row {
    grid-template-columns: 1fr;
  }

  .template-output-actions {
    padding-bottom: 0;
  }
}

@media (max-width: 560px) {
  .smart-form-actions,
  .smart-bottom-actions {
    flex-direction: column;
  }

  .smart-form-actions .btn,
  .smart-bottom-actions .btn,
  .template-output-actions .btn {
    width: 100%;
  }
}
