/* ==========================================================================
   Arynox QR Platform Stylesheet
   ==========================================================================
   Author: Arynox IT Services

   Purpose:
   Main application stylesheet for the QR platform UI.

   Structure:
   01. Theme Variables
   02. Reset & Base
   03. Layout
   04. Header / Navigation
   05. Typography
   06. Reusable Components 
   07. Forms
   08. Alerts
   09. Buttons
   10. Tables
   11. Home Page
   12. QR Builder / Preview
   13. Dashboard / Projects
   14. Pricing
   15. Billing
   16. Help Page
   17. Admin Plans
   18. Utilities / Special Components
   19. Responsive Rules
   20. API
   ========================================================================== */

/* ==========================================================================
   01. Theme Variables
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111b31;
  --panel-muted: #16233b;
  --surface: #1a2740;
  --surface-2: #21314f;
  --text: #ecf3ff;
  --text-soft: #c7d3eb;
  --muted: #93a4c3;
  --line: rgba(143, 165, 198, 0.16);
  --line-strong: rgba(143, 165, 198, 0.28);
  --primary: #14b8a6;
  --primary-strong: #0f9c8d;
  --primary-soft: rgba(20, 184, 166, 0.14);
  --secondary: #5b7cff;
  --secondary-soft: rgba(91, 124, 255, 0.14);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --white: #ffffff;
  --shadow-lg: 0 24px 80px rgba(2, 8, 23, 0.42);
  --shadow-md: 0 14px 36px rgba(2, 8, 23, 0.26);
  --shadow-sm: 0 8px 24px rgba(2, 8, 23, 0.18);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1240px;
  --header-bg: rgba(9, 14, 26, 0.82);
  --page-glow:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(91, 124, 255, 0.12), transparent 28%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef3f8;
  --bg-soft: #f6f9fc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --panel-muted: #eef4fb;
  --surface: #f2f6fb;
  --surface-2: #e7eef7;
  --text: #16253f;
  --text-soft: #304461;
  --muted: #62748f;
  --line: rgba(40, 58, 87, 0.12);
  --line-strong: rgba(40, 58, 87, 0.22);
  --primary: #12b3a2;
  --primary-strong: #0f9688;
  --primary-soft: rgba(18, 179, 162, 0.12);
  --secondary: #4f6cf6;
  --secondary-soft: rgba(79, 108, 246, 0.1);
  --success: #1ea855;
  --warning: #d8890b;
  --danger: #dc3f46;
  --shadow-lg: 0 30px 80px rgba(30, 47, 74, 0.12);
  --shadow-md: 0 16px 40px rgba(30, 47, 74, 0.1);
  --shadow-sm: 0 10px 24px rgba(30, 47, 74, 0.08);
  --header-bg: rgba(255, 255, 255, 0.75);
  --page-glow:
    radial-gradient(circle at top left, rgba(18, 179, 162, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(79, 108, 246, 0.08), transparent 28%);
}

/* ==========================================================================
   02. Reset & Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-glow), linear-gradient(180deg, var(--bg-soft), var(--bg));
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(127, 138, 161, 0.12);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 8px;
}

/* ==========================================================================
   03. Layout
   ========================================================================== */

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.page {
  padding: 28px 0 56px;
}

.grid.two,
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid.compact {
  gap: 14px;
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.page-section {
  margin-top: 24px;
}

/* ==========================================================================
   04. Header / Navigation
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #06251f;
  background: linear-gradient(135deg, var(--primary), #76e4d8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--shadow-sm);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-menu a {
  padding: 10px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: 0.18s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav.is-mobile-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav.is-mobile-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.is-mobile-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   05. Typography
   ========================================================================== */

.hero h1,
h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 12px;
}

.lead {
  font-size: 16px;
  color: var(--text-soft);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
  padding: 10px;
}

.hero-eyebrow,
.eyebrow {
  display: block;
  width: max-content;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(20, 184, 166, 0.18);
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   06. Reusable Components
   ========================================================================== */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.card.compact-card {
  padding: 18px;
}

.subtle-card {
  background: var(--panel-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.badge,
.pill {
  display: block;
  width: max-content;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.pill.success {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
}

.pill.info {
  color: var(--secondary);
  background: rgba(91, 124, 255, 0.1);
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.list-clean li {
  padding: 15px 14px;
  border-radius: 14px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
}

.home-list-clean li {
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
}

.kpi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

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

.stat-box {
  background: var(--panel-muted);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.stat-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-box strong {
  font-size: clamp(18px, 3vw, 24px);
  letter-spacing: -0.04em;
}

.stats-compact .stat-box strong {
  font-size: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-actions,
.search-form,
.search-form-wide,
.admin-subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.search-form input,
.search-form-wide input {
  min-width: 280px;
}

.search-form-wide select {
  width: auto;
  min-width: 140px;
}

.admin-subnav {
  margin-bottom: 22px;
  padding: 12px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.admin-subnav a {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
}

.admin-main-nav {
  margin-bottom: 24px;
}

.admin-settings-shell {
  margin-bottom: 20px;
}

.admin-settings-head {
  margin-bottom: 14px;
}

.admin-settings-head h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 38px);
}

.admin-settings-nav {
  background: var(--panel-muted);
}

.html-editor-card {
  display: grid;
  gap: 16px;
}

.html-editor-shell {
  display: grid;
  gap: 14px;
}

.html-editor-tabs,
.html-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.html-editor-tabs .btn.is-active {
  background: var(--primary-soft);
  border-color: rgba(20, 184, 166, 0.32);
  color: var(--primary);
}

.html-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.html-editor-visual,
.html-editor-preview,
.html-editor-card textarea {
  min-height: 320px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.html-editor-visual:focus,
.html-editor-card textarea:focus {
  outline: none;
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.html-editor-visual h1,
.html-editor-visual h2,
.html-editor-visual h3,
.html-editor-preview h1,
.html-editor-preview h2,
.html-editor-preview h3 {
  margin-top: 0;
  padding-top: 2px;
}

.html-source-label {
  margin-top: 14px;
}

.html-editor-shell.is-html-mode .html-editor-visual {
  opacity: 0.55;
}

.contact-page {
  display: grid;
  gap: 22px;
}

.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.contact-hero-meta {
  height: 100%;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.contact-side-card {
  position: sticky;
  top: 96px;
}

/* ==========================================================================
   07. Forms
   ========================================================================== */

label {
  display: block;
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

input[type="range"] {
  padding: 0;
  background: transparent;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: var(--primary);
}

input[type="color"] {
  min-height: 54px;
  padding: 6px;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

.auth-wrap {
  display: flex;
  justify-content: center;
}

.form-card {
  width: min(540px, 100%);
}

.form-card h1 {
  font-size: 34px;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}


.builder-save-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-save-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-form {
  display: block;
}

.profile-form label {
  display: block;
  margin-bottom: 6px;
}

.profile-form input {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.profile-form-actions {
  display: block;
  margin-top: 18px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 2px 0;
  font-weight: 600;
  color: var(--text-soft);
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

/* ==========================================================================
   08. Alerts
   ========================================================================== */

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.alert.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

.alert.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   09. Buttons
   ========================================================================== */

.btn {
  display: block;
  width: max-content;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  transition: 0.18s ease;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.btn.primary {
  color: #06251f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #70e0d4);
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.18);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-strong), #5ed8cb);
}

.btn.secondary {
  background: var(--secondary-soft);
  color: var(--secondary);
  border-color: rgba(91, 124, 255, 0.18);
}

.btn.info {
  background: rgba(14, 165, 233, 0.12);
  color: #0b72a5;
  border-color: rgba(14, 165, 233, 0.24);
}

.btn.edit {
  background: rgba(34, 197, 94, 0.12);
  color: #15753a;
  border-color: rgba(34, 197, 94, 0.26);
}

:root[data-theme="dark"] .btn.info {
  color: #8fd9ff;
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(56, 189, 248, 0.34);
}

:root[data-theme="dark"] .btn.edit {
  color: #9ae6b4;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.34);
}

.btn.ghost {
  background: var(--panel-muted);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.18);
  color: #5f1015;
  border-color: rgba(239, 68, 68, 0.28);
  font-weight: 800;
}

:root[data-theme="dark"] .btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ffd3d6;
  border-color: rgba(248, 113, 113, 0.35);
}

.small-btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.compact-btn {
  font-size: 0.82rem;
  padding: 0.58rem 0.7rem;
  white-space: nowrap;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.file-input-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* ==========================================================================
   10. Tables
   ========================================================================== */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table tr:hover td {
  background: rgba(127, 138, 161, 0.04);
}

.admin-table-wrap,
.help-table-wrap {
  overflow-x: auto;
}

.help-table td:first-child,
.help-table th:first-child {
  min-width: 120px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   11. Home Page
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.hero-single {
  grid-template-columns: 1fr;
}

.hero-panel {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.hero-panel-full {
  width: 100%;
}

.home-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.home-summary-grid .summary-tile {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  min-height: 0;
}

.home-summary-grid .summary-tile strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  margin-top: 4px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.home-summary-grid .summary-tile p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.home-summary-grid-vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

.home-summary-grid-vertical .summary-tile {
  padding: 20px 22px;
}

.home-usecase-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.home-usecase-stats .stat-box {
  padding: 18px;
  border-radius: 18px;
  text-align: center;
}

.home-usecase-stats .stat-box span {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.home-usecase-stats .stat-box strong {
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-feature-grid .subtle-card {
  padding: 18px;
}

.home-feature-grid .subtle-card h3 {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.home-feature-grid .subtle-card p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

.hero-image-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 24px;
}

.hero-image-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px;
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(73, 144, 226, 0.18), rgba(99, 102, 241, 0.10));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-image-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(8, 15, 32, 0.02), rgba(8, 15, 32, 0.22));
  pointer-events: none;
  z-index: 1;
}

.hero-image-card img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 184px;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 12px;
  box-sizing: border-box;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.hero-image-card:hover img {
  transform: scale(1.02);
  filter: brightness(1.02);
}

/* ==========================================================================
   12. QR Builder / Preview
   ========================================================================== */

.qr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(350px, 0.8fr);
  gap: 22px;
}

.preview-card {
  position: sticky;
  top: 96px;
  height: fit-content;
}

.qr-preview-shell {
  min-height: 430px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 245, 249, 1));
  border-radius: 24px;
  padding: 26px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

:root[data-theme="dark"] .qr-preview-shell {
  background: linear-gradient(180deg, #ffffff, #edf2f7);
}

.qr-preview-box {
  width: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.preview-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.dynamic-preview-notice {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-radius: 14px;
  background: rgba(254, 242, 242, 0.92);
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

:root[data-theme="dark"] .dynamic-preview-notice {
  background: rgba(127, 29, 29, 0.16);
  border-color: rgba(248, 113, 113, 0.26);
  color: #fca5a5;
}

.qr-builder-header {
  margin-bottom: 20px;
}

.builder-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.summary-tile {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.summary-tile strong {
  display: block;
  font-size: 22px;
  margin-top: 6px;
  letter-spacing: -0.03em;
}

.builder-shell {
  display: grid;
  gap: 18px;
}

.builder-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--panel-strong);
}

:root[data-theme="light"] .builder-section {
  background: var(--panel-strong);
}

.builder-section-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.builder-step {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--secondary), #8194ff);
  color: white;
  font-weight: 800;
}

.builder-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 8px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.builder-tab {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
}

.builder-tab.is-active {
  background: var(--panel-strong);
  border-color: var(--line);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.style-grid-top-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.style-grid-corners {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.brand-mark {
  height: 75px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
  margin-left: 30px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.style-grid-logo-size {
  grid-template-columns: minmax(0, 1fr);
}

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

.style-span-2 {
  grid-column: span 2;
}

.toggle-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.toggle-card input {
  width: auto;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.preset-button {
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--text);
}

.preset-button span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.preset-button.is-active {
  border-color: rgba(20, 184, 166, 0.35);
  background: var(--primary-soft);
}

.swatch-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.swatch-row .chip {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow-sm);
}

.chip-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chip-input-body {
  flex: 1;
}

.chip-input input[type="color"] {
  width: 60px;
  min-width: 60px;
}

.style-picker-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-muted);
}

.tile-picker {
  display: grid;
  gap: 12px;
}

.logo-tile-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.corner-tile-grid {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.tile-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 98px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tile-option:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.tile-option.is-active {
  border-color: rgba(91, 124, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.12);
  background: var(--primary-soft);
}

.tile-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tile-visual {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  overflow: hidden;
}

.tile-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.tile-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.logo-mark {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-none .logo-mark {
  font-size: 32px;
  line-height: 1;
}

.logo-preset-link .tile-visual { background: #9333EA; color: #fff; }
.logo-preset-location .tile-visual { background: #EA4335; color: #fff; }
.logo-preset-email .tile-visual { background: #F4B400; color: #fff; }
.logo-preset-whatsapp .tile-visual { background: #4CAF50; color: #fff; }
.logo-preset-wifi .tile-visual { background: #1E88E5; color: #fff; }
.logo-preset-contact .tile-visual { background: #1565C0; color: #fff; }
.logo-preset-paypal .tile-visual { background: #fff; color: #1E3A8A; }
.logo-preset-bitcoin .tile-visual { background: #F59E0B; color: #fff; }
.logo-preset-scan-frame .tile-visual,
.logo-preset-scan-text .tile-visual,
.logo-preset-menu .tile-visual,
.logo-preset-app .tile-visual {
  background: #fff;
  color: #111;
  font-size: 12px;
}

.tile-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tile-visual.marker-border,
.tile-visual.marker-center {
  width: 54px;
  height: 54px;
  border: none;
  background: transparent;
  border-radius: 0;
}

.marker-border {
  position: relative;
  width: 38px;
  height: 38px;
  border: 6px solid #2f3b59;
  background: transparent;
  border-radius: 6px;
}

.marker-center-preview {
  position: absolute;
  inset: 9px;
  background: #2f3b59;
  border-radius: 3px;
}

.marker-border-rounded { border-radius: 12px; }
.marker-border-dot { border-radius: 999px; }
.marker-border-extra-rounded,
.marker-border-soft-square { border-radius: 16px; }

.marker-border-classy,
.marker-border-leaf {
  border-top-left-radius: 6px;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 18px;
  transform: rotate(-4deg);
}

.marker-border-classy-rounded,
.marker-border-leaf-alt,
.marker-border-soft-arch {
  border-top-left-radius: 18px;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 6px;
}

.marker-border-frame-dot::after {
  content: none;
}
.marker-border-bevel { clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%); }
.marker-border-octagon { clip-path: polygon(28% 0, 72% 0, 100% 28%, 100% 72%, 72% 100%, 28% 100%, 0 72%, 0 28%); }
.marker-border-squircle { border-radius: 22px; }
.marker-border-diamond-frame { clip-path: polygon(50% 0, 92% 8%, 100% 50%, 92% 92%, 50% 100%, 8% 92%, 0 50%, 8% 8%); }
.marker-border-notched { clip-path: polygon(16% 0, 84% 0, 100% 16%, 100% 84%, 84% 100%, 16% 100%, 0 84%, 0 16%, 10% 16%, 16% 10%, 84% 10%, 90% 16%, 90% 84%, 84% 90%, 16% 90%, 10% 84%); }
.marker-border-shield { clip-path: polygon(20% 0, 80% 0, 100% 22%, 100% 72%, 74% 100%, 26% 100%, 0 72%, 0 22%); }
.marker-border-ticket { border-radius: 12px; clip-path: polygon(0 0, 100% 0, 100% 40%, 92% 50%, 100% 60%, 100% 100%, 0 100%, 0 60%, 8% 50%, 0 40%); }

.marker-center {
  width: 34px;
  height: 34px;
  background: #2f3b59;
}

.marker-center-square { border-radius: 3px; }
.marker-center-rounded-square { border-radius: 9px; }
.marker-center-dot,
.marker-center-half-dot { border-radius: 999px; }
.marker-center-rough-square { border-radius: 5px; clip-path: polygon(8% 0, 100% 8%, 92% 100%, 0 92%); }
.marker-center-tilt { transform: rotate(-6deg); }
.marker-center-leaf { border-radius: 50% 40% 50% 40%; }
.marker-center-leaf-alt { border-radius: 40% 50% 40% 50%; }
.marker-center-burst { clip-path: polygon(50% 0, 62% 18%, 82% 8%, 78% 30%, 100% 36%, 82% 50%, 100% 64%, 78% 70%, 82% 92%, 62% 82%, 50% 100%, 38% 82%, 18% 92%, 22% 70%, 0 64%, 18% 50%, 0 36%, 22% 30%, 18% 8%, 38% 18%); }
.marker-center-star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.marker-center-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.marker-center-cross-x { clip-path: polygon(18% 0, 50% 32%, 82% 0, 100% 18%, 68% 50%, 100% 82%, 82% 100%, 50% 68%, 18% 100%, 0 82%, 32% 50%, 0 18%); }
.marker-center-plus { clip-path: polygon(36% 0, 64% 0, 64% 36%, 100% 36%, 100% 64%, 64% 64%, 64% 100%, 36% 100%, 36% 64%, 0 64%, 0 36%, 36% 36%); }
.marker-center-clover { border-radius: 45% 45% 45% 45%; clip-path: polygon(50% 10%, 67% 23%, 83% 17%, 90% 34%, 77% 50%, 90% 66%, 83% 83%, 67% 77%, 50% 90%, 33% 77%, 17% 83%, 10% 66%, 23% 50%, 10% 34%, 17% 17%, 33% 23%); }
.marker-center-petal { clip-path: polygon(50% 0, 70% 20%, 100% 50%, 70% 80%, 50% 100%, 30% 80%, 0 50%, 30% 20%); }
.marker-center-heart { clip-path: path('M 50 88 C 20 66 6 48 6 28 C 6 12 18 0 34 0 C 43 0 50 4 50 12 C 50 4 57 0 66 0 C 82 0 94 12 94 28 C 94 48 80 66 50 88 Z'); }
.marker-center-octagon { clip-path: polygon(28% 0, 72% 0, 100% 28%, 100% 72%, 72% 100%, 28% 100%, 0 72%, 0 28%); }
.marker-center-squircle { border-radius: 14px; }

@supports not (clip-path: path('M0,0')) {
  .marker-center-heart {
    clip-path: polygon(50% 90%, 0 40%, 15% 10%, 35% 10%, 50% 28%, 65% 10%, 85% 10%, 100% 40%);
  }
}

.qr-dynamic-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#resetBuilderButton {
    margin-left: auto;
}
/* ==========================================================================
   13. Dashboard / Projects
   ========================================================================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.billing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel-muted);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.project-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 245, 249, 1));
  padding: 18px;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.project-body h3 {
  margin: 0 0 8px;
}

.project-body .muted.small {
  overflow-wrap: anywhere;
}

.project-body p.muted.small {
  margin: 0 0 0.2rem 0;
  line-height: 1.25;
  padding: 0;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.project-actions .btn {
  min-width: 118px;
}

.project-actions-stacked {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.project-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.project-actions-row-center {
  grid-template-columns: 1fr;
  justify-items: center;
}

.project-actions-row .btn,
.project-actions-row .inline-form,
.project-actions-row .inline-form .btn {
  width: 100%;
}

.project-actions-row .btn,
.project-actions-row .inline-form .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.project-actions-row-center .inline-form {
  width: auto;
}

.project-actions-row-center .inline-form .btn {
  min-width: 140px;
}

.dashboard-projects-card {
  margin-top: 1.5rem;
}

.qr-admin-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.qr-thumb-link {
  display: inline-flex;
}

.qr-thumb-link:hover .qr-admin-thumb {
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   14. Pricing
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.pricing-card {
  min-width: 0;
  height: 100%;
}

.pricing-card .project-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.pricing-card .btn {
  margin-top: auto;
  align-self: center;
}

.price-line {
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
  margin: 8px 0 16px;
  letter-spacing: -0.04em;
}

.price-line span {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.feature-list {
  margin: 0 0 18px;
  padding-left: 20px;
}

.pricing-card.pricing-current {
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.18);
}

.plan-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.chart-list {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 108px 1fr 44px;
  gap: 12px;
  align-items: center;
}

.chart-label {
  color: var(--muted);
  font-size: 13px;
}

.chart-bar-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 16px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
}

/* ==========================================================================
   15. Billing
   ========================================================================== */

.billing-page .stats.stats-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.billing-page .stat-box {
  min-width: 0;
}

.billing-page .stat-box strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.billing-page .pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.billing-page .pricing-card {
  min-width: 0;
}

.billing-page .pricing-card .project-body {
  min-width: 0;
}

.billing-page .pricing-card .btn {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  padding: 12px 14px;
}

.billing-page .price-line {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.billing-page .feature-list li,
.billing-page .muted,
.billing-page .small,
.billing-page .table td,
.billing-page .table th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.billing-history-mobile {
  display: none;
}

.billing-history-list {
  display: grid;
  gap: 14px;
}

.billing-history-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-muted);
}

.billing-history-item h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.billing-history-meta {
  display: grid;
  gap: 10px;
}

.billing-history-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.billing-history-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.billing-history-row strong,
.billing-history-row div {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}


.billing-plan-action {
  margin-top: 12px;
}

/* ==========================================================================
   16. Help Page
   ========================================================================== */

.help-search-section {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.help-search-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.help-search-heading h2 {
  margin: 6px 0 8px;
}

.help-search-heading .muted {
  margin: 0;
}

.help-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.help-layout > * {
  min-width: 0;
}

.help-nav {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  scrollbar-width: thin;
}

.help-nav h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.help-nav .help-search-status {
  margin-bottom: 14px;
}

.help-nav-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.help-nav-search-wide {
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: stretch;
}

.help-search-input {
  width: 100%;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--text);
  font-size: 15px;
}

.help-search-clear {
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--text-soft);
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
}

.help-search-clear:disabled {
  opacity: 0.55;
  cursor: default;
}

.help-search-clear:hover,
.help-search-clear:focus-visible,
.help-search-input:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.help-search-status {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.help-nav nav {
  display: grid;
  gap: 10px;
}

.help-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
  color: var(--text-soft);
  transition: 0.18s ease;
}

.help-nav a:hover,
.help-nav a.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}


.help-nav.is-searching {
  border-color: rgba(18, 179, 162, 0.26);
  box-shadow: 0 18px 36px rgba(18, 179, 162, 0.08);
}

.help-nav.is-searching h2 {
  color: var(--primary-strong);
}

.help-nav.is-searching a {
  background: var(--primary-soft);
  border-color: rgba(18, 179, 162, 0.22);
  color: var(--primary-strong);
}

.help-nav.is-searching a:hover,
.help-nav.is-searching a.is-active {
  background: rgba(18, 179, 162, 0.18);
  border-color: rgba(18, 179, 162, 0.32);
  color: var(--text);
}

.help-section-hidden {
  display: none !important;
}

.help-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.help-layout > * {
  min-width: 0;
}

.help-content {
  min-width: 0;
}

.help-section,
.help-section .card,
.help-section .subtle-card,
.help-section .grid,
.help-section .grid-2 {
  min-width: 0;
}

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

.help-section {
  scroll-margin-top: 96px;
}

.help-hero {
  margin-bottom: 0;
}

.help-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.example-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 14px;
}

.help-code-block,
.code-display-block {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(79, 108, 246, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 24px rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: normal;
  overflow-wrap: anywhere;
  tab-size: 2;
}

:root[data-theme="dark"] .help-code-block,
:root[data-theme="dark"] .code-display-block {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(18, 28, 48, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 24px rgba(2, 6, 23, 0.38);
  color: #e2e8f0;
}

.help-code-block code,
.code-display-block code {
  display: block;
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  white-space: pre-wrap;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  color: inherit;
}

.help-code-block[data-code-language]::before,
.code-display-block[data-code-language]::before {
  content: attr(data-code-language);
  display: block;
  width: max-content;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(79, 108, 246, 0.12);
  border: 1px solid rgba(79, 108, 246, 0.14);
  color: #3556d6;
  font: 700 11px/1.1 Inter, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[data-theme="dark"] .help-code-block[data-code-language]::before,
:root[data-theme="dark"] .code-display-block[data-code-language]::before {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

.help-code-block .token-key,
.code-display-block .token-key { color: #1d4ed8; }
.help-code-block .token-string,
.code-display-block .token-string { color: #047857; }
.help-code-block .token-number,
.code-display-block .token-number { color: #7c3aed; }
.help-code-block .token-boolean,
.code-display-block .token-boolean,
.help-code-block .token-null,
.code-display-block .token-null { color: #b45309; }
.help-code-block .token-tag,
.code-display-block .token-tag,
.help-code-block .token-angle,
.code-display-block .token-angle { color: #c2410c; }
.help-code-block .token-attr,
.code-display-block .token-attr { color: #7c2d12; }
.help-code-block .token-value,
.code-display-block .token-value { color: #0369a1; }
.help-code-block .token-comment,
.code-display-block .token-comment { color: #64748b; font-style: italic; }
.help-code-block .token-command,
.code-display-block .token-command { color: #4338ca; }
.help-code-block .token-variable,
.code-display-block .token-variable { color: #be185d; }
.help-code-block .token-header,
.code-display-block .token-header { color: #334155; font-weight: 700; }

:root[data-theme="dark"] .help-code-block .token-key,
:root[data-theme="dark"] .code-display-block .token-key { color: #93c5fd; }
:root[data-theme="dark"] .help-code-block .token-string,
:root[data-theme="dark"] .code-display-block .token-string { color: #86efac; }
:root[data-theme="dark"] .help-code-block .token-number,
:root[data-theme="dark"] .code-display-block .token-number { color: #c4b5fd; }
:root[data-theme="dark"] .help-code-block .token-boolean,
:root[data-theme="dark"] .code-display-block .token-boolean,
:root[data-theme="dark"] .help-code-block .token-null,
:root[data-theme="dark"] .code-display-block .token-null { color: #fdba74; }
:root[data-theme="dark"] .help-code-block .token-tag,
:root[data-theme="dark"] .code-display-block .token-tag,
:root[data-theme="dark"] .help-code-block .token-angle,
:root[data-theme="dark"] .code-display-block .token-angle { color: #fca5a5; }
:root[data-theme="dark"] .help-code-block .token-attr,
:root[data-theme="dark"] .code-display-block .token-attr { color: #fdba74; }
:root[data-theme="dark"] .help-code-block .token-value,
:root[data-theme="dark"] .code-display-block .token-value { color: #67e8f9; }
:root[data-theme="dark"] .help-code-block .token-comment,
:root[data-theme="dark"] .code-display-block .token-comment { color: #94a3b8; }
:root[data-theme="dark"] .help-code-block .token-command,
:root[data-theme="dark"] .code-display-block .token-command { color: #a5b4fc; }
:root[data-theme="dark"] .help-code-block .token-variable,
:root[data-theme="dark"] .code-display-block .token-variable { color: #f9a8d4; }
:root[data-theme="dark"] .help-code-block .token-header,
:root[data-theme="dark"] .code-display-block .token-header { color: #cbd5e1; }

.help-section code:not(.token-key):not(.token-string):not(.token-number):not(.token-boolean):not(.token-null):not(.token-tag):not(.token-angle):not(.token-attr):not(.token-value):not(.token-comment):not(.token-command):not(.token-variable):not(.token-header),
.help-search-section code,
.help-table code,
.api-summary-card code,
.page-section .card code {
  display: inline;
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.example-box > code.is-code-block {
  display: block;
  margin-top: 10px;
  white-space: pre-wrap;
}
/* ==========================================================================
   17. Admin Plans
   ========================================================================== */

.admin-plan-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  align-items: start;
  gap: 20px;
}

.admin-table-card,
.admin-plan-form-card {
  min-width: 0;
}

.admin-plan-form {
  display: grid;
  gap: 12px;
}

.admin-plan-form .btn.primary {
  margin-top: 8px;
}

.admin-grid {
  margin-top: 16px;
}

.plan-list {
  display: grid;
  gap: 14px;
}

.plan-row-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-muted);
  padding: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.plan-row-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.plan-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 130px;
  gap: 18px;
  align-items: start;
}

.plan-row-block {
  min-width: 0;
}

.plan-row-main h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.plan-tier-pill {
  margin-top: 10px;
}

.plan-row-price {
  margin: 14px 0 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.plan-row-price span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
}

.plan-row-meta {
  display: grid;
  gap: 14px;
}

.plan-meta-group {
  display: grid;
  gap: 6px;
}

.plan-meta-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.billing-id-row {
  display: grid;
  gap: 2px;
  line-height: 1.4;
}

.billing-id-row strong {
  color: var(--text-soft);
}

.plan-row-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.plan-row-actions .btn,
.plan-row-actions .inline-form,
.plan-row-actions .inline-form .btn {
  width: 100%;
}

.plan-row-actions .btn {
  justify-content: center;
}

.plan-row-actions .inline-form {
  display: block;
  width: 100%;
  margin: 0;
}

.plan-row-actions .btn,
.plan-row-actions .inline-form .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.plan-row-actions .btn.ghost {
  background: var(--panel);
}

.plan-row-actions .btn.danger {
  background: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   18. Utilities / Special Components
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 22px 0 46px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.footer-copy {
  white-space: nowrap;
}

.footer-payment-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-muted);
}

.footer-payment-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  display: block;
}

.footer-payment-mini-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.footer-mini-badge {
  display: block;
  width: max-content;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.footer-separator {
  color: var(--muted);
}

@media (max-width: 980px) {
  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-payment-strip {
    justify-content: flex-start;
  }
}

.demo-card ul,
.card ul {
  margin: 0;
  padding-left: 20px;
}

.break-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.link-copy-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  max-width: 100%;
}

.link-copy-btn code {
  cursor: pointer;
}

.link-copy-btn.is-disabled,
.link-copy-btn[disabled] {
  cursor: default;
  opacity: 0.82;
}

.link-copy-btn.is-disabled code,
.link-copy-btn[disabled] code {
  cursor: default;
}

.dynamic-link-code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.copy-bubble {
  position: fixed;
  z-index: 9999;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.copy-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   19. Responsive Rules
   ========================================================================== */

@media (max-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

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

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

@media (max-width: 1080px) {
  .mobile-qr-fab {
    display: inline-flex;
  }

  .home-usecase-stats,
  .home-feature-grid,
  .hero,
  .qr-grid,
  .grid.two,
  .grid-2,
  .builder-summary,
  .stats,
  .admin-stats,
  .form-grid-2,
  .form-grid-3,
  .style-grid-top-row,
  .style-grid-corners,
  .style-grid-colors-2 {
    grid-template-columns: 1fr;
  }

  .preview-card {
    position: static;
  }
}

@media (min-width: 1081px) {
  .mobile-qr-fab {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-search-heading {
    align-items: start;
  }

  .help-nav {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .help-nav-search,
  .help-nav-search-wide {
    grid-template-columns: 1fr;
  }

  .help-search-clear {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .hero-image-strip {
    grid-template-columns: 1fr;
  }

  .hero-image-card {
    min-height: 240px;
  }

  .hero-image-card img {
    height: 190px;
  }
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 12px;
  }

  .brand-wrap {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand {
    font-size: 16px;
  }

  .brand-subtitle {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-actions {
    margin-left: auto;
    gap: 8px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.22s ease, opacity 0.18s ease;
  }

  .nav.is-mobile-open .nav-menu {
    max-height: 720px;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--panel);
    border-color: var(--line);
  }

  .preview-actions,
  .section-head,
  .builder-section-header,
  .form-actions,
  .builder-save-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .search-form input,
  .search-form-wide input {
    min-width: 0;
    width: 100%;
  }

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

  .plan-row-actions {
    grid-template-columns: 1fr 1fr;
    align-content: stretch;
  }

  .plan-row-actions .inline-form {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .help-steps,
  .hero,
  .grid.two,
  .grid-2,
  .qr-grid,
  .stats,
  .admin-stats,
  .form-grid-2,
  .form-grid-3,
  .project-grid {
    grid-template-columns: 1fr;
  }
}

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

  .billing-page .card {
    padding: 18px;
  }

  .billing-page .stats.stats-compact {
    grid-template-columns: 1fr;
  }

  .billing-page .pricing-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .billing-page .project-card.pricing-card {
    width: 100%;
    min-width: 0;
  }

  .billing-page .project-body {
    padding: 16px;
  }

  .billing-page .feature-list {
    padding-left: 18px;
    margin-bottom: 16px;
  }

  .billing-page .price-line {
    font-size: 30px;
    line-height: 1.1;
  }

  .billing-history-desktop {
    display: none;
  }

  .billing-history-mobile {
    display: block;
  }
}

@media (max-width: 560px) {
  .admin-table-card,
  .admin-plan-form-card,
  .plan-row-card {
    padding: 16px;
  }

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

  .search-form {
    width: 100%;
  }

  .search-form input,
  .search-form button {
    width: 100%;
  }

  .billing-page .card {
    padding: 16px;
  }

  .billing-history-item {
    padding: 14px;
  }

  .billing-history-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .billing-page .pricing-card .btn {
    font-size: 14px;
  }
}
@media (max-width: 960px) {
  .contact-hero,
  .contact-layout,
  .html-editor-grid {
    grid-template-columns: 1fr;
  }

  .contact-side-card {
    position: static;
  }
}


.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.inventory-summary {
  white-space: nowrap;
}

.dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(160px, 1fr)) auto;
  gap: 0.9rem;
  align-items: end;
  margin: 1rem 0 1.25rem;
}

.dashboard-toolbar .form-label {
  display: block;
  margin-bottom: 0.4rem;
}

.dashboard-toolbar input,
.dashboard-toolbar select {
  width: 100%;
}

.dashboard-toolbar-actions {
  display: flex;
  gap: 0.65rem;
  align-items: end;
}

.dashboard-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.dashboard-pagination-pages {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-pill {
  min-width: 42px;
  height: 42px;
  display: block;
  width: max-content;
  justify-content: center;
  padding: 0.5rem 0.85rem 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.pagination-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 1180px) {
  .dashboard-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-toolbar {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar-actions {
    width: 100%;
  }

  .dashboard-toolbar-actions .btn {
    flex: 1;
  }

  .dashboard-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-pagination .btn {
    width: 100%;
    text-align: center;
  }

  .dashboard-pagination-pages {
    justify-content: center;
  }
}

/* ==========================================================================
   20. API
   ========================================================================== */
   
.api-summary-actions-bottom {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

.api-summary-actions-bottom form {
  margin: 0;
}

@media (max-width: 700px) {
  .api-summary-actions-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .api-summary-actions-bottom .btn,
  .api-summary-actions-bottom form,
  .api-summary-actions-bottom form .btn {
    width: 100%;
  }
}



.api-access-alert {
  margin: 18px 0;
}

.api-access-disabled-card {
  position: relative;
}

.api-disabled-shell.is-disabled {
  opacity: 0.52;
}

.api-disabled-shell.is-disabled .btn[disabled],
.api-disabled-shell.is-disabled button[disabled] {
  opacity: 1;
}

.api-key-status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.api-key-status-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  display: grid;
  gap: 4px;
}

.api-key-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.8fr);
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-muted);
}

.api-key-label {
  display: grid;
  gap: 4px;
}

.api-key-value-wrap {
  min-width: 0;
}

.api-key-value {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .api-key-status-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .api-key-status-row {
    grid-template-columns: 1fr;
  }
}


.mobile-qr-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.mobile-qr-fab.is-ready {
  display: inline-flex;
}

.mobile-qr-fab-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
}

.mobile-qr-fab-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  width: max-content;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.08);
}

.mobile-qr-fab-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* Mobile floating QR preview improvements */
.mobile-qr-fab {
  max-width: calc(100vw - 24px);
}

@media (max-width: 1080px) {
  .mobile-qr-fab {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .mobile-qr-fab-label {
    font-size: 11px;
  }

  .mobile-qr-fab-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  .mobile-qr-fab {
    right: 10px;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    padding: 7px 9px;
    gap: 7px;
    border-radius: 14px;
  }

  .mobile-qr-fab-label {
    font-size: 10px;
  }

  .mobile-qr-fab-thumb {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
}


.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
  cursor: not-allowed;
}
