@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@500;600;700;800&family=Noto+Sans+Bengali:wght@500;600;700;800&display=swap');

.admin-body {
  margin: 0;
  background: var(--bg, #F4F7F5);
  color: var(--text, #0F172A);
  font-family: var(--font, "Noto Sans", "Noto Sans Bengali", sans-serif);
  font-weight: 500;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  max-width: 100%;
}

.admin-side {
  background: var(--brand-forest-ink, #093322);
  border-right: 1px solid rgba(0, 176, 116, 0.2);
  padding: 24px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.admin-side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 26px;
}

.admin-side .logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 10px;
  margin: 0;
  color: #FFFFFF;
}

.admin-side .logo span {
  color: var(--brand-primary, #00B074);
}

.admin-menu-close {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: transparent;
  color: #FFFFFF;
  font-size: 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.admin-side nav {
  display: grid;
  gap: 4px;
  flex: 1;
}

.admin-side a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #94A3B8;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s ease;
}

.admin-side a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.admin-side a.active {
  background: var(--brand-primary, #00B074);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 176, 116, 0.35);
}

.admin-side a svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.admin-side .side-foot {
  margin-top: 24px;
  padding: 0 10px;
  color: #64748B;
  font-family: var(--font, "Noto Sans", sans-serif);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-backdrop {
  display: none;
}

.admin-main {
  padding: 28px 32px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg, #F4F7F5);
}

.admin-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.admin-top h1 {
  margin: 0;
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text, #0F172A);
}

.admin-menu-btn {
  display: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line, rgba(9, 51, 34, 0.08));
  border-radius: 12px;
  background: var(--surface, #FFFFFF);
  color: var(--text, #0F172A);
  font-size: 1.15rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  place-items: center;
  box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,0.05));
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 10px;
  margin-bottom: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-quick-btn {
  display: block;
  text-align: center;
  color: var(--text, #0F172A);
  text-decoration: none;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease;
}

.admin-quick-btn:hover {
  transform: translateY(-2px);
}

.admin-quick-ico {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border-radius: 14px;
  background: var(--brand-tint, #E8F8F2);
  color: var(--brand-primary, #00B074);
  border: 1px solid var(--border-brand, rgba(0, 176, 116, 0.28));
  display: grid;
  place-items: center;
  transition: all .15s ease;
}

.admin-quick-btn:hover .admin-quick-ico {
  background: var(--brand-tint-hover, #D4F2E6);
  box-shadow: 0 4px 12px var(--brand-glow, rgba(0, 176, 116, 0.22));
}

.admin-quick-ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--brand-primary, #00B074);
}

.admin-quick-btn span {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted, #64748B);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

.admin-quick-btn em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--brand-primary, #00B074);
}

.admin-badge,
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger, #EF4444);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

.admin-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  font-size: 0.68rem;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.35);
}

.admin-side a .nav-badge {
  margin-left: 6px;
  vertical-align: middle;
}

.admin-inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 720px) {
  .admin-quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 6px;
  }
  .admin-quick-ico {
    width: 46px;
    height: 46px;
  }
}

.admin-stat {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  border-radius: var(--radius, 14px);
  padding: 18px 16px;
  min-width: 0;
  box-shadow: var(--shadow-card, 0 4px 16px -2px rgba(9, 51, 34, 0.06));
  transition: transform .15s ease, box-shadow .15s ease;
}

.admin-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -2px rgba(9, 51, 34, 0.1);
}

.admin-stat .k {
  color: var(--muted, #64748B);
  font-family: var(--font, "Noto Sans", sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-stat .v {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  word-break: break-word;
  color: var(--text, #0F172A);
  font-variant-numeric: tabular-nums;
}

.admin-stat.warn .v { color: var(--warn, #F59E0B); }
.admin-stat.ok .v { color: var(--brand-primary, #00B074); }

.admin-panels {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.admin-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  border-radius: var(--radius, 14px);
  padding: 20px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-card, 0 4px 16px -2px rgba(9, 51, 34, 0.06));
}

.admin-card h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text, #0F172A);
}

.admin-card .empty {
  color: var(--muted, #64748B);
  font-size: 0.88rem;
  padding: 24px 0;
  text-align: center;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  font-size: 0.9rem;
}

.admin-row:last-child { border-bottom: 0; }
.admin-row > div:first-child { min-width: 0; flex: 1; }
.admin-row .meta {
  color: var(--muted, #64748B);
  font-size: 0.78rem;
  margin-top: 4px;
  font-family: var(--font, "Noto Sans", sans-serif);
  word-break: break-word;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-actions a, .admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--brand-primary, #00B074);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s ease;
}

.admin-actions a:hover, .admin-btn:hover {
  background: var(--brand-primary-hover, #009663);
  transform: translateY(-1px);
  color: #FFFFFF;
}

.admin-actions a.secondary, .admin-btn.secondary {
  background: var(--brand-tint, #E8F8F2);
  border: 1px solid var(--border-brand, rgba(0, 176, 116, 0.28));
  color: var(--brand-forest-ink, #093322);
}

.admin-actions a.secondary:hover, .admin-btn.secondary:hover {
  background: var(--brand-tint-hover, #D4F2E6);
  border-color: var(--brand-primary, #00B074);
  color: var(--brand-forest-ink, #093322);
}

.admin-actions a.danger, .admin-btn.danger {
  background: var(--danger, #EF4444);
  color: #FFFFFF;
}

.admin-actions a.danger:hover, .admin-btn.danger:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.admin-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table th {
  background: var(--surface-2, #F8FAF9);
  color: var(--muted, #64748B);
  font-family: var(--font, "Noto Sans", sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.admin-table tbody tr:hover td {
  background: var(--surface-2, #F8FAF9);
}

.admin-table td form,
.admin-table td .admin-actions {
  white-space: normal;
}

.admin-flash-float {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(460px, 92%);
}

.admin-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at top, rgba(0, 176, 116, 0.08), transparent 50%),
    var(--bg, #F4F7F5);
}

.admin-login {
  width: min(420px, 100%);
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  border-radius: 18px;
  padding: 28px 24px;
  box-sizing: border-box;
  box-shadow: var(--shadow-card, 0 4px 16px -2px rgba(9, 51, 34, 0.06));
}

.admin-login h1 {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--text, #0F172A);
}

.admin-login p {
  color: var(--muted, #64748B);
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-login .form-control,
.admin-main .form-control {
  max-width: 100%;
  box-sizing: border-box;
}

.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font, "Noto Sans", sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid transparent;
}

.pill.pending, .pill.processing {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
}

.pill.approved, .pill.active, .pill.paid {
  background: var(--brand-tint, #E8F8F2);
  color: var(--brand-forest-ink, #093322);
  border-color: var(--border-brand, rgba(0, 176, 116, 0.28));
}

.pill.rejected, .pill.failed, .pill.banned {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #FCA5A5;
}

.pill.suspended {
  background: #FFEDD5;
  color: #9A3412;
  border-color: #FDBA74;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 86vw);
    height: 100%;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .2s ease;
    border-right: 1px solid rgba(0, 176, 116, 0.2);
    box-shadow: none;
    visibility: hidden;
    pointer-events: none;
  }

  .admin-shell.nav-open .admin-side {
    transform: translateX(0);
    box-shadow: 16px 0 40px rgba(9, 51, 34, 0.45);
    visibility: visible;
    pointer-events: auto;
  }

  .admin-menu-btn,
  .admin-menu-close {
    display: inline-grid;
    place-items: center;
  }

  .admin-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(9, 51, 34, 0.55);
    backdrop-filter: blur(3px);
    z-index: 30;
  }

  .admin-backdrop[hidden] {
    display: none !important;
  }

  .admin-side nav {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 18px 16px 32px;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panels {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-row .admin-btn,
  .admin-row .admin-actions {
    width: 100%;
  }

  .admin-row .admin-actions {
    display: flex;
  }

  .admin-actions a,
  .admin-btn {
    min-height: 44px;
  }
}

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

  .admin-actions a,
  .admin-btn {
    flex: 1 1 auto;
  }

  .admin-table {
    min-width: 480px;
    font-size: 0.82rem;
  }
}

/* --- Tiya Green Admin UI Components (Sub-Phase 2.3) --- */

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--muted, #64748B);
  font-weight: 600;
}

.admin-breadcrumb a {
  color: var(--muted, #64748B);
  text-decoration: none;
  transition: color .15s ease;
}

.admin-breadcrumb a:hover {
  color: var(--brand-primary, #00B074);
}

.admin-breadcrumb .sep {
  opacity: 0.45;
  font-size: 0.75rem;
}

.admin-breadcrumb .current {
  color: var(--brand-forest-ink, #093322);
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted, #64748B);
  background: var(--surface-2, #F8FAF9);
  border: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  white-space: nowrap;
  transition: all .15s ease;
}

.admin-tab:hover {
  color: var(--brand-forest-ink, #093322);
  border-color: var(--border-brand, rgba(0, 176, 116, 0.28));
  background: var(--brand-tint, #E8F8F2);
}

.admin-tab.active {
  color: #FFFFFF;
  background: var(--brand-primary, #00B074);
  border-color: var(--brand-primary, #00B074);
  box-shadow: 0 2px 8px rgba(0, 176, 116, 0.28);
}

.admin-tab .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
}

.admin-tab:not(.active) .badge {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text, #0F172A);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 480px;
  min-width: 240px;
}

.admin-search-input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(9, 51, 34, 0.16));
  background: var(--surface, #FFFFFF);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text, #0F172A);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-search-input:focus {
  border-color: var(--brand-primary, #00B074);
  box-shadow: 0 0 0 3px rgba(0, 176, 116, 0.15);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.admin-pagination a,
.admin-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text, #0F172A);
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, rgba(9, 51, 34, 0.12));
  transition: all .15s ease;
}

.admin-pagination a:hover {
  background: var(--brand-tint, #E8F8F2);
  border-color: var(--brand-primary, #00B074);
  color: var(--brand-forest-ink, #093322);
}

.admin-pagination .active {
  background: var(--brand-primary, #00B074);
  border-color: var(--brand-primary, #00B074);
  color: #FFFFFF;
}

.admin-pagination .disabled {
  opacity: 0.45;
  pointer-events: none;
}

.admin-side .nav-logout-form {
  margin: 0;
  padding: 0;
}

.admin-side .nav-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #94A3B8;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: all .15s ease;
}

.admin-side .nav-logout-btn:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
}

.admin-side .nav-logout-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action .form-control {
  padding-right: 42px;
}

.input-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 6px;
  color: var(--muted, #64748B);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.input-toggle-btn:hover {
  color: var(--text, #0F172A);
}

.input-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.detail-card {
  background: var(--surface-2, #F8FAF9);
  border: 1px solid var(--line, rgba(9, 51, 34, 0.08));
  border-radius: 12px;
  padding: 14px 16px;
}

.detail-card .k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--muted, #64748B);
  margin-bottom: 6px;
}

.detail-card .v {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-forest-ink, #093322);
}

