:root {
  --primary: #0b4f9c;
  --primary-dark: #083972;
  --accent: #f4c542;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #198754;
  --warning: #f59e0b;
  --danger: #dc3545;
  --info: #0dcaf0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(11, 79, 156, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(244, 197, 66, 0.12), transparent 28%),
    linear-gradient(180deg, #f4f7fb, #edf3fb);
}

.hero, .container, .footer {
  position: relative;
  z-index: 1;
}

.hero {
  background: linear-gradient(135deg, rgba(8, 57, 114, 0.97), rgba(11, 79, 156, 0.94));
  color: #fff;
  padding: 34px 20px 42px;
  overflow: hidden;
}

.hero-small { padding: 26px 20px 30px; }

.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero::before { width: 220px; height: 220px; top: -70px; right: -40px; }
.hero::after { width: 150px; height: 150px; bottom: -60px; left: -20px; }

.hero-inner {
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.logo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  flex: 0 0 auto;
}

.logo-wrap span {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: .2px;
}

.hero-subtitle {
  margin: 10px 0 18px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions button, .hero-actions a {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.13);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.container {
  max-width: 1150px;
  margin: 24px auto 28px;
  padding: 0 16px;
}

.top-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel, .card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel { padding: 22px; }
.card { padding: 24px; margin-bottom: 18px; }

.highlight-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,255,.98));
}

.service-pill {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eef4ff;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.panel h2, .panel h3, .card h2 {
  margin: 0 0 8px;
  color: var(--primary-dark);
}

.panel p, .section-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.tabs button {
  flex: 1 1 180px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
}

.tabs button.active {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(11,79,156,0.2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full { grid-column: 1 / -1; }

.field-group label {
  display: block;
  font-weight: 800;
  font-size: 14px;
  color: #374151;
  margin-bottom: 7px;
}

.field-group input, .field-group select, .field-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.field-group textarea {
  min-height: 120px;
  resize: vertical;
}

.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11,79,156,0.08);
}

.helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
}

.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 18px;
  background: #f8fbff;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn {
  border: none;
  padding: 13px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 18px rgba(11,79,156,0.18);
}

.btn-light {
  background: #eef4ff;
  color: var(--primary-dark);
  border: 1px solid #dbeafe;
}

.btn-danger { background: #fee2e2; color: #991b1b; }

.hidden { display: none !important; }

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  border-left: 5px solid var(--primary);
  background: #eef6ff;
  color: #1f2937;
}

.notice.success { background: #ebfff3; border-left-color: var(--success); }
.notice.error { background: #fff0f0; border-left-color: var(--danger); }
.notice.warning { background: #fff8e8; border-left-color: var(--warning); }

.status-flow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.status {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid transparent;
}
.status.Masuk { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.status.Dicek { background: #e0f7ff; color: #075985; border-color: #bae6fd; }
.status.Revisi { background: #fff3cd; color: #92400e; border-color: #fde68a; }
.status.Diproses { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status.Selesai { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.status.Ditolak { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.report-box {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-top: 14px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.report-box p { margin: 8px 0; line-height: 1.5; }

.dashboard-header {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 10px 0 18px;
}

.dashboard-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #f8fbff;
}

.dashboard-item h4 { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-item .number { font-size: 24px; font-weight: 900; color: var(--primary-dark); margin-top: 6px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 11px 9px; text-align: left; vertical-align: top; }
th { background: #f8fafc; color: var(--primary-dark); }
.row-actions { display: grid; gap: 8px; min-width: 240px; }
.row-actions select, .row-actions textarea { width: 100%; padding: 9px; border: 1px solid #d1d5db; border-radius: 10px; }
.row-actions textarea { min-height: 72px; }
.small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 14px 16px 26px; }

@media (max-width: 900px) {
  .hero-inner, .top-grid { grid-template-columns: 1fr; }
  .top-grid { display: grid; }
  .form-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 26px; }
}

@media (max-width: 640px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-actions { justify-content: center; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}


/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 57, 114, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-box {
  background: #ffffff;
  border-radius: 22px;
  padding: 26px 32px;
  min-width: 260px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0,0,0,0.18);
}

.loading-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 5px solid #dbeafe;
  border-top-color: #0b4f9c;
  margin: 0 auto 14px;
  animation: spinLoading 0.8s linear infinite;
}

.loading-title {
  font-weight: 800;
  color: #083972;
  margin-bottom: 6px;
}

.loading-subtitle {
  font-size: 13px;
  color: #6b7280;
}

@keyframes spinLoading {
  to {
    transform: rotate(360deg);
  }
}
