/* IshvaniHub brand tokens. Keep user-authored QR and phone artwork outside this adapter. */
:root {
    color-scheme: dark;
    --ih-bg: #08090b;
    --ih-fg: #f8f8f5;
    --ih-muted: #9a9a94;
    --ih-line: #30312e;
    --ih-surface: #11120f;
    --ih-raised: #1b1d18;
    --ih-accent: #246b3a;
    --ih-accent-hover: #2d8047;
    --ih-accent-text: #8dcca0;
    --ih-accent-soft: #15271b;
    --ih-focus: #8dcca0;
    --ih-link: #9fb1ff;
    --ih-display: "Arial Narrow", "Trebuchet MS", Arial, sans-serif;
}
html[data-theme="light"] {
    color-scheme: light;
    --ih-bg: #f2f1ec;
    --ih-fg: #11120f;
    --ih-muted: #62665d;
    --ih-line: #c9cbc2;
    --ih-surface: #e9e9e2;
    --ih-raised: #f8f8f5;
    --ih-accent-text: #246b3a;
    --ih-accent-soft: #dfeade;
    --ih-focus: #246b3a;
    --ih-link: #3854aa;
}
html { scroll-padding-top: 90px; }
body.ih-app {
    background: var(--ih-bg);
    color: var(--ih-fg);
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.ih-app ::selection { background: var(--ih-accent); color: #f8f8f5; }
.ih-app :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--ih-focus);
    outline-offset: 4px;
}
.ih-app :where(h1, h2, h3):not([data-theme-preserve] *) {
    font-family: var(--ih-display);
    text-transform: uppercase;
    letter-spacing: -.035em;
    font-weight: 700;
}
.ih-app :where([class*="rounded-lg"], [class*="rounded-xl"], [class*="rounded-2xl"], [class*="rounded-3xl"]):not([data-theme-preserve], [data-theme-preserve] *) {
    border-radius: 2px;
}
.ih-app :where([class*="shadow"]):not([data-theme-preserve], [data-theme-preserve] *) { box-shadow: none; }
/* Adapt existing neutral utility classes so dynamic forms and HTMX partials match too. */
.ih-app :where(.bg-white, .bg-slate-50, .bg-zinc-50, .bg-gray-50, .bg-cream-50, .bg-cream-100, [class~="bg-[#FAF9F5]"], [class~="bg-[#F4F4F0]"]):not([data-theme-preserve], [data-theme-preserve] *) {
    background-color: var(--ih-surface);
}
.ih-app :where(.bg-slate-100, .bg-slate-200, .bg-zinc-100, .bg-zinc-200, .bg-gray-100, [class~="bg-slate-50/50"], [class~="bg-slate-50/70"], [class~="bg-slate-50/80"], [class~="bg-slate-100/80"], [class~="bg-slate-100/90"], [class~="bg-slate-200/50"], [class~="bg-slate-200/70"], [class~="bg-zinc-50/50"], [class~="bg-white/80"], [class~="bg-white/90"]):not([data-theme-preserve], [data-theme-preserve] *) {
    background-color: var(--ih-raised);
}
.ih-app :where(.text-slate-700, .text-slate-800, .text-slate-900, .text-slate-950, .text-zinc-700, .text-zinc-800, .text-zinc-900, .text-gray-800, .text-gray-900, .text-obsidian):not([data-theme-preserve], [data-theme-preserve] *) {
    color: var(--ih-fg);
}
.ih-app :where(.text-slate-400, .text-slate-500, .text-slate-600, .text-zinc-400, .text-zinc-500, .text-zinc-600, .text-gray-400, .text-gray-500, .text-gray-600):not([data-theme-preserve], [data-theme-preserve] *) {
    color: var(--ih-muted);
}
.ih-app :where([class*="border-slate-1"], [class*="border-slate-2"], [class*="border-slate-3"], [class*="border-zinc-1"], [class*="border-zinc-2"], [class*="border-zinc-3"], [class*="border-gray-2"], [class*="divide-slate-2"]):not([data-theme-preserve], [data-theme-preserve] *) {
    border-color: var(--ih-line);
}
.ih-app :where(.bg-green-500, .bg-green-600, .bg-green-700, .bg-emerald-500, .bg-emerald-600, .bg-emerald-700):not([data-theme-preserve], [data-theme-preserve] *) {
    background-color: var(--ih-accent);
}
.ih-app :where(.bg-green-50, .bg-green-100, .bg-emerald-50, .bg-emerald-100, [class~="bg-emerald-50/40"], [class~="bg-emerald-50/50"], [class~="bg-emerald-50/70"], [class~="bg-green-50/50"]):not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-accent-soft); }
.ih-app :where(.text-green-500, .text-green-600, .text-green-700, .text-green-800, .text-emerald-500, .text-emerald-600, .text-emerald-700, .text-emerald-800):not([data-theme-preserve], [data-theme-preserve] *) { color: var(--ih-accent-text); }
.ih-app :where(a.text-indigo-600, a.text-blue-600, a.text-blue-700):not([data-theme-preserve], [data-theme-preserve] *) { color: var(--ih-link); }
/* Status colors keep their meaning while using legible surfaces in dark mode. */
html[data-theme="dark"] .ih-app :where(.bg-blue-50, .bg-blue-100, .bg-indigo-50, .bg-indigo-100, .bg-sky-50, .bg-purple-50, .bg-purple-100, [class~="bg-blue-50/50"]):not([data-theme-preserve], [data-theme-preserve] *) { background-color: #172135; }
html[data-theme="dark"] .ih-app :where(.text-blue-600, .text-blue-700, .text-blue-800, .text-indigo-600, .text-indigo-700, .text-indigo-800, .text-sky-600, .text-purple-600, .text-purple-700, .text-purple-800):not([data-theme-preserve], [data-theme-preserve] *) { color: #aabaff; }
html[data-theme="dark"] .ih-app :where(.bg-amber-50, .bg-amber-100, .bg-yellow-50, .bg-yellow-100, [class~="bg-amber-50/50"], [class~="bg-amber-50/70"]):not([data-theme-preserve], [data-theme-preserve] *) { background-color: #302617; }
html[data-theme="dark"] .ih-app :where(.text-amber-600, .text-amber-700, .text-amber-800, .text-amber-900, .text-yellow-700, .text-yellow-800):not([data-theme-preserve], [data-theme-preserve] *) { color: #efcf8f; }
html[data-theme="dark"] .ih-app :where(.bg-red-50, .bg-red-100, .bg-rose-50, .bg-pink-50):not([data-theme-preserve], [data-theme-preserve] *) { background-color: #311d1d; }
html[data-theme="dark"] .ih-app :where(.text-red-600, .text-red-700, .text-red-800, .text-rose-600, .text-pink-600):not([data-theme-preserve], [data-theme-preserve] *) { color: #f0aaaa; }
.ih-app :where(.border-green-100, .border-green-200, .border-emerald-100, .border-emerald-200, .border-emerald-500):not([data-theme-preserve], [data-theme-preserve] *) { border-color: var(--ih-accent); }
.ih-app :where(.bg-green-500, .bg-green-600, .bg-green-700, .bg-emerald-500, .bg-emerald-600, .bg-emerald-700):not([data-theme-preserve], [data-theme-preserve] *) { color: #f8f8f5; }
.ih-app :where([class*="bg-gradient-"][class*="from-green-"], [class*="bg-gradient-"][class*="from-emerald-"]):not([data-theme-preserve], [data-theme-preserve] *) { background-image: none; background-color: var(--ih-accent); }
.ih-app :where([class*="bg-gradient-"][class~="from-slate-50"], [class*="bg-gradient-"][class~="from-white"], [class*="bg-gradient-"][class~="from-zinc-50"]):not([data-theme-preserve], [data-theme-preserve] *) { background-image: none; background-color: var(--ih-bg); }
.ih-app :where([class~="hover:bg-slate-50"], [class~="hover:bg-slate-50/50"], [class~="hover:bg-slate-100"], [class~="hover:bg-zinc-50"], [class~="hover:bg-white/90"]):hover:not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-raised); }
.ih-app .group:hover :where([class~="group-hover:text-emerald-700"], [class~="group-hover:text-emerald-600"]):not([data-theme-preserve], [data-theme-preserve] *) { color: var(--ih-accent-text); }
.ih-app :where([class~="hover:border-zinc-900"]):hover { border-color: var(--ih-accent-text); }
html[data-theme="dark"] .ih-app :where([class~="bg-emerald-50/30"], [class~="bg-emerald-50/60"], [class~="bg-emerald-50/80"], [class~="bg-green-50/30"]):not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-accent-soft); }
.ih-app :where([class~="hover:bg-emerald-50/40"], [class~="hover:bg-emerald-50"], [class~="hover:bg-green-50"]):hover:not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-accent-soft); }
html[data-theme="dark"] .ih-app :where([class~="bg-gray-50/50"], [class~="bg-slate-100/50"], .bg-gray-200):not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-raised); }
html[data-theme="dark"] .ih-app :where([class~="bg-slate-50/60"], [class~="bg-emerald-50/20"], .bg-teal-50, .bg-teal-100):not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-surface); }
html[data-theme="dark"] .ih-app :where(.text-emerald-900,.text-emerald-950,.text-teal-800,.text-teal-900):not([data-theme-preserve], [data-theme-preserve] *) { color: var(--ih-accent-text); }
.ih-app :where([class~="hover:bg-slate-200"], [class~="hover:bg-emerald-100"]):hover:not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-raised); }
html[data-theme="dark"] .ih-app :where([class*="bg-gradient-"][class~="from-emerald-50"]):not([data-theme-preserve], [data-theme-preserve] *) { background-image: none; background-color: var(--ih-accent-soft); }
.registry-types { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.registry-type-card { padding: 18px; border: 1px solid var(--ih-line); border-radius: 12px; background: var(--ih-bg); min-width: 0; }
.registry-type-card[hidden] { display: none; }
.registry-type-card h3 { margin: 0; font-size: 16px; }
.registry-type-card form { display: grid; gap: 8px; margin: 18px 0; }
.registry-type-card select,.registry-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--ih-line); border-radius: 8px; }
.registry-type-card label { font-size: 12px; font-weight: 700; margin-top: 6px; }
.registry-type-card small { line-height: 1.6; }
.registry-search { display: grid; gap: 8px; max-width: 400px; margin-top: 18px; font-size: 13px; }
.registry-type-card details { border-top: 1px solid var(--ih-line); padding-top: 12px; font-size: 12px; }
.ih-app [data-access-denied]:not([data-access-denied=""]) { opacity: .75; }
@media(max-width:700px) { .registry-types { grid-template-columns: 1fr; } }
.ih-app :where([class~="hover:text-slate-900"], [class~="hover:text-slate-950"], [class~="hover:text-zinc-900"]):hover:not([data-theme-preserve], [data-theme-preserve] *) { color: var(--ih-fg); }
.ih-app :where([class~="hover:bg-emerald-600"], [class~="hover:bg-emerald-700"], [class~="hover:bg-green-700"]):hover:not([data-theme-preserve], [data-theme-preserve] *) { background-color: var(--ih-accent-hover); }
.ih-app :where(input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select):not([data-theme-preserve] *) {
    background-color: var(--ih-bg);
    color: var(--ih-fg);
    border-color: var(--ih-line);
}
.ih-app input::placeholder, .ih-app textarea::placeholder { color: var(--ih-muted); opacity: 1; }
.ih-app :where(input[type="checkbox"], input[type="radio"], input[type="range"]):not([data-theme-preserve] *) { accent-color: var(--ih-accent); }
.ih-app .service-btn.active {
    background-color: var(--ih-accent-soft) !important;
    color: var(--ih-accent-text) !important;
    border-color: var(--ih-accent) !important;
    box-shadow: inset 0 -2px var(--ih-accent);
}
.ih-app .service-btn.active :is(svg, i) { color: var(--ih-accent-text) !important; }
.ih-app .tab-btn.active { color: var(--ih-accent-text); border-color: var(--ih-accent); }
.ih-app .ih-header { background: var(--ih-bg); border-color: var(--ih-line); }
.ih-header > div > div:first-child { min-height: 74px; }
.ih-header nav > a, .ih-header nav > div > a { text-transform: uppercase; letter-spacing: .06em; }
.ih-tools-menu { margin-top: 0; }
.ih-theme-toggle, .ih-parent-link {
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ih-fg);
}
.ih-theme-toggle { display: inline-flex; border: 1px solid var(--ih-muted); background: transparent; cursor: pointer; }
.ih-theme-toggle:hover { background: var(--ih-raised); }
.ih-parent-link { color: var(--ih-muted); }
.ih-parent-link:hover { color: var(--ih-fg); }
.ih-wordmark { font-family: var(--ih-display); font-weight: 700; letter-spacing: -.055em; color: var(--ih-fg); white-space: nowrap; }
.ih-wordmark b { color: var(--ih-accent); }
.ih-studio-hero { border-top: 1px solid var(--ih-line); padding-top: 28px; }
.ih-studio-hero h1 { font-size: clamp(2.5rem, 5.5vw, 5rem); line-height: .96; }
.ih-studio-hero h1 span { display: block; margin-top: 12px; font-size: .55em; line-height: 1.1; color: var(--ih-muted); }
.ih-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ih-muted); }
.ih-brand-strip { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 20px; }
.ih-app #studio-workspace { background: var(--ih-bg); }
.ih-app #qrStudioWorkspace { border-color: var(--ih-line); }
.ih-app #qrStudioWorkspace > div > div { border-color: var(--ih-line); }
.ih-app .ih-footer { background: var(--ih-bg); }
/* The artwork retains its own colors and rounded shapes in either app theme. */
[data-theme-preserve] { color-scheme: light; }
@media (max-width: 639px) {
    .ih-theme-toggle { min-height: 40px; padding: 8px; }
    .ih-brand-strip span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ih-app *, .ih-app *::before, .ih-app *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}
/* Keep the QR artwork and its quiet zone inside the mobile publish panel. */
@media (max-width: 639px) {
    .ih-app #dashPreviewWrapperInner { padding: 12px 0; }
    .ih-app #dashQrFrameWrapper { padding: 8px; }
    .ih-app #dashQrCanvasContainer { padding: 4px !important; }
}
.ih-app [aria-current="page"] { color: var(--ih-accent-text); }
.ih-app button:disabled { cursor: not-allowed; }
.ih-app #dashServiceBar .dash-svc-btn { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 82px; }
.ih-app #dashServiceBar .dash-svc-btn > div { margin-left: 0; max-width: 100%; }
.ih-app #dashServiceBar .dash-svc-btn span.truncate { white-space: normal; overflow: visible; text-overflow: clip; text-align: left; }

/* Dashboard workspace: restrained brand color, clear hierarchy, generous controls. */
.dashboard-shell { display: flex; min-height: 100vh; background: var(--ih-bg); }
.dashboard-sidebar { width: 252px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--ih-surface); border-right: 1px solid var(--ih-line); }
.dashboard-sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 26px 22px 12px; }
.dashboard-brand { display: flex; align-items: center; gap: 6px; font-size: 21px; font-weight: 800; letter-spacing: -.7px; }
.dashboard-brand img { width: 30px; height: 30px; margin-right: 4px; }
.dashboard-brand span { color: var(--ih-accent-text); }
.dashboard-workspace-label { color: var(--ih-muted); font-size: 9px; letter-spacing: 2px; padding: 0 24px 20px; }
.dashboard-navigation { flex: 1; overflow-y: auto; padding: 0 14px 16px; }
.dashboard-nav-group { margin-bottom: 18px; }
.dashboard-nav-group > p { color: var(--ih-muted); font-size: 10px; font-weight: 600; padding: 8px 12px; letter-spacing: .08em; }
.dashboard-navigation a { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 12px; border-radius: 9px; font-size: 13px; color: var(--ih-muted); margin: 3px 0; border: 1px solid transparent; }
.dashboard-navigation a:hover { color: var(--ih-fg); background: var(--ih-raised); }
.dashboard-navigation a[aria-current] { background: var(--ih-accent-soft); color: var(--ih-accent-text); border-color: #246b3a66; font-weight: 700; }
.dashboard-navigation svg { width: 18px; height: 18px; flex-shrink: 0; }
.dashboard-navigation small { margin-left: auto; font-size: 11px; opacity: .7; }
.dashboard-sidebar-footer { padding: 18px; border-top: 1px solid var(--ih-line); }
.dashboard-account { display: flex; align-items: center; gap: 10px; }
.dashboard-account > div { min-width: 0; }
.dashboard-account strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-account small { display: block; color: var(--ih-muted); font-size: 10px; margin-top: 4px; }
.dashboard-avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--ih-accent-soft); color: var(--ih-accent-text); display: grid; place-items: center; flex-shrink: 0; }
.dashboard-footer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 11px; color: var(--ih-muted); }
.dashboard-footer-actions .ih-theme-toggle { min-height: 30px; padding: 4px 9px; border-radius: 6px; font-size: 9px; }
.dashboard-signout { display: flex; gap: 8px; align-items: center; color: var(--ih-muted); font-size: 11px; margin-top: 16px; }
.dashboard-signout svg { width: 14px; height: 14px; }
.dashboard-main { flex: 1; min-width: 0; padding: 28px clamp(16px, 3vw, 42px); }
.dashboard-workflow { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--ih-muted); margin-bottom: 28px; }
.dashboard-mobile-header, .dashboard-close { display: none; }
.dashboard-backdrop { position: fixed; inset: 0; background: #0009; z-index: 40; }
.ih-app #dashServiceBar .dash-svc-btn { flex-direction: row; align-items: center; min-height: 58px; padding: 16px; border-radius: 9px; }
.ih-app #dashServiceBar .dash-svc-btn:hover { background: var(--ih-raised); border-color: var(--ih-accent-text); }
.ih-app #dashServiceBar .dash-svc-btn.hidden { display: none; }
.ih-app .dash-cat-tab { border-radius: 7px; min-height: 36px; }
.ih-app .dash-cat-tab[aria-pressed="true"] { background: var(--ih-accent-soft); color: var(--ih-accent-text); }
.ih-app [id^="dashStageBtn"] { min-height: 48px; border-radius: 8px; }
.ih-app [id^="dashStageBtn"][aria-current="step"] { background: var(--ih-accent-soft); color: var(--ih-accent-text); }
.ih-app [id^="dashStageBtn"]:disabled { opacity: .45; }
.ih-app #qrDesignerComponent { border-radius: 16px; border-color: #44796a55; box-shadow: 0 12px 40px #0002; }
.designer-intro { padding: 24px; background: linear-gradient(120deg, #163e32, #172c40); color: #e8f4ee; }
.designer-eyebrow { font-size: 9px; letter-spacing: 2px; color: #8bcead; }
.ih-app .designer-intro h2 { color: #f2faf6; margin-top: 7px; font-size: 22px; text-transform: none; }
.designer-intro p { font-size: 12px; color: #a9c5bc; margin-top: 5px; line-height: 1.6; }
.designer-palettes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.designer-palettes button { display: flex; align-items: center; gap: 6px; background: #ffffff0d; border: 1px solid #ffffff22; color: #e7f1ec; padding: 7px 10px; border-radius: 7px; font-size: 10px; }
.designer-palettes button:hover { background: #ffffff22; }
.designer-palettes span { width: 13px; height: 13px; background: var(--palette-color); border: 1px solid #ffffff66; border-radius: 50%; }
.ih-app #qrDesignerComponent [role="tablist"] { flex-wrap: wrap; gap: 4px; overflow: visible; border-bottom: 0; padding-bottom: 12px; }
.ih-app #qrDesignerComponent [role="tab"] { border: 0; border-radius: 8px; font-size: 11px; padding: 10px 12px; min-height: 40px; }
.ih-app #qrDesignerComponent [role="tab"][aria-selected="true"] { background: #246b3a33; color: var(--ih-accent-text); }
.ih-app #qrDesignerComponent :is([data-des-dots], [data-des-outer], [data-des-inner]) { min-height: 52px; border-radius: 8px; background: var(--ih-raised); }
.ih-app #qrDesignerComponent :is([data-des-dots], [data-des-outer], [data-des-inner]):hover { border-color: #689caa; box-shadow: 0 0 0 2px #689caa22; }
.ih-app #qrDesignerComponent :is([data-des-dots], [data-des-outer], [data-des-inner]) [data-theme-preserve] { border-radius: 5px; background: #edf4f6; color: #213d52; }
.ih-app #qrDesignerComponent :is([data-des-dots], [data-des-outer], [data-des-inner]) svg { color: #213d52; }
.ih-app #qrDesignerComponent input[type="color"] { border-radius: 7px; height: 36px; padding: 3px; background: var(--ih-raised); }
.ih-app #dashQrPreviewWrapper { border-radius: 16px; padding: 20px; border-color: #44796a55; box-shadow: 0 12px 40px #0002; }
.ih-app #dashPreviewWrapperInner { background: radial-gradient(ellipse at top, #dcebe8, #edf2f6); border: 1px solid #d3dfdf; border-radius: 12px; padding: 24px 12px !important; min-height: 300px; }
.ih-app #dashQrFrameWrapper { max-width: 100% !important; box-sizing: border-box; flex-shrink: 1; }
.ih-app #dashQrCanvasContainer { min-width: 0 !important; min-height: 0 !important; width: 260px; max-width: 100%; padding: 0 !important; box-sizing: border-box; aspect-ratio: 1; flex-shrink: 1; }
.ih-app #dashQrCanvasContainer canvas, .ih-app #dashQrCanvasContainer > svg { display: block; width: 100% !important; height: auto !important; max-width: 260px; }
.ih-app #dashPreviewBadge { background: var(--ih-accent-soft); color: var(--ih-accent-text); border: 0; }
.ih-app #dashSaveBtn { border-radius: 9px; background: #246b3a; color: #fff; min-height: 46px; }
.ih-app #dashDownloadActions button { border-radius: 8px; min-height: 42px; }
.ih-app #dash-smartphonePreviewWrapper { border: 1px solid #44796a55; border-radius: 16px; padding: 16px; background: linear-gradient(140deg, var(--ih-surface), var(--ih-accent-soft)); }
.ih-app #dash-smartphonePreviewWrapper > div:first-child { background: transparent; border: 0; padding: 0 0 16px; }
.ih-app #dash-phoneDeviceContainer { width: min(100%, 300px); border-radius: 38px; padding: 8px; box-shadow: 0 20px 45px #0004; }
@media (max-width: 767px) {
    .dashboard-shell { display: block; }
    .dashboard-mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--ih-surface); border-bottom: 1px solid var(--ih-line); position: sticky; top: 0; z-index: 30; }
    .dashboard-mobile-header svg, .dashboard-close svg { width: 20px; height: 20px; }
    .dashboard-mobile-create { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ih-accent-text); }
    .dashboard-mobile-create svg { width: 14px; }
    .dashboard-sidebar { position: fixed; top: 0; left: 0; z-index: 50; width: min(290px, 85vw); height: 100dvh; transform: translateX(-100%); visibility: hidden; transition: transform .2s; }
    .dashboard-sidebar.is-open { transform: translateX(0); visibility: visible; }
    .dashboard-close { display: block; color: var(--ih-muted); }
    .dashboard-main { padding: 20px 16px; }
    .dashboard-workflow { margin-bottom: 20px; }
    .designer-intro { padding: 20px; }
}
.qr-library { max-width: 1280px; }
.qr-library-header, .qr-library-actions, .qr-library-toolbar, .qr-view-toggle, .qr-campaign-link, .qr-campaign-actions { display: flex; align-items: center; gap: 12px; }
.qr-library-header { justify-content: space-between; flex-wrap: wrap; margin-bottom: 26px; }
.qr-library-header h1 { font-size: 28px; margin: 7px 0; }
.qr-library-header p, .qr-library-status { color: var(--ih-muted); font-size: 12px; }
.qr-library-actions a, .qr-primary { font-size: 12px; padding: 11px 15px; border-radius: 8px; border: 1px solid var(--ih-line); display: inline-flex; align-items: center; gap: 8px; }
.qr-primary { background: #246b3a; color: #fff; border-color: #246b3a; }
.qr-library svg { width: 16px; height: 16px; flex-shrink: 0; }
.qr-library-toolbar { flex-wrap: wrap; padding: 14px; border: 1px solid var(--ih-line); border-radius: 12px; background: var(--ih-surface); }
.qr-library-search { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; }
.ih-app .qr-library-search input { border: 0; background: transparent; outline-offset: 0; width: 100%; min-width: 0; font-size: 12px; padding: 8px; }
.qr-library-toolbar select { font-size: 12px; padding: 9px; border: 1px solid var(--ih-line); border-radius: 7px; max-width: 100%; }
.qr-view-toggle { gap: 3px; padding: 3px; background: var(--ih-bg); border-radius: 8px; }
.qr-view-toggle button { display: flex; gap: 7px; align-items: center; padding: 8px 10px; color: var(--ih-muted); font-size: 12px; border-radius: 6px; }
.qr-view-toggle button[aria-pressed="true"] { background: var(--ih-accent-soft); color: var(--ih-accent-text); }
.qr-library-status { margin: 16px 0; }
.qr-collection { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 300px),1fr)); gap: 16px; }
.qr-campaign { background: var(--ih-surface); color: var(--ih-fg); border: 1px solid var(--ih-line); border-radius: 14px; padding: 20px; min-width: 0; display: grid; gap: 18px; }
.qr-campaign[hidden], .qr-library-empty[hidden] { display: none; }
.qr-campaign:hover { border-color: #4f8360; }
.qr-campaign-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.qr-campaign-identity > div:last-child { min-width: 0; }
.qr-campaign-icon { width: 43px; height: 43px; border-radius: 11px; display: grid; place-items: center; background: var(--ih-accent-soft); color: var(--ih-accent-text); flex-shrink: 0; }
.ih-app .qr-campaign h2 { font-size: 15px; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.qr-type-label { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--ih-accent-text); }
.qr-campaign-identity p { font-size: 10px; color: var(--ih-muted); margin-top: 5px; }
.qr-campaign-content { min-width: 0; }
.qr-destination { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ih-muted); font-size: 11px; margin-bottom: 8px; }
.qr-campaign-link { font-size: 12px; color: var(--ih-accent-text); }
.qr-campaign-link button { padding: 5px; color: var(--ih-muted); }
.qr-campaign-metric { display: flex; align-items: baseline; gap: 7px; }
.qr-campaign-metric strong { font-size: 24px; }.qr-campaign-metric span { color: var(--ih-muted); font-size: 11px; }
.qr-campaign-actions { border-top: 1px solid var(--ih-line); padding-top: 14px; gap: 9px; flex-wrap: wrap; font-size: 11px; }
.qr-campaign-actions a { display: flex; align-items: center; gap: 5px; min-height: 32px; }
.qr-edit-link { color: var(--ih-accent-text); }.qr-delete { color: var(--ih-muted); margin-left: auto; padding: 7px; }.qr-delete:hover { color: #ee8792; }
.qr-library-empty { grid-column: 1/-1; padding: 50px 20px; text-align: center; border: 1px dashed var(--ih-line); border-radius: 14px; }
.qr-library-empty p { color: var(--ih-muted); font-size: 13px; margin: 12px 0 20px; }.qr-library-empty > svg { margin: auto auto 16px; width: 32px; height: 32px; }
.qr-collection[data-view="list"] { grid-template-columns: 1fr; }
.qr-collection[data-view="list"] .qr-campaign { grid-template-columns: minmax(150px,1fr) minmax(120px,1fr) auto; align-items: center; }
.qr-collection[data-view="list"] .qr-campaign-actions { grid-column: 1/-1; }
@media(max-width:639px) { .qr-collection[data-view="list"] .qr-campaign { grid-template-columns: minmax(0,1fr) auto; }.qr-collection[data-view="list"] .qr-campaign-content { grid-column: 1/-1; grid-row: 2; } }
.landing-campaign-label { display: flex; align-items: center; gap: 12px; font-size: 12px; flex-wrap: wrap; }
.landing-campaign-label select { padding: 10px; border: 1px solid var(--ih-line); border-radius: 8px; max-width: 100%; }
.landing-editor-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,380px); gap: 30px; align-items: start; max-width: 1100px; }
.landing-editor { display: grid; gap: 18px; min-width: 0; }
.landing-editor section { padding: 22px; background: var(--ih-surface); border: 1px solid var(--ih-line); border-radius: 13px; }
.ih-app .landing-editor h2 { font-size: 16px; text-transform: none; margin-bottom: 16px; }
.landing-editor label { display: grid; gap: 8px; font-size: 12px; margin-top: 14px; min-width: 0; }
.landing-editor :is(input:not([type=checkbox]),textarea,select) { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--ih-line); border-radius: 7px; font-size: 13px; }
.landing-editor input[type=color] { height: 42px; padding: 4px; }
.landing-editor input:disabled { opacity: .4; cursor: not-allowed; }
.landing-help { font-size: 11px; color: var(--ih-muted); margin-top: 12px; line-height: 1.7; }
.landing-style-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.landing-editor button { font-size: 12px; padding: 10px 13px; border: 1px solid var(--ih-line); border-radius: 7px; margin-top: 12px; }
.landing-block-row { display: flex; align-items: center; gap: 10px; }.landing-block-row label { display: flex; align-items: center; flex: 1; text-transform: capitalize; }
.landing-save-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; }.landing-save-actions button { margin: 0; }
.landing-preview { position: sticky; top: 24px; border: 1px solid var(--ih-line); border-radius: 16px; padding: 20px; background: var(--ih-surface); }
.landing-preview strong, .landing-preview small { display: block; font-size: 12px; }.landing-preview small { color: var(--ih-muted); font-size: 10px; margin: 7px 0 18px; }
.landing-preview iframe { width: 100%; height: 630px; border: 6px solid #263247; border-radius: 26px; background: #101827; }
@media(max-width:1050px) { .landing-editor-layout { grid-template-columns: minmax(0,1fr); }.landing-preview { position: static; max-width: 380px; width: 100%; } }
/* Appearance controls must remain usable beside the phone preview. */
.ih-app #dashAppearanceSection .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.ih-app #dashAppearanceSection input { min-width: 0; }
.ih-app [hidden] { display: none !important; }
.qr-library-header .designer-eyebrow { color: var(--ih-accent-text); }
.qr-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.qr-detail-editor { min-width: 0; grid-row: 1; }
.qr-detail-preview { min-width: 0; position: static; }
.qr-detail-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.qr-detail-tabs .detail-tab-btn { flex: 1 1 auto; justify-content: center; padding: 14px 10px; }
.qr-detail-tabs [aria-selected="true"] { background: var(--ih-accent-soft); border-radius: 9px 9px 0 0; }
.qr-detail-tabs button:focus-visible { outline: 2px solid var(--ih-accent-text); outline-offset: -2px; }
.qr-detail-template-notice { padding: 20px; border: 1px solid var(--ih-line); border-radius: 12px; background: var(--ih-accent-soft); font-size: 13px; }
.qr-detail-template-notice p { margin: 8px 0 16px; color: var(--ih-muted); line-height: 1.6; }
.qr-detail-preview #edit-smartphonePreviewWrapper, .qr-detail-published-preview { border: 1px solid var(--ih-line); border-radius: 16px; padding: 16px; background: var(--ih-surface); }
.qr-detail-preview #edit-phoneDeviceContainer { max-width: 300px; }
.qr-detail-preview-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 700; margin-bottom: 16px; }
.qr-detail-preview-heading span:last-child { color: var(--ih-muted); font-weight: 400; }
.qr-detail-phone-frame { display: block; width: min(100%, 300px); height: 570px; margin: auto; border: 9px solid #1e293b; border-radius: 32px; background: #101827; }
.qr-detail-published-preview p { font-size: 12px; color: var(--ih-muted); line-height: 1.6; margin-top: 16px; }
.qr-detail-preview #detailQrContainer { min-width: 0; min-height: 0; width: 240px; max-width: 100%; }
.qr-detail-preview #detailQrContainer :is(canvas,svg) { max-width: 100%; height: auto !important; }
.qr-detail-preview #detailPreviewWrapperInner { padding: 20px 10px; overflow: hidden; }
@media (min-width: 1280px) {
    .qr-detail-layout { grid-template-columns: minmax(0, 1fr) 340px; }
    .qr-detail-editor { grid-column: 1; grid-row: 1; }
    .qr-detail-preview { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
}
.admin-main { max-width: 1600px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.admin-heading h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin: 8px 0; letter-spacing: -.8px; }
.admin-heading p,.admin-muted { color: var(--ih-muted); font-size: 13px; line-height: 1.7; }
.admin-heading .designer-eyebrow { color: var(--ih-muted); }
.admin-card,.admin-metric,.admin-record { background: var(--ih-surface); border: 1px solid var(--ih-line); border-radius: 14px; padding: 22px; min-width: 0; }
.admin-card { margin-top: 20px; }
.admin-card h2 { font-size: 16px; font-weight: 750; margin-bottom: 14px; }
.admin-card h3 { font-size: 14px; font-weight: 700; }
.admin-card p,.admin-record p { font-size: 13px; line-height: 1.6; margin: 5px 0; }
.admin-card small,.admin-record small,.admin-metric small { color: var(--ih-muted); font-size: 11px; }
.admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.admin-metric { background: linear-gradient(150deg,var(--ih-surface),var(--ih-accent-soft)); display: flex; flex-direction: column; gap: 12px; }
.admin-metric > span { font-size: 12px; color: var(--ih-muted); }
.admin-metric > strong { font-size: 32px; font-weight: 800; }
.admin-metric > strong.admin-money { font-size: 20px; }
.admin-metric a,.admin-card a,.admin-pagination a { font-size: 12px; color: var(--ih-accent-text); }
.admin-filter { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--ih-surface); border: 1px solid var(--ih-line); border-radius: 12px; margin: 20px 0; }
.admin-shell label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.admin-filter label:first-child { flex: 1 1 220px; }
.admin-shell :is(input:not([type=checkbox]):not([type=hidden]),select,textarea) { min-width: 0; max-width: 100%; padding: 10px 12px; border: 1px solid var(--ih-line); border-radius: 8px; font-size: 13px; background: var(--ih-bg); color: var(--ih-fg); }
.admin-shell :is(button:not(.dashboard-close):not(#adminMenuToggle):not(.ih-theme-toggle)) { border-radius: 8px; }
.admin-main :is(button:not(.admin-tab-btn)) { padding: 10px 14px; border: 1px solid var(--ih-line); font-size: 12px; font-weight: 650; background: var(--ih-accent-soft); color: var(--ih-accent-text); }
.admin-main button:disabled { opacity: .4; cursor: not-allowed; }
.admin-main :is(button,a,input,select,textarea):focus-visible { outline: 2px solid var(--ih-accent-text); outline-offset: 3px; }
.admin-two-columns { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 20px; }
.admin-card-heading,.admin-stat-row { display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.admin-stat-row { padding: 14px 0; border-bottom: 1px solid var(--ih-line); font-size: 13px; flex-wrap: wrap; overflow-wrap: anywhere; }
.admin-stat-row:last-child { border-bottom: 0; }
.admin-badge { display: inline-block; padding: 6px 10px; border: 1px solid var(--ih-line); border-radius: 30px; font-size: 11px; background: var(--ih-accent-soft); color: var(--ih-accent-text); }
.admin-notice { padding: 16px; margin: 18px 0; border-radius: 12px; border: 1px solid var(--ih-line); background: var(--ih-accent-soft); font-size: 13px; line-height: 1.7; }
.admin-warning { color: #b7791f; }
:root[data-theme=dark] .admin-warning { color: #f4c777; }
.admin-ok { color: var(--ih-accent-text); }
.admin-records { display: grid; gap: 14px; }
.admin-record { display: grid; grid-template-columns: minmax(0,1fr) minmax(90px,.3fr) minmax(180px,.6fr); gap: 20px; align-items: center; }
.admin-record-title { font-size: 15px; font-weight: 750; overflow-wrap: anywhere; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 12px; }
.admin-actions form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.admin-actions input { width: 100%; }
.admin-pagination { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px 0; font-size: 12px; color: var(--ih-muted); }
.admin-pagination div { display: flex; gap: 20px; }
.admin-chart { height: 180px; display: flex; align-items: end; gap: 3px; padding-top: 20px; }
.admin-chart-bar { flex: 1; height: 100%; display: flex; align-items: end; min-width: 0; border-radius: 4px; }
.admin-chart-bar span { width: 100%; height: max(3px,var(--bar-height)); background: var(--ih-accent-text); border-radius: 4px 4px 0 0; opacity: .75; }
.admin-chart-bar:hover span,.admin-chart-bar:focus span { opacity: 1; }
.admin-chart-labels { display: flex; justify-content: space-between; margin-top: 12px; font-size: 10px; color: var(--ih-muted); }
.admin-empty { text-align: center; padding: 30px; color: var(--ih-muted); }
.admin-audit-event { padding: 18px 0; border-bottom: 1px solid var(--ih-line); }
.admin-audit-event:last-child { border-bottom: 0; }
.admin-shell pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; padding: 14px; margin: 12px 0; background: var(--ih-bg); border-radius: 8px; }
.admin-shell details { margin-top: 12px; font-size: 12px; }
.admin-shell summary { cursor: pointer; color: var(--ih-accent-text); }
.admin-wrap { overflow-wrap: anywhere; }
.admin-mail-form { display: grid; gap: 18px; }
@media (max-width:1100px) { .admin-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .admin-two-columns { grid-template-columns: minmax(0,1fr); } .admin-record { grid-template-columns: minmax(0,1fr); } }
@media (max-width:480px) { .admin-heading { align-items: start; } .admin-metrics { gap: 10px; } .admin-card,.admin-metric,.admin-record { padding: 16px; } .admin-filter label { width: 100%; } .admin-metric > strong { font-size: 26px; } }
