:root{
  --green: #0F3B36;
  --green-light: #1C5C53;
  --gold: #D9B96B;
  --gold-dark: #B8872F;
  --ivory: #F6F1E7;
  --border: #E4DCC8;
  --text: #1C2B2D;
  --muted: #5A6865;
  --white: #FFFFFF;
  --radius: 6px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #EFE8D8;
  color: var(--text);
}

.app{
  display:flex;
  min-height:100vh;
}

/* Sidebar */
.sidebar{
  width:240px;
  flex-shrink:0;
  background: linear-gradient(180deg, #0F3B36 0%, #0A2A26 100%);
  color: var(--ivory);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:24px 16px;
  box-shadow: 2px 0 12px rgba(0,0,0,.15);
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 8px 24px;
  border-bottom:1px solid rgba(255,255,255,.12);
  margin-bottom:16px;
}
.brand-mark{ font-size:22px; color: var(--gold); }
.brand-text{ font-size:14px; font-weight:600; line-height:1.3; }
.brand-text small{ font-weight:400; opacity:.7; }

.nav{ display:flex; flex-direction:column; gap:4px; }
.nav-item{
  display:flex; align-items:center; gap:12px;
  width:100%; text-align:left;
  background:none; border:none;
  color: rgba(246,241,231,.75);
  font-size:14px; font-weight:500;
  padding:11px 12px; border-radius:8px;
  cursor:pointer;
  transition: background .15s ease, color .15s ease;
}
.nav-item .icon{ width:18px; text-align:center; font-size:15px; }
.nav-item:hover{ background: rgba(255,255,255,.07); color: var(--ivory); }
.nav-item.active{
  background: linear-gradient(90deg, rgba(217,185,107,.22), rgba(217,185,107,.06));
  color: var(--gold);
  box-shadow: inset 2px 0 0 var(--gold);
}

.sidebar-foot{ border-top:1px solid rgba(255,255,255,.12); padding-top:16px; }
.admin-chip{ display:flex; align-items:center; gap:10px; }
.avatar{
  width:34px; height:34px; border-radius:50%;
  background: var(--gold); color: var(--green);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:14px;
}
.admin-name{ font-size:13px; font-weight:600; }
.admin-role{ font-size:12px; opacity:.6; }

/* Main */
.main{ flex:1; display:flex; flex-direction:column; min-width:0; }
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 32px; border-bottom:1px solid var(--border);
  background: var(--white);
}
.topbar h1{ margin:0; font-size:20px; }
.topbar-actions{ display:flex; align-items:center; gap:12px; }
.search{
  padding:9px 14px; border:1px solid var(--border); border-radius:6px;
  font-size:13px; width:240px; font-family:inherit;
}
.btn-icon{
  border:1px solid var(--border); background:var(--white);
  width:38px; height:38px; border-radius:6px; cursor:pointer; font-size:15px;
}

.tab-content{ display:none; padding:28px 32px; }
.tab-content.active{ display:block; }

/* Stat cards */
.stat-grid{
  display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:28px;
}
.stat-card{
  background: var(--white); border:1px solid var(--border); border-radius:10px;
  padding:20px; display:flex; gap:14px; align-items:flex-start;
  box-shadow: 0 1px 3px rgba(15,59,54,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover{ transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,59,54,.10); }
.stat-card.accent{ background: linear-gradient(135deg, var(--green), #164A43); color: var(--ivory); border:none; }
.stat-card.accent .stat-label{ color: rgba(246,241,231,.65); }
.stat-card.accent .stat-sub{ color: rgba(246,241,231,.55); }
.stat-icon{
  width:40px; height:40px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:17px;
}
.stat-icon.bg-green{ background:#E3F1E8; color:#1F7A47; }
.stat-icon.bg-gold{ background:#FBF0D9; color:var(--gold-dark); }
.stat-icon.bg-rose{ background:#FBE6E6; color:#B33A3A; }
.stat-icon.bg-gold-solid{ background: rgba(217,185,107,.2); color: var(--gold); }
.stat-body{ flex:1; }
.stat-label{ font-size:13px; color: var(--muted); font-weight:500; }
.stat-value{ font-size:28px; font-weight:700; margin:4px 0 2px; color: var(--green); line-height:1; }
.stat-card.accent .stat-value{ color: var(--gold); }
.stat-sub{ font-size:12px; color: var(--muted); }

/* Panel + table */
.panel{
  background: var(--white); border:1px solid var(--border); border-radius: 10px;
  overflow:hidden;
  box-shadow: 0 1px 3px rgba(15,59,54,.06);
}
.panel-plain{ overflow:visible; }
.panel-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid var(--border);
}
.panel-head h2{ margin:0; font-size:16px; }
.link-btn{
  background:none; border:none; color: var(--gold-dark); font-weight:600;
  font-size:13px; cursor:pointer;
}
.table{ width:100%; border-collapse:collapse; }
.table th{
  text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em;
  color: var(--muted); padding:12px 22px; border-bottom:1px solid var(--border);
}
.table td{ padding:14px 22px; border-bottom:1px solid var(--border); font-size:14px; }
.table tbody tr:last-child td{ border-bottom:none; }
.table tbody tr:hover{ background: #FAF7EF; }

.badge{ font-size:12px; font-weight:600; padding:4px 10px; border-radius:999px; }
.badge.published{ background:#E3F1E8; color:#1F7A47; }
.badge.draft{ background:#F1EAE0; color:#8A6A2E; }

.row-actions{ display:flex; gap:10px; }
.row-actions button{
  border:none; background:none; cursor:pointer; font-size:13px; font-weight:600;
}
.row-actions .edit{ color: var(--gold-dark); }
.row-actions .delete{ color:#B33A3A; }

/* Destinasi — grid kartu dengan foto */
.dest-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr));
  gap:18px; padding:22px;
}
.dest-card{
  border:1px solid var(--border); border-radius:10px; overflow:hidden;
  background: var(--white);
  transition: transform .15s ease, box-shadow .15s ease;
}
.dest-card:hover{ transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,59,54,.12); }
.dest-photo{
  height:140px; background-size:cover; background-position:center;
  display:flex; align-items:center; justify-content:center;
  color: rgba(246,241,231,.75); font-size:12px; font-family:'Fraunces',serif;
}
.dest-photo.placeholder{ background: linear-gradient(135deg, var(--green-light), var(--green)); }
.dest-body{ padding:16px; display:flex; flex-direction:column; gap:8px; }
.dest-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.dest-name{ font-size:15px; font-weight:700; color:var(--green); line-height:1.3; }
.dest-cat{
  font-size:11px; font-weight:600; color:var(--gold-dark); background:#FBF0D9;
  padding:3px 9px; border-radius:999px; white-space:nowrap;
}
.dest-loc{ font-size:13px; color:var(--muted); display:flex; align-items:center; gap:5px; }
.dest-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:4px; }

/* Upload foto */
.upload-box{
  height:140px; border:1.5px dashed var(--border); border-radius:8px;
  display:flex; align-items:center; justify-content:center; text-align:center;
  cursor:pointer; color: var(--muted); font-size:13px; overflow:hidden;
  background:#FAF7EF;
  transition: border-color .15s ease, background .15s ease;
}
.upload-box:hover{ border-color: var(--gold-dark); background:#FBF0D9; }
.upload-box small{ opacity:.7; }
.upload-preview{ width:100%; height:100%; object-fit:cover; }
.thumb-cell{ width:48px; height:48px; border-radius:6px; background-size:cover; background-position:center; flex-shrink:0; }
.thumb-cell.placeholder{ background: linear-gradient(135deg, var(--green-light), var(--green)); }

/* Buttons */
.btn-primary{
  background: var(--green); color: var(--ivory); border:none;
  padding:10px 18px; border-radius:7px; font-size:14px; font-weight:600; cursor:pointer;
  transition: background .15s ease, transform .15s ease;
  box-shadow: 0 2px 6px rgba(15,59,54,.25);
}
.btn-primary:hover{ background: var(--green-light); transform: translateY(-1px); }
.btn-secondary{
  background: var(--white); border:1px solid var(--border); color: var(--text);
  padding:10px 18px; border-radius:6px; font-size:14px; font-weight:600; cursor:pointer;
}

/* Settings form */
.form-settings{ display:flex; flex-direction:column; gap:16px; padding:22px; max-width:480px; }
.form-settings label{ display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:600; color: var(--muted); }
.form-settings input, .form-settings textarea{
  font-family:inherit; font-size:14px; padding:10px 12px; border:1px solid var(--border);
  border-radius:6px; color: var(--text);
}

/* Modal */
.modal-overlay{
  display:none; position:fixed; inset:0; background:rgba(15,59,54,.45);
  align-items:center; justify-content:center; z-index:50;
}
.modal-overlay.open{ display:flex; }
.modal{
  background: var(--white); border-radius:8px; padding:26px; width:420px; max-width:90vw;
  max-height:86vh; overflow:auto;
}
.modal h3{ margin:0 0 16px; font-size:17px; }
.modal form{ display:flex; flex-direction:column; gap:14px; }
.modal label{ display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:600; color: var(--muted); }
.modal input, .modal select, .modal textarea{
  font-family:inherit; font-size:14px; padding:9px 11px; border:1px solid var(--border);
  border-radius:6px; color: var(--text);
}
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }

@media (max-width: 860px){
  .sidebar{ width:72px; }
  .brand-text, .admin-name, .admin-role, .nav-item span:last-child{ display:none; }
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
}

a.btn-secondary{ text-decoration:none; display:inline-flex; align-items:center; font-size:13px; padding:9px 14px; }

.btn-keluar{ width:100%; margin-top:14px; background:transparent; color:var(--ivory); border:1px solid rgba(255,255,255,.25); }
.btn-keluar:hover{ background:rgba(255,255,255,.08); }
.login-galat{ margin:0; padding:9px 12px; border-radius:6px; background:#FBE6E6; color:#8F2A2A; font-size:13px; }
.badge.baru{ background:#FBE6E6; color:#B33A3A; }
.baris-belum td{ font-weight:600; }
.modal label small{ font-weight:400; opacity:.7; }

.panel-catatan{ margin:0 0 14px; padding:10px 14px; border-left:3px solid var(--gold,#D9B96B); background:rgba(217,185,107,.14); font-size:13px; }
.modal label.centang{ display:flex; gap:10px; align-items:flex-start; font-weight:500; }
.modal label.centang input{ width:auto; margin-top:3px; }
.badge.aktif{ background:#E3F1E8; color:#1F7A47; }
.badge.nonaktif{ background:#EEE; color:#666; }
.badge.verif{ background:#E3EEF9; color:#2F5F9A; }


/* Kelompok "Info kunjungan" di form destinasi */
.dest-info{ margin:4px 0 0; padding:12px 14px 4px; border:1px solid var(--border, #e5e7eb); border-radius:10px; }
.dest-info legend{ padding:0 6px; font-weight:600; font-size:.9rem; }
.dest-info legend small, .dest-info label small{ font-weight:400; opacity:.7; }
.dest-info label small{ display:block; margin-top:4px; font-size:.78rem; line-height:1.35; }
