/* White professional theme + centered title + modal + toast */
.fkp-app{font:14px/1.6 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#0f172a;background:#ffffff}
.fkp-header{display:flex;justify-content:center;align-items:center;margin-bottom:10px}
.fkp-heading{text-align:center}
.fkp-heading h1{margin:0;font-size:24px;letter-spacing:.2px}
.fkp-heading p{margin:2px 0 0;color:#475569}
.fkp-badge{display:none}
.fkp-topbar{display:grid;grid-template-columns:1fr 1fr 1fr auto auto;gap:10px;align-items:end;margin:14px 0}
.fkp-field label{display:block;margin-bottom:4px;font-weight:600}
.fkp-field input, .fkp-field select{width:100%;padding:9px 11px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
.fkp-actions{display:flex;gap:8px;flex-wrap:wrap}
.fkp-btn{border:1px solid #e2e8f0;background:#fff;border-radius:10px;padding:9px 12px;cursor:pointer}
.fkp-btn.primary{background:#0ea5e9;color:#fff;border-color:transparent}
.fkp-btn.danger{background:#ef4444;color:#fff;border-color:transparent}
.fkp-btn.success{background:#10b981;color:#fff;border-color:transparent}
.fkp-btn.outline{background:#fff}
.fkp-btn.ghost{background:#fff}
.fkp-input-card{border:1px solid #e2e8f0;border-radius:14px;padding:14px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04);margin-top:6px}
.fkp-input-grid{display:grid;grid-template-columns:1.2fr .8fr 1fr auto;gap:10px}
.fkp-btn.add{background:#10b981;color:#fff;border-color:transparent}
.fkp-mini{font-size:12px;color:#64748b;margin-top:8px}
.fkp-flow-wrapper{border:1px solid #e2e8f0;border-radius:14px;padding:14px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04);margin-top:12px}
.fkp-flow-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.fkp-flow-title{font-weight:700}
.fkp-flow-status{font-size:12px;color:#64748b}
.fkp-flow-note{font-size:12px;color:#64748b}
.fkp-flow-container{padding:8px 0 8px 14px;border-left:3px solid #38bdf8;margin-left:6px}
.fkp-item{padding:12px;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:10px;background:#fff}
.fkp-item .meta{font-size:12px;color:#64748b;margin-top:4px}
.fkp-status-pill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;margin-top:4px;margin-right:6px;}
.fkp-status-belum{background:#fee2e2;color:#b91c1c;}
.fkp-status-proses{background:#dbeafe;color:#1d4ed8;}
.fkp-status-selesai{background:#dcfce7;color:#166534;}
.fkp-status-tertunda{background:#fef9c3;color:#92400e;}
.fkp-milestone-tag{display:inline-block;font-size:11px;color:#b45309;font-weight:600;margin-top:4px;}

.fkp-item .actions{display:flex;gap:6px;margin-top:8px}
.fkp-sep{width:2px;background:#e2e8f0;height:16px;margin:6px 16px;border-radius:2px}
.fkp-table{border:1px solid #e2e8f0;border-radius:14px;background:#fff;overflow:hidden;margin-top:12px}
.fkp-table table{width:100%;border-collapse:collapse;font-size:14px}
.fkp-table th,.fkp-table td{padding:10px;border-bottom:1px solid #e2e8f0;text-align:left}
.fkp-table th{background:#f8fafc;font-weight:600}
.fkp-empty{color:#64748b;text-align:center;padding:14px;border:1px dashed #e2e8f0;border-radius:12px;margin-top:8px}
.fkp-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;z-index:9999}
.fkp-modal .box{background:#fff;border-radius:14px;max-width:520px;width:92%;padding:16px;border:1px solid #e2e8f0;box-shadow:0 10px 30px rgba(0,0,0,.2)}
.fkp-modal .box h3{margin:0 0 10px;font-size:18px}
.fkp-row{margin-bottom:10px}
.fkp-row label{display:block;margin-bottom:4px;font-weight:600}
.fkp-row input{width:100%;padding:9px 11px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
.fkp-row .hint{font-size:12px;color:#64748b;margin-top:4px}
.fkp-modal .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
.fkp-toast{position:fixed;right:14px;bottom:14px;background:#0ea5e9;color:#fff;padding:10px 14px;border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.2);font-weight:600;display:none;z-index:99999}
@media print{.fkp-topbar,.fkp-input-card,.fkp-actions .fkp-btn,#fkp-btn-save{display:none!important}.fkp-item{page-break-inside:avoid}}


/* Meta informasi terakhir diperbarui */
.fkp-last-meta{
  font-size:12px;
  color:#94a3b8;
  margin:4px 0 6px;
}


/* Tools & search di header flow */
.fkp-flow-tools{display:flex;flex-direction:column;align-items:flex-end;gap:4px;}
.fkp-search input{width:220px;max-width:100%;padding:6px 10px;border:1px solid #e2e8f0;border-radius:999px;font-size:12px;}
.fkp-search input:focus{outline:none;border-color:#0ea5e9;box-shadow:0 0 0 1px rgba(14,165,233,.25);}


/* Riwayat versi */
.fkp-history-list{max-height:360px;overflow:auto;display:flex;flex-direction:column;gap:8px;}
.fkp-history-row{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-radius:10px;border:1px solid #e2e8f0;background:#f8fafc;}
.fkp-history-row .hist-meta{font-size:13px;color:#0f172a;}
.fkp-history-row .hist-meta .sub{font-size:12px;color:#64748b;}
.fkp-history-row .hist-meta .by{font-size:12px;color:#64748b;margin-left:4px;}
.fkp-history-row .fkp-btn.small{padding:4px 10px;font-size:12px;border-radius:999px;}


/* ==== v1.4.2 visual refresh – advanced but still clean ==== */

/* Layout container */
.fkp-app{
  max-width:1080px;
  margin:0 auto;
  padding:18px 20px 26px;
  background:radial-gradient(circle at top,#f9fbff 0,#ffffff 55%,#f8fafc 100%);
}

/* Header refinement */
.fkp-heading h1{
  font-size:26px;
  letter-spacing:.3px;
}
.fkp-heading p{
  font-size:13px;
}

/* Input card & flow wrapper: smoother + deeper shadow */
.fkp-input-card,
.fkp-flow-wrapper,
.fkp-table{
  border-radius:18px;
  border:1px solid #e2e8f0;
  box-shadow:0 14px 35px rgba(148,163,184,.22);
}

/* Topbar becomes more compact on small screens */
@media (max-width:768px){
  .fkp-topbar{
    grid-template-columns:1fr;
    gap:8px;
  }
  .fkp-actions{
    justify-content:flex-start;
  }
}

/* Buttons: transitions, hover & active states */
.fkp-btn{
  border-radius:999px;
  padding:8px 14px;
  font-weight:500;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .08s ease;
}
.fkp-btn.primary{
  background:linear-gradient(135deg,#0ea5e9,#0369a1);
  box-shadow:0 8px 18px rgba(37,99,235,.35);
}
.fkp-btn.primary:hover{
  box-shadow:0 10px 22px rgba(37,99,235,.5);
  transform:translateY(-1px);
}
.fkp-btn.outline:hover,
.fkp-btn.ghost:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
}
.fkp-btn:active{
  transform:translateY(0);
  box-shadow:none;
}

/* Timeline: bullet nodes & subtle line */
.fkp-flow-container{
  position:relative;
  padding-left:22px;
  border-left:2px dashed rgba(148,163,184,.9);
}
.fkp-item{
  position:relative;
  margin-bottom:10px;
}
.fkp-item::before{
  content:'';
  position:absolute;
  left:-15px;
  top:16px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:radial-gradient(circle,#0ea5e9 0,#0369a1 70%);
  box-shadow:0 0 0 4px rgba(56,189,248,.25);
}

/* Table: zebra and sticky header on long lists */
.fkp-table table{
  font-size:13px;
}
.fkp-table tbody tr:nth-child(odd){
  background:#f9fafb;
}
.fkp-table th{
  position:sticky;
  top:0;
  z-index:1;
}

/* Last meta line slightly separated */
.fkp-last-meta{
  margin-top:2px;
  padding-top:4px;
}

/* Search align better in tools */
.fkp-flow-tools{
  align-items:flex-end;
  gap:6px;
}

/* History modal tweaks */
#fkp-history-modal .box{
  max-width:560px;
}
.fkp-history-row{
  background:linear-gradient(135deg,#f8fafc,#eef2ff);
}

/* Print: keep output clean */
@media print{
  .fkp-app{
    max-width:none;
    box-shadow:none;
    background:#ffffff;
    padding:0;
  }
}


/* ==== v1.9.0 – Pro button layout & refinement ==== */

/* Topbar: rapikan tombol di sisi kanan */
.fkp-topbar{
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.fkp-topbar .fkp-actions{
  justify-content:flex-end;
}

/* General button look & feel */
.fkp-btn{
  font-size:13px;
  font-weight:500;
  border-radius:999px;
  padding:8px 14px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:background .15s ease,border-color .15s ease,transform .08s ease,box-shadow .15s ease;
}

.fkp-btn.primary{
  box-shadow:0 8px 18px rgba(14,165,233,.28);
}

.fkp-btn.outline{
  border-style:solid;
}

.fkp-btn.ghost{
  border-style:dashed;
  opacity:.9;
}

.fkp-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 14px rgba(15,23,42,.14);
}

.fkp-btn:active{
  transform:translateY(0);
  box-shadow:0 2px 6px rgba(15,23,42,.18);
}

/* Tambah item sebagai aksi positif utama pada kartu input */
.fkp-input-card .fkp-btn.add{
  min-width:130px;
  justify-content:center;
}

/* Tombol aksi di bawah tabel */
.fkp-actions{
  justify-content:flex-end;
}

/* ==== v2.0.0 – Layout & grouping, tabbed Timeline / Tabel ==== */

.fkp-app.fkp-v2{
  display:block;
  max-width:1120px;
  margin:24px auto;
  background:#f9fafb;
  border-radius:16px;
  padding:18px 20px 24px;
  box-shadow:0 18px 45px rgba(15,23,42,.08);
}

.fkp-header{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:16px;
}

.fkp-header-meta{
  display:grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 2fr);
  gap:12px 18px;
  align-items:flex-end;
}

.fkp-header-actions{
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  margin-top:6px;
}

.fkp-header-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

.fkp-inline-field label{
  font-size:12px;
  opacity:.85;
  display:block;
  margin-bottom:4px;
}

.fkp-section{
  background:#ffffff;
  border-radius:14px;
  padding:14px 16px 18px;
  margin-top:14px;
  border:1px solid rgba(148,163,184,.35);
}

.fkp-section-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:10px;
}

.fkp-section-header h2{
  margin:0;
  font-size:16px;
}

.fkp-section-header p{
  margin:2px 0 0;
  font-size:12px;
  color:#64748b;
}

.fkp-input-card{
  border-radius:12px;
  background:#f9fafb;
  padding:12px;
  border:1px dashed rgba(148,163,184,.7);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.fkp-field-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.fkp-field-group .fkp-field{
  flex:1;
}

.fkp-field-inline{
  margin-top:2px;
}

.fkp-checkbox{
  font-size:12px;
  color:#0f172a;
}

.fkp-hint{
  font-size:11px;
  color:#64748b;
  margin-top:2px;
}

.fkp-add-wrapper{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
}

.fkp-section-data{
  margin-top:18px;
}

/* Tabs */
.fkp-tabs{
  display:inline-flex;
  border-radius:999px;
  padding:3px;
  background:#e5e7eb;
  margin-bottom:12px;
}

.fkp-tab-btn{
  border:none;
  background:transparent;
  border-radius:999px;
  padding:6px 12px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  cursor:pointer;
  color:#4b5563;
}

.fkp-tab-btn .fkp-tab-icon{
  font-size:15px;
}

.fkp-tab-btn.active{
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 6px 12px rgba(15,23,42,.12);
}

.fkp-tab-panels{
  margin-top:4px;
}

.fkp-tab-panel{
  display:none;
}

.fkp-tab-panel.active{
  display:block;
}

.fkp-actions-bottom{
  margin-top:12px;
  display:flex;
  justify-content:flex-end;
}

/* Responsive tweaks */
@media (max-width: 768px){
  .fkp-header-meta{
    grid-template-columns: minmax(0, 1fr);
  }
  .fkp-header-buttons{
    justify-content:flex-start;
  }
  .fkp-tabs{
    width:100%;
    justify-content:space-between;
  }
}
