/* =============================================================
   Admin Panel + Member Portal styles
   ============================================================= */

/* ---------- Auth pages (login) ---------- */
.auth-page {
  background:
    radial-gradient(800px 500px at 20% 20%, rgba(20,54,95,.08), transparent 60%),
    radial-gradient(700px 400px at 80% 80%, rgba(200,150,64,.07), transparent 60%),
    var(--bg, #f5f7fb);
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Noto Sans Thai", sans-serif;
}
.auth-card {
  background: #fff;
  width: 100%;
  max-width: 420px;
  padding: 32px 32px 28px;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(14,26,43,.08), 0 6px 14px rgba(14,26,43,.05);
  border: 1px solid #eef1f6;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid #eef1f6;
}
.auth-page .form-label { font-weight: 500; color: var(--ink, #0e1a2b); font-size: .9rem; }
.auth-page .input-group-text { background: #f5f7fb; border-color: #e6eaf1; }
.auth-page .form-control { border-color: #e6eaf1; padding: .55rem .75rem; }
.auth-page .form-control:focus { border-color: var(--brand, #14365f); box-shadow: 0 0 0 3px rgba(20,54,95,.1); }
.auth-page .btn-primary {
  background: var(--brand, #14365f);
  border-color: var(--brand, #14365f);
  padding: .65rem;
}
.auth-page .btn-primary:hover { background: var(--brand-3, #1a4a7a); border-color: var(--brand-3, #1a4a7a); }

/* ---------- Admin layout ---------- */
.admin-body {
  font-family: "Noto Sans Thai", sans-serif;
  background: #f5f7fb;
  min-height: 100vh;
  margin: 0;
  display: flex;
  color: #0e1a2b;
}

.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0e2747 0%, #14365f 100%);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 2px 0 14px rgba(14,26,43,.08);
}
.admin-brand {
  padding: 18px 22px;
  display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  border-radius: 8px;
  font-size: .9rem;
  transition: background .15s, color .15s;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active { background: rgba(212,167,44,.18); color: #fff; }
.admin-nav a.active::before {
  content: ""; width: 3px; height: 18px; background: #5eead4;
  margin-left: -14px; margin-right: 11px; border-radius: 3px;
}
.admin-nav a i { font-size: 1.1rem; width: 20px; text-align: center; opacity: .9; }

.admin-foot {
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .85rem;
}
.admin-foot a { color: rgba(255,255,255,.7); text-decoration: none; }
.admin-foot a:hover { color: #5eead4; }

.admin-main {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
}
.admin-topbar {
  background: #fff;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eef1f6;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #0e1a2b;
}
.admin-toggle { font-size: 1.4rem; }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand, #14365f);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600;
}

.admin-content { padding: 24px; }

/* mobile sidebar */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .2s; }
  .admin-main { margin-left: 0; }
  body.sidebar-open .admin-sidebar { transform: translateX(0); }
  body.sidebar-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99;
  }
}

/* ---------- Dashboard stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid #eef1f6;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card > i {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  color: #fff;
}
.stat-blue   > i { background: #14365f; }
.stat-green  > i { background: #16704e; }
.stat-amber  > i { background: #0d9488; }
.stat-rose   > i { background: #b54a5e; }
.stat-purple > i { background: #5a3a7a; }
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: #0e1a2b;
}
.stat-label { color: #8392a8; font-size: .82rem; }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CRUD cards & tables ---------- */
.crud-card {
  border: 1px solid #eef1f6;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
  border-radius: 12px;
  overflow: hidden;
}
.crud-card .card-header { padding: 14px 20px; border-bottom: 1px solid #eef1f6; }

.crud-table { font-size: .9rem; }
.crud-table thead th {
  background: #fafbfd;
  font-weight: 600;
  font-size: .78rem;
  color: #6c7a91;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f6;
}
.crud-table tbody td { padding: 12px 16px; vertical-align: middle; }
.crud-table tbody tr:hover { background: #fafbfd; }

/* form */
.crud-card .form-label { font-weight: 500; color: #0e1a2b; font-size: .9rem; }
.crud-card .form-control,
.crud-card .form-select { border-color: #e6eaf1; padding: .55rem .75rem; }
.crud-card .form-control:focus,
.crud-card .form-select:focus { border-color: var(--brand, #14365f); box-shadow: 0 0 0 3px rgba(20,54,95,.1); }
.crud-card .form-check-input:checked { background-color: var(--brand, #14365f); border-color: var(--brand, #14365f); }

.crud-card .btn-primary {
  background: var(--brand, #14365f);
  border-color: var(--brand, #14365f);
}
.crud-card .btn-primary:hover { background: var(--brand-3, #1a4a7a); border-color: var(--brand-3, #1a4a7a); }

/* ============================================================
   DETAIL PAGES (news / announcement / report)
   ============================================================ */
.detail-article { padding: 0; }
.detail-head {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #eef1f6;
}
.detail-head h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--brand, #14365f);
  margin: 0 0 12px;
  line-height: 1.3;
  text-wrap: balance;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #8392a8;
  font-size: .85rem;
}
.detail-meta i { color: var(--gold, #2dd4bf); margin-right: 4px; }

.detail-cover {
  position: relative;
  aspect-ratio: 16/8;
  overflow: hidden;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover-slot {
  display: grid; place-items: center;
  color: rgba(255,255,255,.6);
  font-family: ui-monospace, monospace;
  font-size: .82rem;
}
.detail-cover-slot::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px);
}

.detail-body { padding: 28px 32px; }
.detail-excerpt {
  font-size: 1.05rem;
  color: var(--ink-soft, #4a5a73);
  font-weight: 500;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px dashed #eef1f6;
  line-height: 1.7;
  text-wrap: pretty;
}
.detail-content {
  color: #0e1a2b;
  line-height: 1.8;
  font-size: 1rem;
}
.detail-content p { margin-bottom: 1rem; }
.detail-content h2, .detail-content h3 {
  color: var(--brand, #14365f);
  margin-top: 1.5rem;
  margin-bottom: .75rem;
  font-weight: 700;
}
.detail-content ul, .detail-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.detail-content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }

.detail-foot {
  padding: 18px 32px;
  border-top: 1px solid #eef1f6;
  background: #fafbfd;
}

.attachment-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  background: #fafbfd;
  margin-top: 14px;
  flex-wrap: wrap;
}
.attachment-box > i:first-child { font-size: 1.8rem; color: var(--brand, #14365f); }

.pdf-frame {
  border: 1px solid #eef1f6;
  border-radius: 10px;
  overflow: hidden;
  height: 700px;
}
.pdf-frame embed { width: 100%; height: 100%; }

/* related news */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 16px 20px 20px;
}
.related-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: 10px;
  transition: background .15s;
}
.related-item:hover { background: #fafbfd; }
.related-thumb {
  width: 90px; aspect-ratio: 4/3;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-title {
  font-weight: 600;
  font-size: .92rem;
  margin-top: 4px;
  color: #0e1a2b;
  line-height: 1.4;
}
.related-item:hover .related-title { color: var(--brand, #14365f); }
@media (max-width: 576px) { .related-grid { grid-template-columns: 1fr; } }

/* ============================================================
   MEMBER DASHBOARD
   ============================================================ */
.member-auth-page {
  background:
    radial-gradient(800px 500px at 20% 20%, rgba(20,54,95,.08), transparent 60%),
    radial-gradient(700px 400px at 80% 80%, rgba(22,112,78,.06), transparent 60%),
    #f5f7fb;
}

.member-hero {
  background: linear-gradient(135deg, #fff 0%, #f0f5fb 100%);
  border: 1px solid #eef1f6;
}
.member-avatar {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--brand, #14365f), var(--brand-3, #1a4a7a));
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(20,54,95,.22);
  flex-shrink: 0;
}

.balance-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  border: 1px solid #eef1f6;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
  transition: transform .15s, box-shadow .15s;
  height: 100%;
}
.balance-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(14,26,43,.08); }
.balance-icon {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 2.2rem;
  opacity: .12;
}
.balance-label { font-size: .8rem; color: #8392a8; font-weight: 500; }
.balance-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--brand, #14365f);
  line-height: 1.2;
  margin: 4px 0 2px;
}
.balance-value small { font-size: .8rem; color: #8392a8; font-weight: 400; margin-left: 4px; }
.balance-sub { font-size: .78rem; color: #8392a8; }
.balance-blue  { border-left: 3px solid #14365f; }
.balance-green { border-left: 3px solid #16704e; }
.balance-rose  { border-left: 3px solid #b54a5e; }
.balance-gold  { border-left: 3px solid #2dd4bf; }
.balance-blue  .balance-icon { color: #14365f; }
.balance-green .balance-icon { color: #16704e; }
.balance-rose  .balance-icon { color: #b54a5e; }
.balance-gold  .balance-icon { color: #2dd4bf; }
.balance-rose  .balance-value { color: #b54a5e; }
.balance-green .balance-value { color: #16704e; }
.balance-gold  .balance-value { color: #0d9488; }

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 18px;
}
.quick-action {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  background: #fafbfd;
  color: #0e1a2b;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  text-align: left;
  transition: all .15s;
  position: relative;
}
.quick-action::after {
  content: "\F285"; /* bi-chevron-right */
  font-family: "bootstrap-icons";
  margin-left: auto;
  color: #8392a8;
  font-size: .95rem;
  transition: transform .15s, color .15s;
}
.quick-action:hover {
  background: var(--brand-soft, #eaf0f9);
  border-color: var(--brand-soft, #eaf0f9);
  color: var(--brand, #14365f);
  transform: translateX(2px);
}
.quick-action:hover::after { color: var(--brand, #14365f); transform: translateX(2px); }
.quick-action > i {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-soft, #eaf0f9);
  color: var(--brand, #14365f);
  border-radius: 9px;
  font-size: 1.15rem;
  transition: background .15s;
}
.quick-action:hover > i { background: #fff; }
.quick-action > span { line-height: 1.25; }

@media (max-width: 576px) {
  .detail-head, .detail-body, .detail-foot { padding-left: 18px; padding-right: 18px; }
}

/* ============================================================
   LISTING PAGES (news.php, announcements.php, reports.php, gallery.php)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, #fff 0%, #f0f5fb 100%);
}
.page-hero h1 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 700; }

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e6eaf1;
  color: var(--ink-soft, #4a5a73);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
}
.filter-pill:hover {
  background: var(--brand-soft, #eaf0f9);
  border-color: var(--brand-soft, #eaf0f9);
  color: var(--brand, #14365f);
}
.filter-pill.is-active {
  background: var(--brand, #14365f);
  border-color: var(--brand, #14365f);
  color: #fff;
}
.filter-pill .count {
  background: rgba(0,0,0,.08);
  color: inherit;
  font-size: .72rem;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.filter-pill.is-active .count { background: rgba(255,255,255,.2); }

/* News card grid (news.php) */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef1f6;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
  transition: transform .15s, box-shadow .15s;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(14,26,43,.1);
}
.news-card-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.news-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card-thumb::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 16px);
}
.news-card-slot {
  position: absolute; top: 8px; left: 10px;
  font-family: ui-monospace, monospace;
  font-size: .68rem;
  color: rgba(255,255,255,.5);
}
.news-card-badge {
  position: absolute; bottom: 10px; left: 10px;
  z-index: 2;
}
.news-card-body { padding: 14px 16px 18px; }
.news-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 6px 0 6px;
  line-height: 1.4;
  color: var(--ink, #0e1a2b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card:hover .news-card-title { color: var(--brand, #14365f); }
.news-card-excerpt {
  font-size: .85rem;
  color: var(--ink-soft, #4a5a73);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* listing table */
.listing-table tbody tr { cursor: pointer; }

/* Report grid (reports.php) */
.report-grid {
  display: grid;
  gap: 10px;
}
.report-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}
.report-card:hover {
  background: var(--brand-soft, #eaf0f9);
  border-color: var(--brand-soft, #eaf0f9);
  transform: translateX(2px);
}
.report-icon {
  width: 48px; height: 48px;
  background: #fde7ec;
  color: #b54a5e;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.report-title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink, #0e1a2b);
}
.report-meta {
  display: flex;
  gap: 14px;
  margin-top: 3px;
  font-size: .78rem;
  color: var(--muted, #8392a8);
}
.report-meta i { margin-right: 3px; }

/* Album grid (gallery.php) */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.album-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
  transition: all .15s;
}
.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(14,26,43,.1);
}
.album-cover {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 18px);
}
.album-slot {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,.5);
  font-family: ui-monospace, monospace;
  font-size: .8rem;
}
.album-count {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .72rem;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 2;
}
.album-body { padding: 14px 16px 18px; }
.album-date { font-size: .75rem; color: var(--gold, #2dd4bf); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.album-title {
  font-size: 1.02rem;
  font-weight: 600;
  margin-top: 4px;
  color: var(--ink, #0e1a2b);
}
.album-desc { font-size: .82rem; color: var(--ink-soft, #4a5a73); margin: 6px 0 0; }

/* Photo grid (gallery-detail.php) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.photo-item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f5f7fb;
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.photo-item:hover img { transform: scale(1.05); }
.photo-cap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
  padding: 14px 12px 10px;
  font-size: .82rem;
}

/* ============================================================
   LOAN APPLICATION
   ============================================================ */
.stepper {
  display: flex;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
}
.stepper .step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: var(--muted, #8392a8);
  font-weight: 500;
  font-size: .9rem;
  border-radius: 8px;
  transition: all .15s;
}
.stepper .step span {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #e6eaf1;
  color: #8392a8;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: .82rem;
}
.stepper .step.is-active {
  background: var(--brand, #14365f);
  color: #fff;
}
.stepper .step.is-active span { background: var(--gold, #2dd4bf); color: #fff; }

.loan-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.loan-type-card {
  display: block;
  padding: 0;
  border: 2px solid #eef1f6;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
}
.loan-type-card input { display: none; }
.loan-type-body { padding: 16px 18px; }
.loan-type-card:hover { border-color: var(--brand-soft, #eaf0f9); }
.loan-type-card input:checked + .loan-type-body {
  background: var(--brand-soft, #eaf0f9);
  border-radius: 10px;
}
.loan-type-card:has(input:checked) {
  border-color: var(--brand, #14365f);
  box-shadow: 0 0 0 3px rgba(20,54,95,.08);
}
.loan-type-name { font-weight: 600; color: var(--brand, #14365f); margin-bottom: 2px; }
.loan-type-rate {
  font-size: 1.4rem;
  font-weight: 700;
  color: #16704e;
  letter-spacing: -.01em;
  line-height: 1;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  overflow: hidden;
}
.review-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f6;
}
.review-grid > div:nth-child(even) { border-left: 1px solid #eef1f6; }
.review-grid > div.full {
  grid-column: 1 / -1;
  border-left: none;
}
.rv-label { font-size: .76rem; color: var(--muted, #8392a8); text-transform: uppercase; letter-spacing: .04em; }
.rv-value { font-size: .95rem; color: var(--ink, #0e1a2b); }
@media (max-width: 576px) {
  .review-grid { grid-template-columns: 1fr; }
  .review-grid > div:nth-child(even) { border-left: none; }
}

/* Loan list (member/loans.php) */
.loan-list { display: flex; flex-direction: column; gap: 14px; }
.loan-card { padding: 0; }
.loan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #eef1f6;
  background: #fafbfd;
}
.loan-card-body { padding: 18px 20px; }
.loan-label { font-size: .76rem; color: var(--muted, #8392a8); text-transform: uppercase; letter-spacing: .04em; }
.loan-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink, #0e1a2b);
  line-height: 1.2;
  margin-top: 2px;
}
.loan-value small { font-size: .78rem; color: var(--muted, #8392a8); font-weight: 400; }

/* ============================================================
   WELFARE
   ============================================================ */
.welfare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.welfare-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(14,26,43,.04);
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.welfare-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,26,43,.08); }
.welfare-card.is-eligible { border-top: 3px solid #16704e; }
.welfare-card.is-restricted { border-top: 3px solid #d1d6e0; opacity: .92; }

.welfare-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.welfare-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: var(--brand-soft, #eaf0f9);
  color: var(--brand, #14365f);
  display: grid; place-items: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.welfare-card.is-restricted .welfare-icon {
  background: #f3f5f8;
  color: #8392a8;
}
.welfare-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand, #14365f);
  letter-spacing: -.01em;
  line-height: 1;
}
.welfare-amount small { font-size: .78rem; color: var(--muted, #8392a8); font-weight: 500; margin-left: 2px; }
.welfare-name {
  font-size: .92rem;
  color: var(--ink, #0e1a2b);
  margin-top: 4px;
  font-weight: 500;
  line-height: 1.3;
}

.welfare-desc {
  font-size: .85rem;
  color: var(--ink-soft, #4a5a73);
  margin-bottom: 12px;
  line-height: 1.55;
}

.welfare-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: .8rem;
  color: var(--ink-soft, #4a5a73);
  display: grid;
  gap: 5px;
}
.welfare-meta li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.welfare-meta i { color: var(--gold, #2dd4bf); width: 14px; text-align: center; }
.welfare-remaining {
  color: #16704e;
  font-weight: 600;
  font-size: .76rem;
  margin-left: 4px;
}

.welfare-status {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .82rem;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
}
.welfare-status i { font-size: 1.05rem; flex-shrink: 0; margin-top: 1px; }
.welfare-status.ok {
  background: #e7f5ed;
  color: #16704e;
}
.welfare-status.warn {
  background: #f0fdfa;
  color: #8a5a00;
}
.welfare-status.warn ul li { line-height: 1.45; margin-bottom: 2px; }

.welfare-card .btn { font-size: .9rem; }
