:root {
  --c-primary: #c1e4f5;
  --c-secondary: #ed0030;
  --c-text: #333;
  --c-primary-dark: #9acbe3;
  --c-secondary-dark: #c40028;
  --c-secondary-light: #ffe5ea;
}

body {
  color: var(--c-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== Hero / Header ===== */
.survey-header {
  background: linear-gradient(135deg, var(--c-primary) 0%, #e8f4fa 50%, var(--c-primary) 100%);
  padding: 4rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.survey-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(237, 0, 48, 0.03) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(193, 228, 245, 0.5) 0%, transparent 50%);
  pointer-events: none;
}

.survey-header .badge-polsek {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  color: var(--c-secondary);
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.survey-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 0.75rem;
  position: relative;
  line-height: 1.2;
}

.survey-header p {
  font-size: 1.3rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ===== Landing Unit Cards ===== */
.unit-card {
  background: white;
  border: none;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.unit-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--c-secondary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.unit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(193, 228, 245, 0.4);
}

.unit-card:hover::after {
  transform: scaleY(1);
}

.unit-card .unit-icon {
  width: 60px;
  height: 60px;
  background: var(--c-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  transition: background 0.3s;
}

.unit-card:hover .unit-icon {
  background: var(--c-secondary);
  color: white;
}

.unit-card h5 {
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.unit-card small {
  font-size: 0.95rem;
}

/* ===== Survey Form ===== */
.survey-form-section {
  padding: 3rem 0;
}

.survey-form-section .unit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--c-primary);
  color: var(--c-text);
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(193, 228, 245, 0.3);
}

.rating-option {
  text-align: center;
  cursor: pointer;
  padding: 1.5rem 0.5rem;
  transition: all 0.3s ease;
  border-radius: 20px;
  position: relative;
}

.rating-option .rating-emoji {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 1.25rem;
  display: block;
  transition: transform 0.3s;
}

.rating-option .rating-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  display: block;
  padding: 0 0.25rem;
  line-height: 1.3;
}

.rating-option.selected .rating-label {
  color: var(--c-secondary);
}

.rating-option.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--c-secondary);
  font-weight: 700;
  font-size: 1.2rem;
}

.btn-submit {
  background: var(--c-secondary);
  border: none;
  color: white;
  padding: 1rem 4rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.3rem;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(237, 0, 48, 0.25);
}

.btn-submit:hover:not(:disabled) {
  background: var(--c-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(237, 0, 48, 0.35);
  color: white;
}

.btn-submit:disabled {
  background: #ccc;
  box-shadow: none;
}

/* ===== Success Page ===== */
.success-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.success-card {
  background: white;
  border: none;
  border-radius: 32px;
  padding: 4rem 3rem;
  box-shadow: 0 12px 48px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.success-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary), var(--c-primary));
}

.success-card .checkmark {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 3rem;
  box-shadow: 0 12px 32px rgba(39, 174, 96, 0.3);
}

.success-card h2 {
  font-weight: 800;
  color: var(--c-text);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.success-card p {
  color: #666;
  font-size: 1.4rem;
  line-height: 1.6;
}

.btn-again {
  background: var(--c-primary);
  color: var(--c-text);
  border: none;
  padding: 1rem 3rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.btn-again:hover {
  background: var(--c-primary-dark);
  color: var(--c-text);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(193, 228, 245, 0.4);
}

/* ===== Footer ===== */
.survey-footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 1rem;
}

/* ===== Gradient background for pages ===== */
.survey-bg {
  background: linear-gradient(180deg, #f0f8fd 0%, #ffffff 40%);
  min-height: 100vh;
}

/* ===== Alert styling ===== */
.survey-alert {
  border-radius: 16px;
  border: none;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-size: 1.1rem;
}

/* ===== Tablet / Fullscreen overrides ===== */
@media (min-width: 992px) {
  .survey-header {
    padding: 5rem 0 4rem;
  }

  .survey-header h1 {
    font-size: 3.5rem;
  }

  .survey-header p {
    font-size: 1.5rem;
  }

  .unit-card {
    padding: 3rem 2rem;
  }

  .unit-card h5 {
    font-size: 1.4rem;
  }

  .rating-option {
    padding: 2rem 1rem;
  }

  .rating-option .rating-emoji {
    font-size: 5rem;
    margin-bottom: 1.5rem;
  }

  .rating-option .rating-label {
    font-size: 1.15rem;
  }

  .success-card .checkmark {
    width: 120px;
    height: 120px;
    font-size: 3.5rem;
  }

  .success-card h2 {
    font-size: 3rem;
  }

  .success-card p {
    font-size: 1.6rem;
  }

  .btn-submit {
    padding: 1.25rem 5rem;
    font-size: 1.5rem;
  }
}

@media (min-width: 1400px) {
  .survey-header {
    padding: 6rem 0 5rem;
  }

  .survey-header h1 {
    font-size: 4rem;
  }

  .rating-option .rating-emoji {
    font-size: 6rem;
    margin-bottom: 1.75rem;
  }

  .rating-option .rating-label {
    font-size: 1.35rem;
  }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

/* --- Admin Body --- */
.admin-bg {
  background: #f5f7fa;
  min-height: 100vh;
}

/* --- Admin Navbar --- */
.admin-navbar {
  background: var(--c-primary);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 0;
}

.admin-navbar .navbar-brand {
  color: var(--c-text);
  font-weight: 800;
  padding: 0.75rem 1.25rem;
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-navbar .brand-accent {
  color: var(--c-secondary);
}

.admin-navbar .nav-link {
  color: rgba(51,51,51,0.75);
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  transition: all 0.2s;
  position: relative;
}

.admin-navbar .nav-link:hover,
.admin-navbar .nav-link.active {
  color: var(--c-text);
  background: rgba(255,255,255,0.35);
}

.admin-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--c-secondary);
  transition: width 0.3s;
}

.admin-navbar .nav-link:hover::after,
.admin-navbar .nav-link.active::after {
  width: 50%;
}

.admin-navbar .nav-link.logout-link {
  color: var(--c-secondary);
}

.admin-navbar .nav-link.logout-link:hover {
  background: rgba(237,0,48,0.1);
}

/* --- Page Title --- */
.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-page-title .title-icon {
  width: 36px;
  height: 36px;
  background: var(--c-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--c-text);
}

/* --- Admin Cards --- */
.admin-card {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  overflow: hidden;
}

.admin-card .card-header-custom {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-card .card-body {
  padding: 1.25rem;
}

/* --- Stat Cards --- */
.stat-card {
  border: none;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.stat-card .stat-body {
  padding: 1rem 1.25rem;
  position: relative;
}

.stat-card .stat-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.stat-blue {
  background: linear-gradient(135deg, #c1e4f5 0%, #9acbe3 100%);
}

.stat-blue .stat-label,
.stat-blue .stat-value {
  color: var(--c-text);
}

.stat-red {
  background: linear-gradient(135deg, #ed0030 0%, #c40028 100%);
}

.stat-green {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.stat-orange {
  background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

/* --- Filter Card --- */
.filter-card {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  margin-bottom: 1.5rem;
}

.filter-card .filter-body {
  padding: 1.25rem;
}

.filter-card .filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

/* --- Admin Tables --- */
.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead th {
  background: var(--c-primary);
  color: var(--c-text);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  border: none;
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  color: var(--c-text);
}

.admin-table tbody tr:hover {
  background: #f8fbff;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Admin Buttons --- */
.btn-admin-primary {
  background: var(--c-primary);
  color: var(--c-text);
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-admin-primary:hover {
  background: var(--c-primary-dark);
  color: var(--c-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(193, 228, 245, 0.3);
}

.btn-admin-danger {
  background: var(--c-secondary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-admin-danger:hover {
  background: var(--c-secondary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(237, 0, 48, 0.3);
}

.btn-admin-outline {
  background: transparent;
  color: #888;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-admin-outline:hover {
  border-color: var(--c-primary);
  color: var(--c-text);
  background: rgba(193, 228, 245, 0.1);
}

.btn-admin-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* --- Admin Forms --- */
.admin-form-card {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  padding: 2rem;
}

.admin-form-card .form-label {
  font-weight: 700;
  color: var(--c-text);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.admin-form-card .form-control,
.admin-form-card .form-select {
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form-card .form-control:focus,
.admin-form-card .form-select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(193, 228, 245, 0.3);
}

.admin-form-card .form-text {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.3rem;
}

/* --- Badge Custom --- */
.badge-admin-active {
  background: #e8f8e8;
  color: #27ae60;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
}

.badge-admin-inactive {
  background: #f0f0f0;
  color: #888;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
}

/* --- Admin Login --- */
.admin-login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--c-primary) 0%, #e8f4fa 50%, #f0f8fd 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.admin-login-page::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(237, 0, 48, 0.04) 0%, transparent 70%);
  border-radius: 50%;
}

.admin-login-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(193, 228, 245, 0.5) 0%, transparent 70%);
  border-radius: 50%;
}

.admin-login-card {
  background: white;
  border: none;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.08);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

.admin-login-card .login-logo {
  width: 64px;
  height: 64px;
  background: var(--c-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--c-secondary);
}

.admin-login-card .login-title {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--c-text);
  text-align: center;
  margin-bottom: 0.25rem;
}

.admin-login-card .login-subtitle {
  text-align: center;
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.admin-login-card .form-control {
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  padding: 0.75rem 1rem;
}

.admin-login-card .form-control:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(193, 228, 245, 0.3);
}

.admin-login-card .input-icon {
  position: relative;
}

.admin-login-card .input-icon .form-control {
  padding-left: 2.75rem;
}

.admin-login-card .input-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
}

.btn-login {
  background: var(--c-secondary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.85rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(237, 0, 48, 0.25);
  width: 100%;
}

.btn-login:hover {
  background: var(--c-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(237, 0, 48, 0.35);
  color: white;
}

/* --- Export Section --- */
.export-section {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  padding: 1.25rem;
}

.export-section .export-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Chart containers --- */
.chart-wrapper {
  position: relative;
  height: 200px;
}

.chart-wrapper-sm {
  position: relative;
  height: 120px;
}

.chart-wrapper-lg {
  position: relative;
  height: 300px;
}
