/* ===================================================
   SNEHASADAN – ADMIN DASHBOARD STYLES
   =================================================== */

/* ADMIN BODY */
.admin-body {
  background: #f0f2f8;
}

/* ADMIN NAVBAR */
.admin-navbar { background: #1a1a2e; }
.admin-navbar .nav-link { color: rgba(255,255,255,.7) !important; }
.admin-navbar .nav-link:hover, .admin-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.1) !important;
}
.admin-logo-circle {
  background: linear-gradient(135deg, #e85d26, #9b59b6) !important;
}
.admin-navbar .brand-name { color: #fff !important; }
.admin-navbar .brand-tagline { color: rgba(255,255,255,.5) !important; }
.admin-navbar .admin-btn {
  background: rgba(232,93,38,.8) !important;
}

/* ===================================================
   LOGIN GATE
   =================================================== */
.login-gate {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
}
.login-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #e85d26, #c44a18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(232,93,38,.35);
}
.login-card h2 { font-size: 1.6rem; font-weight: 700; color: #1a1a2e; margin-bottom: .4rem; }
.login-card > p { color: #718096; font-size: .875rem; margin-bottom: 2rem; }
.login-card .form-group { text-align: left; margin-bottom: 1.1rem; }
.login-card .form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: #2d3748;
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: .4rem;
}
.login-card .form-group label i { color: #e85d26; }
.login-card input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .875rem;
  outline: none;
  transition: all .25s;
  background: #f7f8fc;
}
.login-card input:focus {
  border-color: #e85d26;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232,93,38,.12);
}
.login-submit { width: 100%; justify-content: center; margin-top: .5rem; }
.login-hint {
  margin-top: 1.25rem;
  font-size: .75rem;
  color: #a0aec0;
  display: flex; align-items: center; justify-content: center; gap: .3rem;
}
#loginError { display: block; margin-bottom: .75rem; }

/* ===================================================
   DASHBOARD CONTENT
   =================================================== */
.dashboard-content { min-height: 100vh; }

/* STATS SECTION */
.stats-section {
  padding: 2rem 0 1.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.stat-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all .25s;
  backdrop-filter: blur(6px);
}
.stat-card:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.total-card   .stat-card-icon { background: rgba(44,123,229,.2);  color: #60a5fa; }
.pending-card .stat-card-icon { background: rgba(248,163,40,.2);  color: #fbbf24; }
.review-card  .stat-card-icon { background: rgba(155,89,182,.2);  color: #c084fc; }
.approved-card .stat-card-icon { background: rgba(26,179,148,.2); color: #34d399; }
.rejected-card .stat-card-icon { background: rgba(231,76,60,.2);  color: #f87171; }
.stat-card-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat-card-label {
  display: block;
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  margin-top: .2rem;
  font-weight: 400;
}

/* ===================================================
   FILTER BAR
   =================================================== */
.filter-section { padding: 1.5rem 0; }
.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid #e2e8f0;
}
.search-box {
  display: flex; align-items: center;
  flex: 1; min-width: 220px;
  background: #f7f8fc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: .5rem .875rem;
  gap: .5rem;
  transition: all .25s;
}
.search-box:focus-within {
  border-color: #e85d26;
  box-shadow: 0 0 0 3px rgba(232,93,38,.1);
}
.search-box i { color: #a0aec0; }
.search-box input {
  flex: 1; border: none; background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: .875rem; color: #2d3748;
  outline: none;
}
.filter-group {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.filter-group select {
  padding: .55rem .875rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  color: #2d3748;
  background: #f7f8fc;
  outline: none;
  cursor: pointer;
  transition: all .25s;
}
.filter-group select:focus { border-color: #e85d26; }
.refresh-btn, .export-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem;
  border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
}
.refresh-btn { background: #f0f2f8; color: #2d3748; }
.refresh-btn:hover { background: #e2e8f0; }
.export-btn { background: #1ab394; color: #fff; box-shadow: 0 3px 10px rgba(26,179,148,.3); }
.export-btn:hover { background: #18a085; transform: translateY(-1px); }

/* ===================================================
   TABLE SECTION
   =================================================== */
.table-section { padding: 0 0 3rem; }
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap; gap: .5rem;
}
.table-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  display: flex; align-items: center; gap: .5rem;
}
.table-header h2 i { color: #e85d26; }
.results-count { font-size: .82rem; color: #718096; }
.table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}
.applications-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.applications-table thead tr {
  background: linear-gradient(135deg, #f7f8fc, #eef0f8);
  border-bottom: 2px solid #e2e8f0;
}
.applications-table th {
  padding: .875rem 1rem;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.applications-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid #f0f2f8;
  color: #2d3748;
  vertical-align: middle;
}
.applications-table tbody tr:hover { background: #fafbff; }
.applications-table tbody tr:last-child td { border-bottom: none; }
.loading-row {
  text-align: center;
  padding: 3rem !important;
  color: #a0aec0;
  font-size: .9rem;
}

/* Status Badge */
.status-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .75rem;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}
.status-pending   { background: #fef3c7; color: #d97706; }
.status-under-review { background: #f3e8ff; color: #7c3aed; }
.status-approved  { background: #d1fae5; color: #059669; }
.status-rejected  { background: #fee2e2; color: #dc2626; }

/* Activity Badge */
.activity-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
}
.activity-volunteering  { background: #fde8de; color: #c44a18; }
.activity-sip           { background: #dbeafe; color: #1d4ed8; }
.activity-community     { background: #d1fae5; color: #065f46; }

/* Action Buttons in Table */
.table-actions { display: flex; align-items: center; gap: .4rem; }
.btn-view {
  padding: .35rem .65rem;
  background: #eff6ff; color: #2c7be5;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .3rem;
}
.btn-view:hover { background: #2c7be5; color: #fff; }
.btn-del {
  padding: .35rem .65rem;
  background: #fff5f5; color: #e74c3c;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .3rem;
}
.btn-del:hover { background: #e74c3c; color: #fff; }

/* ===================================================
   PAGINATION
   =================================================== */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.page-btn {
  padding: .45rem .85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #4a5568;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.page-btn:hover, .page-btn.active {
  background: #e85d26;
  border-color: #e85d26;
  color: #fff;
}

/* ===================================================
   DETAIL MODAL
   =================================================== */
.detail-modal {
  max-width: 680px;
  text-align: left;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  background: #f0f2f8;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #4a5568;
  font-size: .9rem;
  transition: all .2s;
}
.modal-close:hover { background: #e74c3c; color: #fff; }
.modal-title {
  font-size: 1.2rem !important;
  text-align: left !important;
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f2f8;
  margin-bottom: 1.25rem;
  color: #1a1a2e !important;
}
.modal-title i { color: #e85d26; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .875rem;
  margin-bottom: 1.5rem;
}
.detail-item { background: #f7f8fc; border-radius: 8px; padding: .75rem 1rem; }
.detail-item.full { grid-column: 1 / -1; }
.detail-item label { font-size: .72rem; font-weight: 700; color: #a0aec0; text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: .2rem; }
.detail-item span { font-size: .875rem; font-weight: 500; color: #2d3748; display: block; }

/* Status Update Box in Modal */
.detail-actions {
  border-top: 2px solid #f0f2f8;
  padding-top: 1.25rem;
}
.status-update-box, .notes-box {
  margin-bottom: 1rem;
}
.status-update-box label, .notes-box label {
  font-size: .8rem;
  font-weight: 700;
  color: #4a5568;
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: .4rem;
}
.status-update-box label i, .notes-box label i { color: #e85d26; }
.status-update-box select {
  padding: .6rem .9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .875rem;
  outline: none;
  width: 100%;
  background: #f7f8fc;
}
.notes-box textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .875rem;
  outline: none;
  resize: vertical;
  background: #f7f8fc;
}
.notes-box textarea:focus, .status-update-box select:focus {
  border-color: #e85d26;
  box-shadow: 0 0 0 3px rgba(232,93,38,.1);
}
.action-btns {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.btn-approve {
  padding: .6rem 1.2rem;
  background: linear-gradient(135deg, #1ab394, #18a085);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
  box-shadow: 0 3px 10px rgba(26,179,148,.3);
}
.btn-approve:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(26,179,148,.4); }
.btn-review {
  padding: .6rem 1.2rem;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn-review:hover { transform: translateY(-1px); }
.btn-reject {
  padding: .6rem 1.2rem;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn-reject:hover { transform: translateY(-1px); }
.btn-save {
  padding: .6rem 1.2rem;
  background: linear-gradient(135deg, #2c7be5, #1a5fbb);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
  margin-left: auto;
}
.btn-save:hover { transform: translateY(-1px); }
.btn-certificate {
  padding: .6rem 1.2rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
  box-shadow: 0 3px 10px rgba(245,158,11,.3);
}
.btn-certificate:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(245,158,11,.4); }

/* DELETE MODAL */
.small-modal { max-width: 360px; }
.confirm-btns { display: flex; gap: .75rem; justify-content: center; }
.btn-cancel {
  padding: .65rem 1.5rem;
  background: #f0f2f8; color: #4a5568;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-cancel:hover { background: #e2e8f0; }
.btn-delete-confirm {
  padding: .65rem 1.5rem;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
  box-shadow: 0 4px 12px rgba(231,76,60,.3);
}
.btn-delete-confirm:hover { transform: translateY(-1px); }

/* ===================================================
   TOAST
   =================================================== */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: #1a1a2e;
  color: #fff;
  padding: .85rem 1.5rem;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 99999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .35s cubic-bezier(.175,.885,.32,1.275);
  display: flex; align-items: center; gap: .5rem;
  max-width: 340px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-success { background: linear-gradient(135deg, #1ab394, #18a085); }
.toast.toast-error   { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.toast.toast-info    { background: linear-gradient(135deg, #2c7be5, #1a5fbb); }

/* ===================================================
   RESPONSIVE ADMIN
   =================================================== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.full { grid-column: 1; }
  .action-btns .btn-save { margin-left: 0; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-box { min-width: unset; }
  .filter-group { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card-number { font-size: 1.3rem; }
  .action-btns { flex-direction: column; }
  .action-btns button { width: 100%; justify-content: center; }
}

/* ===================================================
   CERTIFICATE MODAL
   =================================================== */
.certificate-modal {
  max-width: 900px;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}
.certificate-preview {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 3rem 2.5rem;
  margin-bottom: 1.5rem;
  font-family: 'Times New Roman', serif;
  line-height: 1.8;
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.certificate-preview h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #e85d26;
  margin-bottom: .5rem;
  font-family: 'Poppins', sans-serif;
}
.certificate-preview h3 {
  text-align: center;
  font-size: 1rem;
  font-weight: 400;
  color: #4a5568;
  margin-bottom: 2rem;
  font-style: italic;
}
.certificate-preview .cert-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  text-decoration: underline;
}
.certificate-preview p {
  font-size: 1rem;
  text-align: justify;
  margin-bottom: 1rem;
}
.certificate-preview .cert-highlight {
  font-weight: 700;
  color: #e85d26;
  text-decoration: underline;
}
.certificate-preview .cert-footer {
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.certificate-preview .cert-signature {
  text-align: left;
}
.certificate-preview .cert-date-place {
  text-align: right;
}
.certificate-preview .cert-label {
  font-size: .9rem;
  color: #718096;
  margin-bottom: .3rem;
}
.certificate-preview .cert-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
}
.certificate-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-print, .btn-download {
  padding: .75rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-print {
  background: linear-gradient(135deg, #2c7be5, #1a5fbb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(44,123,229,.3);
}
.btn-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(44,123,229,.4);
}
.btn-download {
  background: linear-gradient(135deg, #1ab394, #18a085);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,179,148,.3);
}
.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26,179,148,.4);
}

@media print {
  body * { visibility: hidden; }
  .certificate-preview, .certificate-preview * { visibility: visible; }
  .certificate-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 2rem;
  }
}

