/* ============================================================================
 * PDF MAGNETS — MODERN MINIMAL STUDIO DASHBOARD & SECURE QR TRANSFER
 * App-shell Sidebar + Bento Workspace + Dark-Glass Secure QR Card.
 * Zero pop-up dialogs. Dedicated full-page workflows.
 * ============================================================================ */

:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E5E9F0;
  --border-strong: #CBD5E1;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --accent: #E5322D;
  --accent-hover: #DC2626;
  --accent-soft: #FEF2F2;
  --green: #059669;
  --green-soft: #ECFDF5;
  --blue: #2563EB;
  --blue-soft: #EFF6FF;
  --sidebar-w: 252px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 14px 36px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ==========================================================================
 * APP SHELL LAYOUT (Fixed Left Sidebar + Main Workspace)
 * ========================================================================== */
.studio-shell {
  display: flex;
  min-height: 100vh;
}

/* --- Left Sidebar --- */
.studio-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  overflow-y: auto;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sb-brand img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.sb-brand-name {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sb-brand-pill {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: #0F172A;
  color: #FFFFFF;
}

.sb-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
  padding: 8px 10px 6px;
}

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.sb-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.14s, color 0.14s;
}

.sb-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.sb-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.sb-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}

.sb-item.active .sb-count {
  background: rgba(229, 50, 45, 0.14);
  color: var(--accent);
}

.sb-security-box {
  margin-top: auto;
  padding: 13px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #F8FAFC;
}

.sb-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.sb-sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4ADE80;
}

.sb-sec-sub {
  font-size: 0.73rem;
  color: #94A3B8;
  line-height: 1.45;
}

/* --- Main Content Column --- */
.studio-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- Sticky Top Command Bar --- */
.studio-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  background: rgba(244, 246, 250, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.topbar-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: #94A3B8;
  fill: none;
  stroke-width: 2;
}

.topbar-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.topbar-search input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

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

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #A7F3D0;
}

.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: sPulse 2s infinite;
}

@keyframes sPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* --- Buttons --- */
.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.83rem;
  font-weight: 650;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.d-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-btn-primary {
  background: #0F172A;
  color: #FFFFFF;
}

.d-btn-primary:hover {
  background: #1E293B;
  transform: translateY(-1px);
}

.d-btn-accent {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(229, 50, 45, 0.25);
}

.d-btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.d-btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--border);
}

.d-btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.d-btn-glass {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.16);
}

.d-btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.d-btn-sm {
  font-size: 0.77rem;
  padding: 6px 12px;
  border-radius: 8px;
}

.d-btn-danger-ghost {
  background: transparent;
  color: #DC2626;
  border-color: #FECACA;
}

.d-btn-danger-ghost:hover {
  background: #FEF2F2;
}

/* --- Main Workspace Body --- */
.studio-body {
  padding: 26px 28px 64px;
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* --- Hero Bento Row: Dark Secure QR Card + Light Upload/Stats Card --- */
.bento-hero {
  display: grid;
  grid-template-columns: 1.32fr 0.98fr;
  gap: 18px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

/* Dark Obsidian Secure QR Card */
.qr-hero-card {
  background: radial-gradient(circle at 92% 15%, rgba(229, 50, 45, 0.24) 0%, transparent 48%),
              radial-gradient(circle at 10% 90%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
              linear-gradient(135deg, #0B1120 0%, #111827 60%, #172033 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  color: #F8FAFC;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  display: flex;
  align-items: center;
  gap: 24px;
}

.qr-dark-frame {
  flex-shrink: 0;
  background: #FFFFFF;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.qr-svg-box {
  width: 156px;
  height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-svg-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-code-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0F172A;
  background: #F1F5F9;
  padding: 3px 9px;
  border-radius: 6px;
}

.qr-hero-details {
  flex: 1;
  min-width: 0;
}

.qr-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.qr-sec-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #4ADE80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  padding: 3px 10px;
  border-radius: 999px;
}

.qr-timer-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.73rem;
  font-weight: 700;
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.09);
  padding: 3px 9px;
  border-radius: 999px;
}

.qr-hero-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.qr-hero-desc {
  margin: 0 0 14px;
  font-size: 0.83rem;
  color: #94A3B8;
  line-height: 1.5;
}

.qr-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 5px 6px 5px 12px;
  margin-bottom: 12px;
}

.qr-url-text {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  color: #CBD5E1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.qr-rotate-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #CBD5E1;
  cursor: pointer;
  user-select: none;
}

.qr-rotate-toggle input {
  accent-color: #E5322D;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Right Upload & Live Stats Card */
.upload-bento-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 20px;
}

.mini-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
}

.mini-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.mini-stat-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

.drop-surface {
  flex: 1;
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  background: var(--surface-2);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}

.drop-surface:hover,
.drop-surface.dragover {
  border-color: var(--accent);
  background: #FFF9F9;
}

.drop-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin-bottom: 10px;
}

.drop-icon-badge svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.drop-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.drop-sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.drop-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Section Headings --- */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sec-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sec-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

/* --- Uploaded Vault + Inline Inspector --- */
.vault-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}

.vault-split.no-selection {
  grid-template-columns: 1fr;
}

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

.vault-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.vault-empty strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.vault-file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}

.vault-file-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.vault-file-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.12);
}

.vault-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vault-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.vault-check-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.vault-source-pill {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.vault-source-pill.qr { background: #EFF6FF; color: #1D4ED8; }
.vault-source-pill.desktop { background: var(--bg); color: var(--muted); }
.vault-source-pill.tool { background: var(--green-soft); color: var(--green); }

.vault-thumb {
  height: 118px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid #EEF2F7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vault-thumb img,
.vault-thumb canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.vault-ext-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

.vault-file-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vault-file-meta {
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* Inline Right Inspector */
.vault-inspector {
  padding: 18px;
  position: sticky;
  top: 84px;
  border-radius: 16px;
}

.inspector-preview-box {
  width: 100%;
  min-height: 180px;
  max-height: 240px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}

.inspector-preview-box img,
.inspector-preview-box canvas {
  max-width: 100%;
  max-height: 236px;
  object-fit: contain;
  display: block;
}

.inspector-file-title {
  font-size: 0.94rem;
  font-weight: 750;
  word-break: break-word;
  margin-bottom: 3px;
}

.inspector-file-sub {
  font-size: 0.77rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.inspector-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.inspector-rec-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94A3B8;
  margin-bottom: 8px;
}

.inspector-quick-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.inspector-tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 650;
  text-align: left;
  transition: all 0.14s;
}

.inspector-tool-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.inspector-tool-btn svg.app-tool-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Tools Studio Grid --- */
.dash-tabs-mobile {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 12px;
  flex-wrap: wrap;
}

.dash-tab {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.14s;
}

.dash-tab:hover { color: var(--ink); }
.dash-tab.active { background: #0F172A; color: #FFFFFF; }

.dash-selection-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  font-size: 0.84rem;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dash-selection-banner.visible { display: flex; }

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

.dash-tool-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
  position: relative;
}

.dash-tool-tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.dash-tool-tile.handoff-ready:hover {
  border-color: var(--accent);
}

.dash-tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid #EEF2F7;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-tool-icon svg.app-tool-svg {
  width: 32px;
  height: 32px;
}

.dash-tool-meta {
  flex: 1;
  min-width: 0;
}

.dash-tool-name {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dash-tool-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 5px;
}

.dash-tool-desc {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
 * DEDICATED MOBILE QR UPLOAD PAGE (qr-upload.html)
 * ========================================================================== */
/* --- Minimal Fresh Mobile QR Upload Page --- */
.qru-topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #E5E7EB;
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.qru-shell {
  min-height: calc(100vh - 58px);
  background:
    radial-gradient(circle at 50% 0%, rgba(229, 50, 45, 0.05), transparent 52%),
    #F8FAFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 20px 14px 48px;
  box-sizing: border-box;
}

.qru-card {
  width: 100%;
  max-width: 460px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.qru-hero-strip {
  background: #FFFFFF;
  color: #0F172A;
  padding: 22px 20px 14px;
  text-align: center;
  border-bottom: 1px solid #F1F5F9;
}

.qru-session-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.qru-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  font-size: 0.74rem;
  font-weight: 700;
  color: #065F46;
  white-space: nowrap;
}

.qru-session-pill code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #047857;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.qru-edit-code-btn {
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.qru-edit-code-btn:hover {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
}

.qru-title {
  margin: 0 0 5px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.qru-sub {
  margin: 0;
  font-size: 0.81rem;
  color: #64748B;
  line-height: 1.45;
}

.qru-body {
  padding: 18px 18px 20px;
}

.qru-code-editor {
  display: none;
  gap: 8px;
  margin-bottom: 14px;
}

.qru-code-editor.open {
  display: flex;
}

.qru-dropzone {
  border: 1.5px dashed #CBD5E1;
  border-radius: 18px;
  padding: 26px 16px 20px;
  text-align: center;
  background: #F8FAFC;
  transition: border-color 0.16s, background 0.16s;
  cursor: pointer;
  margin-bottom: 14px;
}

.qru-dropzone:hover,
.qru-dropzone.dragover {
  border-color: #E5322D;
  background: #FFF9F9;
}

.qru-drop-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: #FEF2F2;
  color: #E5322D;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.qru-drop-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qru-drop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.qru-drop-actions .d-btn {
  height: 44px;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  width: 100%;
}

.qru-upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.qru-upload-list:empty {
  margin-bottom: 0;
}

.qru-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  font-size: 0.82rem;
}

.qru-item-name {
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qru-item-meta { font-size: 0.72rem; color: #64748B; }

.qru-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.qru-status-badge.done { background: #ECFDF5; color: #059669; }
.qru-status-badge.sending { background: #EFF6FF; color: #2563EB; }

.qru-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.qru-ad-wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto !important;
  padding: 0 !important;
}

@media (max-width: 420px) {
  .qru-drop-actions {
    grid-template-columns: 1fr;
  }
  .qru-footer-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .qru-footer-bar .d-btn {
    justify-content: center;
  }
}

/* --- Toast --- */
.dash-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 11px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.dash-toast.show { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1120px) {
  .bento-hero { grid-template-columns: 1fr; }
  .vault-split { grid-template-columns: 1fr; }
  .vault-inspector { position: static; }
}

@media (max-width: 860px) {
  .studio-sidebar { display: none; }
  .studio-content { margin-left: 0; }
  .studio-topbar { padding: 0 16px; }
  .studio-body { padding: 18px 16px 56px; }
}

@media (max-width: 640px) {
  .qr-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .qr-sec-header,
  .qr-hero-btns {
    justify-content: center;
  }
  .dash-tools-grid {
    grid-template-columns: 1fr;
  }
}
