:root {
  --green-dark:  #0E7162;
  --green-mid:   #26C699;
  --green-light: #E8F5F2;
  --yellow:      #FDDB3A;
  --yellow-light:#FEFAE8;
  --white:       #FFFFFF;
  --black:       #111827;
  --grey-50:     #F9FAFB;
  --grey-100:    #F3F4F6;
  --grey-200:    #E5E7EB;
  --grey-300:    #D1D5DB;
  --grey-400:    #9CA3AF;
  --grey-500:    #6B7280;
  --grey-600:    #4B5563;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--grey-50); color: var(--black); min-height: 100vh; }
a { text-decoration: none; color: inherit; }

/* ── TOPBAR ─────────────────────────────────────────────── */
.dp-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 60px;
  background: var(--green-dark); display: flex; align-items: center;
  justify-content: space-between; padding: 0 28px; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.dp-brand { display: flex; align-items: center; gap: 12px; }
.dp-brand img { height: 32px; }
.dp-brand-name { font-size: 14px; font-weight: 700; color: #fff; }
.dp-brand-sub  { font-size: 11px; color: rgba(255,255,255,0.6); }
.dp-topbar-right { display: flex; align-items: center; gap: 12px; }
.dp-user-chip {
  background: rgba(255,255,255,0.15); border-radius: 99px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 7px;
}
.dp-user-chip i { font-size: 15px; }
.dp-logout-btn {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm); padding: 7px 14px; font-size: 13px;
  font-weight: 600; color: #fff; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 6px; transition: background 0.15s;
}
.dp-logout-btn:hover { background: rgba(255,255,255,0.22); }

/* ── MAIN ───────────────────────────────────────────────── */
.dp-main { margin-top: 60px; max-width: 980px; margin-left: auto; margin-right: auto; padding: 32px 24px 64px; }

/* ── HERO BANNER ────────────────────────────────────────── */
.dp-hero {
  background: var(--green-dark); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 24px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 20px;
}
.dp-hero-avatar {
  width: 60px; height: 60px; border-radius: 12px;
  background: var(--yellow); color: var(--green-dark);
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dp-hero-name  { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.dp-hero-sub   { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 4px; }
.dp-hero-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dp-chip {
  background: rgba(255,255,255,0.12); border-radius: 99px;
  padding: 4px 12px; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 5px;
}
.dp-chip i { font-size: 13px; }
.dp-verified-badge { background: #D1FAE5; color: #065F46; border-radius: 99px; padding: 4px 12px; font-size: 12px; font-weight: 700; }

/* ── STATS ──────────────────────────────────────────────── */
.dp-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }
.dp-stat-card {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-sm); text-align: center;
}
.dp-stat-val { font-size: 26px; font-weight: 800; color: var(--green-dark); letter-spacing: -0.02em; }
.dp-stat-lbl { font-size: 12px; color: var(--grey-400); margin-top: 3px; }

/* ── CARD ───────────────────────────────────────────────── */
.dp-card {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.dp-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--grey-100);
}
.dp-card-title {
  font-size: 12px; font-weight: 700; color: var(--grey-600);
  text-transform: uppercase; letter-spacing: 0.07em;
  display: flex; align-items: center; gap: 8px;
}
.dp-card-title i { font-size: 16px; color: var(--green-dark); }

/* ── DONATE BUTTON ──────────────────────────────────────── */
.dp-donate-btn {
  background: var(--yellow); color: var(--green-dark);
  border: none; border-radius: var(--radius-md); padding: 10px 18px;
  font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 6px; transition: opacity 0.15s;
}
.dp-donate-btn:hover { opacity: 0.88; }

/* ── DONATION TABLE ─────────────────────────────────────── */
.dp-table { width: 100%; border-collapse: collapse; }
.dp-table th {
  text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700;
  color: var(--grey-400); text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--grey-100); background: var(--grey-50);
}
.dp-table td { padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--grey-100); }
.dp-table tr:last-child td { border-bottom: none; }
.dp-table tr:hover td { background: var(--grey-50); }
.dp-amount { font-weight: 700; color: var(--green-dark); }
.dp-empty { padding: 32px; text-align: center; color: var(--grey-400); font-size: 13px; }
.dp-empty i { font-size: 28px; display: block; margin-bottom: 8px; opacity: 0.4; }

/* ── MATCHED STUDENT ────────────────────────────────────── */
.dp-student-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0a5a4e 100%);
  padding: 24px; display: flex; align-items: center; gap: 16px;
}
.dp-student-avatar {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--yellow); color: var(--green-dark);
  font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dp-student-name   { font-size: 18px; font-weight: 700; color: #fff; }
.dp-student-school { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 3px; }

.dp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dp-info-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--grey-100); gap: 16px;
}
.dp-info-row:last-child { border-bottom: none; }
.dp-info-key { font-size: 12px; color: var(--grey-400); font-weight: 500; flex-shrink: 0; }
.dp-info-val { font-size: 13px; color: var(--black); font-weight: 500; text-align: right; }
.dp-info-val.empty { color: var(--grey-300); font-style: italic; }

/* ── UPDATE FEED ────────────────────────────────────────── */
.dp-update-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--grey-100);
}
.dp-update-item:last-child { border-bottom: none; }
.dp-update-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.dp-update-title { font-size: 13px; font-weight: 600; color: var(--black); }
.dp-update-meta  { font-size: 12px; color: var(--grey-400); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-update-score {
  background: var(--yellow-light); color: #713F12;
  border: 1px solid #FDE68A; border-radius: 99px;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
}
.dp-new-badge {
  background: #DCFCE7; color: #166534; border-radius: 99px;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
}
.dp-no-match {
  padding: 48px 32px; text-align: center;
}
.dp-no-match-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-light); color: var(--green-dark);
  font-size: 32px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* ── MODAL ──────────────────────────────────────────────── */
.dp-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.dp-modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.dp-modal-head {
  background: var(--green-dark); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.dp-modal-title { font-size: 16px; font-weight: 700; color: #fff; }
.dp-modal-close {
  background: rgba(255,255,255,0.15); border: none; border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; color: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.dp-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dp-modal-foot { padding: 16px 24px; border-top: 1px solid var(--grey-100); display: flex; gap: 10px; justify-content: flex-end; }

/* ── FORM FIELDS ────────────────────────────────────────── */
.dp-field-group { display: flex; flex-direction: column; gap: 6px; }
.dp-field-label { font-size: 12px; font-weight: 600; color: var(--grey-600); }
.dp-field-label .req { color: #DC2626; margin-left: 2px; }
.dp-field-input, .dp-field-select, .dp-field-textarea {
  border: 1px solid var(--grey-200); border-radius: var(--radius-md);
  padding: 10px 13px; font-size: 14px; font-family: var(--font);
  color: var(--black); background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
.dp-field-input:focus, .dp-field-select:focus, .dp-field-textarea:focus {
  border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(14,113,98,0.08);
}
.dp-field-hint { font-size: 11px; color: var(--grey-400); }

/* ── BUTTONS ────────────────────────────────────────────── */
.dp-btn-primary {
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  background: var(--green-dark); color: #fff; font-size: 13px;
  font-weight: 700; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 6px; transition: background 0.15s;
}
.dp-btn-primary:hover { background: var(--green-mid); }
.dp-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.dp-btn-outline {
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--grey-200); background: var(--white);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font); color: var(--grey-600);
}

/* ── AUTH PAGES ─────────────────────────────────────────── */
.dp-auth-wrap {
  min-height: 100vh; display: flex; background: var(--grey-50);
}
.dp-auth-left {
  width: 380px; background: var(--green-dark); flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 40px;
}
.dp-auth-left img { height: 48px; margin-bottom: 28px; object-fit: contain; }
.dp-auth-left-title { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 12px; }
.dp-auth-left-sub   { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.7; }
.dp-auth-left-stats { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.dp-auth-stat { display: flex; align-items: center; gap: 12px; }
.dp-auth-stat-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--yellow); flex-shrink: 0;
}
.dp-auth-stat-val  { font-size: 18px; font-weight: 800; color: #fff; }
.dp-auth-stat-lbl  { font-size: 12px; color: rgba(255,255,255,0.6); }

.dp-auth-right {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px;
}
.dp-auth-form-card {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); width: 100%; max-width: 420px;
  box-shadow: var(--shadow-md); padding: 36px;
  display: flex; flex-direction: column; gap: 20px;
}
.dp-auth-title { font-size: 22px; font-weight: 800; color: var(--black); letter-spacing: -0.02em; }
.dp-auth-sub   { font-size: 13px; color: var(--grey-500); margin-top: 6px; line-height: 1.6; }
.dp-auth-btn {
  width: 100%; background: var(--green-dark); color: #fff; border: none;
  border-radius: var(--radius-md); padding: 13px; font-size: 15px;
  font-weight: 700; font-family: var(--font); cursor: pointer; transition: background 0.15s;
}
.dp-auth-btn:hover    { background: var(--green-mid); }
.dp-auth-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.dp-auth-link { font-size: 13px; color: var(--grey-500); text-align: center; }
.dp-auth-link a { color: var(--green-dark); font-weight: 600; }
.dp-auth-error {
  background: #FEE2E2; border: 1px solid #FCA5A5; border-radius: var(--radius-md);
  padding: 12px 14px; font-size: 13px; color: #991B1B; display: none;
}
.dp-auth-success {
  background: #D1FAE5; border: 1px solid #6EE7B7; border-radius: var(--radius-md);
  padding: 12px 14px; font-size: 13px; color: #065F46; display: none;
}
.dp-view { display: flex; flex-direction: column; gap: 20px; }
.dp-forgot-link { align-self: flex-end; font-size: 12px; font-weight: 600; color: var(--green-dark); text-decoration: none; }
.dp-forgot-link:hover { text-decoration: underline; }

/* Step indicator */
.dp-steps { display: flex; gap: 8px; align-items: center; }
.dp-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--grey-300);
}
.dp-step-num {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--grey-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.dp-step.active .dp-step-num { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.dp-step.active { color: var(--green-dark); }
.dp-step.done .dp-step-num   { background: var(--green-mid); border-color: var(--green-mid); color: #fff; }
.dp-step-divider { flex: 1; height: 1px; background: var(--grey-200); }

/* OTP input */
.dp-otp-wrap { display: flex; gap: 8px; justify-content: center; }
.dp-otp-digit {
  width: 48px; height: 56px; border: 2px solid var(--grey-200);
  border-radius: var(--radius-md); text-align: center; font-size: 22px;
  font-weight: 700; font-family: var(--font); color: var(--black);
  outline: none; transition: border-color 0.15s;
}
.dp-otp-digit:focus { border-color: var(--green-dark); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .dp-auth-left { display: none; }
  .dp-stats { grid-template-columns: 1fr 1fr; }
  .dp-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .dp-stats { grid-template-columns: 1fr; }
  .dp-main  { padding: 20px 16px 48px; }
}
