/* =========================================================
   WebService Membership — Custom CSS (Modern Soft Theme)
   ========================================================= */

:root {
  --primary: #6C63FF;
  --primary-dark: #564FD8;
  --primary-light: #EEEDFF;
  --accent: #2EC4B6;
  --accent-light: #E4FBF9;
  --bg: #F7F8FC;
  --surface: #FFFFFF;
  --text: #2D2A45;
  --text-muted: #8A87A3;
  --border: #E7E6F2;
  --danger: #FF6B6B;
  --danger-light: #FFECEC;
  --warning: #FFB86B;
  --warning-light: #FFF4E5;
  --success: #34C38F;
  --success-light: #E7FAF3;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(108, 99, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(45, 42, 69, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 700; color: var(--text); }
p { margin: 0 0 12px; color: var(--text-muted); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navbar (halaman publik) ---------- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a.active, .nav-links a:hover { color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(108,99,255,.35); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { opacity: .9; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero / landing ---------- */
.hero {
  padding: 90px 0 70px;
  text-align: center;
}
.hero h1 { font-size: 42px; max-width: 720px; margin: 0 auto 16px; }
.hero p { font-size: 17px; max-width: 560px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; }

.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; }
.section-title p { max-width: 520px; margin: 0 auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card h3 { font-size: 19px; }
.product-price { font-size: 24px; font-weight: 800; color: var(--primary); margin: 10px 0 16px; }
.product-card .btn { margin-top: auto; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px 34px;
}
.auth-card h2 { text-align: center; margin-bottom: 4px; }
.auth-card p.subtitle { text-align: center; margin-bottom: 26px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=file], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}
textarea { resize: vertical; min-height: 110px; }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Alerts / flash ---------- */
.alert {
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
  font-weight: 500;
}
.alert-success { background: var(--success-light); color: #1E8A63; }
.alert-error { background: var(--danger-light); color: #C4453D; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-pending { background: var(--warning-light); color: #B5730F; }
.badge-process { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: #1E8A63; }
.badge-danger { background: var(--danger-light); color: #C4453D; }

/* ---------- App layout (dashboard member & admin) ---------- */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
}
.sidebar .brand { padding: 0 24px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.sidebar-menu { list-style: none; margin: 0; padding: 0; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14.5px;
  border-left: 3px solid transparent;
}
.sidebar-menu a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-menu a.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }

.main-content { flex: 1; padding: 28px 32px; max-width: 100%; overflow-x: auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.topbar h1 { font-size: 24px; margin: 0; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
}
.user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ---------- Stat cards ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; color: var(--text); }
.stat-card.accent-primary .stat-value { color: var(--primary); }
.stat-card.accent-success .stat-value { color: var(--success); }
.stat-card.accent-warning .stat-value { color: #B5730F; }

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; min-width: 640px; }
thead th {
  text-align: left;
  padding: 14px 18px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}
tbody td { padding: 14px 18px; border-top: 1px solid var(--border); font-size: 14px; }
tbody tr:hover { background: #FBFBFF; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.actions-cell { display: flex; gap: 8px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text); }

/* ---------- Detail page ---------- */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--text-muted); font-weight: 600; }
.proof-preview { border: 1px dashed var(--border); border-radius: 10px; padding: 12px; text-align: center; margin-top: 10px; }
.proof-preview img { border-radius: 8px; max-height: 260px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 40px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-menu { display: flex; overflow-x: auto; }
  .sidebar-menu a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .sidebar-menu a.active { border-left-color: transparent; border-bottom-color: var(--primary); }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}
