/* ===== Boresha: বাংলাদেশের প্রাকৃতিক থিম ===== */
:root {
  --green: #006a4e;        /* জাতীয় পতাকার সবুজ */
  --green-dark: #064e3b;
  --green-mid: #0a7a4f;
  --green-soft: #e8f5ec;
  --red: #f42a41;          /* জাতীয় পতাকার লাল */
  --ink: #1f2d2a;
  --muted: #5b6b66;
  --line: #d5e3da;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-family: "Noto Sans Bengali", "Kalpurush", "Nikosh", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: #d9efdc;
  position: relative;
}

/* সব পেইজের পেছনের গ্রাফিক্স */
.bg-scene {
  position: fixed; inset: 0; z-index: -1;
  background: #cdeee6 url("../img/bg-bangladesh.svg") center bottom / cover no-repeat;
}

/* ---------- উপরের হেডার (লোগো বাঁদিকের কোণে) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 22px;
  background: rgba(255, 255, 255, .95);
  border-bottom: 4px solid var(--green);
  box-shadow: 0 3px 14px rgba(0, 60, 40, .15);
}
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-logo {
  height: 46px; width: auto; max-width: 150px; object-fit: contain; display: block;
}
.site-logo-default {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff; font-size: 22px; font-weight: 700;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--red);
}
.site-name { font-size: 21px; font-weight: 700; color: var(--green-dark); letter-spacing: .5px; }

/* ---------- মূল অংশ ---------- */
.page-main {
  min-height: calc(100vh - 60px - 44px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 16px;
}

.site-footer {
  text-align: center; padding: 12px; font-size: 13px; color: #fff;
  background: rgba(0, 76, 56, .88);
}

/* ---------- কার্ড ও ফর্ম ---------- */
.card {
  width: 100%; max-width: 450px;
  background: rgba(255, 255, 255, .96);
  border-radius: 16px; padding: 32px 34px;
  border-top: 5px solid var(--green);
  box-shadow: 0 14px 40px rgba(0, 60, 40, .28);
  animation: fadeUp .7s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card h1 { font-size: 24px; margin-bottom: 18px; text-align: center; color: var(--green-dark); }

label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; color: var(--green-dark); }

input, select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #b7cfc2; border-radius: 10px;
  font-size: 15px; background: #fff; transition: .2s;
}
input:focus, select:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 4px rgba(10, 122, 79, .18);
}
input[type="file"] { padding: 10px; background: var(--green-soft); }

button {
  width: 100%; margin-top: 22px; padding: 13px;
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 16px; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, var(--green-mid), var(--green));
  transition: transform .2s, box-shadow .2s;
}
button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 106, 78, .4); }
button:disabled { opacity: .6; cursor: wait; transform: none; box-shadow: none; }

.hint { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.readonly-field { background: #eef4f0; color: #4a5c55; cursor: not-allowed; }
.muted { color: var(--muted); margin-top: 10px; }

.flash { width: 100%; max-width: 450px; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.flash.success { background: #dcf5e3; color: #14532d; border-left: 4px solid #16a34a; }
.flash.error   { background: #fde4e6; color: #9b1c2c; border-left: 4px solid var(--red); }
.card .flash { max-width: none; }

.link-row { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.link-row a { color: var(--green); font-weight: 700; text-decoration: none; }
.link-row a:hover { text-decoration: underline; }

.is-hidden { display: none !important; }
.card.fade-out { opacity: 0; transform: translateY(-25px); transition: .35s; }

/* ---------- আবেদনের পর ফুল পেইজ পপআপ ---------- */
.status-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(3, 52, 38, .78);
  backdrop-filter: blur(3px);
}
.status-card {
  width: 100%; max-width: 460px; padding: 42px 34px; text-align: center;
  background: #fff; border-radius: 22px; border-top: 6px solid var(--green);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
  animation: popIn .5s cubic-bezier(.2, .9, .3, 1.3) both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}
.status-icon { width: 96px; height: 96px; margin: 0 auto 20px; }
.status-icon svg { width: 100%; height: 100%; }
.status-card h2 { font-size: 24px; margin-bottom: 10px; color: var(--green-dark); }
.status-card p { color: #475569; line-height: 1.6; }

.tick-circle, .cross-circle {
  fill: none; stroke-width: 3; stroke-dasharray: 152; stroke-dashoffset: 152;
  animation: draw .7s ease forwards;
}
.tick-circle { stroke: #16a34a; }
.cross-circle { stroke: var(--red); }
.tick-mark, .cross-mark {
  fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 50; stroke-dashoffset: 50;
  animation: draw .5s .6s ease forwards;
}
.tick-mark { stroke: #16a34a; }
.cross-mark { stroke: var(--red); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.wait { margin-top: 22px; color: var(--muted); font-size: 14px; }
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid #bfe3cf; border-top-color: var(--green); border-radius: 50%;
  vertical-align: -2px; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-btn {
  display: inline-block; margin-top: 22px; padding: 12px 28px; width: auto;
  border-radius: 10px; color: #fff; text-decoration: none; font-weight: 600;
  background: linear-gradient(90deg, var(--green-mid), var(--green));
}
button.status-btn { border: none; cursor: pointer; font-size: 16px; }

/* ---------- এডমিন প্যানেল ---------- */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px; flex-shrink: 0; padding: 18px 16px 22px;
  display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, rgba(6, 78, 59, .995), rgba(0, 106, 78, .99));
  border-right: 4px solid var(--red);
}
.side-logo {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.side-logo-img {
  height: 42px; width: auto; max-width: 110px; object-fit: contain;
  background: #fff; border-radius: 8px; padding: 3px;
}
.side-logo-default {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--green); font-size: 20px; font-weight: 700;
  box-shadow: 0 0 0 3px var(--red);
}
.side-logo h3 { font-size: 18px; letter-spacing: .5px; }

.side-menu { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.side-menu a {
  color: #eafff4; text-decoration: none; padding: 12px 16px;
  border-radius: 10px; transition: .25s;
}
.side-menu a:hover { background: rgba(255, 255, 255, .16); transform: translateX(6px); }
.side-menu a.active { background: rgba(255, 255, 255, .26); font-weight: 700; border-left: 4px solid var(--red); }
.side-logout button { background: rgba(255, 255, 255, .18); margin-top: 0; }
.side-logout button:hover { background: var(--red); box-shadow: none; }

.admin-content { flex: 1; padding: 28px; min-width: 0; }
.admin-content .flash { max-width: none; }

.panel {
  background: rgba(255, 255, 255, .95); border-radius: 16px; padding: 28px;
  border-top: 5px solid var(--green);
  box-shadow: 0 12px 34px rgba(0, 60, 40, .25);
  animation: fadeUp .6s ease both;
}
.panel h1 { font-size: 24px; margin-bottom: 14px; color: var(--green-dark); }

.tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.tabs a {
  padding: 8px 16px; border-radius: 20px; text-decoration: none;
  background: var(--green-soft); color: var(--green-dark); font-size: 14px; transition: .2s;
}
.tabs a:hover { background: #cfeadb; }
.tabs a.active { background: var(--green); color: #fff; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--green-soft); color: var(--green-dark); }
td.empty { text-align: center; color: var(--muted); padding: 30px; }

.badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.badge.pending  { background: #fff1c9; color: #8a5a00; }
.badge.approved { background: #d7f3e0; color: #14532d; }
.badge.rejected { background: #fde4e6; color: #9b1c2c; }

.actions { display: flex; gap: 6px; }
.actions form { margin: 0; }
.btn-sm { width: auto; margin-top: 0; padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-sm.ok { background: #16a34a; }
.btn-sm.no { background: var(--red); }
.btn-danger { background: var(--red); margin-top: 12px; }

.logo-preview {
  margin: 20px 0; padding: 20px; border: 2px dashed #a9c9b7;
  border-radius: 14px; text-align: center; background: var(--green-soft);
}
.logo-preview img { max-width: 180px; max-height: 180px; object-fit: contain; }
.no-logo { color: var(--muted); padding: 30px 0; }

/* ---------- মোবাইল ---------- */
@media (max-width: 800px) {
  .site-header { padding: 8px 14px; }
  .site-name { font-size: 18px; }
  .card { padding: 26px 22px; }
  .admin-wrap { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 4px solid var(--red); }
  .side-menu { flex-direction: row; flex-wrap: wrap; margin-bottom: 14px; }
  .admin-content { padding: 16px; }
}

/* ---------- এডমিনিস্ট্রেটর ড্যাশবোর্ড ---------- */
.side-logo small { display: block; margin-top: 2px; font-size: 12px; color: #bdf0d6; letter-spacing: .4px; }

.menu-title {
  margin: 16px 8px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; color: #9fe0c2;
}
.menu-title:first-child { margin-top: 0; }

.menu-count {
  float: right; min-width: 22px; padding: 1px 7px; border-radius: 11px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center;
}

.panel + .panel, .panel + .stat-grid, .stat-grid + .panel { margin-top: 20px; }
.panel h2 { font-size: 18px; margin-bottom: 12px; color: var(--green-dark); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  display: block; text-decoration: none; padding: 20px 22px;
  background: rgba(255, 255, 255, .96); border-radius: 14px;
  border-left: 6px solid var(--green);
  box-shadow: 0 10px 28px rgba(0, 60, 40, .22);
  transition: transform .25s, box-shadow .25s;
  animation: fadeUp .6s ease both;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 60, 40, .3); }
.stat-card.warn  { border-left-color: #f59e0b; }
.stat-card.alert { border-left-color: var(--red); }
.stat-card.gray  { border-left-color: #64748b; }
.stat-num   { display: block; font-size: 34px; font-weight: 800; color: var(--green-dark); line-height: 1.1; }
.stat-label { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { margin-bottom: 0; }
.text-link { color: var(--green); font-weight: 700; text-decoration: none; font-size: 14px; }
.text-link:hover { text-decoration: underline; }

.tool-note {
  padding: 18px; border: 2px dashed #a9c9b7; border-radius: 12px;
  background: var(--green-soft); color: var(--muted); line-height: 1.7;
}

.search-form { display: flex; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 200px; }
.search-form button { width: auto; margin-top: 0; padding: 11px 22px; }

.badge.suspended { background: #e2e8f0; color: #334155; }
.btn-sm.warn { background: #f59e0b; }

@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .stat-grid { grid-template-columns: 1fr; } }
