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

/* =========================================================
   BLACKOUT — painel web
   Soft depth · frosted surfaces · refined red/orange accent
   ========================================================= */

:root {
  --bg-deep: #07070a;
  --bg-primary: #0b0b10;
  --bg-secondary: rgba(255, 255, 255, 0.03);
  --bg-tertiary: rgba(255, 255, 255, 0.05);
  --bg-elevated: rgba(255, 255, 255, 0.07);
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(18, 18, 24, 0.72);
  --bg-glass-strong: rgba(14, 14, 20, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(239, 68, 68, 0.35);
  --text-primary: #f4f4f5;
  --text-secondary: rgba(244, 244, 245, 0.62);
  --text-muted: rgba(244, 244, 245, 0.38);
  --accent: #ef4444;
  --accent-hover: #f87171;
  --accent-glow: rgba(239, 68, 68, 0.28);
  --accent-soft: rgba(239, 68, 68, 0.12);
  --accent-pink: #ef4444;
  --accent-deep: #b91c1c;
  --accent-orange: #f97316;
  --accent-orange-hover: #fb923c;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fb923c;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-pink: 0 8px 32px rgba(239, 68, 68, 0.15);
  --glass: blur(20px) saturate(140%);
  --transition: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sidebar-w: 268px;
  --header-h: 60px;
  --content-max: 1080px;
}

html[data-theme="light"] {
  --bg-deep: #f4f4f5;
  --bg-primary: #fafafa;
  --bg-secondary: rgba(0, 0, 0, 0.03);
  --bg-tertiary: rgba(0, 0, 0, 0.05);
  --bg-elevated: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-glass-strong: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(220, 38, 38, 0.3);
  --text-primary: #18181b;
  --text-secondary: rgba(24, 24, 27, 0.62);
  --text-muted: rgba(24, 24, 27, 0.4);
  --accent: #dc2626;
  --accent-hover: #ef4444;
  --accent-glow: rgba(220, 38, 38, 0.15);
  --accent-soft: rgba(220, 38, 38, 0.08);
  --accent-orange: #ea580c;
  --shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-pink: 0 8px 24px rgba(220, 38, 38, 0.1);
  --glass: blur(16px) saturate(140%);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; font-size: 15px; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: 0.9em; }

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(239, 68, 68, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 35% 25% at 10% 60%, rgba(239, 68, 68, 0.04) 0%, transparent 50%);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(239, 68, 68, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(249, 115, 22, 0.04) 0%, transparent 50%);
}

/* ========== APP SHELL ========== */
.app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* Top header mobile */
.top-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 300;
  background: var(--bg-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}
.top-header-left, .top-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.top-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}
.menu-toggle, .theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.menu-toggle:hover, .theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: var(--border-light);
}
.hamburger { display: flex; flex-direction: column; gap: 5px; width: 16px; }
.hamburger .bar {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: var(--transition);
}
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* Sidebar — glass panel */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-glass-strong);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.sidebar-header {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  margin-bottom: 2px;
  border: 1px solid transparent;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--border-accent);
}
.nav-item.active svg { opacity: 1; color: var(--accent); }

.nav-section { margin-top: 18px; }
.nav-section-title {
  display: block;
  padding: 8px 12px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-tag {
  font-size: 11px;
  color: var(--text-muted);
}
.btn-logout {
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  transition: var(--transition);
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 150;
}

/* Main content */
.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px 44px 72px;
  max-width: calc(var(--content-max) + 88px);
  position: relative;
}
.main-content.full {
  margin-left: 0;
  max-width: none;
  padding: 0;
}

/* ========== PAGE HEADER ========== */
.page-header { margin-bottom: 32px; }
.page-header.with-back {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--text-primary);
}
.page-desc, .page-header .page-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}
.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition);
  margin-top: 2px;
  backdrop-filter: blur(8px);
}
.btn-back:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* ========== BUTTONS ========== */
.btn-primary, .btn-secondary, .btn-lg, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform 0.12s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}
.btn-primary {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 4px 16px rgba(239, 68, 68, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #fca5a5 0%, #f87171 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 20px rgba(239, 68, 68, 0.35);
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-light);
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}
.btn-lg {
  padding: 13px 24px;
  font-size: 14px;
  border-radius: 10px;
}
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-sm:hover { border-color: var(--border-light); background: var(--bg-elevated); }
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-light); }

/* ========== LANDING ========== */
.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  position: relative;
}
.landing::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg, rgba(239,68,68,0.25), rgba(249,115,22,0.15), rgba(239,68,68,0.05), rgba(239,68,68,0.25));
  filter: blur(100px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.landing-content {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  text-align: center;
  padding: 40px 32px;
  background: var(--bg-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.landing-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 24px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.landing h1 {
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
html[data-theme="light"] .landing h1 {
  background: linear-gradient(180deg, #18181b 30%, rgba(24,24,27,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.landing-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}
.landing-contains {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.landing-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.landing-features .feature,
.feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.feature:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--accent-soft);
}
.feature-icon {
  display: flex;
  color: var(--accent);
  opacity: 0.95;
}
.feature-icon svg { width: 14px; height: 14px; }
.landing .btn-primary { min-width: 210px; }

/* ========== GUILD GRID ========== */
.guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.guild-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color var(--transition), background var(--transition), transform 0.15s, box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.guild-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-pink);
  transform: translateY(-1px);
}
.guild-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guild-icon-fallback {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}
.guild-info { flex: 1; min-width: 0; }
.guild-info h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guild-members {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.guild-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity var(--transition), transform var(--transition), color var(--transition);
}
.guild-card:hover .guild-arrow {
  opacity: 1;
  color: var(--accent);
  transform: translateX(3px);
}

/* ========== TABS ========== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  overflow-x: auto;
  backdrop-filter: blur(8px);
}
.tab-btn {
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fade-up 0.28s ease;
}
.tab-content.active .config-form {
  animation: fade-up 0.32s ease;
}

/* ========== FORMS ========== */
.config-form {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Each section is a glass panel — Raycast density */
.form-section {
  margin-bottom: 0;
  padding: 20px 22px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-section:hover {
  border-color: var(--border-light);
}
.form-section:last-of-type {
  margin-bottom: 0;
}
.form-section h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-section.misc-panel-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.form-group { margin-bottom: 14px; min-width: 0; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="color"],
.form-group select,
.form-group textarea,
.layout-type-select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
html[data-theme="light"] .form-group input[type="text"],
html[data-theme="light"] .form-group input[type="url"],
html[data-theme="light"] .form-group input[type="number"],
html[data-theme="light"] .form-group select,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .layout-type-select {
  background: rgba(255,255,255,0.8);
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}
.form-group select,
.layout-type-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--border-light);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(0,0,0,0.35);
}
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}
.section-hint code,
.form-group code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9em;
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 14px 18px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  bottom: 16px;
  z-index: 20;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
}

/* Switch */
.switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}
.slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch input:checked + .slider {
  background: var(--accent) !important;
  border-color: var(--accent);
}
.switch input:checked + .slider::before {
  transform: translateX(18px);
  background: #fff;
}

.color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-input, input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 3px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  -webkit-appearance: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  border-radius: 4px;
}

.multi-select, select[multiple] {
  min-height: 120px;
  width: 100%;
  padding: 8px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}
.multi-select:focus {
  border-color: rgba(239, 68, 68, 0.5);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.button-row, .automsg-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 10px;
}

/* ========== EMPTY / ERROR ========== */
.empty-state, .error-page {
  text-align: center;
  padding: 64px 24px;
  max-width: 400px;
  margin: 0 auto;
}
.empty-icon, .error-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.7;
}
.empty-state h3, .error-page h1 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.empty-state p, .error-page p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ========== TOAST ========== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in 0.25s ease;
  border: 1px solid transparent;
  max-width: 360px;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
}
.toast.success {
  background: rgba(6, 40, 25, 0.9);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}
.toast.error {
  background: rgba(50, 10, 10, 0.9);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.25);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hide { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
.toast-icon { margin-right: 6px; }
.toast-msg { flex: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== DYNAMIC LISTS ========== */
.dynamic-list { display: flex; flex-direction: column; gap: 10px; }
.dynamic-item {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.dynamic-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.dynamic-item-title { font-size: 13px; font-weight: 600; }
.dynamic-item-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-remove-item {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}
.btn-remove-item:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-add-item { margin-top: 4px; }

.online-players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.online-player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}
.online-player-chip .ago {
  color: var(--text-muted);
  font-size: 11px;
}

/* Emoji cards */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.emoji-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.emoji-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
}
.emoji-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.emoji-card img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.emoji-card .emoji-meta { flex: 1; min-width: 0; }
.emoji-card .emoji-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emoji-card .emoji-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
}
.emoji-card .emoji-trash {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.emoji-card .emoji-trash:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}
.emoji-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Preview */
.embed-preview, .preview-box {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  backdrop-filter: blur(10px);
}
.preview-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(10px);
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Tables */
.data-table, .logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .logs-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
.data-table td, .logs-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.data-table tr:hover td, .logs-table tr:hover td {
  background: rgba(255,255,255,0.02);
}
.logs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
}
.logs-table { font-size: 12px; }
.logs-table tr:last-child td { border-bottom: none; }
.log-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Premium cards */
.premium-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
}
.premium-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.premium-card-head strong {
  font-size: 14px;
  font-weight: 600;
}

.coupon-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 12px;
}
.coupon-row .c-code {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-primary);
}
.coupon-row .c-value,
.coupon-row .c-used,
.coupon-row .c-max { color: var(--text-muted); }

.layout-mode-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  line-height: 1.45;
}

.item-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--bg-glass-strong);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .top-header { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.5);
  }
  .sidebar-overlay.open { display: block; }
  .main-content {
    margin-left: 0;
    padding: 84px 20px 48px;
  }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-content { padding: 76px 16px 40px; }
  .page-header h1 { font-size: 20px; }
  .guilds-grid { grid-template-columns: 1fr; }
  .landing { padding: 32px 16px; }
  .landing-content { padding: 32px 20px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary { width: 100%; }
  .dynamic-item-fields { grid-template-columns: 1fr; }
  .coupon-row { grid-template-columns: 1fr; }
  #toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (max-width: 400px) {
  .landing h1 { font-size: 26px; }
}

body.sidebar-open { overflow: hidden; }
@media (min-width: 901px) {
  body.sidebar-open { overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }

.sidebar-nav::-webkit-scrollbar,
.online-players-list::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb,
.online-players-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.main-content:not(.full) > .page-header {
  animation: fade-up 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .main-content:not(.full) > .page-header { animation: none; }
}

/* ========== DASHBOARD DEPTH PASS ========== */

/* Soft stage behind content */
.main-content:not(.full)::before {
  content: '';
  position: fixed;
  inset: 0;
  left: var(--sidebar-w);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 80% 0%, rgba(239, 68, 68, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 100%, rgba(249, 115, 22, 0.04) 0%, transparent 45%);
}
@media (max-width: 900px) {
  .main-content:not(.full)::before { left: 0; }
}

/* Page header as glass strip */
.page-header.with-back,
.page-header:not(.with-back) {
  padding-bottom: 4px;
}
.page-header h1 {
  background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,0.72) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
html[data-theme="light"] .page-header h1 {
  background: linear-gradient(180deg, #18181b 40%, rgba(24,24,27,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Nav items more Raycast-like */
.nav-item {
  position: relative;
}
.nav-item.active {
  box-shadow: 0 0 0 1px var(--border-accent), 0 4px 16px rgba(239, 68, 68, 0.08);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

/* Switch row inside glass cards */
.form-section .form-row {
  padding: 4px 0;
}
.form-section .switch-label small,
.form-section small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* Inline flex helpers used via style= in guild.ejs */
.form-group[style*="display:flex"],
div[style*="display:flex"] {
  gap: 8px;
}
input[style*="font-family:var(--mono)"],
input[style*="font-family:monospace"],
textarea[style*="font-family:var(--mono)"] {
  font-family: var(--mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.01em;
}

/* Primary action emphasis in sticky bar */
.form-actions .btn-primary {
  min-width: 140px;
}

/* Config form children that aren't form-section (raw groups) */
.config-form > .form-group {
  padding: 16px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

/* Select / channel pickers wider feel */
.form-group select,
.layout-type-select {
  border-radius: 10px;
}

/* Textareas feel like Raycast code fields */
.form-group textarea {
  border-radius: 10px;
  min-height: 110px;
  line-height: 1.55;
}

/* Nested lists inside sections */
.form-section .dynamic-item {
  background: rgba(0,0,0,0.22);
  border-color: var(--border);
}
html[data-theme="light"] .form-section .dynamic-item {
  background: rgba(255,255,255,0.6);
}

/* Online chips inside panels */
.form-section .online-player-chip {
  background: rgba(255,255,255,0.04);
}

/* Logs table inside glass */
.logs-table-wrap {
  border-radius: 12px;
  overflow: hidden;
}

/* Owner pages share same form language */
.main-content .config-form {
  max-width: 760px;
}

/* Better empty guild state */
.empty-state {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  padding: 48px 28px;
}

/* Sidebar brand glow */
.sidebar-header .logo-icon {
  box-shadow: 0 0 0 1px var(--border), 0 4px 16px rgba(239, 68, 68, 0.15);
}

/* Scrollbar on main */
.main-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* Hover lift on secondary buttons */
.btn-secondary:active { transform: scale(0.98); }

/* Divider-like section spacing when multiple forms on page */
.tab-content .config-form + .config-form {
  margin-top: 20px;
}

/* Ensure sticky actions don't collide on mobile */
@media (max-width: 640px) {
  .form-actions {
    bottom: 10px;
    padding: 12px;
    flex-direction: column;
  }
  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
  }
  .form-section {
    padding: 16px;
  }
  .nav-item.active::before {
    display: none;
  }
}

/* Light theme glass adjustments */
html[data-theme="light"] .form-section,
html[data-theme="light"] .form-actions,
html[data-theme="light"] .guild-card,
html[data-theme="light"] .landing-content,
html[data-theme="light"] .empty-state {
  background: rgba(255, 255, 255, 0.72);
}
html[data-theme="light"] .form-section .dynamic-item {
  background: rgba(0,0,0,0.03);
}

/* Página inicial */
.rx-landing {
  --landing-width: 1120px;
  --landing-gutter: max(24px, calc((100% - var(--landing-width)) / 2));
  --landing-text: #f8f4f2;
  --landing-muted: #aca1a9;
  --landing-line: #282029;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: #0b090e;
  color: var(--landing-text);
}

.rx-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.rx-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
}
.rx-orb-a {
  width: 800px;
  height: 480px;
  top: -288px;
  left: 52%;
  transform: translateX(-50%) rotate(-12deg);
  background: linear-gradient(110deg, #49253c 10%, #622637 55%, #311722 86%);
  opacity: 0.72;
}
.rx-orb-b {
  width: 500px;
  height: 240px;
  top: 275px;
  right: -250px;
  background: #78424d;
  opacity: 0.16;
}
.rx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(219, 167, 181, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 167, 181, 0.09) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 58% 48% at 52% 12%, #000 6%, transparent 98%);
}

.rx-nav {
  padding: 0 var(--landing-gutter);
  border-bottom: 1px solid var(--landing-line);
}
.rx-nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.035em;
}
.rx-brand-icon { width: 32px; height: 32px; }

.rx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, filter 0.15s;
}
.rx-btn-ghost {
  color: var(--landing-text);
  background: #18131b;
  border-color: #3e323c;
}
.rx-btn-ghost:hover { background: #2d222b; border-color: #5c4550; }
.rx-btn-primary {
  color: #211016;
  background: linear-gradient(120deg, #ffb192, #ff8593);
  border-color: #ffc1ad;
  box-shadow: 0 4px 26px rgba(255, 121, 143, 0.17);
}
.rx-btn-primary:hover { filter: brightness(1.12); }
.rx-landing a:focus-visible { outline: 2px solid #ffc2a7; outline-offset: 4px; }
.rx-btn-lg { min-height: 48px; padding-inline: 20px; font-size: 14px; }

.rx-hero {
  padding: clamp(60px, 8.5vw, 124px) var(--landing-gutter) clamp(48px, 7vw, 96px);
  text-align: center;
}
.rx-title {
  max-width: 13em;
  margin: 0 auto 20px;
  color: var(--landing-text);
  font-size: clamp(36px, 6.2vw, 80px);
  font-weight: 800;
  letter-spacing: -0.069em;
  line-height: 1.07;
  text-wrap: balance;
}
.rx-title-accent {
  color: #ff9a91;
  background: linear-gradient(105deg, #ffc3a4 4%, #ff8092 88%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rx-lead {
  max-width: 36em;
  margin: 0 auto 28px;
  color: var(--landing-muted);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.65;
  text-wrap: pretty;
}
.rx-cta { display: flex; justify-content: center; }

.rx-features { padding: 0 var(--landing-gutter) 58px; }
.rx-features-inner { border-top: 1px solid var(--landing-line); padding-top: 25px; }
.rx-features h2 {
  margin-bottom: 17px;
  color: var(--landing-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.rx-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.rx-feature {
  padding: 19px;
  border: 1px solid #2e2630;
  border-radius: 13px;
  background: linear-gradient(150deg, #19131c, #131017 82%);
}
.rx-feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: #ffaaa0;
  background: #291923;
  border: 1px solid #4e2e3a;
  border-radius: 10px;
}
.rx-feature-icon svg { display: block; }
.rx-feature h3 { margin-bottom: 6px; color: var(--landing-text); font-size: 15px; font-weight: 750; }
.rx-feature p { color: var(--landing-muted); font-size: 13px; line-height: 1.57; }

.rx-footer {
  margin-top: auto;
  padding: 16px var(--landing-gutter) 20px;
  border-top: 1px solid var(--landing-line);
  color: var(--landing-muted);
  font-size: 13px;
  font-weight: 600;
}
.rx-footer-brand { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 760px) {
  .rx-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .rx-landing { --landing-gutter: 16px; }
  .rx-nav-inner { min-height: 62px; }
  .rx-feature-grid { gap: 9px; }
  .rx-feature { padding: 13px; }
  .rx-feature-icon { margin-bottom: 12px; }
  .rx-features { padding-bottom: 36px; }
}
@media (max-width: 340px) {
  .rx-feature-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-btn { transition: none; }
}

.main-content.full:has(.rx-landing) {
  padding-inline: 0 !important;
}
.main-content.full {
  padding: 0;
}

/* ========== FUNCIONALIDADES TAB ========== */
#tab-funcionalidades { min-width: 0; width: 100%; }
#tab-funcionalidades .config-form { max-width: 760px; width: 100%; min-width: 0; }
#tab-funcionalidades .form-section { min-width: 0; max-width: 100%; }
#tab-funcionalidades .logs-table-wrap { display: block; min-width: 0; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
#tab-funcionalidades .logs-table { width: 100%; }
#tab-funcionalidades .section-hint { overflow-wrap: anywhere; }
#tab-funcionalidades .feature-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#tab-funcionalidades input[readonly] { background: var(--bg-tertiary); font-family: var(--mono); font-size: 22px; font-weight: 600; padding-block: 16px; }
.feature-intro { display: flex; align-items: center; gap: 14px; padding: 4px 0 10px; min-width: 0; }
.feature-intro-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--border-accent); border-radius: 13px; color: var(--accent); background: var(--accent-soft); }
.feature-intro strong { font-size: 17px; letter-spacing: -.02em; }
.feature-intro p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
#tab-funcionalidades input[readonly] {
  opacity: 0.9;
  cursor: default;
}
@media (max-width: 640px) {
  #tab-funcionalidades .form-grid { grid-template-columns: 1fr; }
  #tab-funcionalidades .form-actions { flex-direction: column; }
  #tab-funcionalidades .form-actions .btn-primary,
  #tab-funcionalidades .form-actions .btn-secondary { width: 100%; }
}

/* ========== ACESSO ========== */
.access-tabs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.access-tab-chip {
  padding: 8px 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  font-size: 13px;
}
.access-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.access-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.access-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.access-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.access-meta strong {
  font-size: 14px;
}

/* ========== FUNCIONALIDADES MOBILE FIX ========== */
@media (max-width: 900px) {
  #tab-funcionalidades .config-form {
    max-width: 100% !important;
    width: 100% !important;
  }
  #tab-funcionalidades .form-section {
    padding: 16px !important;
  }
  #tab-funcionalidades .form-grid {
    grid-template-columns: 1fr !important;
  }
  #tab-funcionalidades input:not([type="checkbox"]):not([type="radio"]),
  #tab-funcionalidades select,
  #tab-funcionalidades textarea {
    font-size: 16px !important; /* evita zoom iOS + legível */
    min-height: 44px;
  }
  #tab-funcionalidades label {
    font-size: 14px !important;
  }
  #tab-funcionalidades h3 {
    font-size: 13px !important;
  }
  #tab-funcionalidades .form-actions {
    position: static !important;
    flex-direction: column;
    gap: 8px;
  }
  #tab-funcionalidades .form-actions button {
    width: 100%;
  }
  #tab-funcionalidades .logs-table {
    font-size: 13px;
  }
  .main-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100%;
    max-width: 100%;
  }
}

/* ==================== ABA RECIBOS ==================== */
.rcpt-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.rcpt-subtab {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.rcpt-subtab:hover { border-color: var(--border-light); color: var(--text-primary); }
.rcpt-subtab.active {
  background: var(--accent-soft);
  border-color: var(--border-accent);
  color: var(--accent);
}
.rcpt-mobile-toggle { display: none; }

/* grid editor + prévia */
.rcpt-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
  align-items: start;
}
.rcpt-preview-col { position: sticky; top: 16px; }
.rcpt-preview-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.rcpt-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.rcpt-preview-box img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  background-image:
    linear-gradient(45deg, rgba(128,128,128,.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(128,128,128,.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(128,128,128,.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(128,128,128,.12) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  min-height: 120px;
}

/* campos */
.rcpt-wide { grid-column: 1 / -1; }
.rcpt-field-hint {
  background: var(--bg-tertiary);
  border-radius: 50%;
  padding: 1px 7px;
  cursor: help;
  font-size: 11px;
}
.rcpt-color { display: flex; gap: 8px; align-items: center; }
.rcpt-color input[type=color] {
  width: 42px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  padding: 2px;
  cursor: pointer;
  flex: none;
}
.rcpt-hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: lowercase;
}
.rcpt-discord-row { display: flex; gap: 8px; }
.rcpt-discord-row input { flex: 1; min-width: 0; }

/* dinheiro */
.rcpt-money-row { display: flex; flex-direction: column; gap: 6px; }
.rcpt-money-tag { font-size: 11px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rcpt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.rcpt-badge-ok { background: rgba(34,197,94,.14); color: #4ade80; border-color: rgba(34,197,94,.35); }
.rcpt-badge-warn { background: rgba(245,158,11,.14); color: #fbbf24; border-color: rgba(245,158,11,.35); }
.rcpt-badge-err { background: rgba(239,68,68,.14); color: #f87171; border-color: rgba(239,68,68,.35); }
.rcpt-mini-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.rcpt-mini-btn:hover { color: var(--text-primary); border-color: var(--border-light); }
.rcpt-mini-btn[disabled] { opacity: .4; cursor: default; }
.rcpt-mini-danger:hover { color: #f87171; border-color: rgba(239,68,68,.45); }

/* itens */
.rcpt-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rcpt-item-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 90px 110px;
  gap: 8px;
  align-items: center;
}
.rcpt-item-total {
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
}
.rcpt-item-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* variáveis */
.rcpt-variables { display: flex; flex-wrap: wrap; gap: 6px; }
.rcpt-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.rcpt-chip code { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 11px; }
.rcpt-chip span { font-size: 11px; opacity: .8; }
.rcpt-chip:hover { border-color: var(--border-accent); color: var(--text-primary); }

/* listas (modelos/rascunhos/recibos) */
.rcpt-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  flex-wrap: wrap;
}
.rcpt-list-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rcpt-list-sub { font-size: 12px; color: var(--text-muted); }
.rcpt-list-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.rcpt-record {
  display: flex;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--bg-secondary);
  flex-wrap: wrap;
}
.rcpt-record-thumb {
  width: 96px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d0d12;
  object-fit: contain;
  flex: none;
}
.rcpt-record-body { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.rcpt-record-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rcpt-record-total { margin-left: auto; font-weight: 800; }
.rcpt-sends { display: flex; flex-direction: column; gap: 4px; }
.rcpt-send-row { font-size: 12px; color: var(--text-secondary); }
.rcpt-send-row a { color: var(--accent); text-decoration: none; }
.rcpt-err-detail { color: #f87171; font-size: 12px; }

/* diálogo de envio */
.rcpt-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
/* hidden precisa vencer o display:flex acima (senão o modal fica sempre visível) */
.rcpt-dialog-backdrop[hidden] { display: none; }
.rcpt-dialog {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.rcpt-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rcpt-dialog-head h3 { margin: 0; }
.rcpt-send-channels { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.rcpt-guild-name { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.rcpt-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 6px 6px 0;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.rcpt-channel-chip.on { border-color: var(--border-accent); background: var(--accent-soft); color: var(--accent); }
.rcpt-channel-chip.off { opacity: .55; cursor: not-allowed; }
.rcpt-channel-chip input { accent-color: var(--accent); }
.rcpt-channel-chip small { font-size: 10px; color: #fbbf24; }
.rcpt-send-result {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.rcpt-send-result a { color: var(--accent); }
.rcpt-send-result .rcpt-mini-btn { margin-left: auto; }

/* toast info */
.toast-info { border-left-color: #38bdf8; }

/* botão ocupado */
button.busy { opacity: .65; pointer-events: none; }

/* responsivo */
@media (max-width: 1100px) {
  .rcpt-create-grid { grid-template-columns: 1fr; }
  .rcpt-preview-col { position: static; order: -1; }
}
@media (max-width: 700px) {
  .rcpt-item-grid { grid-template-columns: 1fr 90px; }
  .rcpt-item-grid .rcpt-item-total { grid-column: 1 / -1; }
  .rcpt-mobile-toggle {
    display: inline-block;
    margin-left: auto;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    color: var(--accent);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }
  body.rcpt-preview-only .rcpt-editor-col { display: none; }
  body.rcpt-preview-only .rcpt-preview-col { order: 0; }
  body:not(.rcpt-preview-only) .rcpt-preview-col { display: none; }
  .rcpt-record-thumb { width: 72px; }
}

/* Remaster: cada aba respeita a largura disponível, inclusive tabelas longas. */
.ui-icon { display: inline-block; flex: 0 0 auto; vertical-align: -.2em; }
.ui-icon-wrap, [data-ui-icon] { display: inline-flex; align-items: center; justify-content: center; }
.ui-icon-wrap { margin-inline-end: 4px; }
.rcpt-subtab, .rcpt-mobile-toggle, .rcpt-mini-btn { align-items: center; justify-content: center; gap: 7px; }
.rcpt-subtab, .rcpt-mini-btn { display: inline-flex; }
.rcpt-subtab { min-height: 42px; }
#rcpt-root { width: 100%; min-width: 0; }
#rcpt-root [hidden] { display: none !important; }
.rcpt-editor-col, .rcpt-preview-col, .rcpt-create-grid, .rcpt-editor-col > *, #rcpt-editor, #rcpt-editor > *, .rcpt-dialog { min-width: 0; }
.rcpt-editor-col { display: flex; flex-direction: column; gap: 16px; }
#rcpt-editor { display: flex; flex-direction: column; gap: 16px; }
#rcpt-view-modelos > .form-section, #rcpt-view-salvos > .form-section { margin-bottom: 16px; }
#rcpt-root .section-hint { line-height: 1.65; overflow-wrap: anywhere; margin-bottom: 12px; color: var(--text-secondary); }
#rcpt-root .form-section h3, #tab-funcionalidades .form-section h3 { color: var(--text-secondary); }
#tab-funcionalidades .section-hint { color: var(--text-secondary); }
#rcpt-root .form-grid > .form-row { align-self: start; padding-block: 9px; }
#rcpt-root .switch-label { gap: 12px; width: 100%; }
#rcpt-root .switch-label > span:first-child { min-width: 0; }
#rcpt-root .switch { flex: 0 0 40px; }
#rcpt-root .form-actions { position: static; margin-top: 12px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
.rcpt-template-editor { border-color: var(--border-accent); background: linear-gradient(135deg, var(--accent-soft), var(--bg-glass)); }
.rcpt-template-card { align-items: flex-start; padding: 16px; gap: 14px; }
.rcpt-template-card .rcpt-list-main { flex: 1 1 220px; }
.rcpt-template-title { display: flex; align-items: center; gap: 9px; color: var(--text-primary); }
.rcpt-template-title > .ui-icon { color: var(--accent); }
.rcpt-template-title strong, .rcpt-list-sub, .rcpt-share-code { overflow-wrap: anywhere; }
.rcpt-share-code { color: var(--accent); font-size: 11px; letter-spacing: .04em; padding: 6px 0 1px; user-select: all; }
.rcpt-import-section h3 { display: flex; align-items: center; gap: 8px; }
.rcpt-import-row { display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.rcpt-import-row > input { flex: 1 1 auto; min-width: 0; font-family: var(--mono); }
.rcpt-import-row > button { flex: 0 0 auto; }
#rcpt-image-format, #rcpt-background-settings-section { scroll-margin-top: 80px; }
.rcpt-background-upload { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-secondary); min-width: 0; }
.rcpt-background-thumb, .rcpt-background-empty { width: 100%; aspect-ratio: 16 / 10; border-radius: 9px; border: 1px solid var(--border); object-fit: cover; }
.rcpt-background-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; text-align: center; color: var(--text-secondary); background: var(--accent-soft); font-size: 12px; border-style: dashed; }
.rcpt-background-empty .ui-icon { width: 28px; height: 28px; color: var(--accent); }
.rcpt-background-controls { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; min-width: 0; }
.rcpt-background-controls .section-hint { margin: 0 !important; font-size: 11px; }
.rcpt-range-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.rcpt-range-head label { margin-bottom: 0; }
.rcpt-range-head output { flex-shrink: 0; color: var(--accent); font-family: var(--mono); font-size: 12px; }
#rcpt-root input.rcpt-range { display: block; width: 100%; min-height: 38px; margin: 0; padding: 0; accent-color: var(--accent); background: transparent; cursor: pointer; }
.rcpt-style-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rcpt-style-option { padding: 10px; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-secondary); color: var(--text-secondary); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.rcpt-style-option:hover, .rcpt-style-option.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text-primary); }
.rcpt-style-option > span:last-child { display: block; margin-top: 9px; font-size: 11px; font-weight: 600; }
.rcpt-style-sample { display: flex; min-height: 68px; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; border-radius: 8px; border: 1px solid rgba(139,92,246,.45); background: rgba(139,92,246,.13); color: #e9ddff; }
.rcpt-style-sample small { font-size: 8px; letter-spacing: .06em; }
.rcpt-style-sample b { font-size: 16px; align-self: flex-end; white-space: nowrap; }
.rcpt-sample-solido { background: #6d28d9; border-color: #8b5cf6; color: #fff; }
.rcpt-sample-gradiente { background: linear-gradient(115deg, #7c3aed, #db2777); border-color: #a78bfa; color: #fff; }
.rcpt-sample-contorno { background: transparent; border-color: #a78bfa; }
.rcpt-sample-minimalista { background: transparent; border: 0; border-bottom: 1px solid #a78bfa; border-radius: 0; }
.rcpt-sample-centralizado { text-align: center; background: rgba(139,92,246,.22); }
.rcpt-sample-centralizado b { align-self: center; }
.rcpt-mini-btn { min-height: 36px; min-width: 36px; }
.rcpt-record-body { min-width: 0; flex-basis: 220px; }
.rcpt-record, .rcpt-list-row, .rcpt-dialog-backdrop { max-width: 100%; }
.rcpt-preview-head .section-hint { font-size: 11px; }
.toast-success { background: rgba(6,40,25,.95); color: #6ee7b7; border-color: rgba(52,211,153,.25); }
.toast-error { background: rgba(50,10,10,.95); color: #fca5a5; border-color: rgba(248,113,113,.25); }
.toast-info { background: var(--bg-glass-strong); color: var(--text-primary); border-color: var(--border); }
@media (min-width: 1101px) and (max-width: 1350px) {
  .rcpt-create-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); }
  .rcpt-item-grid { grid-template-columns: minmax(0, 1fr) 80px; }
}
@media (max-width: 900px) {
  #tab-funcionalidades .feature-summary-grid { grid-template-columns: minmax(0, 1fr) !important; }
  #tab-funcionalidades .logs-table { min-width: 560px; font-size: 12px; }
  #tab-funcionalidades .logs-table-wrap { border-radius: 10px; border: 1px solid var(--border); }
  #tab-funcionalidades .switch-label { min-width: 0; gap: 12px; }
  #tab-funcionalidades .switch { flex-shrink: 0; }
  #tab-funcionalidades button { min-height: 44px; white-space: normal; }
  #rcpt-root .form-group input:not([type="color"]):not([type="checkbox"]), #rcpt-root .form-group select, #rcpt-root textarea { min-height: 44px; max-width: 100%; font-size: 16px; }
}
@media (max-width: 700px) {
  .rcpt-subtabs { gap: 6px; }
  .rcpt-subtab { flex: 1 1 auto; padding: 10px; font-size: 12px; }
  .rcpt-mobile-toggle { display: inline-flex; width: 100%; margin-left: 0; min-height: 42px; }
  #rcpt-root .form-section { padding: 16px; }
  .rcpt-style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rcpt-import-row { flex-direction: column; }
  .rcpt-background-upload { grid-template-columns: minmax(0, 1fr); }
  .rcpt-background-thumb, .rcpt-background-empty { max-height: 180px; }
  .rcpt-list-actions { gap: 6px; width: 100%; }
  .rcpt-list-actions .btn-secondary, .rcpt-list-actions .btn-primary { flex: 1 1 auto; padding-inline: 10px; white-space: normal; }
  .rcpt-item-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 90px); }
  #rcpt-root .btn-primary, #rcpt-root .btn-secondary { white-space: normal; min-height: 42px; }
  .rcpt-dialog-backdrop { padding: 12px; }
  .rcpt-dialog { max-height: calc(100dvh - 24px); }
}
