:root {
  /* ===== The 2 brand colors ===== */
  --bg: #131D1F;             /* every background: page, sidebar, cards, table, topbar */
  --green: #66FA5E;          /* every accent: buttons, sidebar links, borders */

  /* neutral helpers (solid tints of the 2 colors, no glass / transparency) */
  --surface: #1a2628;
  --surface-2: #213033;
  --text: #f1f1f1;
  --muted: #9aa8aa;
  --line: #243336;
  --line-strong: #2f4245;
  --green-soft: #1b3a2e;
  --green-line: #3f9a46;
  --danger: #ff5a5a;         /* only used for delete / inactive / logout */
  --danger-soft: #3a2326;
  --danger-line: #8a3a3f;
  --pill: 999px;

  /* animation helpers */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Poppins", sans-serif; color: var(--text); min-height: 100vh;
  background: var(--bg); overflow-x: hidden;
}
ul { list-style: none; }
a { text-decoration: none; }

/* =====================================================
   KEYFRAMES
   ===================================================== */
@keyframes pageIn   { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn   { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes growBar  { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growLine { from { width: 0; } to { width: 46px; } }
@keyframes pulseGlow {
  0%   { box-shadow: 0 0 0 0 rgba(102, 250, 94, .55); }
  70%  { box-shadow: 0 0 0 14px rgba(102, 250, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 250, 94, 0); }
}
@keyframes pulseDanger {
  0%   { box-shadow: 0 0 0 0 rgba(255, 90, 90, .5); }
  70%  { box-shadow: 0 0 0 14px rgba(255, 90, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); }
}
@keyframes floaty   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes shine    { from { left: -80%; } to { left: 130%; } }
@keyframes badgePop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
@keyframes iconPop  { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.15) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes popFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn    { from { opacity: 0; transform: scale(.85) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes spin     { to { transform: rotate(360deg); } }

/* page content enters with a soft slide-up (used by className="page-anim") */
.page-anim { animation: pageIn .55s var(--ease) backwards; }
.page-anim .page-head { animation: fadeUp .5s var(--ease) .05s both; }
.page-anim .card,
.page-anim .stat-grid { animation: fadeUp .55s var(--ease) .15s both; }

/* ---------- Layout ---------- */
.admin-wrapper { display: flex; min-height: 100vh; position: relative; }
.admin-main {
  flex: 1; margin-left: 270px; display: flex; flex-direction: column; min-height: 100vh; min-width: 0;
  transition: margin-left .35s var(--ease);
}
.admin-main.expanded { margin-left: 84px; }
.admin-content { flex: 1; padding: 28px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: 270px; z-index: 100;
  background: var(--bg); border-right: 1px solid var(--line);
  color: #fff; display: flex; flex-direction: column; padding: 22px 14px;
  overflow: hidden;
  transition: width .35s var(--ease);
  animation: slideInLeft .5s var(--ease) both;
}
.sidebar.closed { width: 84px; }

.sidebar-brand {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 8px 22px;
  border-bottom: 1px solid var(--line); position: relative;
}
.brand-logo {
  font-size: 22px; font-weight: 700; color: var(--bg); white-space: nowrap; position: relative;
  padding: 8px 14px; border-radius: var(--pill); background: var(--green);
  border: 1px solid var(--green); overflow: hidden;
  animation: zoomIn .6s var(--spring) .1s both, pulseGlow 2.8s ease-out 1s infinite;
  transition: transform .3s var(--spring);
}
.brand-logo:hover { transform: scale(1.08) rotate(-2deg); }
.brand-logo::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: shine 3.2s ease-in-out 1.2s infinite;
}
.brand-logo span { color: var(--bg); }
.brand-text {
  font-size: 14px; letter-spacing: 4px; text-transform: uppercase; color: var(--text);
  white-space: nowrap; font-weight: 500; animation: fadeUp .6s var(--ease) .25s both;
}

.sidebar-menu { margin-top: 18px; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 8px; }
/* every <li> slides in one by one (delay comes from the inline animationDelay in the JSX) */
.sidebar-menu li { margin-bottom: 8px; animation: slideInLeft .55s var(--ease) both; }

/* menu link = oval / pill */
.sidebar-menu a {
  display: flex; align-items: center; gap: 14px; padding: 5px 18px 5px 5px; border-radius: var(--pill);
  color: var(--muted); font-size: 14.5px; font-weight: 500; position: relative;
  white-space: nowrap; border: 1px solid transparent; overflow: hidden;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease),
              transform .3s var(--ease), padding-left .3s var(--ease);
}
.menu-icon {
  font-size: 19px; display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2);
  transition: background .3s var(--ease), color .3s var(--ease), transform .4s var(--spring);
}

/* hover + active link: fully #66FA5E */
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--green); color: var(--bg); border-color: var(--green); font-weight: 600;
}
.sidebar-menu a:hover { transform: translateX(5px); }
.sidebar-menu a:active { transform: translateX(5px) scale(.97); }
.sidebar-menu a:hover .menu-icon,
.sidebar-menu a.active .menu-icon {
  background: var(--bg); color: var(--green);
}
.sidebar-menu a:hover .menu-icon { transform: rotate(360deg) scale(1.08); }
.sidebar-menu a.active .menu-icon { animation: floaty 2.4s ease-in-out infinite; }

/* shine sweep on the active link */
.sidebar-menu a.active::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); animation: shine 3.5s ease-in-out 1s infinite;
}

/* logout */
.sidebar-logout {
  display: flex; align-items: center; gap: 12px; justify-content: center; padding: 13px; margin: 0 8px;
  border: 1px solid var(--danger-line); background: var(--danger-soft); color: #ff9b9b;
  border-radius: var(--pill); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
  white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--spring);
  animation: fadeUp .6s var(--ease) .6s both;
}
.sidebar-logout:hover { background: var(--danger); color: #fff; transform: translateY(-3px); animation: none; }
.sidebar-logout:active { transform: scale(.95); }

.sidebar.closed .menu-label, .sidebar.closed .brand-text { display: none; }
.sidebar.closed .sidebar-menu { padding: 6px 4px; }
.sidebar.closed .sidebar-menu a { justify-content: center; padding: 5px; }
.sidebar.closed .sidebar-logout { margin: 0 4px; }
.sidebar.closed .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; padding: 14px 28px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); border-bottom: 1px solid var(--line);
  animation: slideDown .5s var(--ease) both;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: var(--bg);
  border: 1px solid var(--green); font-size: 19px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: transform .3s var(--spring), filter .2s;
}
.icon-btn:hover { filter: brightness(.9); transform: scale(1.12) rotate(8deg); }
.icon-btn:active { transform: scale(.9); }
.bell .badge-dot {
  position: absolute; top: -5px; right: -5px; background: var(--bg); color: var(--green);
  border: 1px solid var(--green); font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  animation: badgePop 1.8s ease-in-out infinite;
}
.search-box, .search-box.light {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: var(--pill); width: 300px;
  color: var(--muted);
  transition: border-color .3s, color .3s, box-shadow .3s, width .4s var(--ease);
}
.search-box:hover { border-color: var(--green-line); }
.search-box:focus-within {
  border-color: var(--green); color: var(--green);
  box-shadow: 0 0 0 4px rgba(102, 250, 94, .15);
}
.search-box input { border: none; outline: none; background: transparent; width: 100%; font-family: inherit; font-size: 14px; color: #fff; }
.search-box input::placeholder { color: var(--muted); }
.profile { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; color: var(--bg); font-weight: 700; position: relative;
  background: var(--green); display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--spring);
  animation: pulseGlow 3s ease-out 1.5s infinite;
}
.avatar:hover { transform: scale(1.1) rotate(-6deg); }
.profile-info { display: flex; flex-direction: column; line-height: 1.2; }
.profile-info strong { color: #fff; }
.profile-info small { color: var(--muted); font-size: 12px; }

/* ---------- Page header ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-head h2 { color: #fff; font-size: 28px; font-weight: 700; }
.page-head h2::after {
  content: ""; display: block; width: 46px; height: 4px; margin-top: 6px; border-radius: 4px;
  background: var(--green); animation: growLine .7s var(--ease) .3s both;
  transition: width .4s var(--ease);
}
.page-head h2:hover::after { width: 90px; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Buttons (all oval, fully #66FA5E) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 26px;
  border: 1px solid var(--green); border-radius: var(--pill);
  font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .3s var(--spring), filter .2s, box-shadow .3s var(--ease);
}
.btn svg { transition: transform .3s var(--spring); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg);
}
.btn:hover::after { animation: shine .7s ease; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(102, 250, 94, .25); }
.btn:hover svg { transform: scale(1.2) rotate(-8deg); }
.btn:active { transform: translateY(0) scale(.95); box-shadow: none; }

.btn-green,
.btn-blue,
.btn-light {
  background: var(--green) !important;
  color: var(--bg) !important;
  border-color: var(--green) !important;
}

.btn-green:hover,
.btn-blue:hover,
.btn-light:hover,
.btn-green:focus,
.btn-blue:focus,
.btn-light:focus {
  background: var(--green) !important;
  color: var(--bg) !important;
  border-color: var(--green) !important;
  filter: brightness(1.05);
}

.btn-green:active,
.btn-blue:active,
.btn-light:active {
  background: var(--green) !important;
  color: var(--bg) !important;
}


/* ---------- Cards & stats ---------- */
.card {
  position: relative; border-radius: 20px; padding: 24px; background: var(--bg);
  border: 1px solid var(--line-strong); overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
.card:hover { border-color: var(--green-line); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.card-title { color: #fff; margin-bottom: 18px; font-weight: 600; position: relative; padding-left: 14px; }
.card-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--green); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
  display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: 20px; color: #fff;
  position: relative; overflow: hidden;
  transition: transform .4s var(--spring), box-shadow .4s var(--ease), border-color .3s;
  animation: zoomIn .6s var(--spring) both;
}
.stat-card:nth-child(1) { animation-delay: .10s; }
.stat-card:nth-child(2) { animation-delay: .20s; }
.stat-card:nth-child(3) { animation-delay: .30s; }
.stat-card:nth-child(4) { animation-delay: .40s; }
.stat-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 18px 36px rgba(102, 250, 94, .18); }
.stat-card.blue { background: var(--bg); border: 1px solid var(--line-strong); }
.stat-card.blue:hover { border-color: var(--green); }
.stat-card.blue .stat-icon { background: var(--green-soft); color: var(--green); }
.stat-card.green { background: var(--green); color: var(--bg); }
.stat-icon {
  width: 58px; height: 58px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  transition: transform .5s var(--spring);
}
.stat-card:hover .stat-icon { transform: rotate(360deg) scale(1.12); }
.stat-card.green .stat-icon { background: rgba(19,29,31,.15); }
.stat-card h3 { font-size: 28px; font-weight: 700; }
.stat-card span { font-size: 13.5px; opacity: .85; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }

/* ---------- Bar chart ---------- */
.bar-chart {
  display: flex; align-items: flex-end; justify-content: space-around; height: 260px; padding-top: 10px;
  background: repeating-linear-gradient(0deg, transparent 0 51px, var(--line) 51px 52px);
}
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; width: 100%; }
.bar {
  width: 34px; border-radius: 10px 10px 0 0; background: var(--green);
  position: relative; transform-origin: bottom;
  animation: growBar .9s var(--ease) both;
  transition: filter .3s, transform .3s var(--spring);
}
.bar-col:nth-child(1) .bar { animation-delay: .10s; }
.bar-col:nth-child(2) .bar { animation-delay: .20s; }
.bar-col:nth-child(3) .bar { animation-delay: .30s; }
.bar-col:nth-child(4) .bar { animation-delay: .40s; }
.bar-col:nth-child(5) .bar { animation-delay: .50s; }
.bar-col:nth-child(6) .bar { animation-delay: .60s; }
.bar-col:nth-child(7) .bar { animation-delay: .70s; }
.bar:hover { filter: brightness(1.15); transform: scaleX(1.18); }
.bar em { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 12px; font-style: normal; color: #fff; font-weight: 600; }
.bar-col span { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ---------- Table (#131D1F) ---------- */
.table-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.count {
  color: var(--green); font-size: 13px; font-weight: 500; padding: 5px 14px; border-radius: var(--pill);
  background: var(--green-soft); border: 1px solid var(--green-line);
  animation: zoomIn .5s var(--spring) .3s both;
}

.table-responsive {
  overflow-x: auto; background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 16px;
}
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-hover-bg: transparent;
  --bs-table-hover-color: var(--text);
  --bs-table-striped-bg: transparent;
  --bs-table-accent-bg: transparent;
  width: 100%; border-collapse: collapse; background: var(--bg); color: var(--text);
}
.table > :not(caption) > * > * {
  background-color: transparent;
  color: var(--text);
}
.table thead th {
  background: var(--surface-2); color: #fff; padding: 15px 16px; text-align: left;
  font-size: 13.5px; font-weight: 600; border-bottom: 2px solid var(--green-line); white-space: nowrap;
}
/* rows fade up one by one (delay comes from inline animationDelay in the JSX) */
.table tbody tr {
  background: var(--bg); position: relative;
  animation: fadeUp .5s var(--ease) both;
  transition: background .3s var(--ease);
}
.table tbody tr:hover { background: var(--green-soft); }
.table td {
  padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text);
  transition: padding-left .3s var(--ease);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--green); padding-left: 22px; }
.table td b { color: #fff; }
.sub { display: block; color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px !important; }

/* Table directly inside a card (dashboard recent bookings) */
.card > .table { background: var(--bg); border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; min-width: 480px; }

.status {
  padding: 5px 14px; border-radius: var(--pill); font-size: 12px; font-weight: 600; display: inline-block;
  transition: transform .3s var(--spring);
}
.table tbody tr:hover .status { transform: scale(1.1); }
.status.active, .status.confirmed { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.status.inactive, .status.cancelled { background: var(--danger-soft); color: #ff7b7b; border: 1px solid var(--danger-line); }
.status.pending { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }

/* action buttons = round */
.act {
  width: 36px; height: 36px; border: 1px solid transparent; border-radius: 50%; margin-right: 6px; cursor: pointer;
  font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .35s var(--spring), background .25s, color .25s, filter .2s, box-shadow .3s;
}
.act:hover { transform: translateY(-4px) rotate(15deg) scale(1.15); }
.act:active { transform: scale(.88); }
.act.edit { background: var(--green); color: var(--bg); border-color: var(--green); }
.act.del { background: var(--danger-soft); color: #ff7b7b; border-color: var(--danger-line); }
.act.edit:hover { filter: brightness(.9); box-shadow: 0 8px 16px rgba(102, 250, 94, .3); }
.act.del:hover { background: var(--danger); color: #fff; box-shadow: 0 8px 16px rgba(255, 90, 90, .3); }

/* table thumbnails */
.thumb {
  width: 50px; height: 50px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line-strong);
  transition: transform .4s var(--spring), border-color .3s, box-shadow .3s;
}
.thumb:hover { transform: scale(1.7); border-color: var(--green); box-shadow: 0 10px 24px rgba(0,0,0,.5); position: relative; z-index: 5; }

/* ---------- Form ---------- */
.form-card { max-width: 100%; width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; animation: fadeUp .5s var(--ease) both; }
.form-grid .form-group:nth-child(1) { animation-delay: .15s; }
.form-grid .form-group:nth-child(2) { animation-delay: .25s; }
.form-grid .form-group:nth-child(3) { animation-delay: .35s; }
.form-grid .form-group:nth-child(4) { animation-delay: .45s; }
.form-grid .form-group:nth-child(5) { animation-delay: .55s; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13.5px; font-weight: 600; color: #fff; transition: color .3s; }
.form-group:focus-within label { color: var(--green); }
.form-group input, .form-group select, .form-group textarea {
  padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); font-family: inherit; font-size: 14px; color: #fff; outline: none;
  transition: border-color .3s, background .3s, box-shadow .3s, transform .3s var(--ease);
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--green-line); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--muted); }
.form-group select option { background: var(--bg); color: #fff; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--green); background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(102, 250, 94, .15); transform: translateY(-2px);
}
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; animation: fadeUp .5s var(--ease) .6s both; }

/* image preview */
.thumb-lg {
  display: block; width: 140px; height: 140px; object-fit: cover; border-radius: 10px;
  margin-top: 10px; border: 1px solid var(--line-strong);
  animation: zoomIn .5s var(--spring) both;
  transition: transform .4s var(--spring), border-color .3s;
}
.thumb-lg:hover { transform: scale(1.06) rotate(1.5deg); border-color: var(--green); }

/* ---------- Footer ---------- */
.admin-footer {
  padding: 16px 28px; display: flex; justify-content: space-between;
  font-size: 13px; color: var(--muted); background: var(--bg); position: relative;
  border-top: 1px solid var(--line);
  animation: fadeUp .6s var(--ease) .4s both;
}
.admin-footer b { color: #fff; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }
.sidebar-menu::-webkit-scrollbar { width: 0; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Popup ---------- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(19, 29, 31, .85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: popFade .25s ease;
}
.popup-box {
  width: 100%; max-width: 380px; text-align: center; padding: 32px 26px 26px;
  background: var(--bg); border: 1px solid var(--green-line); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: popIn .45s var(--spring) both;
}
.popup-icon {
  width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  background: var(--green); color: var(--bg);
  animation: iconPop .6s var(--spring) .15s both, pulseGlow 1.8s ease-out .8s infinite;
}
.popup-box h3 { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 6px; animation: fadeUp .4s var(--ease) .25s both; }
.popup-box p { color: var(--muted); font-size: 14px; animation: fadeUp .4s var(--ease) .32s both; }
.popup-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; animation: fadeUp .4s var(--ease) .4s both; }

.popup-box.confirm,
.popup-box.error { border-color: var(--danger-line); }
.popup-box.error { animation: popIn .45s var(--spring) both, shake .5s ease .45s; }
.popup-box.confirm .popup-icon,
.popup-box.error .popup-icon {
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line);
  animation: iconPop .6s var(--spring) .15s both, pulseDanger 1.8s ease-out .8s infinite;
}

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(.92); box-shadow: 0 10px 22px rgba(255, 90, 90, .3); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid-2 { grid-template-columns: 1fr; }
  .search-box { width: 200px; }
  .profile-info { display: none; }
}
@media (max-width: 768px) {
  /* ---- sidebar becomes an off-canvas drawer ---- */
  .sidebar {
    width: 270px; height: 100vh; height: 100dvh;
    transform: translateX(-100%);
    animation: none;               /* the desktop slide-in animation would override transform */
    box-shadow: none;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 24px 0 60px rgba(0, 0, 0, .6); }
  .sidebar.closed { width: 270px; }

  /* always show full labels inside the drawer */
  .sidebar.closed .menu-label,
  .sidebar.closed .brand-text { display: inline; }
  .sidebar.closed .sidebar-menu { padding: 6px 8px; }
  .sidebar.closed .sidebar-menu a { justify-content: flex-start; padding: 5px 18px 5px 5px; }
  .sidebar.closed .sidebar-logout { margin: 0 8px; }
  .sidebar.closed .sidebar-brand { justify-content: center; padding: 4px 8px 22px; }

  .sidebar .sidebar-close { display: flex; }
  .sidebar .sidebar-brand { gap: 8px; }
  .sidebar .brand-text { letter-spacing: 2px; }
  .admin-wrapper > .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: rgba(19, 29, 31, .75); backdrop-filter: blur(3px);
    animation: popFade .25s ease both;
  }

  /* ---- content takes the full width ---- */
  .admin-main, .admin-main.expanded { margin-left: 0; }
  .admin-content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .topbar-left, .topbar-right { gap: 12px; }
  .topbar .search-box { display: none; }
  .table-tools .search-box { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 24px; }
  .admin-footer { flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 16px; }
  .card { padding: 18px; }
  .table-tools { flex-direction: column; align-items: stretch; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; }
  .popup-box.view { max-width: 100%; }
}

/* ---------- Respect "reduce motion" setting ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* ---------- Profile dropdown ---------- */
.profile-wrap { position: relative; }
.profile { cursor: pointer; user-select: none; color: var(--muted); }
.chev { transition: transform .3s var(--ease); }
.chev.up { transform: rotate(180deg); }

.profile-menu {
  position: absolute; right: 0; top: calc(100% + 12px); width: 220px; z-index: 200;
  background: var(--bg); border: 1px solid var(--green-line); border-radius: 16px; padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: popIn .3s var(--spring) both; transform-origin: top right;
}
.profile-menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.profile-menu-head strong { color: #fff; font-size: 14px; }
.profile-menu-head small { color: var(--muted); font-size: 12px; word-break: break-all; }
.profile-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: transparent; border: 1px solid transparent; border-radius: var(--pill);
  color: var(--text); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.profile-menu button:hover { background: var(--green); color: var(--bg); transform: translateX(3px); }
.profile-menu button.danger { color: #ff9b9b; }
.profile-menu button.danger:hover { background: var(--danger); color: #fff; }

/* ---------- Login page ---------- */
@keyframes ldDrift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(80px,50px) scale(1.2); } }
@keyframes ldDrift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px,-50px) scale(1.15); } }
@keyframes ldDrift3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px,-70px); } }
@keyframes ldSpin   { to { transform: rotate(360deg); } }
@keyframes ldBob    { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(6deg); } }
@keyframes ldRise   { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-105vh); opacity: 0; } }
@keyframes ldBlink  { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.ld-page {
  --mx: 50vw; --my: 40vh;
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 16px 24px;
  background: var(--bg);
}
.ld-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(102, 250, 94, .12), transparent 60%);
}

/* ----- background ----- */
.ld-grid {
  position: absolute; inset: 0; opacity: .8; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.ld-aurora { position: absolute; border-radius: 50%; background: var(--green); filter: blur(120px); pointer-events: none; }
.ld-aurora-1 { width: 460px; height: 460px; top: -160px; left: -120px; opacity: .2; animation: ldDrift1 13s ease-in-out infinite; }
.ld-aurora-2 { width: 380px; height: 380px; bottom: -160px; right: -100px; opacity: .18; animation: ldDrift2 15s ease-in-out infinite; }
.ld-aurora-3 { width: 240px; height: 240px; top: 50%; left: 50%; margin: -120px 0 0 -120px; opacity: .08; animation: ldDrift3 11s ease-in-out infinite; }

.ld-spark {
  position: absolute; bottom: -20px; border-radius: 50%; pointer-events: none;
  background: var(--green); box-shadow: 0 0 12px var(--green);
  animation: ldRise linear infinite; opacity: 0;
}

.ld-float {
  position: absolute; width: 56px; height: 56px; border-radius: 50%; pointer-events: none;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: var(--surface); color: var(--green); border: 1px solid var(--green-line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: ldBob 6s ease-in-out infinite;
}
.ld-f1 { top: 14%; left: 14%; }
.ld-f2 { top: 68%; left: 10%; width: 48px; height: 48px; font-size: 21px; animation-delay: 1s; animation-duration: 7s; background: var(--green); color: var(--bg); border-color: var(--green); }
.ld-f3 { top: 18%; right: 13%; width: 48px; height: 48px; font-size: 21px; animation-delay: .5s; animation-duration: 8s; background: var(--green); color: var(--bg); border-color: var(--green); }
.ld-f4 { top: 70%; right: 12%; animation-delay: 1.6s; animation-duration: 6.5s; }
.ld-f5 { top: 44%; left: 5%; width: 40px; height: 40px; font-size: 18px; animation-delay: 2s; animation-duration: 9s; }

/* ----- card with rotating glow border ----- */
.ld-wrap {
  position: relative; z-index: 2; width: 100%; max-width: 400px; padding: 2px; border-radius: 30px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 90px rgba(102, 250, 94, .1);
  animation: popIn .7s var(--spring) both;
}
.ld-wrap::before {
  content: ""; position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent 0 50%, var(--green-line) 72%, var(--green) 88%, transparent 100%);
  animation: ldSpin 5s linear infinite;
}
.ld-card {
  position: relative; z-index: 1; padding: 24px 32px 18px; border-radius: 28px; overflow: hidden;
  background: var(--bg);
}
.ld-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, rgba(102, 250, 94, .09), transparent);
}

.ld-top { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px 32px 18px; }
.ld-brand { display: flex; align-items: center; gap: 12px; }
.ld-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: var(--pill);
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line);
  font-size: 12px; font-weight: 600; letter-spacing: .5px;
}
.ld-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ldBlink 1.6s ease-in-out infinite; }

.ld-card h2 { position: relative; color: #fff; font-size: 24px; font-weight: 700; text-align: center; }
.ld-sub { position: relative; color: var(--muted); font-size: 14px; text-align: center; margin: 4px 0 18px; line-height: 1.6; }

/* ----- fields: label ABOVE the box ----- */
.ld-field { position: relative; margin-bottom: 12px; }
.ld-field label {
  display: block; margin: 0 0 6px 2px; color: #fff; font-size: 13.5px; font-weight: 600;
  transition: color .3s;
}
.ld-field:focus-within label { color: var(--green); }

.ld-box {
  display: flex; align-items: stretch; height: 46px; overflow: hidden; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-strong);
  transition: border-color .3s, box-shadow .3s, background .3s, transform .3s var(--ease);
}
.ld-box:hover { border-color: var(--green-line); }
.ld-box:focus-within {
  border-color: var(--green); background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(102, 250, 94, .15); transform: translateY(-2px);
}
.ld-icon {
  width: 46px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--muted); background: var(--surface-2);
  border-right: 1px solid var(--line-strong);
  transition: background .3s, color .3s, border-color .3s;
}
.ld-box:focus-within .ld-icon { background: var(--green); color: var(--bg); border-color: var(--green); }
.ld-box input {
  flex: 1; min-width: 0; padding: 0 16px; border: none; outline: none; background: transparent;
  color: #fff; font-family: inherit; font-size: 14.5px;
}
.ld-box input::placeholder { color: var(--muted); }
.ld-box input:-webkit-autofill {
  -webkit-text-fill-color: #fff; transition: background-color 9999s ease-in-out 0s;
  box-shadow: 0 0 0 100px var(--surface) inset;
}
.ld-eye {
  width: 52px; flex-shrink: 0; background: none; border: none; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  transition: color .2s, transform .3s var(--spring);
}
.ld-eye:hover { color: var(--green); transform: scale(1.15); }

.ld-caps {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0 2px; color: #ffcf5a; font-size: 12.5px; font-weight: 500;
  animation: fadeUp .3s var(--ease) both;
}

/* remember me */
.ld-check {
  display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 20px 2px; cursor: pointer;
  color: var(--text); font-size: 13.5px; user-select: none;
}
.ld-check input { position: absolute; opacity: 0; pointer-events: none; }
.ld-tick {
  width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line-strong); color: transparent; font-size: 14px;
  transition: background .25s, border-color .25s, color .25s, transform .3s var(--spring);
}
.ld-check:hover .ld-tick { border-color: var(--green-line); }
.ld-check input:checked + .ld-tick { background: var(--green); border-color: var(--green); color: var(--bg); transform: scale(1.08); }
.ld-check input:focus-visible + .ld-tick { outline: 2px solid var(--green); outline-offset: 2px; }

.ld-error {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border-radius: 14px;
  font-size: 13px; font-weight: 500; background: var(--danger-soft); color: #ff9b9b; border: 1px solid var(--danger-line);
  animation: shake .5s ease;
}
.ld-error svg { font-size: 18px; flex-shrink: 0; }

.ld-submit { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
.ld-submit:disabled { opacity: .8; cursor: not-allowed; transform: none; box-shadow: none; }
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(19, 29, 31, .3); border-top-color: var(--bg); animation: spin .7s linear infinite;
}

.ld-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; color: var(--muted); font-size: 12px; }
.ld-divider::before, .ld-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

.ld-badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ld-badges span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--pill);
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line);
  font-size: 12px; font-weight: 600; transition: transform .3s var(--spring);
}
.ld-badges span:hover { transform: translateY(-3px); }
.ld-foot { margin-top: 12px; text-align: center; color: var(--muted); font-size: 12px; }
.ld-foot b { color: #fff; }

/* ----- success overlay ----- */
.ld-success {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: var(--bg); animation: popFade .3s ease both;
}
.ld-success-ico {
  width: 86px; height: 86px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 44px;
  background: var(--green); color: var(--bg);
  animation: iconPop .6s var(--spring) both, pulseGlow 1.6s ease-out .5s infinite;
}
.ld-success h3 { color: #fff; font-size: 22px; margin-top: 22px; animation: fadeUp .4s var(--ease) .25s both; }
.ld-success p { color: var(--muted); font-size: 14px; margin-top: 6px; animation: fadeUp .4s var(--ease) .35s both; }

/* ----- responsive ----- */
@media (max-width: 900px) {
  .ld-f1, .ld-f2, .ld-f3, .ld-f4, .ld-f5 { display: none; }
}
@media (max-width: 480px) {
  .ld-page { padding: 14px; }
  .ld-card { padding: 28px 20px 20px; }
  .ld-box { height: 44px; }
  .ld-icon { width: 44px; }
}
/* ---------- Type checkboxes & tags ---------- */
.type-options { display: flex; gap: 14px; flex-wrap: wrap; }
.type-check {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  padding: 10px 20px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color .3s, background .3s;
}
.type-check:hover { border-color: var(--green-line); }
.type-check:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* Green checkbox and selected Type option */

/* Green checkbox and radio buttons */
.form-group .type-check input[type="checkbox"],
.form-group .type-check input[type="radio"],
.type-check input[type="checkbox"],
.type-check input[type="radio"] {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: #66FA5E !important;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

/* Green radio button when selected */
.type-check input[type="radio"]:checked {
  accent-color: #66FA5E !important;
}

/* Green border and text for selected option */
.type-check:has(input:checked) {
  background: #1b3a2e;
  border-color: #66FA5E;
  color: #66FA5E;
}


.type-check {
  border-color: #2f4245;
  transition: all 0.3s ease;
}

.type-check:hover {
  border-color: #66FA5E;
}

.type-check:has(input:checked) {
  background: #1b3a2e;
  border-color: #66FA5E;
  color: #66FA5E;
}

/* Green image upload box */
.form-group input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  background: #1a2628;
  color: #f1f1f1;
  border: 1px solid #3f9a46;
  border-radius: 12px;
  cursor: pointer;
  accent-color: #66FA5E;
}

/* Green Choose File button */
.form-group input[type="file"]::file-selector-button {
  background: #66FA5E;
  color: #131D1F;
  border: 1px solid #66FA5E;
  border-radius: 6px;
  padding: 7px 12px;
  margin-right: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
  background: #4de846;
  border-color: #4de846;
}

/* Green border when image field is selected */
.form-group input[type="file"]:focus {
  outline: none;
  border-color: #66FA5E;
  box-shadow: 0 0 0 3px rgba(102, 250, 94, 0.15);
}

.type-tag {
  display: inline-block; margin-right: 6px; padding: 4px 12px; border-radius: var(--pill);
  font-size: 12px; font-weight: 600;
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line);
}
/* ---------- Vision & Mission extras ---------- */
.field-error {
  display: flex; align-items: center; gap: 6px; color: #ff7b7b; font-size: 12.5px; font-weight: 500;
  animation: fadeUp .3s var(--ease) both;
}
.form-group input.invalid, .form-group textarea.invalid { border-color: var(--danger); }
.form-group textarea { min-height: 130px; resize: vertical; }

.type-check:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.type-check:has(input:disabled):hover { border-color: var(--line-strong); }
.form-group .type-check input:disabled { cursor: not-allowed; }
.type-check:has(input:checked:disabled) { opacity: .85; cursor: default; }

.form-group input:disabled, .form-group textarea:disabled { opacity: .85; cursor: default; }
.form-group input[type="file"].invalid { border-color: var(--danger); }

.act.view { background: var(--surface-2); color: var(--green); border-color: var(--green-line); }
.act.view:hover { background: var(--green); color: var(--bg); box-shadow: 0 8px 16px rgba(102, 250, 94, .3); }

.clip {
  max-width: 280px; display: -webkit-box;  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--muted);
}
.form-note {
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 18px;
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line);
}

/* ---------- Investor extras ---------- */
.thumb.round { border-radius: 50%; width: 52px; height: 52px; }
.thumb-lg.round { border-radius: 50%; width: 150px; height: 150px; }
.type-tag.team { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.form-group a.link { color: var(--green); font-size: 14px; word-break: break-all; }


/* ---------- Enquiry page ---------- */
.clip { -webkit-line-clamp: 2; line-clamp: 2; }

.popup-box.view { max-width: 520px; text-align: left; }
.popup-box.view h3 { text-align: center; }
.popup-box.view .popup-actions { justify-content: center; }
.enq-detail p { color: var(--text); font-size: 14px; margin-bottom: 8px; }
.enq-detail b { color: #fff; }
.enq-msg {
  margin-top: 12px; padding: 14px 16px; border-radius: 12px; max-height: 220px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-left: 4px solid var(--green);
  color: var(--text); font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}

/* ---------- Settings page ---------- */
.set-view {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 16px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong);
  color: #fff; font-size: 14.5px; word-break: break-all;
}
.set-view svg { color: var(--green); flex-shrink: 0; font-size: 18px; }
.set-view span { flex: 1; letter-spacing: .3px; }

.pw-box { position: relative; }
.pw-box input { width: 100%; padding-right: 52px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 19px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, background .2s, transform .3s var(--spring);
}
.pw-eye:hover { color: var(--green); background: var(--surface-2); transform: translateY(-50%) scale(1.12); }
.pw-eye.inline { position: static; transform: none; flex-shrink: 0; }
.pw-eye.inline:hover { transform: scale(1.12); }

/* ---------- TinyMCE editor - Blog & Add Business ---------- */
.tox.tox-tinymce {
  border: 1px solid var(--green-line) !important;
  border-radius: 12px !important;
  background: var(--bg) !important;
  overflow: hidden;
}

/* Editor toolbar and header */
.tox .tox-editor-header,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary,
.tox .tox-toolbar,
.tox .tox-statusbar,
.tox .tox-edit-area {
  background: var(--bg) !important;
  border-color: var(--line-strong) !important;
}

/* Toolbar buttons */
.tox .tox-tbtn {
  color: var(--text) !important;
}

.tox .tox-tbtn svg {
  fill: var(--text) !important;
}

.tox .tox-tbtn:hover {
  background: var(--green-soft) !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
  background: var(--green) !important;
  color: var(--bg) !important;
}

.tox .tox-tbtn--enabled svg {
  fill: var(--bg) !important;
}

/* Editor content area */
.tox .tox-edit-area__iframe {
  background: var(--bg) !important;
}

/* Editor bottom status bar */
.tox .tox-statusbar {
  border-top: 1px solid var(--line-strong) !important;
  color: var(--muted) !important;
}

/* Image/link dialogs and dropdowns */
.tox .tox-dialog,
.tox .tox-menu,
.tox .tox-dialog__header,
.tox .tox-dialog__footer {
  background: var(--bg) !important;
  border-color: var(--line-strong) !important;
}

.tox .tox-textfield,
.tox .tox-selectfield select,
.tox .tox-textarea {
  background: var(--surface) !important;
  color: #fff !important;
  border-color: var(--line-strong) !important;
}

/* Dialog action buttons */
.tox .tox-button:not(.tox-button--secondary):not(.tox-button--naked) {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: var(--bg) !important;
}

.tox .tox-editor-header,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary,
.tox .tox-toolbar,
.tox .tox-statusbar,
.tox .tox-edit-area,
.tox .tox-edit-area__iframe {
  background: #131D1F !important;
  color: #f1f1f1 !important;
}
.tox .tox-toolbar__group { border-color: var(--line-strong) !important; }
.tox .tox-tbtn {
  color: #f1f1f1 !important;
}

.tox .tox-tbtn svg {
  fill: #f1f1f1 !important;
}

.tox .tox-tbtn:hover {
  background: #213033 !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
  background: #213033 !important;
}

.tox .tox-tbtn__select-label,
.tox .tox-mbtn__select-label {
  color: #f1f1f1 !important;
}
.tox .tox-statusbar { border-top: 1px solid var(--line) !important; color: var(--muted) !important; }

/* dialogs (image / link) and dropdown menus */
.tox .tox-dialog,
.tox .tox-menu,
.tox .tox-dialog__header,
.tox .tox-dialog__footer { background: var(--bg) !important; border-color: var(--line-strong) !important; }
.tox .tox-textfield, .tox .tox-selectfield select, .tox .tox-textarea {
  background: var(--surface) !important; color: #fff !important; border-color: var(--line-strong) !important;
}
.tox .tox-button:not(.tox-button--secondary):not(.tox-button--naked) {
  background: var(--green) !important; border-color: var(--green) !important; color: var(--bg) !important;
}

/* ---------- Saved rich content (View page) ---------- */
.rich-view {
  padding: 16px 18px; border-radius: 12px; overflow-x: auto;
  background: var(--bg); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 14px; line-height: 1.7; word-break: break-word;
}
.rich-view h1, .rich-view h2, .rich-view h3, .rich-view h4 { color: #fff; margin: 14px 0 8px; }
.rich-view p { margin-bottom: 10px; }
.rich-view a { color: var(--green); }
.rich-view img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-view ul, .rich-view ol { padding-left: 24px; margin-bottom: 10px; }
.rich-view ul { list-style: disc; }
.rich-view blockquote { border-left: 4px solid var(--green); padding-left: 12px; color: var(--muted); }
.rich-view table, .rich-view td, .rich-view th { border: 1px solid var(--line-strong); }

.rich-section {
  margin-bottom: 18px; padding: 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
}
.rich-section .type-tag { margin-bottom: 12px; }

button,
button:hover,
button:focus,
button:active,
.btn,
.btn:hover,
.btn:focus,
.btn:active {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Keep buttons green on normal, hover, focus, and click */
.btn,
.btn-green,
.btn-blue,
.btn-light,
.btn:hover,
.btn-green:hover,
.btn-blue:hover,
.btn-light:hover,
.btn:focus,
.btn-green:focus,
.btn-blue:focus,
.btn-light:focus,
.btn:active,
.btn-green:active,
.btn-blue:active,
.btn-light:active {
  background-color: #66FA5E !important;
  color: #131D1F !important;
  border-color: #66FA5E !important;
}

/* Green hover effect */
.btn:hover,
.btn-green:hover,
.btn-blue:hover,
.btn-light:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 22px rgba(102, 250, 94, 0.25);
}
/* ---------- Mobile drawer: close button & backdrop (hidden on desktop) ---------- */
.sidebar-close {
  display: none; position: absolute; top: 0; right: 0; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  align-items: center; justify-content: center; font-size: 20px; cursor: pointer;
  background: var(--green); color: var(--bg); border: 1px solid var(--green);
  transition: transform .3s var(--spring), filter .2s;
}
.sidebar-close:hover { transform: rotate(90deg) scale(1.1); filter: brightness(.92); }
.sidebar-close:active { transform: scale(.9); }
.sidebar-backdrop { display: none; }

/* ---------- Small phones (≤ 480px) ---------- */
@media (max-width: 480px) {
  .sidebar { width: 82vw; max-width: 300px; }
  .sidebar.closed { width: 82vw; }
  .admin-content { padding: 12px; }
  .topbar { padding: 10px 12px; }
  .icon-btn { width: 40px; height: 40px; font-size: 18px; }
  .avatar { width: 40px; height: 40px; }
  .profile { gap: 6px; }
  .profile-menu { width: 200px; }
  .page-head h2 { font-size: 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .stat-icon { width: 46px; height: 46px; font-size: 22px; }
  .stat-card h3 { font-size: 22px; }
  .bar { width: 22px; }
  .bar-chart { height: 220px; }
  .table thead th, .table td { padding: 12px; font-size: 13px; }
  .act { width: 32px; height: 32px; }
  .btn { padding: 10px 20px; }
  .type-check { padding: 8px 14px; }
  .thumb-lg { width: 110px; height: 110px; }
  .popup-box { padding: 26px 18px 20px; }
  .popup-actions { flex-wrap: wrap; }
  .clip { max-width: 180px; }
}

/* ---------- Tablets (769px – 992px) ---------- */
@media (min-width: 769px) and (max-width: 992px) {
  .admin-content { padding: 20px; }
  .topbar { padding: 12px 20px; }
}
/* ---------- Sidebar logo image ---------- */
.brand-img {
  display: block; height: 72px; width: auto; max-width: 370px; object-fit: contain;
  animation: zoomIn .6s var(--spring) .1s both;
  transition: transform .3s var(--spring);
}
.brand-img:hover { transform: scale(1.06); }

/* collapsed desktop sidebar (84px wide): keep the logo inside */
.sidebar.closed .brand-img { max-width: 56px; height: auto; object-fit: cover; object-position: left center; margin: 0 auto; }

@media (max-width: 768px) {
  /* mobile drawer always shows the full logo */
  .sidebar.closed .brand-img { max-width: 150px; height: 44px; }
}
@media (max-width: 480px) {
  .sidebar .brand-img { height: 38px; max-width: 120px; }
  .sidebar.closed .brand-img { height: 38px; max-width: 120px; }
}
/* ---------- Login page logo ---------- */
.ld-logo {
  display: block; height: 64px; width: auto; max-width: 220px; object-fit: contain;
  margin: 0 auto;
  animation: zoomIn .6s var(--spring) .1s both;
}
@media (max-width: 480px) {
  .ld-logo { height: 52px; max-width: 180px; }
}
/* ---------- Responsive fixes: tables, headers, popups ---------- */
.grid-2 > *, .stat-grid > *, .form-grid > *, .form-group { min-width: 0; }
.table-responsive { max-width: 100%; -webkit-overflow-scrolling: touch; }
.table td:last-child { white-space: nowrap; }   /* edit / delete buttons stay in one row */

/* no zoom-on-hover thumbnails on touch screens (they get clipped) */
@media (hover: none) {
  .thumb:hover, .thumb-lg:hover { transform: none; }
  .table tbody tr:hover td:first-child { padding-left: 16px; }
}

@media (max-width: 992px) {
  .table-responsive .table { min-width: 720px; }   /* table scrolls sideways instead of squashing */
}

@media (max-width: 768px) {
  .card { overflow-x: auto; }                      /* tables not wrapped in .table-responsive still scroll */
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head .btn { width: 100%; }
  .table-tools input, .table-tools select { width: 100%; }
  .count { align-self: flex-start; }
  .popup-box { max-height: 90vh; overflow-y: auto; }
  .enq-msg { max-height: 160px; }
  .type-options { gap: 10px; }
  .bar-chart { overflow-x: auto; }
}

@media (max-width: 480px) {
  .form-actions .btn { width: 100%; flex: 1 1 100%; }
  .popup-actions .btn { flex: 1 1 100%; }
  .thumb.round { width: 44px; height: 44px; }
  .thumb-lg.round { width: 110px; height: 110px; }
  .ld-top { padding: 12px 0 14px; }
  .ld-logo { max-width: 160px; }
  .rich-view { padding: 12px; font-size: 13.5px; }
  .set-view { font-size: 13.5px; }
}
/* small buttons: icon + text on one line, fit to content */
.btn.btn-sm {
  display: inline-flex;
  flex-direction: row;
  width: fit-content !important;
  max-width: max-content;
  flex: 0 0 auto;
  align-self: flex-start;
  min-width: 0;
  min-height: 46px;
  padding: 12px 16px;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  border-radius: 14px;
}
.btn.btn-sm svg { font-size: 15px; flex-shrink: 0; }

/* =========================================================
   REGISTER – OTP, PURPOSE, WARNING  +  HEADER PROFILE  +  PROFILE PAGE
========================================================= */

/* ---------- email row ---------- */
.rg-emailrow { display: flex; gap: 10px; align-items: stretch; }
.rg-emailrow .lg-box { flex: 1; min-width: 0; }
.rg-main .rg-emailrow .lg-box { height: 42px; }
.rg-sendbtn {
  flex-shrink: 0; min-width: 104px; padding: 0 18px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-text); font: 700 14px inherit; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; transition: .3s;
}
.rg-sendbtn:hover { background: var(--btn-hover); color: #fff; transform: translateY(-2px); }
[data-theme="dark"] .rg-sendbtn:hover { color: #06210f; }
.rg-sendbtn:disabled { opacity: .8; cursor: not-allowed; transform: none; }
.rg-sendbtn .lg-spin { width: 18px; height: 18px; }
.rg-ghost { background: transparent; color: var(--heading); border: 1.5px solid var(--border); }
.rg-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
[data-theme="dark"] .rg-ghost:hover { color: var(--accent); }
.rg-ok {
  display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-style: normal;
  font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap;
}
.lg-box input:disabled { opacity: .85; cursor: not-allowed; }

/* ---------- purpose cards ---------- */
.rg-purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rg-pitem { position: relative; cursor: pointer; }
.rg-pitem input { position: absolute; opacity: 0; pointer-events: none; }
.rg-pcard {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--bg-soft); border: 1.5px solid var(--border); transition: .3s;
}
.rg-pcard i {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--accent); border: 1px solid var(--border); transition: .3s;
}
.rg-pcard b { font-size: 14px; color: var(--heading); }
.rg-pcard u {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: transparent; transition: .3s;
}
.rg-pitem:hover .rg-pcard { border-color: var(--accent); transform: translateY(-2px); }
.rg-pitem input:checked + .rg-pcard { border-color: var(--accent); background: rgba(83,158,89,.12); box-shadow: 0 0 0 3px rgba(83,158,89,.15); }
.rg-pitem input:checked + .rg-pcard i { background: var(--accent); color: #fff; }
.rg-pitem input:checked + .rg-pcard u { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .rg-pitem input:checked + .rg-pcard i,
[data-theme="dark"] .rg-pitem input:checked + .rg-pcard u { color: #06210f; }
.rg-pitem input:focus-visible + .rg-pcard { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- small popups (OTP / warning) ---------- */
.lg-overlay.rg-top { z-index: 3200; }
.rg-pop {
  position: relative; width: 100%; max-width: 430px; padding: 44px 34px 30px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 26px;
  box-shadow: 0 40px 100px rgba(10,20,35,.45); animation: lgPop .45s cubic-bezier(.34,1.56,.64,1);
}
[data-theme="dark"] .rg-pop { background: #0c1d15; box-shadow: 0 40px 100px rgba(0,0,0,.75), 0 0 70px rgba(75,227,106,.12); }
.rg-pop-ic {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; box-shadow: 0 0 0 8px rgba(83,158,89,.15);
}
[data-theme="dark"] .rg-pop-ic { color: #06210f; box-shadow: 0 0 0 8px rgba(75,227,106,.12), 0 0 30px rgba(75,227,106,.45); }
.rg-pop-warn { background: #f5a524; color: #fff; box-shadow: 0 0 0 8px rgba(245,165,36,.18); }
[data-theme="dark"] .rg-pop-warn { background: #ffd84d; color: #3a2a00; box-shadow: 0 0 0 8px rgba(255,216,77,.14), 0 0 30px rgba(255,216,77,.4); }
.rg-pop h3 { font-size: 24px; margin-bottom: 8px; }
.rg-pop p { font-size: 14.5px; margin-bottom: 20px; }
.rg-pop p strong { color: var(--heading); }
.rg-pop .lg-error { text-align: left; }
.rg-pop .lg-foot { margin-top: 18px; }
.rg-wait { font-weight: 700; color: var(--accent); }

.rg-otp { display: flex; justify-content: center; gap: 10px; margin-bottom: 22px; }
.rg-otp input {
  width: 48px; height: 56px; text-align: center; border-radius: 14px; outline: none;
  font: 700 24px 'Poppins', sans-serif; color: var(--heading);
  background: var(--bg-soft); border: 1.5px solid var(--border); transition: .25s;
}
.rg-otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(83,158,89,.18); transform: translateY(-2px); }
[data-theme="dark"] .rg-otp input:focus { box-shadow: 0 0 0 4px rgba(75,227,106,.18); }

@media (max-width: 480px) {
  .rg-purpose { grid-template-columns: 1fr; }
  .rg-emailrow { flex-direction: column; }
  .rg-sendbtn { height: 42px; }
  .rg-pop { padding: 44px 20px 26px; }
  .rg-otp { gap: 6px; }
  .rg-otp input { width: 40px; height: 50px; font-size: 20px; }
}

/* ---------- header profile dropdown ---------- */
.rx-prof { position: relative; margin-left: 12px; }
.rx-prof-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 50px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--heading);
  font: 700 14px 'Lato', sans-serif; transition: .3s;
}
.rx-prof-btn:hover, .rx-prof.open .rx-prof-btn { border-color: var(--accent); box-shadow: 0 6px 18px rgba(83,158,89,.25); }
.rx-prof-av {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #539E59, #2f7d4a); color: #fff; font: 700 16px 'Poppins', sans-serif;
}
[data-theme="dark"] .rx-prof-av { background: linear-gradient(135deg, #6dff8a, #1fbf4a); color: #06210f; }
.rx-prof-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-prof-chev { transition: transform .3s; }
.rx-prof.open .rx-prof-chev { transform: rotate(180deg); }
.rx-prof-menu {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 250px; padding: 10px; z-index: 1100;
  background: var(--bg); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 20px 50px rgba(22,49,85,.22);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: top right; transition: .25s;
}
[data-theme="dark"] .rx-prof-menu { background: #0c1d15; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.rx-prof.open .rx-prof-menu { opacity: 1; visibility: visible; transform: none; }
.rx-prof-head { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.rx-prof-head strong { display: block; font: 700 15px 'Poppins', sans-serif; color: var(--heading); }
.rx-prof-head small { font-size: 12px; color: var(--text); word-break: break-all; }
.rx-prof-menu a, .rx-prof-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: none; border-radius: 12px;
  background: transparent; cursor: pointer; text-align: left; font: 700 14px 'Lato', sans-serif; color: var(--heading); transition: .25s;
}
.rx-prof-menu a:hover, .rx-prof-menu button:hover { background: rgba(83,158,89,.14); color: var(--accent); }
.rx-prof-menu .rx-prof-out:hover { background: rgba(229,72,77,.12); color: #e5484d; }
@media (max-width: 991px) {
  .rx-prof { margin: 8px 0 0; }
  .rx-prof-btn { width: 100%; justify-content: flex-start; }
  .rx-prof-menu { position: static; margin-top: 8px; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
  .rx-prof.open .rx-prof-menu { display: block; }
}

/* ---------- profile page ---------- */
.pf-page { background: var(--bg); min-height: 70vh; }
.pf-loading { display: flex; justify-content: center; padding: 140px 0; }
.pf-loading .lg-spin { border-color: var(--border); border-top-color: var(--accent); width: 40px; height: 40px; }

.pf-hero {
  position: relative; overflow: hidden; text-align: center; color: #fff; padding: 70px 0 120px;
  background: linear-gradient(135deg, #163155 0%, #1e4a78 55%, #539E59 130%);
}
[data-theme="dark"] .pf-hero { background: linear-gradient(135deg, #04100a 0%, #0a2a18 55%, #1c7a38 140%); }
.pf-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .4; background: #7be28a; }
.pf-b1 { width: 300px; height: 300px; top: -100px; left: -80px; animation: bzFloat 9s ease-in-out infinite; }
.pf-b2 { width: 260px; height: 260px; bottom: -110px; right: -60px; background: #4aa3ff; animation: bzFloat 11s ease-in-out infinite reverse; }
[data-theme="dark"] .pf-b2 { background: #4be36a; opacity: .25; }
.pf-hero-in { position: relative; z-index: 2; }
.pf-crumb {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; margin-bottom: 26px; border-radius: 50px; font-size: 13px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(10px);
}
.pf-crumb a:hover { color: #8be28f; }
.pf-crumb strong { color: #8be28f; }
.pf-avatar {
  width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 700 52px 'Poppins', sans-serif; color: #163155; background: #fff;
  box-shadow: 0 0 0 6px rgba(255,255,255,.25), 0 18px 40px rgba(0,0,0,.35);
}
[data-theme="dark"] .pf-avatar { background: #4be36a; color: #06210f; box-shadow: 0 0 0 6px rgba(75,227,106,.25), 0 0 40px rgba(75,227,106,.5); }
.pf-hero h1 { color: #fff; font-size: 38px; margin-bottom: 4px; }
.pf-hero p { color: #dbe6f1; font-size: 16px; margin-bottom: 16px; }
.pf-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 50px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
}
.pf-status i { width: 9px; height: 9px; border-radius: 50%; background: #4be36a; box-shadow: 0 0 10px #4be36a; animation: mqBlink 1.6s ease-in-out infinite; }

.pf-body { padding: 0 0 90px; margin-top: -70px; position: relative; z-index: 5; }
.pf-card {
  padding: 34px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
[data-theme="dark"] .pf-card { backdrop-filter: blur(10px); }
.pf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.pf-card-head h2 { font-size: 28px; }
.pf-card-head h2 span { color: var(--accent); }
.pf-logout {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 50px; cursor: pointer;
  background: transparent; color: #e5484d; border: 1.5px solid #e5484d; font: 700 14px 'Lato', sans-serif; transition: .3s;
}
.pf-logout:hover { background: #e5484d; color: #fff; transform: translateY(-2px); }

.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pf-item {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px;
  background: var(--bg-soft); border: 1px solid var(--border); transition: transform .35s ease, border-color .3s, box-shadow .3s;
}
.pf-item:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.pf-item i {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--accent); transition: .4s;
}
.pf-item:hover i { background: var(--accent); color: #fff; transform: rotateY(360deg); }
[data-theme="dark"] .pf-item:hover i { color: #06210f; }
.pf-item div { min-width: 0; }
.pf-item small { display: block; font-size: 12px; margin-bottom: 2px; }
.pf-item strong { display: block; font-size: 15px; color: var(--heading); word-break: break-word; }

.pf-purpose { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.pf-purpose small { display: block; font-size: 12px; letter-spacing: 2px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.pf-chips span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 50px; font-weight: 700; font-size: 14px;
  background: var(--btn-bg); color: var(--btn-text);
}

@media (max-width: 991px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } .pf-hero h1 { font-size: 30px; } }
@media (max-width: 575px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-card { padding: 24px 18px; }
  .pf-hero { padding: 50px 0 110px; }
}
/* register: OTP status message under email */
.rg-info { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--text); }
.rg-info-ok { color: var(--accent); }
.rg-info .lg-linkbtn { font-size: 12.5px; text-decoration: underline; }


/* ---------- Subscribe Mail: recipients dropdown fix ---------- */
.form-group.sm-recipients { position: relative; z-index: 20; }

.sm-recipients .sm-menu { background: #1a2527; }

.form-group.sm-recipients .sm-menu label {
  font-weight: 500;
  transition: background .2s;
}
.form-group.sm-recipients .sm-menu label:hover { background: var(--green-soft); }

/* .form-group input padding/focus styles checkbox ku apply aagama */
.form-group.sm-recipients .sm-menu input[type="checkbox"],
.form-group.sm-recipients .sm-menu input[type="checkbox"]:hover,
.form-group.sm-recipients .sm-menu input[type="checkbox"]:focus {
  width: 16px;
  height: 16px;
  padding: 0;
  flex-shrink: 0;
  accent-color: #66FA5E;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}


/* ---------- Authentication tabs ---------- */
.auth-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.auth-tab {
  padding: 10px 28px; border-radius: var(--pill); cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  font-family: inherit; font-size: 14px; font-weight: 600;
  transition: background .3s, color .3s, border-color .3s;
}
.auth-tab:hover { border-color: var(--green); }
.auth-tab.active { background: var(--green); color: var(--bg); border-color: var(--green); }

/* ================= DASHBOARD ================= */
.dash-row { display: grid; gap: 20px; margin-bottom: 20px; }
.dash-row > * { min-width: 0; }
.dash-row-2-1 { grid-template-columns: 2fr 1fr; }
.dash-row-1-1 { grid-template-columns: 1fr 1fr; }
.dash-row-3   { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1200px) { .dash-row-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 992px)  { .dash-row-2-1, .dash-row-1-1, .dash-row-3 { grid-template-columns: 1fr; } }

.dash-hint { display: block; margin-top: 2px; font-size: 11.5px; opacity: .8; }
.dash-loading { display: flex; justify-content: center; padding: 100px 0; }
.dash-loading .spinner { width: 40px; height: 40px; border-width: 4px; }
.dash-error { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 50px 20px; color: var(--danger); text-align: center; }
.dash-error p { color: var(--text); }
.dash-spin { animation: spin .8s linear infinite; }
.dash-empty { display: flex; align-items: center; justify-content: center; min-height: 200px; color: var(--muted); font-size: 14px; }

.dash-donut { position: relative; }
.dash-donut-center {
  position: absolute; left: 0; right: 0; top: 92px; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; pointer-events: none;
}
.dash-donut-center strong { color: #fff; font-size: 26px; line-height: 1; }
.dash-donut-center span { color: var(--muted); font-size: 11.5px; margin-top: 4px; }

.dash-tip {
  background: var(--surface-2); border: 1px solid var(--green-line); border-radius: 12px;
  padding: 10px 14px; box-shadow: 0 12px 28px rgba(0,0,0,.5); font-size: 13px; color: var(--text);
}
.dash-tip b { display: block; margin-bottom: 6px; color: #fff; }
.dash-tip p { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.dash-tip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dash-tip strong { color: var(--green); }

.dash-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dash-list li:last-child { border-bottom: none; }
.dash-list li > div { flex: 1; min-width: 0; }
.dash-list b { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-list small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-list em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dash-av {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line);
}

.recharts-legend-item-text { color: var(--muted) !important; }
.recharts-wrapper:focus, .recharts-surface:focus { outline: none; }

.head-content {
  color: #fff;
}


/* New css in  */

/* ---------- Topbar search dropdown ---------- */
.search-box { position: relative; }
.search-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 300;
  background: var(--bg); border: 1px solid var(--green-line); border-radius: 16px;
  padding: 8px; max-height: 320px; overflow-y: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: popIn .25s var(--spring) both; transform-origin: top left;
}
.search-results li { margin: 0; }
.search-results button {
  width: 100%; text-align: left; padding: 10px 14px; border: 1px solid transparent;
  border-radius: var(--pill); background: transparent; color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.search-results button:hover { background: var(--green); color: var(--bg); transform: translateX(3px); }
.search-empty { padding: 10px 14px; color: var(--muted); font-size: 14px; }



/* Native select dropdown arrow spacing */
.page-anim select {
  appearance: none !important;
  -webkit-appearance: none !important;

  padding-right: 42px !important;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f1f1f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;

  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
}

/* White calendar and date picker icons - all admin pages */
.page-anim input[type="date"]::-webkit-calendar-picker-indicator,
.page-anim input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.page-anim input[type="month"]::-webkit-calendar-picker-indicator,
.page-anim input[type="time"]::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1);
    opacity: 1;
    cursor: pointer;
}