/* =============================================
   SURVEI KEPUASAN - STYLESHEET (Tema Al Madani)
   Navy + Gold + Poppins
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #1a4789;
  --primary-light: #E8EEF7;
  --primary-dark: #12356b;
  --primary-darker: #0d2950;
  --accent: #f5b400;
  --accent-light: #ffc828;
  --danger: #D85A30;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #d1d5db;
  --bg: #f9fafb;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 1px 4px rgba(13,41,80,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LAYOUT ── */
.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ── HEADER PUBLIK ── */
.site-header {
  background: var(--primary);
  color: white;
  padding: 22px 0;
  margin-bottom: 28px;
  border-bottom: 4px solid var(--accent);
}
.site-header h1 { font-size: 20px; font-weight: 600; }
.site-header p { font-size: 13px; opacity: 0.9; margin-top: 2px; font-weight: 300; }
.header-flex { display: flex; align-items: center; gap: 14px; }
.site-logo { height: 56px; width: auto; flex-shrink: 0; background: white; border-radius: 8px; padding: 5px; }
.sidebar-logo { display: block; max-height: 64px; width: auto; margin: 0 auto 10px; background: white; border-radius: 8px; padding: 5px; }

/* ── CARD ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--primary-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: bold;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { min-height: 80px; resize: vertical; }
.required { color: var(--danger); margin-left: 2px; }

/* ── BINTANG ── */
.star-group { margin-bottom: 14px; }
.star-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #F0EFE8;
}
.star-row:last-child { border-bottom: none; }
.star-text { flex: 1; font-size: 13px; color: var(--text); }
.stars { display: flex; gap: 3px; }
.star {
  font-size: 24px;
  cursor: pointer;
  color: #D3D1C7;
  transition: color 0.1s;
  user-select: none;
  line-height: 1;
}
.star.on { color: var(--accent); }
.star-val {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 72px;
  text-align: right;
}

/* ── RADIO & CHECKBOX ── */
.options-group { display: flex; flex-direction: column; gap: 8px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.option-item input { cursor: pointer; width: 16px; height: 16px; accent-color: var(--primary); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); opacity: 1; }
.btn-accent { background: var(--accent); color: var(--primary-darker); }
.btn-accent:hover { background: var(--accent-light); opacity: 1; }
.btn-danger  { background: var(--danger); color: white; }
.btn-outline { background: white; color: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ── ALERT ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: #EAF3DE; color: #3B6D11; border-color: #97C459; }
.alert-danger   { background: #FCEBEB; color: #A32D2D; border-color: #F09595; }
.alert-info     { background: #E6F1FB; color: #185FA5; border-color: #85B7EB; }

/* ── PROGRESS ── */
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 24px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }

/* ── ADMIN LAYOUT ── */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: var(--primary-darker);
  color: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 3px solid var(--accent);
}
.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand h2 { font-size: 14px; font-weight: bold; line-height: 1.4; }
.sidebar-brand p { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  transition: background 0.15s;
  text-decoration: none;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(245,180,0,0.15);
  color: white;
  text-decoration: none;
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}
.sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-footer a { color: rgba(255,255,255,0.7); font-size: 12px; }

.admin-content { flex: 1; padding: 24px; overflow-x: auto; }
.page-title { font-size: 20px; font-weight: bold; color: var(--primary-dark); margin-bottom: 20px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--primary-dark);
  color: white;
  padding: 10px 12px;
  text-align: left;
  font-weight: bold;
  white-space: nowrap;
}
td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: var(--primary-light); }
tr:last-child td { border-bottom: none; }

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
}
.badge-success { background: #EAF3DE; color: #3B6D11; }
.badge-danger  { background: #FCEBEB; color: #A32D2D; }
.badge-info    { background: #E6F1FB; color: #185FA5; }

/* ── STATS CARD ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .num { font-size: 28px; font-weight: bold; color: var(--primary); }
.stat-card .lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── LOGIN ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
}
.login-box h1 { font-size: 18px; color: var(--primary-dark); margin-bottom: 4px; }
.login-box p { font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }

/* ── SUKSES PAGE ── */
.success-wrap { text-align: center; padding: 40px 20px; }
.success-wrap .icon { font-size: 56px; margin-bottom: 12px; }
.success-wrap h2 { font-size: 20px; color: var(--primary); margin-bottom: 8px; }
.success-wrap p { color: var(--text-muted); margin-bottom: 20px; }

/* ── FOOTER AL MADANI (4 kolom) ── */
.site-footer {
  background: var(--primary-darker);
  color: #aec4e0;
  padding: 60px 0 0;
  margin-top: 40px;
}
.foot-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.foot-grid .col p {
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.85;
}
.foot-grid .col h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 18px;
  font-weight: 700;
}
.foot-grid .col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-grid .col ul a {
  font-size: 13px;
  opacity: 0.82;
  color: #aec4e0;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.foot-grid .col ul a:hover {
  opacity: 1;
  color: var(--accent-light);
  padding-left: 5px;
  text-decoration: none;
}
.foot-brand {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: center;
}
.foot-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  padding: 4px;
}
.foot-brand-fallback {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--primary-darker);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}
.foot-brand b {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: block;
}
.foot-brand span {
  font-size: 12px;
  opacity: 0.7;
  display: block;
}
.foot-contact .ci {
  display: flex;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  opacity: 0.85;
  align-items: flex-start;
}
.foot-contact .ci svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
}
.foot-contact .ci a {
  color: #aec4e0;
  transition: color 0.2s;
}
.foot-contact .ci a:hover {
  color: var(--accent-light);
  text-decoration: none;
}
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  opacity: 0.75;
  flex-wrap: wrap;
}

@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; gap: 30px; } }

/* Footer untuk admin (di dalam content) */
.admin-footer {
  margin-top: 24px;
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.admin-footer a { color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .admin-wrapper { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar-nav { display: flex; flex-wrap: wrap; padding: 8px; }
  .sidebar-nav a { flex: 1; min-width: 120px; justify-content: center; padding: 8px; font-size: 12px; }
  .star { font-size: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
