/* ===== RESET & VARIABLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a56db;
  --primary-dark: #1e429f;
  --primary-light: #ebf5ff;
  --danger: #e02424;
  --danger-light: #fef2f2;
  --success: #057a55;
  --success-light: #f0fdf4;
  --warning: #c27803;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

html {
  background: #002244;
  min-height: 100%;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN PAGE ===== */
.mandiri-logo {
  height: 48px;
  margin: 0 auto 20px auto;
  display: block;
}

@keyframes mandiriFluid {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.1); }
}

.login-page {
  background: linear-gradient(-45deg, #003D79, #0B5A9D, #002244, #003D79);
  background-size: 400% 400%;
  animation: mandiriFluid 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -10%; left: -10%;
  width: 50vw; height: 50vh;
  background: radial-gradient(circle, rgba(242,169,0,0.15) 0%, rgba(0,0,0,0) 70%);
  filter: blur(40px);
  animation: floatOrb 10s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -10%;
  width: 60vw; height: 60vh;
  background: radial-gradient(circle, rgba(11,90,157,0.4) 0%, rgba(0,0,0,0) 70%);
  filter: blur(60px);
  animation: floatOrb 12s ease-in-out infinite alternate-reverse;
  z-index: 0;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 400px;
  z-index: 1;
  position: relative;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 32px 36px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.3;
}

.login-header p {
  font-size: 13px;
  color: var(--gray-500);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-group input[type="number"] {
  text-align: right;
  font-size: 16px;
  font-weight: 500;
}

.form-group input.read-only {
  background: var(--gray-50);
  color: var(--gray-500);
  cursor: not-allowed;
}

/* Password toggle */
.input-wrapper {
  position: relative;
}

.input-wrapper input {
  padding-right: 44px;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  color: var(--gray-400);
  line-height: 1;
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 8px 16px;
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--primary-light);
}

.btn-danger {
  padding: 8px 16px;
  background: var(--white);
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover {
  background: var(--danger-light);
}

/* ===== ALERTS ===== */
.error-msg {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
}

.success-msg {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
}

/* ===== LOADER ===== */
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ===== NAVBAR ===== */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.nav-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.2;
}

.nav-role-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.nav-role-badge.role-area {
  background: #dbeafe;
  color: var(--primary-dark);
}

.nav-role-badge.role-kacab {
  background: #d1fae5;
  color: #065f46;
}

.nav-role-badge.role-pic {
  background: #fef3c7;
  color: #92400e;
}

.btn-logout {
  padding: 7px 14px;
  background: transparent;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-logout:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ===== WELCOME CARD ===== */
.welcome-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.welcome-label {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 3px;
}

.welcome-card h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.welcome-cabang {
  font-size: 13px;
  opacity: 0.8;
}

.welcome-date {
  font-size: 12px;
  opacity: 0.7;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1.6;
}

/* ===== MENU GRID ===== */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.menu-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.12);
  transform: translateY(-2px);
}

.menu-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

.menu-icon {
  font-size: 34px;
  margin-bottom: 10px;
  display: block;
  line-height: 1;
}

.menu-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.menu-card p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ===== COMING SOON ===== */
.coming-soon-note {
  margin-top: 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
}

.coming-soon-note p {
  font-size: 13px;
  color: var(--warning);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 20px 28px;
  }

  .login-header h1 {
    font-size: 20px;
  }

  .nav-user-info {
    display: none;
  }

  .welcome-card {
    flex-direction: column;
    gap: 8px;
  }

  .welcome-date {
    text-align: left;
    opacity: 0.65;
  }

  .welcome-card h2 {
    font-size: 18px;
  }

  .menu-grid {
    gap: 10px;
  }

  .menu-card {
    padding: 18px 12px;
  }

  .menu-icon {
    font-size: 28px;
  }

  .menu-card h3 {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   REPORT INPUT PAGE
   ============================================================ */

/* Navbar extras */
.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  width: 80px;
  text-align: left;
}

.btn-back:hover { opacity: 0.75; }

.nav-page-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

/* Form container */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

/* Warning banner */
.warning-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.warning-banner.warning-edit {
  justify-content: space-between;
}
.btn-edit-report {
  flex-shrink: 0;
  padding: 6px 14px;
  background: #d97706;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-edit-report:hover { background: #b45309; }
.edit-mode-banner {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 14px;
}

/* Form sections */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.section-body {
  padding: 4px 0;
}

/* Input rows */
.input-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
}

.input-row:last-child { border-bottom: none; }

.input-row.total-row {
  background: var(--gray-50);
}

.input-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.input-static {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.input-static.small { font-size: 13px; }

/* Number inputs in rows */
.num-input {
  width: 110px;
  text-align: right;
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}

.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.num-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

/* Input sub-group (within a section) */
.input-subgroup {
  margin-bottom: 4px;
}
.input-subgroup-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 16px;
  margin-bottom: 0;
}
.input-subgroup:last-of-type { margin-bottom: 0; }

/* Auto-calculated field */
.calc-field {
  background: var(--gray-50) !important;
  color: var(--primary) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  cursor: default;
}

/* Date input */
.date-input {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  background: var(--white);
}

.date-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

/* Total CIF banner */
.total-cif-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 100%);
  color: white;
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
  margin-bottom: 12px;
}

.total-cif-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.75;
  margin-bottom: 6px;
}

.total-cif-value {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -2px;
}

.total-cif-sub {
  font-size: 13px;
  opacity: 0.7;
}

/* 3P+I grid */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.grid-field {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}

.grid-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.grid-field input {
  display: block;
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  padding: 8px 6px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  color: var(--gray-900);
  background: var(--white);
  -moz-appearance: textfield;
}

.grid-field input::-webkit-outer-spin-button,
.grid-field input::-webkit-inner-spin-button { -webkit-appearance: none; }

.grid-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 16px;
  letter-spacing: 0.3px;
}

.btn-submit:hover:not(:disabled) { background: var(--primary-dark); }
.btn-submit:active:not(:disabled) { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.success-state {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--gray-50);
}

.success-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #d1fae5;
  color: #057a55;
  border-radius: 50%;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 700;
}

.success-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.success-date {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.success-summary {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 4px 0;
  margin-bottom: 24px;
  text-align: left;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.summary-row:last-child { border-bottom: none; }

.summary-row span { color: var(--gray-600, #4b5563); }
.summary-row strong { font-size: 16px; font-weight: 700; color: var(--gray-900); }

.summary-row.summary-total {
  background: var(--primary-light);
}

.summary-row.summary-total span { color: var(--primary); font-weight: 600; }
.summary-row.summary-total strong { font-size: 22px; color: var(--primary); }

@media (max-width: 480px) {
  .total-cif-value { font-size: 44px; }
  .num-input { width: 90px; font-size: 16px; }
  .grid-field input { font-size: 20px; }
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */

.dash-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

/* Date filter bar */
.dash-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.dash-filter-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-filter-left label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.btn-today {
  padding: 8px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  height: 38px;
}

.btn-today:hover { background: var(--primary); color: white; }

/* Loading & empty states */
.dash-loading,
.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--gray-400);
}

.dash-loading p,
.dash-empty p { font-size: 14px; }

.spin {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.empty-icon { font-size: 40px; }

/* Hero total CIF */
.dash-hero {
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 12px;
}

.dash-hero-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.dash-hero-value {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 6px;
}

.dash-hero-sub {
  font-size: 13px;
  opacity: 0.7;
}

/* 2-column stat grid */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.dash-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.dash-card-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #1e293b;
  margin-bottom: 6px;
}

.dash-card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 8px;
}

.dash-card-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.tag-blue { background: #dbeafe; color: var(--primary-dark); }
.tag-gray { background: var(--gray-100); color: var(--gray-600, #4b5563); }

/* Section title */
.dash-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

/* 4-column 3P+I grid */
.dash-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

/* 3P+I expanded cards */
.dash-3pi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.dash-3pi-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dash-3pi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}
.dash-3pi-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}
.dash-3pi-total {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}
.dash-3pi-rows {
  padding: 6px 0;
}
.dash-3pi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-50);
}
.dash-3pi-row:last-child { border-bottom: none; }
.dash-3pi-row strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  min-width: 24px;
  text-align: right;
}

.dash-mini-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.dash-mini-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.dash-mini-label {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Shared table scroll wrapper */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Dashboard breakdown table */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
  min-width: 560px;
}

.dash-table thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
}

.dash-table th {
  padding: 10px 12px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--gray-500);
  white-space: nowrap;
}

.th-left { text-align: left !important; }
.th-highlight { color: var(--primary) !important; }

.dash-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); }

/* ============================================================
   DATA TABLE PAGE
   ============================================================ */

/* Filter card */
.filter-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.filter-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-select,
.filter-text {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  width: 100%;
  -webkit-appearance: none;
}

.filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.filter-select:focus,
.filter-text:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.btn-filter {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.btn-filter:hover { background: var(--primary-dark); }

/* Result info */
.result-info {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 10px;
  padding: 0 2px;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
  min-width: 900px;
}

.data-table thead tr {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 10px 10px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}

/* Shared row/cell helpers */
.tr-alt { background: var(--gray-50); }
.tr-total { background: #eff6ff; border-top: 2px solid #bfdbfe; }
.td-left { text-align: left !important; }
.td-num { text-align: right; font-variant-numeric: tabular-nums; }
.td-highlight { color: var(--primary); font-weight: 700; }
.td-muted { color: var(--gray-400); }
.td-nowrap { white-space: nowrap; }
.td-small { font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

.tr-total td { font-weight: 700; font-size: 13px; }

@media (max-width: 480px) {
  .dash-hero-value { font-size: 48px; }
  .dash-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-mini-value { font-size: 20px; }
  .filter-row { flex-direction: column; gap: 8px; }
}

/* ============================================================
   TAHAP 4 — NEW COMPONENTS
   ============================================================ */

/* ── Belum Lapor widget ─────────────────────────────────── */
.missing-card {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1.5px solid;
}

.missing-warn {
  background: #fff7ed;
  border-color: #fed7aa;
}

.missing-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.missing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.missing-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
}

.missing-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f97316;
  flex-shrink: 0;
}

.missing-ok .missing-dot { background: #22c55e; }

.missing-count {
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: #ffedd5;
  padding: 2px 10px;
  border-radius: 20px;
}

.missing-ok .missing-count {
  color: #15803d;
  background: #dcfce7;
}

.missing-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.missing-item {
  font-size: 13px;
  color: #9a3412;
  padding: 3px 0;
  border-bottom: 1px solid #fed7aa;
}

.missing-item:last-child { border-bottom: none; }

.missing-all-ok {
  font-size: 13px;
  color: #15803d;
  font-weight: 600;
}

.missing-toggle {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.missing-toggle:hover { text-decoration: underline; }

/* ── Dashboard hero update ──────────────────────────────── */
.dash-hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.dash-hero-chip {
  font-size: 12px;
  opacity: 0.75;
}

.dash-hero-sep {
  font-size: 12px;
  opacity: 0.45;
}

.dash-hero-sub {
  font-size: 12px;
  opacity: 0.6;
}

/* ── Trend chart ────────────────────────────────────────── */
.trend-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 12px 10px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 88px;
}

.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 3px;
}

.trend-col.trend-today .trend-bar { background: var(--primary); }
.trend-col.trend-today .trend-date { color: var(--primary); font-weight: 700; }

.trend-val {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-700);
  min-height: 14px;
  line-height: 1;
}

.trend-bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.trend-bar {
  width: 100%;
  background: #93c5fd;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  min-height: 3px;
}

.trend-bar-zero { background: var(--gray-100); }

.trend-date {
  font-size: 10px;
  color: var(--gray-400);
  white-space: nowrap;
}

/* ── Top5 / Bottom5 ranking ─────────────────────────────── */
.rank-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
  margin-top: 12px;
}

.rank-top    { background: #dcfce7; color: #15803d; }
.rank-bottom { background: #fff7ed; color: #c2410c; }

.btn-showall {
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-showall:hover { background: var(--primary-light); border-color: var(--primary); }

/* ── Sticky submit button ───────────────────────────────── */
.sticky-submit-wrap {
  position: sticky;
  bottom: 0;
  z-index: 30;
  padding: 10px 0 6px;
  background: linear-gradient(to top, var(--gray-50) 75%, transparent);
  margin-top: 8px;
}

/* ── Minor polish ───────────────────────────────────────── */
.dash-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin: 16px 0 8px;
}

/* Improve table scroll hint on mobile */
.table-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 24px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.6));
  pointer-events: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.table-scroll-wrapper { position: relative; }

@media (max-width: 480px) {
  .trend-val { font-size: 9px; }
  .trend-date { font-size: 9px; }
  .missing-card { padding: 12px 14px; }
  .rank-label { font-size: 10px; }
}

/* ===== REMINDER SETTINGS ===== */
.reminder-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.reminder-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}
.reminder-info-row:last-of-type { border-bottom: none; }
.reminder-info-label { font-size: 13px; color: var(--gray-500); }
.reminder-info-val   { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.reminder-info-note  { font-size: 12px; color: var(--gray-400); margin-top: 10px; }

.btn-test-reminder {
  width: 100%;
  padding: 14px;
  background: #0694a2;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-test-reminder:hover   { background: #047481; }
.btn-test-reminder:disabled { opacity: .6; cursor: not-allowed; }

.test-result {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.6;
}
.test-result-ok    { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.test-result-error { background: var(--danger-light);  color: #991b1b; border: 1px solid #fecaca; }

.reminder-group { border-bottom: 1px solid var(--gray-100); }
.reminder-group:last-child { border-bottom: none; }
.reminder-group-header {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  background: var(--gray-50);
}
.reminder-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
}
.reminder-user-row:last-child { border-bottom: none; }
.reminder-user-name {
  flex: 1;
  font-size: 14px;
  color: var(--gray-700);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reminder-phone-wrap {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.reminder-phone-input {
  width: 140px;
  padding: 7px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-900);
}
.reminder-phone-input:focus { outline: none; border-color: var(--primary); }
.btn-save-phone {
  padding: 7px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-save-phone:hover { background: var(--primary-dark); }

.btn-send-reminder {
  padding: 7px 10px;
  background: #0e9f6e;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-send-reminder:hover { background: #057a55; }
.btn-send-reminder:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== HOME ADMIN SECTION ===== */
.menu-admin-section { margin-top: 8px; }
.menu-admin-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gray-400);
  margin-bottom: 8px;
  padding: 0 2px;
}

/* ===== USER MANAGEMENT ===== */
.um-container { max-width: 700px; margin: 0 auto; padding: 16px; }

.btn-add-user {
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-add-user:hover { background: var(--primary-dark); }

.um-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.um-stat {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}
.um-stat span { display: block; font-size: 22px; font-weight: 700; color: var(--gray-900); }
.um-stat small { font-size: 11px; color: var(--gray-400); }

.um-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.um-search {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
}
.um-search:focus { outline: none; border-color: var(--primary); }

.um-table .td-actions { white-space: nowrap; text-align: center; }
.um-cabang { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-edit {
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
}
.btn-edit:hover { background: #dbeafe; }
.btn-del {
  padding: 4px 10px;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-del:hover { background: #fee2e2; }

/* Tags extra colors */
.tag-purple { background: #ede9fe; color: #5b21b6; }
.tag-green  { background: #d1fae5; color: #065f46; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-card-sm { max-width: 340px; padding: 20px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 0;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--gray-400);
  line-height: 1;
}
.modal-close:hover { color: var(--gray-700); }
.modal-field {
  padding: 10px 20px 0;
}
.modal-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 5px;
}
.modal-field input, .modal-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
}
.modal-field input:focus, .modal-field select:focus {
  outline: none;
  border-color: var(--primary);
}
.req { color: var(--danger); }
.pw-hint { font-size: 11px; color: var(--gray-400); font-weight: 400; }
.excel-date-input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  box-sizing: border-box;
}
.excel-date-input:focus { outline: none; border-color: var(--primary); }
#modalError { margin: 10px 20px 0; }
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 20px;
}
.delete-confirm-text {
  padding: 12px 0 16px;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}
.btn-danger {
  padding: 9px 18px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { background: #b91c1c; }

/* ===== TREND PERIOD TABS ===== */
.trend-period-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.trend-tab {
  padding: 5px 12px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all .15s;
}
.trend-tab:hover  { border-color: var(--primary); color: var(--primary); }
.trend-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Dense bars (> 14 bars) — fixed width + scroll */
.trend-bars-dense { overflow-x: auto; padding-bottom: 4px; }
.trend-bars-dense .trend-col { min-width: 44px; flex: 0 0 44px; }

/* Clickable bars */
.trend-col { cursor: pointer; border-radius: 6px; padding: 2px 0; transition: background .1s; }
.trend-col:hover { background: var(--gray-100); }

/* Active (selected via date click) bar */
.trend-active .trend-bar { background: var(--primary) !important; }
.trend-active .trend-date { color: var(--primary); font-weight: 700; }

/* Trend date — allow two lines */
.trend-date { font-size: 10px; line-height: 1.3; text-align: center; white-space: normal; word-break: keep-all; }

.wa-test-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.wa-test-title { font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.wa-test-note  { font-size: 12px; color: var(--gray-400); margin-bottom: 12px; }
.wa-test-row   { display: flex; gap: 8px; align-items: center; }

/* ── Visit & Akuisisi pair inputs ─────────────────────────── */
.va-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}
.va-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.va-field span {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.va-sep {
  font-size: 16px;
  font-weight: 400;
  color: var(--gray-300);
  margin-top: 14px;
}
.num-input-sm {
  width: 72px;
  text-align: right;
  padding: 6px 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}
.num-input-sm::-webkit-outer-spin-button,
.num-input-sm::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input-sm:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

/* ── WA text section on success screen ─────────────────────── */
.wa-text-section {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 4px;
  text-align: left;
}
.wa-text-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.wa-text-header span {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
}
.btn-copy-wa {
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-copy-wa:hover { background: var(--primary-dark); }
.wa-textarea {
  width: 100%;
  min-height: 180px;
  padding: 10px 12px;
  border: none;
  background: var(--white);
  font-size: 12px;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
  color: var(--gray-700);
  resize: vertical;
  display: block;
}
.wa-textarea:focus { outline: none; }

/* ============================================================
   ACQUISITION TABLES (Dashboard – AREA only)
   ============================================================ */
.acq-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--gray-400);
  font-size: 14px;
}

.acq-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 16px;
  flex-wrap: wrap;
}
.acq-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
}
.acq-date-range { display: flex; align-items: center; gap: 4px; }
.acq-range-sep  { font-size: 11px; font-weight: 600; color: var(--gray-500); }
.acq-date-input {
  padding: 5px 10px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  font-size: 12px;
  color: var(--gray-800);
  background: var(--white);
  cursor: pointer;
}
.acq-preset-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.acq-preset-btn:hover { border-color: var(--primary); color: var(--primary); }
.acq-preset-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.acq-table-wrap {
  margin-bottom: 20px;
}

.acq-table-header {
  margin-bottom: 6px;
}

.acq-table-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.acq-table-sub {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.acq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  background: var(--white);
  min-width: 700px;
}

/* Group header row */
.acq-th-group {
  padding: 6px 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
  white-space: nowrap;
}

.acq-th-cabang  { background: var(--primary-dark); text-align: left; }
.acq-th-daily   { background: #d97706; }
.acq-th-weekly  { background: #b45309; }
.acq-th-monthly { background: var(--primary-dark); }

/* Sub-header row */
.acq-th-sub {
  padding: 5px 6px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.acq-th-sub:last-child { border-right: none; }

.acq-th-sub-cabang  { background: var(--primary-dark); text-align: left; }
.acq-th-sub-daily   { background: #d97706; }
.acq-th-sub-weekly  { background: #b45309; }
.acq-th-sub-monthly { background: var(--primary-dark); }

/* Data cells */
.acq-td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gray-100);
  border-right: 1px solid var(--gray-100);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  white-space: nowrap;
}
.acq-td:last-child { border-right: none; }

.acq-td-cabang {
  text-align: left;
  font-size: 11px;
  color: var(--gray-700);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acq-tr:nth-child(even) { background: var(--gray-50); }

.acq-tr-total {
  background: #dbeafe !important;
  font-weight: 700;
}
.acq-tr-total .acq-td { font-weight: 700; font-size: 11px; }
.acq-tr-total .acq-td-cabang { color: var(--primary-dark); font-weight: 800; }

/* Target cell (muted) */
.acq-td-target { color: var(--gray-500); }

/* %to cell with dot */
.acq-pct {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.acq-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.acq-dot-green  { background: #16a34a; }
.acq-dot-orange { background: #f59e0b; }
.acq-dot-red    { background: #dc2626; }

/* Section separator between groups */
.acq-td-sep-right { border-right: 2px solid var(--gray-300) !important; }

@media (max-width: 480px) {
  .acq-table { font-size: 10px; }
  .acq-td, .acq-td-cabang { padding: 5px 6px; }
}

/* Acq table header row (title + fullscreen button) */
.acq-table-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.acq-header-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
  align-items: center;
}
.btn-acq-fs, .btn-acq-dl {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid;
}
.btn-acq-fs {
  color: var(--primary-dark);
  background: #eff6ff;
  border-color: #bfdbfe;
}
.btn-acq-fs:hover { background: #dbeafe; }
.btn-acq-dl {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.btn-acq-dl:hover { background: #dcfce7; }
.btn-acq-img {
  color: #6b21a8;
  background: #faf5ff;
  border-color: #e9d5ff;
}
.btn-acq-img:hover { background: #f3e8ff; }

/* Fullscreen overlay */
.acq-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.acq-fs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--primary-dark);
  color: #fff;
  flex-shrink: 0;
}
.acq-fs-topbar-left { display: flex; flex-direction: column; gap: 2px; }
.acq-fs-topbar-title { font-size: 13px; font-weight: 800; letter-spacing: 0.3px; }
.acq-fs-topbar-sub   { font-size: 11px; opacity: 0.75; }
.btn-acq-fs-close {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-acq-fs-close:hover { background: #dbeafe; }
.acq-fs-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
}
.acq-fs-body .acq-table { font-size: 12px; min-width: 700px; }
.acq-fs-body .acq-td, .acq-fs-body .acq-td-cabang { padding: 7px 10px; }
.acq-fs-body .acq-th-group { padding: 8px 10px; font-size: 11px; }
.acq-fs-body .acq-th-sub   { padding: 6px 8px; font-size: 10px; }

/* Skyline Animation */
@keyframes skylinePan {
  from { background-position: 0 100%; }
  to { background-position: 1000px 100%; }
}

.skyline-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 250px;
  background-image: url('/images/skyline.svg');
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 1000px 200px;
  animation: skylinePan 60s linear infinite;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

/* Specific Login Revisions */
.login-header h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.login-header p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}
.login-form .form-group label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-left {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.login-form input.has-icon {
  padding-left: 44px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.login-form input.has-icon::placeholder {
  color: #94a3b8;
}
.login-form input.has-icon:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.login-form .toggle-pw {
  right: 12px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-login {
  background: linear-gradient(to right, #1d4ed8, #2563eb);
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 12px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-login:hover {
  background: linear-gradient(to right, #1e40af, #1d4ed8);
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 20px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #f1f5f9;
}
.login-divider span {
  padding: 0 16px;
}

.help-link-container {
  text-align: center;
}
.help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.help-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Clean Form Styling for Mandiri Theme */
.section-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
}
.section-label {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.input-subgroup-title {
  font-size: 12px;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 8px 16px 8px 14px;
  margin-bottom: 0;
  background: #eff6ff !important;
  color: #1a56db !important;
  border-top: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
  border-left: 3px solid #1a56db;
}
.input-subgroup:first-of-type .input-subgroup-title {
  border-top: none;
}
.form-section {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.input-row {
  border-bottom: 1px solid #f1f5f9;
}

/* Dashboard UI Refinements */
.acq-header-btns {
  display: flex;
  gap: 8px;
}
.new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}
.btn-acq-dl.new-btn {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.btn-acq-dl.new-btn:hover { background: #dcfce3; }

.btn-acq-img.new-btn {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.btn-acq-img.new-btn:hover { background: #f3e8ff; }

.btn-acq-fs.new-btn {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.btn-acq-fs.new-btn:hover { background: #dbeafe; }

/* General Dashboard Theme Sync */
.dash-container {
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.dash-card, .dash-3pi-card, .missing-card, .trend-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
}
.dash-hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}
.navbar {
  background: white;
  border-bottom: 1px solid #e2e8f0;
}
.nav-page-title {
  font-weight: 700;
  color: #0f172a;
}
.btn-back {
  color: #64748b;
  font-weight: 600;
}
.btn-back:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Tambahan margin untuk bagian Akuisisi */
#acqSection {
  margin-top: 48px;
}

/* Styling specific to Reminder WA and User Management to match Mandiri theme */
.reminder-info-card, .wa-test-card, .um-stats {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.um-stats {
  margin-top: 24px;
}
.btn-test-reminder, .btn-add-user {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: white !important;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-test-reminder:hover, .btn-add-user:hover {
  opacity: 0.9;
}
.btn-save-phone, .btn-primary {
  background: #2563eb;
  color: white;
  border-radius: 6px;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
}
.btn-save-phone:hover, .btn-primary:hover {
  background: #1d4ed8;
}

/* User Management Table Buttons */
.btn-edit {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.btn-edit:hover { background: #dbeafe !important; }

.btn-del {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.btn-del:hover { background: #fee2e2 !important; }

/* Clean table styling */
.um-table {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}
.um-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}
.um-table td {
  border-bottom: 1px solid #f1f5f9;
}

/* Fix input style in reminder row to match the clean look */
.reminder-phone-input {
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.reminder-phone-input:focus {
  border-color: #2563eb;
  outline: none;
}
