﻿/* Core Variables */
:root {
  --bg-body: #0c0c0c;
  --bg-nav: rgba(var(--glass-tint), 0.4);
  --bg-panel: rgba(var(--glass-tint), 0.6);
  --bg-input: rgba(30, 31, 38, 0.6);
  --text-main: #f8fafc;
  --text-muted: #a2a2a2;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(85, 85, 90, 0.6);
  --accent-color: #ffffff; /* Indigo */
  --accent-hover: #e2e2e4;
  --accent-yellow: #61615c;
  --accent-yellow-hover: #fffffe;
  --success: #10b981;
  --error: #ef4444;
  --warning: #fbbf24;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-panel: 0 12px 40px rgba(0, 0, 0, 0.5);

  /* Glass effect โ€“ change --glass-tint to re-color every glass surface */
  --glass-tint:  rgba(var( --bg-body), 1);
  --glass-bg: rgba(var(--glass-tint), 0.5);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
  --glass-saturate: 150%;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

  /* Themeable surfaces (overridden in html.theme-light) */
  --bg-glass: rgba(var(--glass-tint), 0.5);
  --bg-panel-solid: rgba(var(--glass-tint), 0.35);
  --surface-faint: rgba(255, 255, 255, 0.02);
  --border-soft: var(--glass-border);
  --hover-soft: rgba(255, 255, 255, 0.08);
  --bg-glow-1: rgba(28, 28, 30, 0.12);
  --bg-glow-2: rgba(28, 28, 30, 0.12);
  --preview-grad: linear-gradient(180deg, rgba(10, 10, 18, 0.95) 0%, rgba(10, 10, 12, 0.98) 100%);

  font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


* { box-sizing: border-box; }

html {
  width: 100%;
  overflow-x: hidden;
}

img, svg, video, canvas, audio {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--text-main);
  background-color: var(--bg-body);
  /* Subtle glowing orbs in background to make it feel premium */
  background-image: 
    radial-gradient(circle at 15% 0%, var(--bg-glow-1) 0%, transparent 40%),
    radial-gradient(circle at 85% 100%, var(--bg-glow-2) 0%, transparent 40%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  padding: 16px 24px;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-menu-pill {
  display: flex;
  align-items: center;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 16px;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  gap: 8px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.nav-menu-pill a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-menu-pill a:hover,
.nav-menu-pill a.active {
  background: rgba(255, 255, 255, 0.08);
}
.nav-menu-pill .nav-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

.nav-user-pill {
  display: flex;
  align-items: center;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 5px 6px 5px 16px;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.nav-user-pill .nav-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.nav-user-pill .nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-user-pill .nav-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  text-decoration: none;
  flex: none;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-user-pill .nav-logout:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  transform: translateY(-1px);
}

.nav-user-pill .avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
}

/* Layout - Center everything nicely */
.console-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.console-shell,
.single-shell,
.auth-shell,
.dashboard-shell {
  width: 100%;
  margin: 100px auto 60px;
  padding: 0 32px;
}

.settingss-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.settingss-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 100px;
}

.settingss-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
}

.settingss-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.settingss-tab.active {
  background: rgba(var(--glass-tint), 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 var(--glass-highlight);
}

.settingss-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* โ”€โ”€ Admin Layout (settingss.php) โ”€โ”€ */
.admin-layout {
  width: 100%;
  margin: 100px auto 60px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 96px;
  background: rgba(var(--glass-tint), 0.5);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.admin-sidebar-label {
  display: block;
  margin: 10px 12px 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.admin-sidebar-label:first-child {
  margin-top: 4px;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 17px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-size: 0.92rem;
}

.admin-tab svg {
  flex: none;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.admin-tab:hover svg {
  opacity: 0.9;
}

.admin-tab.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-hover);
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-tab.active svg {
  opacity: 1;
  color: var(--accent-hover);
}

.sidebar-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 8px 12px;
}

.admin-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* โ”€โ”€ Nav Console Tabs (mobile only) โ”€โ”€ */
.nav-divider {
  display: none;
}

.nav-console-tab {
  display: none;
}

.nav-menu-label {
  display: none;
}

/* โ”€โ”€ Console Header โ”€โ”€ */
.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.console-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.console-header-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 4px 0 0;
}

/* โ”€โ”€ Overview Cards โ”€โ”€ */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.overview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.overview-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.overview-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
}

.overview-card-icon--green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.overview-card-icon--blue {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.overview-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.overview-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.overview-card-code {
  margin: 0;
  padding: 10px 14px;
  background: rgba(10, 10, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.78rem;
  word-break: break-all;
  color: #a5b4fc;
}

.overview-card-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.overview-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-hover);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.overview-card-link:hover {
  color: #c7d2fe;
}

/* โ”€โ”€ Preview Inline โ”€โ”€ */
.overlay-settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.overlay-settings-preview {
  position: sticky;
  top: 100px;
}

.preview-stage-inline {
  position: relative;
  width: 100%;
  min-height: 300px;
  background: rgba(--bg-body, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.preview-stage-inline .donate-alert {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  opacity: 0;
  margin: 42px auto auto;
  transition: opacity 0.3s ease;
}

.preview-stage-inline .donate-alert.is-visible {
  opacity: 1;
  transform: none;
}

/* When preview has an animation class, let the animation handle transforms */
.preview-stage-inline.anim-fadeUp .donate-alert.is-visible { animation: pvFadeUp 0.5s ease-out forwards; }
.preview-stage-inline.anim-fadeIn .donate-alert.is-visible { animation: pvFadeIn 0.6s ease-out forwards; }
.preview-stage-inline.anim-popIn .donate-alert.is-visible { animation: pvPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.preview-stage-inline.anim-bounceIn .donate-alert.is-visible { animation: pvBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.preview-stage-inline.anim-slideLeft .donate-alert.is-visible { animation: pvSlideLeft 0.5s ease-out forwards; }
.preview-stage-inline.anim-slideRight .donate-alert.is-visible { animation: pvSlideRight 0.5s ease-out forwards; }
.preview-stage-inline.anim-slideDown .donate-alert.is-visible { animation: pvSlideDown 0.5s ease-out forwards; }
.preview-stage-inline.anim-zoomRotate .donate-alert.is-visible { animation: pvZoomRotate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.preview-stage-inline.anim-flipIn .donate-alert.is-visible { animation: pvFlipIn 0.6s ease-out forwards; }
.preview-stage-inline.anim-shake .donate-alert.is-visible { animation: pvShake 0.6s ease-out forwards; }

/* Donate Page Preview */
.preview-stage-inline#donatePreviewStage {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  align-items: stretch;
  justify-content: flex-start;
}

.donate-preview-frame {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 14, 0.6);
}

.donate-preview-device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-soft);
}

.device-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.device-bar-dot:first-child { background: #ff5f57; }
.device-bar-dot:nth-child(2) { background: #febc2e; }
.device-bar-dot:nth-child(3) { background: #28c840; }

.device-bar-url {
  flex: 1;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donate-preview-iframe {
  width: 100%;
  height: 480px;
  border: none;
  background: #0a0a0c;
}

@keyframes pvFadeUp {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes pvFadeIn {
  0%   { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pvPopIn {
  0%   { opacity: 0; transform: scale(0.3); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pvBounceIn {
  0%   { opacity: 0; transform: translateY(60px) scale(0.5); }
  60%  { opacity: 1; transform: translateY(-10px) scale(1.05); }
  80%  { transform: translateY(5px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pvSlideLeft {
  0%   { opacity: 0; transform: translateX(-80px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes pvSlideRight {
  0%   { opacity: 0; transform: translateX(80px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes pvSlideDown {
  0%   { opacity: 0; transform: translateY(-60px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes pvZoomRotate {
  0%   { opacity: 0; transform: scale(0.2) rotate(-15deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes pvFlipIn {
  0%   { opacity: 0; transform: rotateX(90deg); }
  100% { opacity: 1; transform: rotateX(0deg); }
}
@keyframes pvShake {
  0%   { opacity: 0; transform: scale(0.8); }
  20%  { opacity: 1; transform: translateX(-12px); }
  40%  { transform: translateX(12px); }
  60%  { transform: translateX(-8px); }
  80%  { transform: translateX(8px); }
  100% { opacity: 1; transform: translateX(0); }
}

.preview-stage-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: rgba(var(--glass-tint), 0.6);
  color: var(--text-muted);
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s, color 0.15s;
  flex: none;
  width: auto;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.preview-stage-btn:hover {
  background: var(--accent);
  color: #fff;
}

.preview-stage-btn--save {
  left: auto;
  right: 10px;
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.preview-stage-btn--save:hover {
  background: #15803d;
  border-color: #15803d;
}

.preview-stage-btn--reset {
  left: auto;
  right: 70px;
  color: var(--text-muted);
}

.preview-stage-btn--reset:hover {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}

@media (max-width: 1024px) {
  .overlay-settings-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .overlay-settings-preview {
    position: static;
  }
  .preview-stage-inline {
    min-height: 180px;
  }
  .preview-collapse {
    max-height: none;
  }
  .donate-preview-iframe {
    height: 320px;
  }
  .preview-stage-btn {
    position: static;
    margin: 8px;
  }
  .preview-stage-inline#donatePreviewStage .donate-preview-frame {
    margin: 0;
  }
  .overlay-url-display {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .overlay-url-code {
    text-align: center;
    word-break: break-all;
    white-space: normal;
    min-width: 0;
  }
  .overlay-url-copy-btn {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .preview-stage-inline {
    min-height: 120px;
  }
  .donate-preview-iframe {
    height: 260px;
  }
  .donate-preview-device-bar {
    padding: 6px 8px;
  }
  .device-bar-url {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}

/* โ”€โ”€ Utility Classes โ”€โ”€ */
.label-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: -4px;
}

.label-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.range-input {
  width: 100%;
  cursor: pointer;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  flex: none;
  margin-top: 8px;
  gap: 6px;
}

.btn-test-voice {
  padding: 12px;
}

.btn-reset {
  flex: 1;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.05);
}

.btn-reset:hover {
  background: rgba(239, 68, 68, 0.15);
}

.media-preview {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.media-preview.is-visible {
  display: flex;
}

.media-preview-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(var(--glass-tint), 0.3);
}

.media-preview-banner {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-preview {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  background: rgba(var(--glass-tint), 0.4);
}

/* โ”€โ”€ Overview Cards (legacy) โ”€โ”€ */
.setup-url-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-top: 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.setup-url-card:hover {
  border-color: rgba(46, 46, 56, 0.2);
}

.setup-url-card .url-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.setup-url-card code {
  margin: 0;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 0.82rem;
  word-break: break-all;
}

.setup-url-card .url-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.setup-url-card .url-actions a,
.setup-url-card .url-actions button {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}

.setup-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  color: #34d399;
  font-size: 0.88rem;
  font-weight: 500;
}

/* โ”€โ”€ Section Divider โ”€โ”€ */
.settings-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
}

.settings-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* โ”€โ”€ Settings Collapse (Accordion) โ”€โ”€ */
.settings-collapse {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(--bg-body, 0.35);
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settings-collapse summary {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.settings-collapse summary::-webkit-details-marker {
  display: none;
}

.settings-collapse summary::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-muted);
  margin-left: auto;
  transition: transform 0.2s ease;
}

.settings-collapse[open] summary::after {
  transform: rotate(180deg);
}

.settings-collapse-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}



/* โ”€โ”€ Color Picker โ”€โ”€ */
.color-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-pick-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.color-pick-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 44px;
  transition: border-color 0.2s ease;
}

.color-pick-field:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(46, 46, 56, 0.1);
}

.color-pick-swatch {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  flex: none;
}

.color-pick-field input[type="color"] {
  flex: 1;
  width: 100%;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
}

/* โ”€โ”€ Grid helpers โ”€โ”€ */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.console-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 1.2fr);
  gap: 40px;
  align-items: start;
  flex: 1;
}

.console-shell > *,
.single-shell > *,
.auth-shell > *,
.settings-column,
.panel {
  min-width: 0;
}

.single-shell,
.auth-shell {
  width: 100%;
  max-width: 1080px;
  margin: 100px auto 60px;
  padding: 0 32px;
}

.auth-shell {
  max-width: 1080px;
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  width: 100%;
  align-items: stretch;
}

.auth-panel {
  width: 100%;
}

.auth-panel .small {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-alert {
  padding: 16px;
  margin: 18px 0;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  color: #fecaca;
  background: rgba(239, 68, 68, 0.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

.discord-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: rgba(88, 101, 242, 0.9);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.discord-login-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.btn-yellow {
  background: var(--accent-yellow) !important;
  color: #251f1f !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 var(--glass-highlight) !important;
}

.btn-yellow:hover {
  background: var(--accent-yellow-hover) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.user-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(var(--glass-tint), 0.4);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.user-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.user-main,
.user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-main strong,
.user-main span {
  display: block;
}

.user-main span {
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.3);
}

.user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-size: 1.4rem;
  font-weight: 700;
}

.role-badge {
  padding: 5px 10px;
  border-radius: 999px;
  color: #c7d2fe;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem;
  font-weight: 700;
}

.user-actions {
  display: grid;
  grid-template-columns: 120px 120px 90px;
  gap: 10px;
  align-items: center;
}

.user-actions select,
.user-actions button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.user-actions button {
  flex: none;
}

/* Panels - Glassmorphism */
.panel {
  background: var(--bg-body);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  padding: 40px 48px;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 var(--glass-highlight);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 24px;
}

/* Typography */
h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 6px;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-hover);
  font-weight: 700;
}

/* Status Badge */
.status-badge {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--glass-tint), 0.5);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.status-badge.is-online {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.status-badge.is-offline {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

/* Forms - Intentional Composition */
.donate-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 400;
  color: #94a3b8;
}

input, select, textarea {
  min-width: 0;
  width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(var(--glass-tint), 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  transition: all 0.3s ease;
  font-size: 1rem;
}

input::placeholder, textarea::placeholder {
  color: #475569;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 4px rgba(46, 46, 56, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.asset-grid > * {
  min-width: 0;
}

.upload-control {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(--bg-body, 0.35);
}

.upload-control input[type="file"] {
  padding: 12px;
  cursor: pointer;
}

.upload-control input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(46, 46, 56, 0.22);
  color: #ffffff;
  cursor: pointer;
}

.upload-status {
  display: block;
  min-height: 20px;
  max-width: 100%;
  color: var(--text-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status.is-loading {
  color: #fbbf24;
}

.upload-status.is-ready {
  color: #34d399;
}

.upload-status.is-error {
  color: #f87171;
}

/* Amount Row neatly proportioned */
.amount-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
}

/* Buttons neatly balanced */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

button {
  flex: 1;
  min-width: 0;
  padding: 18px 24px;
  border: none;
  background: linear-gradient(135deg, var(--accent-color), #4f46e5);
  color: #ffffff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  text-align: center;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 46, 56, 0.4);
  filter: brightness(1.1);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  filter: none;
}

button:active {
  transform: translateY(0);
}

button.secondary {
  flex: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  filter: none;
}

/* Setup Panel Formatting */
code {
  display: block;
  max-width: 100%;
  padding: 20px;
  background: rgba(10, 10, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.9rem;
  color: #a5b4fc;
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.setup-panel p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.setup-panel .small {
  font-size: 0.85rem;
}

.setup-panel p:last-child {
  margin-bottom: 0;
}

/* Skeleton refinements */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  background: linear-gradient(to right, rgba(255,255,255,0.03) 4%, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.03) 36%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
  border-radius: 4px;
}
.skeleton-input { border-radius: var(--radius-sm); }
.skeleton-btn { border-radius: var(--radius-sm); }

/* Shine text effect */
.shine {
  position: relative;
  color: var(--shine-color, currentColor);
  display: inline-block;
  vertical-align: baseline;
  line-height: inherit;
  text-shadow: none;
}

.shine::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  pointer-events: none;
  text-shadow: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .shine::after {
    background-image: linear-gradient(
      110deg,
      transparent 0%,
      transparent 38%,
      #ffffff 48%,
      #fff7b8 52%,
      transparent 62%,
      transparent 100%
    );
    background-size: 240% 100%;
    background-position: 240% 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-text 1.8s linear infinite;
  }
}

@keyframes shine-text {
  0% { background-position: 240% 0; }
  100% { background-position: -240% 0; }
}

/* Overlay - Modern Dark Theme */
.overlay-page {
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  background: transparent;
}

.donate-alert {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translateX(-50%) translateY(-30px);
  width: min(680px, calc(100vw - 48px));
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.donate-alert.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}



.alert-border-top {
  display: none;
}

.alert-media-frame {
  --alert-media-size: 250px;
  width: min(var(--alert-media-size), 90vw);
  height: min(var(--alert-media-size), 70vh);
  margin-bottom: 16px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.alert-media-frame img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.42));
  object-fit: contain;
}

.alert-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.88), 0 0 2px rgba(0, 0, 0, 0.9);
}

.alert-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.donor-name {
  color: #fff;
  font-weight: 800;
  font-size: 1.8rem;
}

.muted-text {
  color: #f8fafc;
  font-weight: 600;
}

.donation-amount {
  color: #a855f7;
  font-weight: 800;
  font-size: 1.8rem;
}

.alert-message {
  color: #cbd5e1;
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
}

/* โ”€โ”€ Overlay Style Variants โ”€โ”€ */

/* Banner - horizontal bar */
.overlay-banner .donate-alert {
  position: fixed;
  top: 18px;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-140%);
  width: min(560px, calc(100vw - 32px));
  margin: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--bg-body), var(--bg-body));
  border: 1px solid rgba(140, 139, 141, 0.35);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.4);
}
.overlay-banner .donate-alert.is-visible {
  transform: translateX(-50%) translateY(0);
}
.overlay-banner .alert-media-frame {
  --alert-media-size: 64px;
  margin-bottom: 0;
  margin-right: 16px;
}
.overlay-banner .alert-content {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.overlay-banner .alert-header {
  font-size: 1.1rem;
  gap: 8px;
}
.overlay-banner .donor-name { font-size: 1.2rem; }
.overlay-banner .donation-amount { font-size: 1.2rem; }
.overlay-banner .alert-message { font-size: 0.9rem; }

/* Minimal - text only, no image */
.overlay-minimal .alert-media-frame {
  display: none;
}
.overlay-minimal .donate-alert {
  top: 20%;
}
.overlay-minimal .alert-content {
  gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.overlay-minimal .alert-header {
  font-size: 1.3rem;
}

/* Card - boxed with background */
.overlay-card .donate-alert {
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: min(420px, calc(100vw - 32px));
  background: linear-gradient(145deg, var(--bg-body), var(--bg-body));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(75, 75, 76, 0.15);
}
.overlay-card .donate-alert.is-visible {
  transform: translateX(-50%) translateY(-50%) scale(1);
  animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cardPop {
  0%   { transform: translateX(-50%) translateY(-50%) scale(0.7); opacity: 0; }
  100% { transform: translateX(-50%) translateY(-50%) scale(1); opacity: 1; }
}
.overlay-card .alert-media-frame {
  --alert-media-size: min(160px, 46vw);
}
.overlay-card .alert-content {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.overlay-card .alert-header {
  font-size: 1.25rem;
}
.overlay-card .donor-name,
.overlay-card .donation-amount {
  font-size: 1.55rem;
}
.overlay-card .alert-message {
  font-size: 1rem;
}

/* Fullscreen - big alert */
.overlay-fullscreen .donate-alert {
  top: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.8);
  width: min(420px, calc(100vw - 32px));
}
.overlay-fullscreen .donate-alert.is-visible {
  transform: translateX(-50%) translateY(-50%) scale(1);
  animation: fsPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes fsPop {
  0%   { transform: translateX(-50%) translateY(-50%) scale(0.5); opacity: 0; }
  100% { transform: translateX(-50%) translateY(-50%) scale(1); opacity: 1; }
}
.overlay-fullscreen .alert-media-frame {
  --alert-media-size: min(190px, 50vw);
}
.overlay-fullscreen .alert-header {
  font-size: 1.7rem;
  gap: 16px;
}
.overlay-fullscreen .donor-name { font-size: 2rem; }
.overlay-fullscreen .donation-amount { font-size: 2rem; }
.overlay-fullscreen .alert-message { font-size: 1.15rem; }

/* โ”€โ”€ Overlay Animation Variants โ”€โ”€ */
.anim-fadeUp .donate-alert.is-visible {
  animation: animFadeUp 0.5s ease-out forwards;
}
@keyframes animFadeUp {
  0%   { opacity: 0; transform: translateX(-50%) translateY(40px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.anim-fadeIn .donate-alert.is-visible {
  animation: animFadeIn 0.6s ease-out forwards;
}
@keyframes animFadeIn {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.95); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.anim-popIn .donate-alert.is-visible {
  animation: animPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes animPopIn {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.3); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.anim-bounceIn .donate-alert.is-visible {
  animation: animBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes animBounceIn {
  0%   { opacity: 0; transform: translateX(-50%) translateY(60px) scale(0.5); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(-10px) scale(1.05); }
  80%  { transform: translateX(-50%) translateY(5px) scale(0.98); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.anim-slideLeft .donate-alert.is-visible {
  animation: animSlideLeft 0.5s ease-out forwards;
}
@keyframes animSlideLeft {
  0%   { opacity: 0; transform: translateX(-50%) translateX(-80px); }
  100% { opacity: 1; transform: translateX(-50%) translateX(0); }
}

.anim-slideRight .donate-alert.is-visible {
  animation: animSlideRight 0.5s ease-out forwards;
}
@keyframes animSlideRight {
  0%   { opacity: 0; transform: translateX(-50%) translateX(80px); }
  100% { opacity: 1; transform: translateX(-50%) translateX(0); }
}

.anim-slideDown .donate-alert.is-visible {
  animation: animSlideDown 0.5s ease-out forwards;
}
@keyframes animSlideDown {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-60px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.anim-zoomRotate .donate-alert.is-visible {
  animation: animZoomRotate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes animZoomRotate {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.2) rotate(-15deg); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0deg); }
}

.anim-flipIn .donate-alert.is-visible {
  animation: animFlipIn 0.6s ease-out forwards;
  perspective: 600px;
}
@keyframes animFlipIn {
  0%   { opacity: 0; transform: translateX(-50%) rotateX(90deg); }
  100% { opacity: 1; transform: translateX(-50%) rotateX(0deg); }
}

.anim-shake .donate-alert.is-visible {
  animation: animShake 0.6s ease-out forwards;
}
@keyframes animShake {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.8); }
  20%  { opacity: 1; transform: translateX(-50%) translateX(-12px); }
  40%  { transform: translateX(-50%) translateX(12px); }
  60%  { transform: translateX(-50%) translateX(-8px); }
  80%  { transform: translateX(-50%) translateX(8px); }
  100% { opacity: 1; transform: translateX(-50%) translateX(0); }
}

/* โ”€โ”€ Overlay Exit Animations โ”€โ”€ */
.anim-fadeUp .donate-alert.is-hiding { animation: outFadeUp 0.4s ease-in forwards; }
@keyframes outFadeUp {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-30px); }
}

.anim-fadeIn .donate-alert.is-hiding { animation: outFadeIn 0.4s ease-in forwards; }
@keyframes outFadeIn {
  0%   { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.9); }
}

.anim-popIn .donate-alert.is-hiding { animation: outPopIn 0.3s ease-in forwards; }
@keyframes outPopIn {
  0%   { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.3); }
}

.anim-bounceIn .donate-alert.is-hiding { animation: outBounceIn 0.4s ease-in forwards; }
@keyframes outBounceIn {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(60px) scale(0.5); }
}

.anim-slideLeft .donate-alert.is-hiding { animation: outSlideLeft 0.4s ease-in forwards; }
@keyframes outSlideLeft {
  0%   { opacity: 1; transform: translateX(-50%) translateX(0); }
  100% { opacity: 0; transform: translateX(-50%) translateX(80px); }
}

.anim-slideRight .donate-alert.is-hiding { animation: outSlideRight 0.4s ease-in forwards; }
@keyframes outSlideRight {
  0%   { opacity: 1; transform: translateX(-50%) translateX(0); }
  100% { opacity: 0; transform: translateX(-50%) translateX(-80px); }
}

.anim-slideDown .donate-alert.is-hiding { animation: outSlideDown 0.4s ease-in forwards; }
@keyframes outSlideDown {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-60px); }
}

.anim-zoomRotate .donate-alert.is-hiding { animation: outZoomRotate 0.4s ease-in forwards; }
@keyframes outZoomRotate {
  0%   { opacity: 1; transform: translateX(-50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.2) rotate(15deg); }
}

.anim-flipIn .donate-alert.is-hiding { animation: outFlipIn 0.4s ease-in forwards; }
@keyframes outFlipIn {
  0%   { opacity: 1; transform: translateX(-50%) rotateX(0deg); }
  100% { opacity: 0; transform: translateX(-50%) rotateX(-90deg); }
}

.anim-shake .donate-alert.is-hiding { animation: outShake 0.4s ease-in forwards; }
@keyframes outShake {
  0%   { opacity: 1; transform: translateX(-50%) translateX(0); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.8); }
}

/* โ”€โ”€ Preview Exit Animations โ”€โ”€ */
body.overlay-banner .donate-alert.is-visible {
  animation: bannerIn 0.38s ease-out forwards;
}

body.overlay-banner .donate-alert.is-hiding {
  animation: bannerOut 0.32s ease-in forwards;
}

@keyframes bannerIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-140%); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes bannerOut {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-140%); }
}

body.overlay-card .donate-alert.is-visible {
  animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

body.overlay-card .donate-alert.is-hiding {
  animation: cardOut 0.3s ease-in forwards;
}

@keyframes cardOut {
  0% { opacity: 1; transform: translateX(-50%) translateY(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50%) scale(0.86); }
}

.preview-stage-inline.anim-fadeUp .donate-alert.is-hiding { animation: pvOutFadeUp 0.4s ease-in forwards; }
.preview-stage-inline.anim-fadeIn .donate-alert.is-hiding { animation: pvOutFadeIn 0.4s ease-in forwards; }
.preview-stage-inline.anim-popIn .donate-alert.is-hiding { animation: pvOutPopIn 0.3s ease-in forwards; }
.preview-stage-inline.anim-bounceIn .donate-alert.is-hiding { animation: pvOutBounceIn 0.4s ease-in forwards; }
.preview-stage-inline.anim-slideLeft .donate-alert.is-hiding { animation: pvOutSlideLeft 0.4s ease-in forwards; }
.preview-stage-inline.anim-slideRight .donate-alert.is-hiding { animation: pvOutSlideRight 0.4s ease-in forwards; }
.preview-stage-inline.anim-slideDown .donate-alert.is-hiding { animation: pvOutSlideDown 0.4s ease-in forwards; }
.preview-stage-inline.anim-zoomRotate .donate-alert.is-hiding { animation: pvOutZoomRotate 0.4s ease-in forwards; }
.preview-stage-inline.anim-flipIn .donate-alert.is-hiding { animation: pvOutFlipIn 0.4s ease-in forwards; }
.preview-stage-inline.anim-shake .donate-alert.is-hiding { animation: pvOutShake 0.4s ease-in forwards; }

@keyframes pvOutFadeUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}
@keyframes pvOutFadeIn {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}
@keyframes pvOutPopIn {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.3); }
}
@keyframes pvOutBounceIn {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(60px) scale(0.5); }
}
@keyframes pvOutSlideLeft {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(80px); }
}
@keyframes pvOutSlideRight {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-80px); }
}
@keyframes pvOutSlideDown {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}
@keyframes pvOutZoomRotate {
  0%   { opacity: 1; transform: scale(1) rotate(0deg); }
  100% { opacity: 0; transform: scale(0.2) rotate(15deg); }
}
@keyframes pvOutFlipIn {
  0%   { opacity: 1; transform: rotateX(0deg); }
  100% { opacity: 0; transform: rotateX(-90deg); }
}
@keyframes pvOutShake {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: scale(0.8); }
}

/* โ”€โ”€ Preview Banner โ”€โ”€ */
.preview-stage-inline.overlay-banner .donate-alert,
.preview-stage-inline.overlay-card .donate-alert,
.preview-stage-inline.overlay-fullscreen .donate-alert,
.preview-stage-inline.overlay-minimal .donate-alert {
  position: relative;
  inset: auto;
  left: auto;
  top: auto;
  margin: 42px auto auto;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 56px);
}

.preview-stage-inline .donate-alert {
  align-self: center;
  justify-self: center;
}

.preview-stage-inline.overlay-banner .donate-alert {
  width: min(92%, 560px);
  transform: none;
}

.preview-stage-inline.overlay-banner .donate-alert.is-visible {
  transform: none;
}

.preview-stage-inline.overlay-card .donate-alert,
.preview-stage-inline.overlay-fullscreen .donate-alert {
  width: min(92%, 420px);
  transform: none;
}

.preview-stage-inline.overlay-card .donate-alert.is-visible,
.preview-stage-inline.overlay-fullscreen .donate-alert.is-visible {
  transform: none;
}

.preview-stage-inline.overlay-card .donate-alert {
  padding: 20px 22px;
}

.preview-stage-inline.overlay-card .alert-media-frame {
  --alert-media-size: min(160px, 46vw);
}

.preview-stage-inline.overlay-card .alert-header {
  font-size: 1.25rem;
}

.preview-stage-inline.overlay-card .donor-name,
.preview-stage-inline.overlay-card .donation-amount {
  font-size: 1.55rem;
}

.preview-stage-inline.overlay-card .alert-message {
  font-size: 1rem;
}

.preview-stage-inline.overlay-fullscreen .alert-media-frame {
  --alert-media-size: min(190px, 50vw);
}

.preview-stage-inline.overlay-fullscreen .alert-header {
  font-size: 1.7rem;
}

.preview-stage-inline.overlay-fullscreen .donor-name,
.preview-stage-inline.overlay-fullscreen .donation-amount {
  font-size: 2rem;
}

.preview-stage-inline.overlay-fullscreen .alert-message {
  font-size: 1.15rem;
}

.preview-badge {
  position: absolute;
  top: 12px;
  right: 32px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(var(--glass-tint), 0.6);
  color: var(--accent-hover);
  border: 1px solid var(--glass-border);
  z-index: 5;
}

.preview-empty {
  color: #475569;
  font-size: 0.9rem;
  text-align: center;
  padding: 40px;
}

.preview-empty svg {
  display: block;
  margin: 0 auto 12px;
  opacity: 0.3;
}

/* Overlay URL Section */
.overlay-url-section {
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.overlay-url-section:hover {
  border-color: rgba(123, 123, 123, 0.25);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.06);
}

.overlay-url-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.overlay-url-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8f8f8;
}

.overlay-url-info {
  flex: 1;
  min-width: 0;
}

.overlay-url-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}

.overlay-url-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 2px 0 0;
  line-height: 1.4;
}

.overlay-url-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  min-width: 0;
}

.overlay-url-code {
  flex: 1;
  display: grid;
  align-items: center;
  justify-items: start;
  align-self: stretch;
  min-width: 0;
  min-height: 32px;
  font-size: 0.72rem;
  color: #f6f6f6;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  background: rgba(10, 10, 14, 0.4);
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  line-height: 1.35;
  text-align: left;
  transition: filter 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-url-code.blurred {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.overlay-url-display .btn-sm {
  margin-top: 0;
}

.overlay-url-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.overlay-url-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.overlay-url-reset-btn {
  color: #f87171;
}

.overlay-url-reset-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

@media (max-width: 640px) {
  .overlay-url-section {
    padding: 12px;
    border-radius: 14px;
  }

  .overlay-url-top {
    align-items: flex-start;
    gap: 10px;
  }

  .overlay-url-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .overlay-url-hint {
    font-size: 0.68rem;
  }

  .overlay-url-display {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
  }

  .overlay-url-code {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
    max-height: 74px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.68rem;
    line-height: 1.45;
    overflow: auto;
  }

  .overlay-url-copy-btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 9px;
    font-size: 0.72rem;
  }
}

/* Responsive constraints */
@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
  .console-shell {
    grid-template-columns: 1fr;
    margin: 40px auto;
    gap: 32px;
  }
  .settingss-layout {
    grid-template-columns: 1fr;
  }
  .settingss-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .settingss-tab {
    white-space: nowrap;
  }
  .admin-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .sidebar-divider { display: none; }
  .admin-sidebar-label { display: none; }
  .admin-tab {
    white-space: nowrap;
    flex: none;
    padding: 9px 14px;
    font-size: 0.85rem;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .single-shell,
  .auth-shell {
    max-width: 100%;
    padding: 0 16px;
  }
}

@media (max-width: 853px) {
  :root {
    --radius: 16px;
    --radius-sm: 9px;
  }

  body {
    background-attachment: scroll;
  }

  .admin-layout {
    padding: 0 12px;
  }

  .console-shell,
  .single-shell,
  .auth-shell {
    padding: 0 12px;
    margin-top: 80px;
    margin-bottom: 32px;
  }

  .console-shell {
    gap: 18px;
  }

  .panel {
    padding: 20px 14px;
  }

  .panel-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  .panel-heading > div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
  }

  .panel-heading > div[style*="display:flex"] button {
    width: 100%;
  }

  h1 {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  h2 {
    line-height: 1.3;
  }

  .donate-form {
    gap: 20px;
  }

  input,
  select,
  textarea {
    padding: 13px 14px;
    font-size: 16px;
  }

  .asset-grid { grid-template-columns: 1fr; gap: 12px; }

  .button-row {
    flex-direction: column;
    gap: 10px;
    padding-top: 22px;
  }

  button {
    width: 100%;
    padding: 14px 16px;
  }
  .btn-sm,
  .preview-stage-btn,
  .goal-reset-button {
    width: auto;
    min-height: 44px;
    padding: 10px 14px;
  }

  .amount-row { grid-template-columns: 1fr; gap: 12px; }
  .setup-panel code { font-size: 0.8rem; padding: 12px; word-break: break-all; }
  .preview-panel .panel-heading { padding: 16px 16px 0; }
  .preview-stage { min-height: 260px; }
  .preview-badge { right: 16px; }
  .alert-header {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 1.08rem;
    line-height: 1.35;
  }
  .donor-name,
  .donation-amount {
    font-size: 1.28rem;
  }
  .alert-message {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }
  .alert-content {
    width: min(100%, 340px);
    padding: 0 8px;
  }
  .upload-control {
    padding: 14px;
  }
  .upload-control input[type="file"] {
    padding: 10px;
    font-size: 0.88rem;
  }
  .upload-control input[type="file"]::file-selector-button {
    max-width: 100%;
    margin: 0 0 8px;
    display: block;
  }
  .settings-panel [style*="grid-template-columns: 1fr 1fr"],
  .auth-panel [style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .setup-url-card { padding: 14px; }
  .setup-url-card code { font-size: 0.75rem; padding: 10px 12px; }
  .overlay-settings-layout { gap: 16px; }
  .settings-collapse-body { overflow: visible; }
  .panel { overflow: visible; }

  /* Hero mobile */
  .hero-section {
    min-height: auto;
    padding: 48px 16px 32px;
  }
  .hero-section h1,
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.25;
  }
  .hero-section .hero-subtitle,
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }
  .hero-search-box {
    padding: 6px 6px 6px 16px;
    border-radius: 999px;
    gap: 8px;
    max-width: 100%;
  }
  .hero-search-box input {
    font-size: 0.85rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-search-box .btn-outline {
    padding: 10px 16px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  /* Console header mobile */
  .console-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* User table mobile */
  .user-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .user-main {
    gap: 10px;
  }
  .user-actions {
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
  }
  .user-actions select,
  .user-actions button {
    min-height: 44px;
    font-size: 0.88rem;
  }

  /* Dashboard mobile */
  .dashboard-shell {
    padding: 0 16px;
    margin: 80px auto 40px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 28px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-card .value {
    font-size: 2rem;
  }
  .chart-panel {
    padding: 18px;
  }
  .leaderboard-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }
  .leaderboard-row .user-main {
    gap: 10px;
  }
  .leaderboard-row .donation-amount {
    text-align: right;
  }
  .modal-content {
    padding: 24px 16px;
    border-radius: 16px;
  }
  .modal-header h2 {
    font-size: 1.4rem;
  }
}

/* โ”€โ”€ Tablet + Mobile Nav (โค1024px) โ”€โ”€ */
@media (max-width: 1024px) {
  .nav-menu-pill {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 16px;
    background: var(--bg-nav);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    flex-direction: column;
    padding: 18px 14px;
    gap: 14px;
    border-radius: 20px;
    z-index: 100;
  }

  .nav-menu-pill.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-menu-pill a {
    justify-content: center;
    padding: 10px 12px;
  }

  .nav-menu-pill .nav-link-home {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-menu-pill .nav-link-settings {
    grid-column: 2;
    grid-row: 1;
  }

  .nav-menu-pill .nav-link-dashboard {
    grid-column: 1;
  }

  .nav-menu-pill .nav-link-users {
    grid-column: 2;
  }

  .nav-menu-pill .nav-link-docs,
  .nav-menu-pill .nav-divider,
  .nav-menu-pill .nav-console-tab {
    grid-column: 1 / -1;
  }

  .nav-toggle {
    display: flex;
    flex: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    padding: 12px;
    box-sizing: content-box;
    border-radius: 50%;
  }

  .nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
  }

  .nav-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--border-soft);
    margin: 4px 0;
  }

  .nav-menu-label {
    display: block;
    margin: 0 8px -6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
  }

  .nav-console-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.15s ease;
    width: 100%;
    min-height: 44px;
  }


  .nav-console-tab svg {
    flex: none;
    opacity: 0.6;
  }

  .nav-console-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
  }

  .nav-console-tab.active {
    background: rgba(40, 40, 41, 0.12);
    border-color: rgba(142, 142, 142, 0.2);
    color: var(--accent-hover);
    font-weight: 600;
  }

  .nav-console-tab.active svg {
    opacity: 1;
    color: var(--accent-hover);
  }

  .navbar {
    padding: 12px 16px;
  }
  .nav-container {
    height: auto;
    min-height: 48px;
    gap: 12px;
  }

  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .console-shell,
  .single-shell,
  .auth-shell {
    padding: 0 10px;
  }

  .panel {
    padding: 18px 12px;
  }

  .status-badge {
    width: fit-content;
    padding: 7px 12px;
  }

  .user-actions {
    grid-template-columns: 1fr;
  }

  .user-meta,
  .user-actions {
    width: 100%;
  }

  /* Login touch targets */
  .login-features-panel {
    padding: 24px 16px 12px;
  }
  .login-card-panel {
    padding: 24px 16px 32px;
  }
  .login-hero-title {
    font-size: 1.3rem;
  }
  .auth-tab {
    padding: 12px;
    font-size: 0.88rem;
  }
  .auth-form input {
    min-height: 48px;
  }

  /* Docs mobile */
  .docs-page {
    padding: 88px 16px 36px;
  }
  .docs-header h1 {
    font-size: 1.3rem;
  }
  .docs-step {
    gap: 12px;
  }
  .step-num {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  .docs-body p {
    font-size: 0.88rem;
  }
}

/* Landing Page Hero */
.hero-section {
  text-align: center;
  padding: 80px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

.hero-search-box {
  display: flex;
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 8px 8px 24px;
  width: 100%;
  max-width: 640px;
  align-items: center;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.hero-search-box input {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
}

.hero-search-box input:focus {
  background: transparent;
  box-shadow: none;
}

.hero-search-box .btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  border-radius: 999px;
  padding: 10px 20px;
  white-space: nowrap;
  font-size: 0.9rem;
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search-box .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  transform: none;
}

/* โ”€โ”€ Auth Page (2-Column Login) โ”€โ”€ */
.auth-page {
  background-color: var(--bg-body);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(53, 53, 65, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(53, 53, 65, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
}

.auth-page .navbar {
  position: relative;
}

.auth-shell {
  max-width: 960px;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  margin-top: 0;
  margin-bottom: 0;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}

.auth-grid .panel {
  display: flex;
  flex-direction: column;
}

.auth-grid .panel h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.auth-grid .panel .small {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(46, 46, 56, 0.12);
}

.login-input::placeholder {
  color: #475569;
}

.btn-login-yellow {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: #e8e625;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-login-yellow:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 230, 37, 0.3);
}

/* โ”€โ”€ Login Page โ”€โ”€ */
.login-features-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}

.login-hero-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.login-hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 420px;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.login-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(46, 46, 56, 0.1);
  border: 1px solid rgba(46, 46, 56, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  flex: none;
  margin-top: 2px;
}

.login-feature strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.login-feature span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-card-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
}

.login-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
}

.login-logo-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.login-pending-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  margin-bottom: 20px;
}

.login-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}

.login-card-actions a {
  flex: 1;
  text-align: center;
  font-size: 0.88rem;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* โ”€โ”€ Auth Tabs โ”€โ”€ */
.auth-tabs {
  display: flex;
  width: 100%;
  background: var(--surface-faint);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: none;
}

.auth-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.auth-tab.active {
  background: var(--bg-panel);
  color: var(--text-main);
  font-weight: 600;
  border: 1px solid var(--border-soft);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* โ”€โ”€ Auth Form โ”€โ”€ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form.is-hidden {
  display: none;
}

.auth-form label {
  gap: 8px;
}

.auth-form input {
  height: 48px;
  font-size: 0.95rem;
}

@media (max-width: 853px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-shell {
    max-width: 100%;
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .login-features-panel {
    padding: 28px 20px 12px;
  }
  .login-hero-title {
    font-size: 1.5rem;
  }
  .login-hero-sub {
    margin-bottom: 24px;
  }
  .login-features {
    gap: 14px;
  }
  .login-card-panel {
    padding: 28px 20px 36px;
  }
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 0.85rem;
}

.auth-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-links a:hover {
  color: var(--text-main);
}

.auth-links label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-links label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* โ”€โ”€ Landing Page / Hero Section โ”€โ”€ */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 72px);
  padding: 60px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-section .hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
}

.hero-search-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--hover-soft);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.hero-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.2);
}

.hero-search-input::placeholder {
  color: #475569;
}

.hero-btn {
  padding: 14px 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 853px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-search {
    flex-direction: column;
  }
  .hero-btn {
    width: 100%;
  text-align: left;
  }
}

/* โ”€โ”€ Footer โ”€โ”€ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 32px 24px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.footer-desc {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-main);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--text-main);
}

.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 853px) {
  .site-footer {
    padding: 32px 16px 20px;
    margin-top: 48px;
  }
  .footer-container {
    flex-direction: column;
    gap: 32px;
  }
  .footer-brand {
    max-width: 100%;
  }
  .footer-links {
    gap: 40px;
  }
}

/* โ”€โ”€ Docs Page โ”€โ”€ */
.docs-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}

.docs-header {
  margin-bottom: 40px;
}

.docs-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.docs-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.docs-body h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.docs-body h2:first-child {
  margin-top: 0;
}

.docs-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0 0 12px;
}

.docs-body a {
  color: var(--accent);
  text-decoration: none;
}

.docs-body a:hover {
  text-decoration: underline;
}

.docs-body code {
  background: var(--surface-ghost);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.84rem;
  color: var(--accent);
}

.docs-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.step-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

.docs-step strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.docs-step p {
  margin: 0;
}

.docs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.docs-list li {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.docs-list li::before {
  content: "โ€ข";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.docs-list strong {
  color: var(--text-primary);
}

@media (max-width: 853px) {
  .docs-page {
    padding: 100px 16px 40px;
  }
  .docs-header h1 {
    font-size: 1.4rem;
  }
}

/* โ”€โ”€ Account Tab โ”€โ”€ */
.account-info-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.account-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.1);
}

.account-avatar-wrapper {
  position: relative;
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  cursor: pointer;
}

.account-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
  pointer-events: none;
}

.account-avatar-wrapper:hover .account-avatar-overlay {
  opacity: 1;
  pointer-events: auto;
}

.account-avatar-wrapper:hover .account-avatar,
.account-avatar-wrapper:hover .account-avatar-fallback {
  border-color: rgba(99,102,241,0.5);
}

.account-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.2);
  color: #818cf8;
  font-size: 2.8rem;
  font-weight: 700;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  flex-shrink: 0;
}

.account-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-display-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.account-role-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}

.account-role-badge.role-admin {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
}

.account-role-badge.role-user {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}

.label-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.label-hint.is-success {
  color: #86efac;
}

.goal-reset-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(--bg-body, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.goal-reset-panel > div {
  min-width: 0;
  flex: 1 1 0;
}

.goal-reset-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.goal-reset-panel strong {
  display: block;
  color: var(--text-main);
  font-size: 1rem;
}

.goal-reset-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 116px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.goal-reset-button:hover {
  border-color: rgba(251, 191, 36, 0.58);
  background: rgba(251, 191, 36, 0.18);
  color: #fff7d6;
}

.goal-reset-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.goal-reset-button.is-ready {
  border-color: rgba(34, 197, 94, 0.46);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.16);
}

.goal-reset-button.is-ready:hover {
  background: rgba(22, 163, 74, 0.24);
}

@media (max-width: 853px) {
  .account-avatar {
    width: 80px;
    height: 80px;
  }
  .account-avatar-wrapper {
    width: 80px;
    height: 80px;
  }
  .account-avatar-fallback {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
  }
  .account-display-name {
    font-size: 1rem;
  }
}

/* โ”€โ”€ Toggle Row (settings) โ”€โ”€ */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
}

.toggle-row span {
  font-weight: 500;
}

.toggle-input {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
  margin: 0;
}

.toggle-input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.25s ease, background 0.25s ease;
}

.toggle-input:checked {
  background: rgba(99,102,241,0.35);
  border-color: rgba(99,102,241,0.5);
}

.toggle-input:checked::before {
  transform: translateX(18px);
  background: #818cf8;
}

/* โ”€โ”€ Widget Sub-Tabs โ”€โ”€ */
.widget-subtabs {
  display: flex;
  gap: 4px;
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.widget-subtab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: none;
  font-family: inherit;
  min-height: 44px;
}

.widget-subtab:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}

.widget-subtab.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 600;
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 var(--glass-highlight);
}

.widget-subtab.active svg {
  color: var(--accent);
}

.widget-subtab svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.widget-subtab.active svg {
  opacity: 1;
}

.widget-subtab-content.is-hidden {
  display: none;
}

/* โ”€โ”€ Goal Preview (Overlay) โ”€โ”€ */
.goal-preview-widget {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(--bg-body) 0%, rgba(--bg-body) 100%);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.58),
    0 3px 10px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.08);
  min-width: 200px;
  max-width: 280px;
  width: 80%;
  margin: 42px auto auto;
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--goal-font-scale, 1) * 1rem);
  --goal-bar-color: #6366f1;
  --goal-text-color: #f8fafc;
}

.goal-preview-title {
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--goal-text-color);
  opacity: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.72);
}

.goal-preview-bar {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.62);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.86),
    0 1px 0 rgba(255,255,255,0.08);
}

.goal-preview-bar::after {
  content: '';
  position: absolute;
  inset: -45% auto -45% -35%;
  z-index: 1;
  width: 34%;
  transform: translateX(-130%) skewX(-18deg);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.16) 34%,
    rgba(255,255,255,0.62) 50%,
    rgba(255,255,255,0.16) 66%,
    rgba(255,255,255,0) 100%
  );
  filter: blur(0.5px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: goalBarShine 2.8s ease-in-out infinite;
}

.goal-preview-fill {
  position: relative;
  height: 100%;
  border-radius: 6px;
  background: var(--goal-bar-color);
  background-image: linear-gradient(
    90deg,
    var(--goal-bar-color) 0%,
    color-mix(in srgb, var(--goal-bar-color) 70%, white) 50%,
    var(--goal-bar-color) 100%
  );
  background-size: 200% 100%;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  animation: goalBarShimmer 2.5s ease-in-out infinite;
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--goal-bar-color) 72%, transparent),
    inset 0 1px 1px rgba(255,255,255,0.32),
    inset 0 -1px 2px rgba(0,0,0,0.18);
  overflow: hidden;
}

.goal-preview-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-25deg);
  animation: goalBarFillShine 6s infinite;
  pointer-events: none;
  z-index: 2;
}

.goal-preview-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.goal-preview-stats {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.95em;
  font-weight: 800;
  color: var(--goal-text-color);
  text-shadow: 0 2px 7px rgba(0,0,0,0.78);
}

.goal-preview-stats .goal-preview-current {
  font-size: 1em;
  font-weight: 800;
  color: color-mix(in srgb, var(--goal-bar-color) 62%, white);
  text-shadow:
    0 2px 5px rgba(0,0,0,0.86),
    0 0 10px color-mix(in srgb, var(--goal-bar-color) 34%, transparent);
}

.goal-preview-sep {
  opacity: 0.75;
  font-weight: 700;
  margin: 0 1px;
}

.goal-preview-stats .goal-preview-target {
  opacity: 0.92;
  font-weight: 700;
}

/* โ”€โ”€ Goal Preview Styles (Console) โ”€โ”€ */
.goal-preview-widget.goal-style-glass {
  background: linear-gradient(135deg, rgba(200, 200, 202, 0.427) 0%, rgba(200, 200, 202, 0.296) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}
.goal-preview-widget.goal-style-glass .goal-preview-bar {
  background: rgba(0,0,0,0.54);
  border: 1px solid rgba(255,255,255,0.14);
  height: 12px;
}
.goal-preview-widget.goal-style-glass .goal-preview-fill {
  background: linear-gradient(90deg, var(--goal-bar-color), color-mix(in srgb, var(--goal-bar-color) 60%, white));
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--goal-bar-color) 68%, transparent),
    inset 0 1px 1px rgba(255,255,255,0.28);
}

.goal-preview-widget.goal-style-minimal {
  background: var(--bg-body) ;
  border: 1px solid rgba(26, 26, 26, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 10px 12px;
  min-width: 190px;
}
.goal-preview-widget.goal-style-minimal .goal-preview-title {
  font-size: 0.72em;
  letter-spacing: 0.02em;
  opacity: 1;
}
.goal-preview-widget.goal-style-minimal .goal-preview-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.66);
  border: 1px solid rgba(255,255,255,0.14);
}
.goal-preview-widget.goal-style-minimal .goal-preview-fill {
  border-radius: 2px;
  background: var(--goal-bar-color);
  border: 2px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 9px color-mix(in srgb, var(--goal-bar-color) 70%, transparent);
}
.goal-preview-widget.goal-style-minimal .goal-preview-fill::after {
  display: none;
}
.goal-preview-widget.goal-style-minimal .goal-preview-stats {
  font-size: 0.88em;
  gap: 3px;
}
.goal-preview-widget.goal-style-minimal .goal-preview-stats .goal-preview-current {
  font-size: 0.95em;
}

.goal-preview-widget.goal-style-bold {
  border-radius: 16px;
  padding: 18px 22px 20px;
  max-width: 320px;
  width: 90%;
  background: linear-gradient(160deg, rgba(15,15,22,0.9) 0%, rgba(10,10,18,0.85) 100%);
  border: 2px solid color-mix(in srgb, var(--goal-bar-color) 30%, transparent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px color-mix(in srgb, var(--goal-bar-color) 10%, transparent);
}
.goal-preview-widget.goal-style-bold .goal-preview-title {
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.goal-preview-widget.goal-style-bold .goal-preview-bar {
  height: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.goal-preview-widget.goal-style-bold .goal-preview-fill {
  border-radius: 8px;
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 16px var(--goal-bar-color),
    0 0 32px color-mix(in srgb, var(--goal-bar-color) 60%, transparent),
    inset 0 2px 4px rgba(255,255,255,0.15);
}
.goal-preview-widget.goal-style-bold .goal-preview-stats {
  font-size: 1em;
  gap: 6px;
}
.goal-preview-widget.goal-style-bold .goal-preview-stats .goal-preview-current {
  font-size: 1.2em;
}

.goal-preview-widget.goal-style-pill {
  border-radius: 50px;
  padding: 12px 22px 14px;
  max-width: 300px;
  background: linear-gradient(135deg, rgba(7,7,12,0.94) 0%, rgba(18,18,28,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}
.goal-preview-widget.goal-style-pill .goal-preview-bar {
  height: 10px;
  border-radius: 5px;
  background: rgba(0,0,0,0.58);
}
.goal-preview-widget.goal-style-pill .goal-preview-fill {
  border-radius: 4px;
  background: var(--goal-bar-color);
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 16px var(--goal-bar-color),
    0 0 32px color-mix(in srgb, var(--goal-bar-color) 50%, transparent);
}
.goal-preview-widget.goal-style-pill .goal-preview-fill::after {
  display: none;
}
.goal-preview-widget.goal-style-pill .goal-preview-stats {
  font-size: 0.8em;
}
.goal-preview-widget.goal-style-pill .goal-preview-stats .goal-preview-current {
  font-size: 0.9em;
}

.goal-preview-bar-label {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 0.85em;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

.goal-preview-subtitle {
  display: none;
  font-size: 0.7em;
  font-weight: 700;
  color: var(--goal-text-color);
  opacity: 0.9;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.74);
}

.goal-preview-widget.goal-style-rounded {
  border-radius: 0;
  padding: 0;
  max-width: 400px;
  width: 90%;
  margin: 42px auto auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.goal-preview-widget.goal-style-rounded .goal-preview-title {
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 6px;
}
.goal-preview-widget.goal-style-rounded .goal-preview-bar {
  position: relative;
  height: 36px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.66);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 5px rgba(0,0,0,0.85),
    0 4px 14px rgba(0,0,0,0.42);
}
.goal-preview-widget.goal-style-rounded .goal-preview-fill {
  border-radius: 18px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--goal-bar-color) 80%, #121212),
    var(--goal-bar-color),
    color-mix(in srgb, var(--goal-bar-color) 60%, #f1f1f1)
  );
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--goal-bar-color) 70%, transparent),
    inset 0 1px 1px rgba(255,255,255,0.28);
}
.goal-preview-widget.goal-style-rounded .goal-preview-fill::after {
  display: none;
}
.goal-preview-widget.goal-style-rounded .goal-preview-bar-label {
  display: block;
}
.goal-preview-widget.goal-style-rounded .goal-preview-stats {
  display: none;
}
.goal-preview-widget.goal-style-rounded .goal-preview-subtitle {
  display: block;
  margin-top: 6px;
}



@media (prefers-reduced-motion: reduce) {
  .goal-preview-fill {
    animation: none;
  }
  .goal-preview-bar::after {
    animation: none;
    opacity: 0.28;
    transform: translateX(185%) skewX(-18deg);
  }
}

@media (max-width: 853px) {
  .widget-subtab {
    font-size: 0.82rem;
    padding: 10px 10px;
    gap: 6px;
  }
}

/* โ”€โ”€ Donate Goal Widget (Overlay) โ”€โ”€ */
.donate-goal-widget {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: calc(var(--goal-font-scale, 1) * 1rem);
  --goal-bar-color: #6366f1;
  --goal-bar-bg: rgba(0,0,0,0.62);
  --goal-text-color: #f8fafc;
  min-width: 300px;
  max-width: 420px;
  width: 80%;
  padding: 18px 22px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(7,7,12,0.94) 0%, rgba(18,18,28,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.58),
    0 3px 10px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.donate-goal-widget.goal-top-left { top: 24px; left: 24px; }
.donate-goal-widget.goal-top-center { top: 24px; left: 50%; transform: translateX(-50%); }
.donate-goal-widget.goal-top-right { top: 24px; right: 24px; }
.donate-goal-widget.goal-bottom-left { bottom: 24px; left: 24px; }
.donate-goal-widget.goal-bottom-center { bottom: 24px; left: 50%; transform: translateX(-50%); }
.donate-goal-widget.goal-bottom-right { bottom: 24px; right: 24px; }
.donate-goal-widget.goal-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.donate-goal-title {
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--goal-text-color);
  opacity: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.72);
}

.donate-goal-bar {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: var(--goal-bar-bg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.86),
    0 1px 0 rgba(255,255,255,0.08);
}

.donate-goal-bar::after {
  content: '';
  position: absolute;
  inset: -45% auto -45% -35%;
  z-index: 1;
  width: 34%;
  transform: translateX(-130%) skewX(-18deg);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.16) 34%,
    rgba(255,255,255,0.62) 50%,
    rgba(255,255,255,0.16) 66%,
    rgba(255,255,255,0) 100%
  );
  filter: blur(0.5px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: goalBarShine 2.8s ease-in-out infinite;
}

.donate-goal-bar-fill {
  position: relative;
  height: 100%;
  border-radius: 6px;
  background: var(--goal-bar-color);
  background-image: linear-gradient(
    90deg,
    var(--goal-bar-color) 0%,
    color-mix(in srgb, var(--goal-bar-color) 70%, white) 50%,
    var(--goal-bar-color) 100%
  );
  background-size: 200% 100%;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  animation: goalBarShimmer 2.5s ease-in-out infinite;
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--goal-bar-color) 72%, transparent),
    inset 0 1px 1px rgba(255,255,255,0.32),
    inset 0 -1px 2px rgba(0,0,0,0.18);
  overflow: hidden;
}

.donate-goal-bar-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-25deg);
  animation: goalBarFillShine 6s infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes goalBarFillShine {
  0% { left: -100%; opacity: 0; }
  5% { opacity: 1; }
  25% { left: 200%; opacity: 0; }
  100% { left: 200%; opacity: 0; }
}

@keyframes goalBarShimmer {
  0%, 100% { background-position: -100% 0; }
  50% { background-position: 200% 0; }
}

@keyframes goalBarShine {
  0% { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
  12% { opacity: 0; }
  34% { opacity: 0.92; }
  62% { opacity: 0.92; }
  84%, 100% { transform: translateX(390%) skewX(-18deg); opacity: 0; }
}

.donate-goal-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.donate-goal-bar-label {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 0.9em;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  text-shadow:
    0 2px 5px rgba(0,0,0,0.9),
    0 0 2px rgba(0,0,0,0.8);
  pointer-events: none;
}

.donate-goal-subtitle {
  display: none;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--goal-text-color);
  opacity: 0.9;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.74);
}

.donate-goal-stats {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.95em;
  font-weight: 800;
  color: var(--goal-text-color);
  text-shadow: 0 2px 7px rgba(0,0,0,0.78);
}

.donate-goal-stats #goalCurrentDisplay {
  font-size: 1em;
  font-weight: 800;
  color: color-mix(in srgb, var(--goal-bar-color) 62%, white);
  text-shadow:
    0 2px 5px rgba(0,0,0,0.86),
    0 0 10px color-mix(in srgb, var(--goal-bar-color) 34%, transparent);
}

.donate-goal-separator {
  opacity: 0.75;
  font-weight: 700;
  margin: 0 1px;
}

.donate-goal-stats #goalTargetDisplay {
  opacity: 0.92;
  font-weight: 700;
}

@keyframes goalPulse {
  0% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.2), 0 0 0 0 color-mix(in srgb, var(--goal-bar-color) 40%, transparent); }
  50% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.2), 0 0 24px 6px color-mix(in srgb, var(--goal-bar-color) 25%, transparent); }
  100% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.2), 0 0 0 0 color-mix(in srgb, var(--goal-bar-color) 0%, transparent); }
}

.donate-goal-widget.goal-pulse {
  animation: goalPulse 0.7s ease-out;
}

/* โ”€โ”€ Goal Style: Glass โ”€โ”€ */
.donate-goal-widget.goal-style-glass {
  background: linear-gradient(135deg, rgba(200, 200, 202, 0.427) 0%, rgba(200, 200, 202, 0.296) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}
.donate-goal-widget.goal-style-glass .donate-goal-bar {
  background: rgba(35, 27, 27, 0.54);
  border: 1px solid rgba(255,255,255,0.14);
  height: 12px;
}
.donate-goal-widget.goal-style-glass .donate-goal-bar-fill {
  background: linear-gradient(90deg, var(--goal-bar-color), color-mix(in srgb, var(--goal-bar-color) 60%, white));
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--goal-bar-color) 68%, transparent),
    inset 0 1px 1px rgba(255,255,255,0.28);
}

/* โ”€โ”€ Goal Style: Minimal โ”€โ”€ */
.donate-goal-widget.goal-style-minimal {
  background: var(--bg-body) ;
  border: 1px solid rgba(26, 26, 26, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 10px 12px;
  min-width: 190px;
}
.donate-goal-widget.goal-style-minimal .donate-goal-title {
  font-size: 0.72em;
  letter-spacing: 0.02em;
  opacity: 1;
}
.donate-goal-widget.goal-style-minimal .donate-goal-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.66);
  border: 1px solid rgba(255,255,255,0.14);
}
.donate-goal-widget.goal-style-minimal .donate-goal-bar-fill {
  border-radius: 2px;
  background: var(--goal-bar-color);
  border: 2px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 9px color-mix(in srgb, var(--goal-bar-color) 70%, transparent);
}
.donate-goal-widget.goal-style-minimal .donate-goal-bar-fill::after {
  display: none;
}
.donate-goal-widget.goal-style-minimal .donate-goal-stats {
  font-size: 0.88em;
  gap: 3px;
}
.donate-goal-widget.goal-style-minimal .donate-goal-stats #goalCurrentDisplay {
  font-size: 0.95em;
}

/* โ”€โ”€ Goal Style: Bold โ”€โ”€ */
.donate-goal-widget.goal-style-bold {
  border-radius: 16px;
  padding: 18px 22px 20px;
  max-width: 320px;
  width: 90%;
  background: linear-gradient(160deg, rgba(15,15,22,0.9) 0%, rgba(10,10,18,0.85) 100%);
  border: 2px solid color-mix(in srgb, var(--goal-bar-color) 30%, transparent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px color-mix(in srgb, var(--goal-bar-color) 10%, transparent);
}
.donate-goal-widget.goal-style-bold .donate-goal-title {
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.donate-goal-widget.goal-style-bold .donate-goal-bar {
  height: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.donate-goal-widget.goal-style-bold .donate-goal-bar-fill {
  border-radius: 8px;
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 16px var(--goal-bar-color),
    0 0 32px color-mix(in srgb, var(--goal-bar-color) 60%, transparent),
    inset 0 2px 4px rgba(255,255,255,0.15);
}
.donate-goal-widget.goal-style-bold .donate-goal-stats {
  font-size: 1em;
  gap: 6px;
}
.donate-goal-widget.goal-style-bold .donate-goal-stats #goalCurrentDisplay {
  font-size: 1.2em;
}

/* โ”€โ”€ Goal Style: Pill โ”€โ”€ */
.donate-goal-widget.goal-style-pill {
  border-radius: 50px;
  padding: 12px 22px 14px;
  max-width: 300px;
  background: linear-gradient(135deg, rgba(7,7,12,0.94) 0%, rgba(18,18,28,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}
.donate-goal-widget.goal-style-pill .donate-goal-bar {
  height: 10px;
  border-radius: 5px;
  background: rgba(0,0,0,0.58);
}
.donate-goal-widget.goal-style-pill .donate-goal-bar-fill {
  border-radius: 4px;
  background: var(--goal-bar-color);
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 16px var(--goal-bar-color),
    0 0 32px color-mix(in srgb, var(--goal-bar-color) 50%, transparent);
}
.donate-goal-widget.goal-style-pill .donate-goal-bar-fill::after {
  display: none;
}
.donate-goal-widget.goal-style-pill .donate-goal-stats {
  font-size: 0.8em;
}
.donate-goal-widget.goal-style-pill .donate-goal-stats #goalCurrentDisplay {
  font-size: 0.9em;
}

/* โ”€โ”€ Goal Style: Rounded โ”€โ”€ */
.donate-goal-widget.goal-style-rounded {
  border-radius: 0;
  padding: 0;
  max-width: 400px;
  width: 90%;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.donate-goal-widget.goal-style-rounded .donate-goal-title {
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 6px;
}
.donate-goal-widget.goal-style-rounded .donate-goal-bar {
  position: relative;
  height: 36px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.66);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 5px rgba(0,0,0,0.85),
    0 4px 14px rgba(0,0,0,0.42);
}
.donate-goal-widget.goal-style-rounded .donate-goal-bar-fill {
  border-radius: 18px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--goal-bar-color) 80%, #121212),
    var(--goal-bar-color),
    color-mix(in srgb, var(--goal-bar-color) 60%, #f1f1f1)
  );
  border: 3px solid color-mix(in srgb, var(--goal-bar-color) 40%, white);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--goal-bar-color) 70%, transparent),
    inset 0 1px 1px rgba(255,255,255,0.28);
}
.donate-goal-widget.goal-style-rounded .donate-goal-bar-fill::after {
  display: none;
}
.donate-goal-widget.goal-style-rounded .donate-goal-bar-label {
  display: block;
  font-size: 1.05em;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.693);
}
.donate-goal-widget.goal-style-rounded .donate-goal-stats {
  display: none;
}
.donate-goal-widget.goal-style-rounded .donate-goal-subtitle {
  display: block;
  margin-top: 6px;
}



@media (prefers-reduced-motion: reduce) {
  .donate-goal-bar-fill {
    animation: none;
  }
  .donate-goal-bar::after {
    animation: none;
    opacity: 0.28;
    transform: translateX(185%) skewX(-18deg);
  }
  .donate-goal-widget.goal-pulse {
    animation: none;
  }
}

/* โ”€โ”€ Banner Crop Modal โ”€โ”€ */
.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.crop-modal[hidden] { display: none; }

.crop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.crop-modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  max-height: calc(100vh - 32px);
  background: var(--bg-panel, #1a1a2e);
  border: 1px solid var(--border-soft, rgba(255,255,255,0.08));
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popInModal 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

@keyframes popInModal {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft, rgba(255,255,255,0.08));
}
.crop-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main, #fff);
}
.crop-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: none;
}
.crop-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main, #fff);
  transform: scale(1.05);
}

/* โ”€โ”€ Preview Shell โ”€โ”€ */
.crop-preview-shell {
  padding: 28px 28px 0;
}

.crop-phone-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
  border-bottom: none;
}
.crop-phone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

/* โ”€โ”€ Viewport โ”€โ”€ */
.crop-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 200;
  background: #0a0a0c;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 0 0 12px 12px;
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
}
.crop-viewport:active { cursor: grabbing; }

.crop-image-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.crop-image-wrap img {
  display: block;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  will-change: transform;
}

/* โ”€โ”€ Rule-of-thirds grid โ”€โ”€ */
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 0 0 12px 12px;
}
.crop-grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
}
.crop-grid-v { width: 1px; top: 0; bottom: 0; }
.crop-grid-v:nth-child(1) { left: 33.33%; }
.crop-grid-v:nth-child(2) { left: 66.66%; }
.crop-grid-h { height: 1px; left: 0; right: 0; }
.crop-grid-h:nth-child(3) { top: 33.33%; }
.crop-grid-h:nth-child(4) { top: 66.66%; }

.crop-label {
  text-align: center;
  padding: 12px 0 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* โ”€โ”€ Zoom โ”€โ”€ */
.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}
.crop-zoom-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
}
.crop-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-main, #fff);
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.1s ease;
}
.crop-zoom-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}
.crop-zoom-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-main, #fff);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* โ”€โ”€ Actions โ”€โ”€ */
.crop-modal-actions {
  display: flex;
  gap: 16px;
  padding: 16px 28px 28px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}
.crop-modal-actions button {
  flex: 1;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
}

@media (max-width: 860px) {
  .crop-modal-content { max-width: 600px; }
}

@media (max-width: 560px) {
  .crop-modal-content { max-width: 100%; border-radius: 16px; }
  .crop-preview-shell { padding: 16px 16px 0; }
  .crop-zoom-row { padding: 12px 16px; }
  .crop-modal-actions { padding: 12px 16px 20px; gap: 10px; }
}

/* โ”€โ”€ Toggle Switch โ”€โ”€ */
.toggle-label {
  display: flex !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  user-select: none;
}

.toggle-label--card {
  gap: 0;
  margin-left: auto;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #666;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.toggle-input:checked + .toggle-switch {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}

.toggle-input:checked + .toggle-switch::after {
  transform: translateX(20px);
  background: #10b981;
}

/* โ”€โ”€ Payment Grid โ”€โ”€ */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .payment-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .payment-grid {
    grid-template-columns: 1fr;
  }
}

.payment-card {
  background: rgba(--bg-body);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.payment-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.payment-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.payment-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-card-icon--truemoney {
  background: rgba(255, 107, 53, 0.12);
  color: #ff6b35;
  border: 1px solid rgba(255, 107, 53, 0.2);
}

.payment-card-icon--promptpay {
  background: rgba(41, 41, 41, 0.12);
  color: #f5f5f5;
  border: 1px solid rgba(30, 30, 30, 0.2);
}

.payment-card-icon--bank {
  background: rgba(79, 195, 247, 0.12);
  color: #4fc3f7;
  border: 1px solid rgba(79, 195, 247, 0.2);
}

.payment-card-title-group {
  flex: 1;
  min-width: 0;
}

.payment-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.3;
}

.payment-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.payment-card-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  max-height: 600px;
  opacity: 1;
}

.payment-card-body.is-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

/* Expand / Edit button */
.payment-card-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: none;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-card-expand:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.payment-card-expand svg {
  transition: transform 0.3s ease;
}

.payment-card.is-open .payment-card-expand svg {
  transform: rotate(180deg);
}

.payment-card.is-open .payment-card-expand {
  color: var(--text-main);
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Card actions */
.payment-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.payment-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: rgba(171, 170, 170, 0.9);
  color: #252626;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.payment-save-btn:hover {
  background: rgb(253, 253, 253);
  transform: translateY(-1px);
}

/* โ”€โ”€ PromptPay QR Auto-Scan โ”€โ”€ */
.pp-qr-scan-divider,
.pp-qr-paste-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}
.pp-qr-scan-divider span,
.pp-qr-paste-divider span {
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.pp-qr-scan-divider::before,
.pp-qr-scan-divider::after,
.pp-qr-paste-divider::before,
.pp-qr-paste-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.pp-qr-scan-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(var(--glass-tint), 0.4);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pp-qr-scan-zone:hover {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.03);
}
.pp-qr-scan-zone.dragover {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.08);
}
.pp-qr-scan-zone svg {
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}
.pp-qr-scan-zone span {
  line-height: 1.4;
}
.pp-qr-scan-zone span u {
  color: var(--accent-color);
  text-decoration: underline;
  cursor: pointer;
}

.pp-qr-scan-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  width: 100%;
  text-align: center;
  justify-content: center;
}
.pp-qr-scan-status--ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.pp-qr-scan-status--err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.pp-qr-scan-status--loading {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.pp-qr-paste-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(var(--glass-tint), 0.5);
  color: var(--text-main);
  font-size: 0.72rem;
  font-family: monospace;
  resize: vertical;
  min-height: 44px;
  outline: none;
  transition: border-color 0.2s;
}
.pp-qr-paste-input:focus {
  border-color: var(--accent-color);
}
.pp-qr-paste-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* โ”€โ”€ Dashboard Overview โ”€โ”€ */
.dash-range-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 20px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.dash-range-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(var(--glass-tint), 0.3);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.dash-range-btn:hover {
  border-color: var(--accent-color);
  color: var(--text-main);
}
.dash-range-btn.active {
  background: var(--accent-color);
  color: #000000;
  border-color: var(--accent-color);
}
.dash-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.dash-custom-range span {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.dash-date-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(var(--glass-tint), 0.5);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  width: 140px;
  flex-shrink: 0;
}
.dash-date-input:focus {
  border-color: var(--accent-color);
}
.dash-apply-btn {
  padding: 8px 24px;
  border-radius: 8px;
  border: none;
  background: var(--accent-color);
  color: #000000;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  height: 36px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.dash-apply-btn:hover { opacity: 0.85; }

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dash-stats-grid {
    grid-template-columns: 1fr;
  }
}
.dash-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dash-stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.dash-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}
.dash-stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.dash-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.dash-section {
  background: rgba(var(--glass-tint), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-section-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.dash-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  background: rgba(var(--glass-tint), 0.2);
  border-radius: 12px;
  padding: 12px;
}
.dash-chart-sm {
  height: 220px;
}

.dash-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.dash-grid-2col > * {
  min-width: 0;
}

.dash-channel-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.dash-legend-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.dash-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}
.dash-legend-label {
  color: var(--text-main);
  flex: 1;
}
.dash-legend-val {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.82rem;
}

.dash-top-donors {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dash-donor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-donor-row:last-child { border-bottom: none; }
.dash-donor-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(var(--glass-tint), 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-donor-name {
  flex: 1;
  color: var(--text-main);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-donor-count {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.dash-donor-total {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.88rem;
  white-space: nowrap;
}

.dash-recent-table-wrap {
  overflow-x: auto;
}
.dash-recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.dash-recent-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-recent-table td {
  padding: 10px 12px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-recent-table tr:last-child td { border-bottom: none; }
.dash-td-name {
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-td-amount {
  font-weight: 600;
  white-space: nowrap;
}
.dash-td-msg {
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-td-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.dash-pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2col { grid-template-columns: 1fr; }
  .dash-range-controls { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .dash-stats-grid { grid-template-columns: 1fr; }
}

