/* ==========================================================================
   QB Code Studio — Modern Tech Hybrid redesign layer
   Loaded after app.css. Visual only: no backend or JS contracts are changed.
   ========================================================================== */

:root {
    --navy: #101a33;
    --primary: #101a33;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --sky: #60a5fa;
    --bg: #f5f8fc;
    --surface: #ffffff;
    --text: #111827;
    --secondary: #64748b;
    --muted: #64748b;
    --muted-soft: #94a3b8;
    --border: #e4eaf2;
    --border-strong: #cbd5e1;
    --font-sans: "Google Sans", "Product Sans", Inter, Roboto, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --shadow-xs: 0 1px 2px rgba(16, 26, 51, 0.04);
    --shadow-sm: 0 6px 20px -12px rgba(16, 26, 51, 0.22);
    --shadow: 0 20px 45px -24px rgba(16, 26, 51, 0.28);
    --shadow-lg: 0 32px 70px -32px rgba(16, 26, 51, 0.32);
    --radius-lg: 18px;
    --radius-xl: 24px;
}

html {
    scroll-padding-top: 92px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
}

h1, h2, h3, h4 {
    color: var(--text);
    letter-spacing: -0.03em;
}

::selection {
    background: rgba(37, 99, 235, 0.16);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

/* Buttons ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 11px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.85);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 16px 30px -12px rgba(37, 99, 235, 0.9);
}

.btn-outline {
    border: 1px solid rgba(37, 99, 235, 0.24);
    background: rgba(255, 255, 255, 0.86);
    color: var(--accent);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: #eff6ff;
}

.btn-dark {
    background: var(--navy);
    box-shadow: 0 12px 24px -14px rgba(16, 26, 51, 0.8);
}

.btn-dark:hover {
    background: #1b2b52;
}

/* Navbar ------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 6px 24px -20px rgba(16, 26, 51, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-header-inner {
    height: 76px;
    gap: 18px;
}

/* Desktop: wrapper ini tidak membuat kotak layout baru, jadi posisi nav dan
   tombol aksi tetap mengikuti tata letak header yang lama. */
.site-menu {
    display: contents;
}

.brand {
    gap: 11px;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(140deg, var(--accent), #1e3a8a 78%);
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.85);
}

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

.brand-text strong {
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.brand-text span {
    color: var(--muted-soft);
    letter-spacing: 0.14em;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--navy);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover {
    border-color: var(--accent);
    background: #eff6ff;
    transform: translateY(-1px);
}

.nav-toggle svg {
    width: 21px;
    height: 21px;
}

.nav-toggle .icon-close {
    display: none;
}

.site-header.is-nav-open .icon-menu {
    display: none;
}

.site-header.is-nav-open .icon-close {
    display: block;
}

.site-nav a {
    position: relative;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 500;
}

.site-nav a::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 5px;
    left: 13px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.site-nav a:hover {
    background: #eff6ff;
    color: var(--accent);
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

/* Hero --------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 92px;
    background:
        radial-gradient(circle at 82% 22%, rgba(96, 165, 250, 0.2), transparent 34%),
        radial-gradient(circle at 12% 88%, rgba(37, 99, 235, 0.1), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse at 75% 45%, #000 5%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 75% 45%, #000 5%, transparent 72%);
    animation: grid-drift 18s linear infinite alternate;
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 56px;
}

.hero h1 {
    max-width: 660px;
    font-size: clamp(2.2rem, 4.4vw, 3.85rem);
    line-height: 1.08;
    font-weight: 800;
}

.hero h1 .gradient-text {
    background: linear-gradient(100deg, var(--accent), #60a5fa 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 600px;
    margin-top: 22px;
    color: var(--secondary);
    font-size: clamp(1rem, 1.2vw, 1.075rem);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-actions .btn {
    min-height: 50px;
    padding: 0 22px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
}

.hero-points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 500;
}

.hero-points svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.hero-visual {
    position: relative;
    min-height: 430px;
}

.hero-glow {
    position: absolute;
    inset: 12% 4% 6% 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), transparent 68%);
    filter: blur(28px);
    animation: pulse-glow 6s ease-in-out infinite alternate;
}

.mock-window {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(37, 99, 235, 0.06);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
    animation: float-card 7s ease-in-out infinite;
}

.mock-window-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: #fbfdff;
}

.mock-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mock-dot:first-child {
    background: #60a5fa;
}

.mock-window-title {
    margin-left: 10px;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

.mock-window-body {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 30px 26px;
}

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

.mock-label,
.mock-input,
.mock-button {
    border-radius: 8px;
}

.mock-label {
    width: 72%;
    height: 8px;
    background: #dbe4f0;
}

.mock-label.short {
    width: 48%;
}

.mock-input {
    height: 36px;
    border: 1px solid var(--border);
    background: #f8fbff;
}

.mock-input.short {
    width: 76%;
}

.mock-button {
    width: 58%;
    height: 34px;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
}

.mock-qr {
    display: grid;
    place-items: center;
    width: 148px;
    height: 148px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    animation: assemble 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mock-qr svg,
.mock-qr canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    color: var(--navy);
}

.mock-qr > svg:first-child:last-child {
    width: 76px !important;
    height: 76px !important;
}

.mock-barcode {
    position: absolute;
    right: 6px;
    bottom: 34px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 64px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mock-barcode::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 46px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.28), transparent);
    animation: scan 2.6s ease-in-out infinite;
}

.mock-bar {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: var(--navy);
}

.mock-bar:nth-child(1) { height: 70%; }
.mock-bar:nth-child(2) { height: 100%; width: 2px; }
.mock-bar:nth-child(3) { height: 55%; width: 5px; }
.mock-bar:nth-child(4) { height: 88%; }
.mock-bar:nth-child(5) { height: 42%; width: 2px; }
.mock-bar:nth-child(6) { height: 96%; width: 4px; }
.mock-bar:nth-child(7) { height: 64%; }
.mock-bar:nth-child(8) { height: 100%; width: 2px; }
.mock-bar:nth-child(9) { height: 48%; width: 5px; }
.mock-bar:nth-child(10) { height: 82%; }

.floating-card {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--navy);
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    animation: float-soft 5s ease-in-out infinite;
}

.floating-card svg {
    width: 17px;
    height: 17px;
    color: var(--accent);
}

.floating-card.top {
    top: 26px;
    left: -12px;
    animation-delay: -1.2s;
}

.floating-card.bottom {
    right: -10px;
    bottom: 150px;
    animation-delay: -3s;
}

/* Hero 3D illustration ------------------------------------------------------ */
.hero-3d-art {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    overflow: visible;
}

.hero-3d-panel,
.hero-3d-qr,
.hero-3d-barcode,
.hero-3d-chip,
.hero-3d-cursor,
.hero-3d-glow,
.hero-3d-scan,
.hero-3d-ripple,
.hero-3d-spark {
    transform-box: fill-box;
    transform-origin: center;
}

.hero-3d-panel {
    animation: hero3d-float 7s ease-in-out infinite;
}

.hero-3d-qr {
    animation: hero3d-float 6.4s ease-in-out -1.1s infinite;
}

.hero-3d-barcode {
    animation: hero3d-float 5.8s ease-in-out -2.4s infinite;
}

.hero-3d-chip.chip-one {
    animation: hero3d-float 5.2s ease-in-out -0.6s infinite;
}

.hero-3d-chip.chip-two {
    animation: hero3d-float 5.6s ease-in-out -3s infinite;
}

.hero-3d-cursor {
    animation: hero3d-click 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.hero-3d-ripple {
    animation: hero3d-ripple 2.8s ease-out infinite;
}

.hero-3d-ripple.ripple-two {
    animation-delay: 0.18s;
}

.hero-3d-scan {
    animation: hero3d-scan 3.2s ease-in-out infinite;
}

.hero-3d-glow {
    animation: pulse-glow 6s ease-in-out infinite alternate;
}

.hero-3d-spark {
    animation: hero3d-spark 3.4s ease-in-out infinite;
}

.hero-3d-spark.spark-two {
    animation-delay: -1.2s;
}

.hero-3d-spark.spark-three {
    animation-delay: -2.1s;
}

@keyframes hero3d-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes hero3d-click {
    0%, 100% { transform: translateY(0); }
    12% { transform: translateY(5px); }
    24% { transform: translateY(0); }
}

@keyframes hero3d-ripple {
    0% { opacity: 0; transform: scale(0.55); }
    18% { opacity: 0.95; }
    62%, 100% { opacity: 0; transform: scale(2.4); }
}

@keyframes hero3d-scan {
    0% { transform: translateX(0); opacity: 0; }
    20%, 75% { opacity: 0.85; }
    100% { transform: translateX(218px); opacity: 0; }
}

@keyframes hero3d-spark {
    0%, 100% { opacity: 0.35; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.35); }
}

/* Sections ----------------------------------------------------------------- */
.section {
    padding: 88px 0;
}

.section-alt {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.section-kicker {
    color: var(--accent);
    letter-spacing: 0.16em;
}

.section-title {
    font-size: clamp(1.85rem, 3.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.18;
}

.section-lead {
    color: var(--secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.feature-card,
.tool-card,
.step-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover,
.tool-card:hover,
.step-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.feature-icon {
    border-radius: 13px;
    background: linear-gradient(140deg, #eff6ff, #dbeafe);
    color: var(--accent);
}

.feature-card h3,
.tool-card h3,
.step-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.feature-card p,
.tool-card p,
.step-card p {
    color: var(--secondary);
    font-size: 0.875rem;
    line-height: 1.7;
}

.tool-card {
    position: relative;
    padding: 32px;
    overflow: hidden;
}

.tool-card::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.09), transparent 70%);
    pointer-events: none;
}

.tool-illustration {
    display: grid;
    place-items: center;
    height: 132px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        #fbfdff;
    background-size: 20px 20px;
}

.tool-illustration svg {
    width: 84px;
    height: 84px;
    color: var(--accent);
}

.chip {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 600;
}

.step-card {
    position: relative;
    padding: 30px;
}

.step-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 13px;
    background: var(--navy);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.step-card::after {
    content: "";
    position: absolute;
    top: 44px;
    right: -24px;
    width: 24px;
    border-top: 2px dashed rgba(37, 99, 235, 0.3);
}

.step-card:last-child::after {
    display: none;
}

.cta-band {
    position: relative;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 88% 20%, rgba(96, 165, 250, 0.32), transparent 38%),
        linear-gradient(120deg, var(--navy), #162a55 68%, #1d4ed8 140%);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.cta-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 28px;
    padding: 44px 48px;
}

.cta-band h2,
.cta-band p {
    color: #fff;
}

.cta-band h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.cta-band p {
    margin-top: 10px;
    opacity: 0.78;
}

.cta-illustration {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(-6deg);
}

.cta-illustration svg {
    width: 48px;
    height: 48px;
}

.cta-band::after {
    content: "";
    position: absolute;
    right: 24%;
    bottom: -60px;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    transform: rotate(14deg);
    pointer-events: none;
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
    border-top: 2px solid var(--accent);
    background: var(--surface);
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(180px, 0.7fr);
    align-items: center;
    gap: 32px;
    padding-block: 48px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.footer-links a {
    color: var(--secondary);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom-bar {
    background: var(--navy);
}

.footer-bottom .copyright {
    color: rgba(226, 232, 240, 0.6);
    font-size: 0.78rem;
    font-weight: 300;
}

.footer-bottom .copyright-text {
    font-weight: 300;
}

.footer-bottom .copyright-mark {
    stroke-width: 1.4;
}

.footer-privacy {
    color: rgba(203, 213, 225, 0.6);
    font-size: 0.78rem;
    font-weight: 300;
    text-decoration-color: rgba(203, 213, 225, 0.45);
}

.footer-privacy:hover,
.footer-privacy:focus-visible {
    color: rgba(248, 250, 252, 0.9);
    text-decoration-color: rgba(248, 250, 252, 0.9);
}

/* App shell / dashboard ----------------------------------------------------- */
.app-shell {
    background: var(--bg);
}

.sidebar {
    background: linear-gradient(180deg, var(--navy), #14224a 70%, #162a55);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar .brand {
    color: #fff;
}

.sidebar .brand-text span {
    color: rgba(255, 255, 255, 0.55);
}

.sidebar .brand-mark {
    background: linear-gradient(140deg, var(--accent), var(--sky));
}

.nav-group-label {
    color: rgba(255, 255, 255, 0.42);
    letter-spacing: 0.14em;
}

.sidebar .nav-link {
    color: rgba(226, 232, 240, 0.72);
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar .nav-link.is-active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(37, 99, 235, 0.6));
    color: #fff;
    box-shadow: 0 10px 24px -14px rgba(37, 99, 235, 0.9);
}

.sidebar-user {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-meta strong {
    color: #fff;
}

.sidebar-user-meta span {
    color: rgba(226, 232, 240, 0.6);
}

.sidebar-logout {
    color: rgba(226, 232, 240, 0.7);
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-guest-actions {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.sidebar-guest-actions .btn {
    width: 100%;
}

.topbar {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.topbar-title strong {
    color: var(--text);
}

.topbar-title span {
    color: var(--secondary);
}

.app-content {
    background: var(--bg);
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--sky));
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(180deg, #1e3a8a, #60a5fa);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(180deg, #16a34a, #86efac);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-value {
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.stat-label {
    color: var(--secondary);
}

.stat-icon {
    border-radius: 13px;
    background: #eff6ff;
    color: var(--accent);
}

.stat-icon.dark {
    background: #e8edf7;
    color: var(--navy);
}

.stat-icon.green {
    background: #ecfdf3;
    color: #16a34a;
}

.quick-card,
.activity-item {
    border: 1px solid transparent;
    border-radius: 13px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.quick-card:hover,
.activity-item:hover {
    border-color: rgba(37, 99, 235, 0.2);
    background: #f8fbff;
    transform: translateX(3px);
}

/* Forms, generators, previews ---------------------------------------------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card-header {
    border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
    font-weight: 700;
}

.card-header p,
.hint {
    color: var(--secondary);
}

.label {
    color: var(--text);
    font-weight: 600;
}

.input,
.select,
.textarea {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: var(--sky);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.type-option input:checked + .type-option-body {
    border-color: var(--accent);
    background: #eff6ff;
    color: var(--accent);
    box-shadow: 0 10px 20px -14px rgba(37, 99, 235, 0.8);
}

.type-option-body {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: all 0.2s ease;
}

.type-option-body:hover {
    border-color: var(--sky);
    transform: translateY(-2px);
}

.design-panel,
.type-panel {
    border: 0;
    border-radius: 0;
    background: var(--surface);
}

.preview-panel,
.preview-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.preview-canvas {
    border-radius: 14px;
    background:
        linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
        #ffffff;
    background-size: 18px 18px;
}

.range-row input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #bfdbfe);
    accent-color: var(--accent);
    cursor: pointer;
}

.color-row input[type="color"] {
    width: 44px;
    height: 36px;
    padding: 3px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.type-panel-title {
    color: var(--navy);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.type-panel-title svg {
    color: var(--accent);
}

.design-panel > summary {
    border-radius: 12px;
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
}

.design-panel > summary::-webkit-details-marker {
    color: var(--accent);
}

.badge {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.preview-status {
    color: var(--secondary);
    font-size: 0.82rem;
}

.preview-note {
    border-radius: 10px;
    background: #f8fbff;
    color: var(--secondary);
}

.save-row {
    border-top: 1px solid var(--border);
}

/* Auth --------------------------------------------------------------------- */
.auth-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
}

.auth-card > p {
    color: var(--secondary);
}

/* Scroll reveal + entrance -------------------------------------------------- */
.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes grid-drift {
    from { background-position: 0 0; }
    to { background-position: 46px 46px; }
}

@keyframes pulse-glow {
    from { opacity: 0.65; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1.05); }
}

@keyframes float-card {
    0%, 100% { transform: perspective(1200px) rotateY(-5deg) rotateX(2deg) translateY(0); }
    50% { transform: perspective(1200px) rotateY(-3deg) rotateX(1deg) translateY(-12px); }
}

@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes scan {
    0% { transform: translateX(-40px); opacity: 0; }
    35% { opacity: 1; }
    100% { transform: translateX(360px); opacity: 0; }
}

@keyframes assemble {
    from { opacity: 0; transform: scale(0.82) rotate(-6deg); }
    to { opacity: 1; transform: none; }
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
    .hero-grid {
        gap: 36px;
    }

    .hero-visual {
        min-height: 380px;
    }

    .step-card::after {
        display: none;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    /* Satu panel untuk tautan dan tombol aksi: tidak ada dua kotak absolut
       yang bertumpukan di layar kecil. */
    .site-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        left: 16px;
        z-index: 1;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-lg);
    }

    .site-header.is-nav-open .site-menu {
        display: flex;
    }

    .site-header.is-nav-open .site-nav {
        display: flex;
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .site-nav a {
        padding: 11px 14px;
    }

    .site-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .site-actions .btn,
    .site-actions .btn-ghost {
        width: 100%;
        display: inline-flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-copy {
        max-width: 720px;
    }

    .hero-visual {
        order: 0;
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .hero {
        padding: 64px 0 72px;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .generator-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .cta-band {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 32px 26px;
        gap: 20px;
    }

    .cta-illustration {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .cta-illustration svg {
        width: 36px;
        height: 36px;
    }

    .cta-band .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .site-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
        padding-block: 40px;
    }

    .mock-window-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .mock-form {
        width: 100%;
    }

    .floating-card.top {
        left: 0;
    }

    .floating-card.bottom {
        right: 0;
        bottom: 120px;
    }
}

@media (max-width: 520px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-points {
        gap: 10px 16px;
    }

    .hero-visual {
        min-height: 360px;
    }

    .mock-window {
        transform: none;
        animation: float-soft 6s ease-in-out infinite;
    }

    .mock-qr {
        width: 124px;
        height: 124px;
    }

    .mock-barcode {
        right: -4px;
        bottom: 22px;
        transform: scale(0.85);
        transform-origin: right bottom;
    }

    .floating-card {
        font-size: 0.68rem;
        padding: 9px 11px;
    }

    .floating-card.top {
        top: 10px;
        left: -4px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        padding: 24px;
    }

    .site-footer-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-block: 44px 40px;
    }

    .footer-brand {
        grid-column: auto;
        min-width: 0;
        padding-bottom: 4px;
    }

    .footer-links {
        justify-content: flex-start;
        gap: 10px 18px;
    }

    .footer-links a {
        font-size: 0.875rem;
    }

    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
        padding-block: 24px;
    }

    .footer-bottom .copyright {
        white-space: nowrap;
    }

    .footer-privacy {
        margin-left: 0;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .inline-actions {
        width: 100%;
    }

    .inline-actions .btn {
        flex: 1;
    }
}

@media (max-width: 360px) {
    .hero-points {
        flex-direction: column;
    }

    .mock-window-body {
        padding: 22px 18px;
    }

    .floating-card {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Generator form — structured, step-based layout
   -------------------------------------------------------------------------- */

.generator-form .card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.generator-heading-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--accent);
}

.generator-heading-icon svg {
    width: 22px;
    height: 22px;
}

.generator-heading-copy {
    min-width: 0;
    flex: 1;
}

.generator-heading-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.generator-heading-top h2 {
    margin: 0;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.step-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.form-section + .form-section {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px dashed var(--border);
}

.form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.form-section-index {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
}

.form-section-title {
    margin: 1px 0 3px;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 700;
}

.form-section-desc {
    margin: 0;
    color: var(--secondary);
    font-size: 0.78rem;
    line-height: 1.5;
}

.generator-form .type-selector {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.generator-form .type-option-body {
    flex-direction: row;
    align-items: center;
    gap: 7px;
    min-height: 0;
    padding: 7px 9px;
    font-size: 0.74rem;
    line-height: 1.25;
}

.generator-form .type-option-body svg {
    box-sizing: content-box;
    width: 14px;
    height: 14px;
    padding: 4px;
    border-radius: 6px;
    background: #eff6ff;
    color: var(--accent);
    opacity: 1;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.generator-form .type-option input:checked + .type-option-body svg {
    background: var(--accent);
    color: #fff;
}

.form-section .design-panel {
    margin-top: 0;
    padding-top: 14px;
    border-top: 0;
}

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

.download-settings .field + .field {
    margin-top: 0;
}

.download-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

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

.style-choice {
    position: relative;
    display: block;
    cursor: pointer;
}

.style-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.style-choice-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 12px 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--secondary);
    text-align: center;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.style-choice:hover .style-choice-inner {
    border-color: var(--sky);
    transform: translateY(-1px);
}

.style-choice input:checked + .style-choice-inner {
    border-color: var(--accent);
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 8px 18px -12px rgba(37, 99, 235, 0.9);
}

.style-choice input:focus-visible + .style-choice-inner {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

.style-choice-art {
    display: grid;
    place-items: center;
    width: 44px;
    height: 40px;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
}

.style-choice-art svg {
    width: 34px;
    height: 28px;
}

.style-choice input:checked + .style-choice-inner .style-choice-art {
    background: #fff;
    color: #1d4ed8;
}

.style-choice-label {
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
}

.frame-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.frame-choice-grid .style-choice-art {
    width: 100%;
    height: 42px;
}

.frame-design-section {
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.design-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.section-kicker {
    color: #0369a1;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.frame-gallery-toolbar {
    display: grid;
    gap: 9px;
    margin: 12px 0;
}

.frame-search {
    height: 36px;
    font-size: 0.8rem;
}

.frame-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.frame-filter {
    padding: 5px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.frame-filter:hover {
    border-color: #00a8e8;
    color: #0057b8;
    transform: translateY(-1px);
}

.frame-filter.is-active {
    border-color: #0057b8;
    background: #0057b8;
    color: #fff;
}

.frame-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.frame-card {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.frame-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.frame-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    height: 100%;
    padding: 7px 5px 8px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: var(--secondary);
    text-align: center;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.frame-card:hover .frame-card-inner {
    border-color: #00a8e8;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -12px rgba(0, 87, 184, 0.65);
}

.frame-card input:checked + .frame-card-inner {
    border-color: #0057b8;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(0, 168, 232, 0.24), 0 10px 20px -14px rgba(0, 43, 103, 0.8);
}

.frame-card input:focus-visible + .frame-card-inner {
    outline: 3px solid rgba(0, 168, 232, 0.35);
    outline-offset: 2px;
}

.frame-card-art {
    display: grid;
    place-items: center;
    width: 100%;
    height: 48px;
    padding: 2px;
    border-radius: 8px;
    background: #f8fafc;
}

.frame-card-art svg {
    width: 100%;
    max-width: 62px;
    height: 44px;
}

.frame-card-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.frame-card-name {
    overflow: hidden;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frame-card-category {
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.1;
}

.frame-card-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 13px;
    height: 13px;
    padding: 2px;
    border-radius: 50%;
    background: #0057b8;
    color: #fff;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.frame-card input:checked + .frame-card-inner .frame-card-check {
    opacity: 1;
    transform: scale(1);
}

.frame-card[hidden],
.frame-customization[hidden],
#frame_title_field[hidden] {
    display: none !important;
}

.frame-empty {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    text-align: center;
}

.frame-customization {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-strong);
}

.frame-subtitle {
    margin: 0 0 9px;
    color: #002b67;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.label-row .label {
    flex: 1;
}

.char-count {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.color-row.is-muted {
    opacity: 0.5;
    filter: grayscale(0.7);
}

.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.preset-chip {
    padding: 6px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.preset-chip:hover {
    border-color: var(--accent);
    background: #eff6ff;
    color: #1d4ed8;
}

.style-help {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 3px solid #bfdbfe;
    border-radius: 0 8px 8px 0;
    background: #f8fbff;
    color: var(--secondary);
    font-size: 0.76rem;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .generator-form .type-selector {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .frame-choice-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .frame-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .generator-form .card-header {
        align-items: flex-start;
        gap: 11px;
    }

    .generator-heading-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 10px;
    }

    .generator-form .type-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .frame-card-art {
        height: 42px;
    }

    .frame-card-art svg {
        max-width: 54px;
        height: 38px;
    }

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

    .download-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 360px) {
    .download-settings {
        grid-template-columns: minmax(0, 1fr);
    }
}

