/* ==========================================================
   Audio QR Generator – Styles (cleaned)
   ========================================================== */

/* ==========================================================
   Layout wrappers
   ========================================================== */
.aqg-create-wrap,
.aqg-dashboard,
.aqg-success {
  max-width: 1000px;
  margin: 0 auto;
}


/* ==========================================================
   Design tokens (colors) - NOT YET ALL LINKED UP 010126
   ========================================================== */
:root {
  /* Base surfaces */
  --aqg-bg: #FFFFFF;
  --aqg-app-bg: #F6FAFF;
  --aqg-bg-muted: #f7f7f8;
  --aqg-bg-dark: #051A3A;

/* QR texture */
  --aqg-qr-opacity: 0.01;   /* VERY subtle */
/*  --aqg-qr-size: 220px;      /* scale of the pattern tile */
	
  /* Text */
  --aqg-text: #111111;
  --aqg-text-muted: #666666;
  --aqg-text-inverse: #ffffff;

  /* Borders / dividers */
  --aqg-border: rgba(0,0,0,0.08);
  --aqg-border-dark: rgba(255,255,255,0.12);

  /* Interactive */
  --aqg-accent: #3b82f6; /* example blue */
  --aqg-accent-hover: #2563eb;

  /* Icon buttons */
  --aqg-icon-hover-bg: rgba(0,0,0,0.05);
  --aqg-icon-hover-bg-dark: rgba(255,255,255,0.12);

  /* Token states */
  --aqg-token-bg: rgba(159,215,249,0.75); /* #082d6a; */
  --aqg-token-hover: #C2E9FF; /* #617fb1; */
  --aqg-token-selected: #C2E9FF;

/* Plans */
  --plan-free-bg: rgba(0,0,0,0.08);
  --plan-free-fg: #374151;

  --plan-basic-bg: rgba(14,156,240,0.16);
  --plan-basic-fg: #0E9CF0;

  --plan-pro-bg: rgba(59,130,246,0.18);
  --plan-pro-fg: #2563EB;

  --plan-enterprise-bg: #111827;
  --plan-enterprise-fg: #F9FAFB;
	
}

/* ==========================================================
   Outer wrap page level
   ========================================================== */

.aqg-app {
/*  background: var(--aqg-app-bg);*/
  min-height: 100vh;
}

/* Full-page app background on AQG pages */
body.page-dashboard,
body.page-create-audio,
body.page-account-settings,
body.page-edit-audio,
body.page-audio-created,
body.page-login {
  background: var(--aqg-app-bg);
}


/* Full viewport background for AQG pages */
html body.aqg-app-page {
  background: var(--aqg-app-bg) !important;
}

/* Subtle QR-ish texture across all app pages */
body.aqg-app-page{
  background: var(--aqg-app-bg);
}

body.aqg-app-page::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--aqg-qr-opacity);
  background-repeat: repeat;

  /* smaller tile = no huge empty areas */
  background-size: 100px 100px;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='0' width='6' height='6'/%3E%3Crect x='12' y='0' width='6' height='6'/%3E%3Crect x='30' y='0' width='6' height='6'/%3E%3Crect x='42' y='0' width='6' height='6'/%3E%3Crect x='6' y='6' width='6' height='6'/%3E%3Crect x='24' y='6' width='6' height='6'/%3E%3Crect x='36' y='6' width='6' height='6'/%3E%3Crect x='0' y='18' width='6' height='6'/%3E%3Crect x='18' y='18' width='6' height='6'/%3E%3Crect x='30' y='18' width='6' height='6'/%3E%3Crect x='42' y='18' width='6' height='6'/%3E%3Crect x='12' y='24' width='6' height='6'/%3E%3Crect x='24' y='30' width='6' height='6'/%3E%3Crect x='6' y='36' width='6' height='6'/%3E%3Crect x='18' y='36' width='6' height='6'/%3E%3Crect x='36' y='36' width='6' height='6'/%3E%3Crect x='42' y='42' width='6' height='6'/%3E%3C/g%3E%3C/svg%3E");
}


body.aqg-app-page .aqg-app{
  position: relative;
  z-index: 1;
}

body.aqg-app-page::before{
  background-position: 12px 18px;
}

/* ==========================================================
   Form fields
   ========================================================== */
.aqg-field { margin-bottom: 1.25em; }

.aqg-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.aqg-field textarea,
.aqg-field input,
.aqg-field select {
  width: 100%;
  padding: 0.6em;
  font-size: 1em;
}

/* ==========================================================
   Buttons / actions (Create / Success / Edit page)
   ========================================================== */
.aqg-actions {
  margin-top: 1em;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.aqg-preview-btn,
.aqg-save-btn {
  padding: 0.6em 1.1em;
  font-size: 1em;
  border-radius: 5px;
  border: none;
}

.aqg-preview-enabled {
  background-color: #2b6cb0;
  color: #fff;
  cursor: pointer;
}
.aqg-preview-enabled:hover { background-color: #234e87; }

.aqg-preview-disabled {
  background-color: #e2e8f0;
  color: #718096;
  cursor: not-allowed;
}

.aqg-save-btn {
  background-color: #38a169;
  color: #fff;
}
.aqg-save-btn:hover { background-color: #2f855a; }

.aqg-btn {
  padding: 0.6em 1.1em;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
}

.aqg-btn-primary { background: #0e9cf0; color: #fff; }
.aqg-btn-primary:hover { background: #0b81c6; }

.aqg-btn-secondary { background: #edf2f7; color: #2d3748; }
.aqg-btn-secondary:hover { background: #e2e8f0; }

/* ==========================================================
   Status / helper text
   ========================================================== */
.aqg-preview-hint {
  margin-top: 0.75em;
  font-size: 0.9em;
  color: #4a5568;
}

.aqg-status {
  margin-top: 0.75em;
  font-size: 0.95em;
}

.aqg-help {
  color: #4a5568;
  font-size: 0.95em;
}

.aqg-empty-state{
  padding: 18px;
  border: 1px dashed var(--aqg-border);
  border-radius: 5px;
  background: rgba(0,0,0,0.02);
}
.aqg-empty-state p{
  margin: 0;
  font-size: 14px;
}


/* ==========================================================
   Dashboard list + card layout
   ========================================================== */
.aqg-audio-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aqg-audio-item {
  border: 1px solid #e2e8f0;
  margin-bottom: 18px;
  border-radius: 5px;
	
  /* NEW: smooth focus animation */
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}

/* Focus card effect */
.aqg-audio-item.aqg-is-focused{
  box-shadow: 0 14px 40px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.10);
/*  border-radius: 16px;*/
  margin: 12px 0;
  background: #fff;
}

/* Two-column layout: left rail + right content */
.aqg-item-body{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: stretch;
  background: #fff;
  border-radius: 5px;
}

/* Left rail (extends full height) */
.aqg-item-rail{
  background: rgba(0,0,0,0.03);
  border-radius: 5px 0 0 5px;
  display: flex;
  justify-content: center;
}

/* Darker rail when checkbox checked (modern browsers) */
.aqg-audio-item:has(.aqg-item-checkbox:checked) .aqg-item-rail{
  background: rgba(0,0,0,0.09);
}

/* Checkbox label */
.aqg-item-select{
  background: transparent;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Header: QR | title/tokens | actions */
.aqg-item-header{
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px 18px 18px 0;
}

.aqg-item-thumb img{
  width: 86px;
  height: auto;
  display:block;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 5px;
}

/* Title */
.aqg-item-title{
  margin-top: 12px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.05;
}

/* Right actions column */
.aqg-item-actions{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 230px;
}

/* Top-right explainer text */
.aqg-item-hint{
  font-size: 14px;
  opacity: 0.75;
  min-height: 15px;
  text-align: right;
	color: #555;
}

.aqg-item-divider{
  margin: 16px 0;
  border-top: 1px solid rgba(0,0,0,0.10);
}

/* ==========================================================
   Expand / collapse (grid-row technique)
   ========================================================== */
.aqg-item-expanded{
  position: relative;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);

  transition:
    grid-template-rows 260ms ease,
    opacity 180ms ease,
    transform 220ms ease;
}

.aqg-item-expanded-inner{
  overflow: hidden; /* required for 0fr */
  min-height: 0;
}

/* Open state */
.aqg-audio-item.aqg-is-focused .aqg-item-expanded{
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

/* Spacer for corner delete (avoids end-jerk) */
.aqg-item-expanded-inner::after{
  content: "";
  display: block;
  height: 0;
  transition: height 260ms ease;
}
.aqg-audio-item.aqg-is-focused .aqg-item-expanded-inner::after{
  height: 64px;
}

/* Optional subtle fade-in for contents */
@keyframes aqgFadeIn{
  from { opacity: 0; }
  to   { opacity: 1; }
}
.aqg-audio-item.aqg-is-focused .aqg-item-expanded-inner{
  animation: aqgFadeIn 180ms ease;
}

/* During close, keep hidden panels from causing layout snaps */
.aqg-audio-item.is-closing .aqg-item-panel[hidden],
.aqg-audio-item.is-closing .aqg-item-delete-corner[hidden]{
  display: block !important;
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease;
}

/* ==========================================================
   Details + panels
   ========================================================== */
.aqg-item-details{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
  max-width: 520px;
  font-size: 14px;
}
.aqg-item-details[hidden]{ display:none !important; }

.aqg-item-detail-row{
  display:flex;
  gap: 14px;
}
.aqg-item-detail-label{
  width: 200px;
  opacity: 0.75;
}
.aqg-item-detail-value{
  font-weight: 600;
}

/* Panels (player/upload/text/revert) */
.aqg-item-panel{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 5px;
}

/* Player sizing */
.aqg-item-player audio{
  display:block;
  width: 100%;
  max-width: 520px;
  height: 42px;
}

/* ==========================================================
   Icon buttons (ghost buttons)
   ========================================================== */
.aqg-iconbtn {
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

.aqg-iconbtn:hover {
  background: var(--aqg-icon-hover-bg);
  transform: translateY(-1px);
}

.aqg-iconbtn:active {
  transform: translateY(0);
  background: rgba(0,0,0,0.07);
}

.aqg-iconbtn[disabled]{
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  background: transparent;
}

.aqg-iconbtn:focus-visible{
  outline: 2px solid rgba(0,0,0,0.25);
  outline-offset: 2px;
}

/* Active icon state */
.aqg-item-action.is-active{
  background: rgba(0,0,0,0.08);
}

/* Toolbars */
.aqg-item-toolbar,
.aqg-item-more-toolbar{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Lucide SVG icons */
.aqg-ico {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.aqg-ico-addgroup {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  position: relative;
  top: 3px;
}

/* Icon pop animation */
.aqg-iconbtn .aqg-ico {
  transition: transform 160ms cubic-bezier(.2,.8,.2,1);
}
.aqg-iconbtn:not([disabled]):hover .aqg-ico {
  transform: scale(1.08);
}
.aqg-item-action.is-active .aqg-ico {
  transform: scale(1.05);
  stroke-width: 2.4;
}

/* ==========================================================
   App bar (sticky header)
   ========================================================== */
.aqg-appbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--aqg-bg);
  color: var(--aqg-text);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  min-height: 120px;
  padding: 24px 0;

  transition:
    min-height 240ms ease,
    padding 240ms ease,
    background-color 240ms ease;
}

.aqg-appbar-inner {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 12px;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* App bar – compact on scroll */
.aqg-appbar.is-scrolled {
  min-height: 56px;
  padding: 6px 0;
}

.aqg-appbar-spacer {
  flex: 1;
}

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

/* Dark app bar theme (optional, future use) */
.aqg-appbar--dark {
  background: var(--aqg-bg-dark);
  color: var(--aqg-text-inverse);
  border-bottom-color: rgba(255,255,255,0.12);
}

/* App bar icon hooks (for future dark header theming) */
.aqg-appbar .aqg-appbar-icon {
  color: inherit; /* icons use currentColor via .aqg-ico */
}

/* Optional: improve hover/focus contrast if appbar becomes dark */
.aqg-appbar.aqg-appbar--dark .aqg-iconbtn:hover {
  background: var(--aqg-icon-hover-bg-dark);
}

.aqg-appbar.aqg-appbar--dark .aqg-iconbtn:active {
  background: rgba(255,255,255,0.14);
}

.aqg-appbar.aqg-appbar--dark .aqg-iconbtn:focus-visible {
  outline: 2px solid rgba(255,255,255,0.35);
}

.aqg-appbar-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.aqg-appbar-logo{
  height: 40px;      /* tweak */
  width: auto;
  display: block;

  transition: transform 240ms ease;
}

.aqg-appbar.is-scrolled .aqg-appbar-logo {
  transform: scale(0.85);
}

#create-icon {
  transition: background 480ms ease;
}

#create-icon.highlight {
  background: #0C9CEF;
}

/* ==========================================================
   App menu
   ========================================================== */

.aqg-appmenu[hidden] { display: none !important; }

.aqg-appmenu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.98);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.aqg-appmenu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.aqg-appmenu-inner {
  max-width: 900px;
  margin: 0 auto;
}

.aqg-appmenu-close { float: right; }

.aqg-appmenu-list {
  list-style: none;
  padding: 60px 0 0 0;
  margin: 0;
  display: grid;
  gap: 18px;
  font-size: 22px;
  color: black;
}

.aqg-appmenu-list a {
  text-decoration: none;
  color: inherit;
}

html.aqg-noscroll,
body.aqg-noscroll {
  overflow: hidden !important;
  height: 100% !important;
}

/* ==========================================================
   Modal
   ========================================================== */
.aqg-modal[hidden]{ display:none !important; }
.aqg-modal{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  z-index: 10001;
  padding: 20px;
}
.aqg-modal-inner{
  max-width: 900px;
  margin: 0 auto;
}


/* ==========================================================
   "More actions" row (class-driven, no [hidden])
   ========================================================== */
.aqg-item-more{
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  overflow: hidden;
  pointer-events: none;
  margin-top: 0;
  transition: max-height 220ms ease, opacity 160ms ease, transform 160ms ease, margin-top 160ms ease;
}

.aqg-audio-item.aqg-more-open .aqg-item-more{
  max-height: 140px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: 10px;
}

/* ==========================================================
   Corner delete
   ========================================================== */
.aqg-item-delete-corner{
  position: absolute;
  right: 12px;
  bottom: 12px;
}
.aqg-item-delete-corner[hidden]{ display:none !important; }

.aqg-item-delete-corner .aqg-iconbtn:hover {
  background: rgba(220, 38, 38, 0.06);
}

/* ==========================================================
   Group tokens
   ========================================================== */
.aqg-group-tokens {
/*  display: flex;
  flex-wrap: wrap;*/
  gap: 10px;
  margin-top: 6px;
}

.aqg-token {
  border: 1px solid var(--aqg-token-bg);
  background: var(--aqg-token-bg);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
  color: #535560;
  margin-top: 6px;
  letter-spacing: 0.2px;
}

.aqg-token:hover { background: var(--aqg-token-hover); }

.aqg-token.is-selected {
  background: var(--aqg-token-selected)
/*  border-color: rgba(0,0,0,0.45);*/
}

.aqg-token:focus {
  outline: none;
  box-shadow: none;
}

.aqg-token:focus-visible {
  outline: 2px solid rgba(0,0,0,0.25);
  outline-offset: 2px;
}

@keyframes aqgPulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.aqg-token.aqg-pulse { animation: aqgPulse 420ms ease-out; }

/* Item group tokens (with remove X) */
.aqg-item-groups{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Make item tokens the positioning context for the X */
.aqg-item-groups .aqg-token{
  position: relative;
}

/* no longer used (tokens are .aqg-token)
.aqg-item-token{
  position: relative;
  display:inline-flex;
  align-items:center;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.10);
  line-height: 1;
}
*/

.aqg-item-token-remove{
  position:absolute;
  top:-6px;
  right:-6px;
  z-index: 5;
  width:18px;
  height:18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  cursor:pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display:flex;
  align-items:center;
  justify-content:center;

  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.aqg-token:hover .aqg-item-token-remove{
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.aqg-item-token-remove{
  user-select: none;
}

/* ==========================================================
   Add-group morph control
   ========================================================== */
.aqg-addgroup{
  display:inline-flex;
  align-items:baseline;
  gap: 10px;
  overflow:hidden;
  width: 22px;
  border-radius: 5px;
  transition: width 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.aqg-addgroup-btn{
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
}

/* Slightly smaller plus inside the chip looks better */
.aqg-addgroup-btn .aqg-ico{
  width: 16px;
  height: 16px;
}

.aqg-addgroup .aqg-addgroup-btn{
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.aqg-addgroup .aqg-addgroup-input{
  width: 0;
  height: 22px;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: width 180ms ease, opacity 120ms ease, padding 180ms ease;
  background: transparent;
  font: inherit;
  font-size: 14px;
}

.aqg-addgroup.is-open{ width: 200px; }
.aqg-addgroup.is-open .aqg-addgroup-input{
  width: 100%;
  opacity: 1;
  pointer-events: auto;
  padding: 0 12px 0 10px;
}

.aqg-addgroup-input:focus-visible{
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}

/* ==========================================================
   Dashboard topbar / bulk bar / NOT SURE WHICH OF THESE ARE STILL IN USE
   ========================================================== */
.aqg-dashboard-topbar{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0.5em 0 1em 0;
}

.aqg-bulkbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 5px;
  padding: 10px 12px;
  flex: 1;
}

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

/* Bulk "add to group" popover (matches toolbar pop style) */
.aqg-bulk-group-pop{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;              /* you can change to left:0 if you want it under the button */
  width: min(720px, calc(100vw - 24px));
  z-index: 200;
}

.aqg-bulk-group-pop-inner{
  background: #fff;
  border: 1px solid var(--aqg-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Ensure the toolbar area is a positioning context */
.aqg-toolbar{
  position: relative;
}

.aqg-bulk-group-pop-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}


/* ==========================================================
   Voice preview UI (create page)
   ========================================================== */
.aqg-voice-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.aqg-voice-preview-btn {
  padding: 0.6em 1.1em;
  border-radius: 5px;
  border: none;
  background: #edf2f7;
  cursor: pointer;
}

.aqg-voice-preview-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner */
.aqg-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 8px;
  animation: aqg-spin 0.7s linear infinite;
}
@keyframes aqg-spin { to { transform: rotate(360deg); } }


/* Universal hidden */
[hidden] { display: none !important; }

/* Dashboard header (org + plan + create) */
.aqg-dash-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  margin: 12px 0 20px 0;
}

.aqg-dash-header-left{
  display:flex;
  align-items:center;
  gap: 18px;
}

.aqg-dash-logo{
  width: 120px;
  height: 120px;
  border-radius: 5px;
  background: rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard/account logo image */
.aqg-dash-logo img,
.aqg-logo-preview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Account settings preview wrapper (optional helper) */
.aqg-logo-preview{
  width: 120px;
  height: 120px;
  border-radius: 5px;
  background: rgba(0,0,0,0.04);
  overflow: hidden;
}

.aqg-dash-titles {
	padding: 10px 0 10px 0;
}


.aqg-dash-title{
  margin: 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -1px;
}

.aqg-dash-sub{
  display:flex;
  align-items:center;
  gap: 24px;
  margin-top: 8px;
}

.aqg-dash-org{
  opacity: 0.7;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.aqg-dash-plan{
  background: #e11d48;
  color: #fff;
  border-radius: 999px;
  padding: 4px 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  font-size: 12px;
}

/* Free – neutral / subtle */
.aqg-dash-plan[data-plan="free"]{
  background: var(--plan-free-bg);
  color: var(--plan-free-fg);
}

/* Basic – calm blue */
.aqg-dash-plan[data-plan="basic"]{
  background: var(--plan-basic-bg);
  color: var(--plan-basic-fg);
}

/* Pro – confident purple */
.aqg-dash-plan[data-plan="pro"]{
  background: var(--plan-pro-bg);
  color: var(--plan-pro-fg);
}

/* Enterprise – dark / premium */
.aqg-dash-plan[data-plan="enterprise"]{
  background: linear-gradient(180deg, #33405c, #0F172A);
}


.aqg-dash-create{
  padding: 24px 66px;
  font-size: 18px;
}

/* Search + sort row (inside filterbar) */
.aqg-dash-controls{
  display:flex;
  gap: 12px;
  align-items:center;
  margin-left: 10px;
}

.aqg-dash-search{
/*  width: 420px;
  max-width: 48vw;*/
  padding: 10px 14px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 14px;
}

.aqg-dash-sort{
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 14px;
  background: #fff;
}

/* ======================================================
   DASHBOARD TOOLBAR (select all + sort/filter/search)
   ====================================================== */

.aqg-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
  padding: 10px 10px 10px 0;
  background: #fff;
  border-radius: 5px;
  position: sticky;
  top: 80px;
  border: 1px solid #e2e8f0;
  z-index: 100;
  transition: margin 480ms ease, padding 480ms ease, border-radius 480ms ease, box-shadow 480ms ease;

}

.aqg-toolbar.is-stuck{
  margin-left: -10px;
  margin-right: -10px;
  padding-left: 10px;
  padding-right: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}	
	
.aqg-toolbar-left{
  display:flex;
  align-items:center;
  gap: 18px;
  padding-left: 18px;
  min-width: 420px; /* gives the selected toolbar room */
}

.aqg-toolbar-selectall{
  display:flex;
  align-items:center;
  gap: 10px;
  opacity: 0.75;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.75);
}

.aqg-toolbar-selected{
  display:flex;
  align-items:center;
  gap: 10px;
/*  border: 1px solid rgba(0,0,0,0.12);*/
/*  border-radius: 5px;*/
  padding: 0px 10px;
/*  background: rgba(255,255,255,0.65);*/
  min-width: 420px;
}

.aqg-toolbar-selected-spacer{ flex: 1; }

.aqg-toolbar-selected-count{
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.aqg-toolbar-selected-hint{
  opacity: 0.55;
  font-size: 14px;
  margin-right: 6px;
  white-space: nowrap;
}

.aqg-toolbar-right{
  display:flex;
  align-items:center;
  gap: 12px;
}

.aqg-toolbar-divider{
  border-top: 1px solid rgba(0,0,0,0.2);
  margin-top: 10px;
  margin-bottom: 18px;
}

/* popouts */
.aqg-toolbar-sort,
.aqg-toolbar-filter{
  position: relative;
  display:flex;
  align-items:center;
}

.aqg-toolbar-pop{
  position: absolute;
  right: 44px;
  top: 3px;
  font-size: 14px;
/*  transform: translateY(-50%) translateY(6px);*/
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
/*  box-shadow: 0 10px 26px rgba(0,0,0,0.10);*/

  /* Fade behavior */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;

  /* Fixed sizing so no reflow */
  width: min(420px, calc(100vw - 24px));

  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms; /* wait until fade out finishes */
}


/* open state */
.aqg-toolbar-pop.is-open{
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
/*  transform: translateY(-50%) translateY(0);*/
  transform: translateX(-10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0s;
}

.aqg-sort-pop {
/*  width: 360px;  matches your mock */
  padding: 6px;
}

.aqg-sort-menu{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aqg-sort-option{
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.aqg-sort-option:hover{
  background: rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.aqg-sort-option:active{
  transform: translateY(0);
  background: rgba(0,0,0,0.08);
}

.aqg-sort-option.is-active{
  background: rgba(0,0,0,0.10);
}

.aqg-filter-pop {
/*  width: 620px;  group panel width in your mock */
  padding: 10px 12px;
}

/* Make inputs look like part of the UI */
.aqg-sort-pop select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
}

/* Make toolbar icons match your icon button style */
.aqg-toolbar-icon{
  min-width: 40px;
  min-height: 40px;
}

#aqg-group-filter-wrap {
  top: 3px;
  border: 1px solid rgba(0,0,0,0.12);
}

/* When selection toolbar is visible, hide the right controls to prevent overlap */
.aqg-toolbar.is-selecting .aqg-toolbar-right{
  opacity: 0;
  pointer-events: none;
}

/* Make item token rows match filter token rows */
.aqg-item-groups{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Ensure token label behaves consistently */
.aqg-token-label{
  display:inline-block;
}

/* Ensure the × is visible inside the remove circle */
.aqg-item-token-remove{
  color: rgba(0,0,0,0.85);
  font-weight: 700;
  line-height: 1;
}

/* ==========================================================
   LEGACY / REMOVED (kept for reference only)
   ========================================================== */
/*
  Previously used approaches that caused snapping/conflicts:

  - More row controlled via [hidden] + .aqg-item-more:not([hidden]) rules
  - Expanded area controlled via max-height hacks

  If you ever need them, recover from git / backups instead of re-enabling here.
*/

