/* Etiket Ayırıcı — sade ama rafine: beyaz kartlar, çok hafif gölge, daha güzel ritim */

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

:root {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --surface-soft: #f4f6f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #64748b;
    --border: #e2e6ed;
    --border-strong: #cbd2dc;
    --brand: #157c36;
    --brand-hover: #115d29;
    --brand-soft: #ecf7f0;
    --yellow: #facc15;
    --yellow-soft: #fffceb;
    --yellow-border: #fde68a;
    --yellow-text: #713f12;
    --orange: #ea580c;
    --orange-soft: #fff5ec;
    --orange-border: #fed7aa;
    --orange-text: #9a3412;
    --manav: #16a34a;
    --manav-soft: #ecfdf5;
    --manav-border: #bbf7d0;
    --manav-text: #14532d;
    --zero-price: #6366f1;
    --zero-price-soft: #eef2ff;
    --zero-price-border: #c7d2fe;
    --zero-price-text: #312e81;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.045);
    --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-card-hover: 0 4px 16px rgba(15, 23, 42, 0.08);
    --radius: 14px;
    --radius-sm: 9px;
    --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

html { color-scheme: only light; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 100% 70% at 50% -28%, rgba(21, 124, 54, 0.11), transparent 55%),
        radial-gradient(ellipse 55% 40% at 100% 10%, rgba(250, 204, 21, 0.07), transparent 50%),
        radial-gradient(ellipse 50% 35% at 0% 90%, rgba(234, 88, 12, 0.05), transparent 55%);
    background-attachment: fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

.page {
    max-width: 800px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

/* Üst */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 230, 237, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

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

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(21, 124, 54, 0.08);
}

.brand-text .kicker {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand);
}

.brand-text h1 {
    margin: 3px 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.topbar .brand .brand-ver {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border: 1px solid #0e6a2e;
    border-radius: 999px;
    background: #157c36;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 16px;
    vertical-align: 1px;
}

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

/* Hero + akordeonlar */
.hero {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 4px 18px;
    margin-bottom: 24px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--brand) 0%,
        rgba(21, 124, 54, 0.35) 42%,
        rgba(234, 88, 12, 0.35) 72%,
        rgba(250, 204, 21, 0.5) 100%
    );
    pointer-events: none;
}

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

.accordion:last-of-type {
    border-bottom: none;
}

.accordion > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    user-select: none;
    transition: color .15s ease;
}

.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary:hover { color: var(--brand); }

.accordion-chevron {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--surface-soft);
    transition: background .15s ease;
}

.accordion-chevron::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg) translate(-1.5px, -1.5px);
    transition: transform .2s ease, border-color .15s ease;
}

.accordion[open] > summary .accordion-chevron {
    background: var(--brand-soft);
}

.accordion[open] > summary .accordion-chevron::after {
    transform: rotate(-135deg) translate(-1.5px, -1.5px);
    border-color: var(--brand);
}

.accordion[open] > summary { color: var(--brand); }

.accordion-body {
    padding: 2px 0 18px;
}

.howto-outro {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.58;
    color: var(--text-secondary);
}

.howto-outro strong:first-child {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 600;
}

.howto-outro strong:not(.ink-yellow):not(.ink-orange) {
    color: var(--text);
    font-weight: 600;
}

.howto-steps {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.howto-steps li { margin-bottom: 10px; }
.howto-steps li:last-child { margin-bottom: 0; }
.howto-steps li::marker { color: var(--brand); font-weight: 700; }

.howto-steps strong { color: var(--text); font-weight: 600; }

.howto-video-wrap {
    width: min(100%, 420px);
    margin: 18px auto 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow-sm);
}

.howto-video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    aspect-ratio: 9 / 16;
    background: #000;
    object-fit: contain;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .howto-video-wrap {
        width: min(100%, 320px);
        margin-top: 14px;
        border-radius: 10px;
    }

    .howto-video {
        max-height: 58vh;
    }
}

.ink-yellow { color: var(--yellow-text); font-weight: 600; }
.ink-orange { color: var(--orange-text); font-weight: 600; }

/* Kartlar */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s var(--ease), border-color 0.2s var(--ease);
}

#uploadCard:hover {
    border-color: #cfe8d4;
    box-shadow: var(--shadow-md);
}

.result-card:not(.hidden):hover {
    box-shadow: var(--shadow-md);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-head .step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
}

.card-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.hidden { display: none !important; }

/* Yükleme */
.dropzone {
    display: block;
    cursor: pointer;
    padding: 28px 16px;
    text-align: center;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0%, rgba(21, 124, 54, 0.06), transparent 58%),
        var(--surface-soft);
    transition: border-color 0.22s var(--ease), background 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.dropzone:hover,
.dropzone.is-drag {
    border-color: var(--brand);
    background:
        radial-gradient(circle at 50% 0%, rgba(21, 124, 54, 0.12), transparent 62%),
        var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(21, 124, 54, 0.1);
}

.dropzone.is-drag { transform: scale(1.008); }

.dropzone.has-file {
    border-style: solid;
    border-color: var(--brand);
    background: var(--brand-soft);
}

.dropzone:focus-within {
    outline: none;
    border-color: var(--brand);
}

.dropzone-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dropzone-icon {
    width: 38px;
    height: 38px;
    color: var(--brand);
    margin-bottom: 10px;
    padding: 8px;
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow-sm), 0 2px 8px rgba(21, 124, 54, 0.08);
    transition: transform 0.25s var(--ease);
}

.dropzone:hover .dropzone-icon,
.dropzone.is-drag .dropzone-icon {
    transform: translateY(-2px);
}

.dropzone-body strong { font-size: 15px; color: var(--text); font-weight: 600; }
.dropzone-body span { font-size: 14px; color: var(--text-secondary); }
.dropzone-body small { font-size: 12px; color: var(--muted); margin-top: 2px; }

.actions { margin-top: 16px; }

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    line-height: 1.35;
    transition: background .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}

.btn:hover { background: var(--surface-soft); }
.btn:active { transform: translateY(1px); }

.btn-primary {
    width: 100%;
    border-color: transparent;
    background: #15803d;
    color: #fff;
    min-height: 44px;
    font-size: 15px;
    white-space: normal;
    text-align: center;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 2px 8px rgba(21, 124, 54, 0.28);
}

.btn-primary:hover {
    background: #166534;
    border-color: transparent;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 14px rgba(21, 124, 54, 0.32);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

@keyframes spectrum-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.btn-primary.btn-primary--spectrum {
    background: linear-gradient(
        105deg,
        #fffbeb 0%,
        #fef9c3 8%,
        #fde047 18%,
        #facc15 28%,
        #fcd34d 38%,
        #fb923c 52%,
        #fdba74 62%,
        #f97316 75%,
        #fbbf24 88%,
        #fff7ed 100%
    );
    background-size: 400% 100%;
    animation: spectrum-shift 14s ease-in-out infinite alternate;
    color: #422006;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.38) inset,
        0 2px 16px rgba(251, 146, 60, 0.38);
    transition:
        box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s ease,
        filter 0.45s ease;
}

.btn-primary.btn-primary--spectrum:hover {
    background-size: 400% 100%;
    filter: brightness(1.03) saturate(1.06);
    border-color: transparent;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.48) inset,
        0 6px 24px rgba(249, 115, 22, 0.38);
    transform: translateY(-1px);
}

.btn-primary.btn-primary--spectrum:active {
    transform: translateY(0);
    filter: brightness(0.99) saturate(1.02);
    transition-duration: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary.btn-primary--spectrum {
        animation: none;
        background-size: 100% 100%;
        background-position: center;
    }
}

.btn-ghost {
    background: transparent;
}

.btn-yellow {
    border-color: #d4a508;
    background: var(--yellow);
    color: #422006;
}

.btn-yellow:hover { filter: brightness(0.97); background: var(--yellow); }

.btn-orange {
    border-color: #c2410c;
    background: var(--orange);
    color: #fff;
}

.btn-orange:hover { filter: brightness(1.04); background: var(--orange); }

.btn-install {
    border: none;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(21, 124, 54, 0.25);
}

.btn-install:hover { background: var(--brand-hover); }

.btn-svg-icon {
    flex-shrink: 0;
    width: 1.2em;
    height: 1.2em;
    display: block;
}

.btn-install .btn-svg-icon {
    width: 18px;
    height: 18px;
}

.copy-icon {
    display: inline-flex;
    align-items: center;
}

.copy-icon .btn-svg-icon {
    width: 1.1em;
    height: 1.1em;
}

/* Yükleniyor */
.status-card {
    position: relative;
    overflow: hidden;
    padding: 26px 22px 28px;
}

.status-card__pulse {
    position: absolute;
    inset: -45% -20%;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 28% 42%, rgba(253, 230, 138, 0.55) 0%, transparent 58%),
        radial-gradient(ellipse 50% 42% at 72% 58%, rgba(251, 146, 60, 0.42) 0%, transparent 55%),
        radial-gradient(ellipse 40% 35% at 50% 80%, rgba(254, 243, 199, 0.5) 0%, transparent 50%);
    animation: status-glow-move 9s ease-in-out infinite alternate;
}

@keyframes status-glow-move {
    0% {
        transform: translate(-4%, -2%) rotate(0deg) scale(1);
        opacity: 0.82;
    }
    100% {
        transform: translate(6%, 4%) rotate(6deg) scale(1.06);
        opacity: 1;
    }
}

.status-card__main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.status-card__msg {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.status-card__tick {
    margin: -2px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-secondary);
    min-height: 1.45em;
    letter-spacing: -0.01em;
    transition: opacity 0.2s ease;
}

.status-tick--pop {
    animation: status-tick-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes status-tick-pop {
    0% {
        opacity: 0.2;
        transform: translateY(5px);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.status-card__steps {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.status-card__step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--muted);
    transition: color 0.22s ease;
}

.status-card__step-text {
    flex: 1;
    min-width: 0;
}

.status-card__step-ok {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 1.5px solid rgba(148, 163, 184, 0.55);
    flex-shrink: 0;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.status-step--on .status-card__step-text {
    color: var(--text);
    font-weight: 600;
}

.status-step--on .status-card__step-ok {
    border-color: rgba(251, 146, 60, 0.75);
    box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.28);
}

.status-step--done .status-card__step-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-step--done .status-card__step-ok {
    border: none;
    background: linear-gradient(145deg, #22c55e, #15803d);
    box-shadow: 0 1px 5px rgba(21, 128, 61, 0.35);
}

.status-step--done .status-card__step-ok::after {
    content: "✓";
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.status-card__bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    overflow: hidden;
    border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
    background: rgba(148, 163, 184, 0.18);
}

.status-card__bar-fill {
    height: 100%;
    width: 45%;
    max-width: 180px;
    border-radius: 999px;
    background: linear-gradient(90deg, #fde047, #fbbf24, #fb923c, #f97316);
    animation: status-bar-slide 1.45s ease-in-out infinite;
    opacity: 0.92;
}

@keyframes status-bar-slide {
    0% { transform: translateX(-130%); }
    100% { transform: translateX(420%); }
}

.status-card__text {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: -0.02em;
    background: linear-gradient(
        100deg,
        var(--text-secondary) 0%,
        var(--text) 35%,
        var(--text-secondary) 70%,
        var(--text) 100%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: status-text-shine 3.2s ease-in-out infinite;
}

.status-card__dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-card__dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(145deg, #facc15, #f97316);
    box-shadow: 0 1px 3px rgba(249, 115, 22, 0.35);
    animation: status-dot-bounce 0.95s ease-in-out infinite;
}

.status-card__dots span:nth-child(2) { animation-delay: 0.16s; }
.status-card__dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes status-text-shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes status-dot-bounce {
    0%, 70%, 100% {
        transform: translateY(0);
        opacity: 0.55;
    }
    35% {
        transform: translateY(-7px);
        opacity: 1;
    }
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.status-spinner {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 14px rgba(251, 146, 60, 0.28));
}

/* Dikey spektrum + süren tarama hüzmesi (barkod şekli yok, belirgin hareket) */
.status-busy {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.42);
    background:
        radial-gradient(ellipse 85% 70% at 50% 100%, rgba(253, 224, 71, 0.22), transparent 62%),
        linear-gradient(165deg, #fffefa 0%, #fef9c3 45%, #fde68a 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.5) inset,
        0 3px 8px rgba(180, 83, 9, 0.1) inset;
}

.status-busy__cols {
    position: absolute;
    z-index: 0;
    left: 9px;
    right: 9px;
    bottom: 9px;
    height: 34px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
}

.status-busy__cols span {
    display: block;
    flex: 1 1 0;
    min-width: 2px;
    max-width: 6px;
    height: 30px;
    border-radius: 999px;
    transform-origin: bottom center;
    background: linear-gradient(180deg, #fef9c3 0%, #fde047 22%, #fbbf24 55%, #f97316 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 3px 8px rgba(234, 88, 12, 0.28);
    animation: status-busy-wave 0.58s cubic-bezier(0.45, 0.18, 0.35, 1) infinite alternate;
}

.status-busy__cols span:nth-child(1) {
    animation-duration: 0.52s;
    animation-delay: 0s;
}

.status-busy__cols span:nth-child(2) {
    animation-duration: 0.64s;
    animation-delay: 0.07s;
}

.status-busy__cols span:nth-child(3) {
    animation-duration: 0.55s;
    animation-delay: 0.14s;
}

.status-busy__cols span:nth-child(4) {
    animation-duration: 0.7s;
    animation-delay: 0.04s;
}

.status-busy__cols span:nth-child(5) {
    animation-duration: 0.6s;
    animation-delay: 0.11s;
}

.status-busy__cols span:nth-child(6) {
    animation-duration: 0.53s;
    animation-delay: 0.18s;
}

.status-busy__cols span:nth-child(7) {
    animation-duration: 0.66s;
    animation-delay: 0.09s;
}

@keyframes status-busy-wave {
    0% {
        transform: scaleY(0.22);
        filter: brightness(0.92);
    }
    100% {
        transform: scaleY(1);
        filter: brightness(1.08);
    }
}

.status-busy__beam {
    position: absolute;
    z-index: 1;
    left: -8%;
    right: -8%;
    height: 5px;
    top: -12%;
    border-radius: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 18%,
        rgba(255, 255, 255, 0.95) 42%,
        #fef08a 50%,
        rgba(251, 146, 60, 0.92) 58%,
        rgba(255, 255, 255, 0.25) 82%,
        transparent 100%
    );
    box-shadow:
        0 0 10px rgba(253, 224, 71, 0.95),
        0 0 22px rgba(251, 146, 60, 0.55),
        0 0 36px rgba(249, 115, 22, 0.2);
    pointer-events: none;
    animation: status-busy-beam 1.05s cubic-bezier(0.42, 0.06, 0.28, 1) infinite;
    will-change: top, opacity;
}

@keyframes status-busy-beam {
    0% {
        top: -15%;
        opacity: 0;
    }
    6% {
        opacity: 1;
    }
    94% {
        opacity: 1;
    }
    100% {
        top: 108%;
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-card__pulse,
    .status-card__text,
    .status-card__dots span,
    .status-busy__beam,
    .status-busy__cols span,
    .status-card__bar-fill,
    .status-tick--pop {
        animation: none;
    }

    .status-card__text {
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        color: var(--text);
    }

    .status-card__pulse {
        transform: none;
        opacity: 0.65;
    }

    .status-card__bar-fill {
        transform: translateX(0);
        opacity: 0.55;
        width: 100%;
        max-width: none;
    }

    .status-busy__cols span {
        animation: none;
        transform: scaleY(0.58);
        filter: brightness(1);
        opacity: 0.92;
    }

    .status-busy__beam {
        animation: none;
        top: 50%;
        margin-top: -2.5px;
        opacity: 0.5;
        will-change: auto;
        box-shadow: 0 0 8px rgba(253, 224, 71, 0.45);
    }
}

/* Sonuç */
.summary {
    margin: 0 0 18px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--surface-soft) 0%, #eef6f0 100%);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.code-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px 14px;
    background: var(--surface);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
    display: flex;
    flex-direction: column;
}

.code-card:hover {
    border-color: #d8dde6;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.code-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.code-yellow::before { background: var(--yellow); }
.code-orange::before { background: var(--orange); }

.code-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.code-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.code-card-title h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.005em;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border);
}

.dot-yellow { background: var(--yellow); }
.dot-orange { background: var(--orange); }
.dot-manav  { background: var(--manav); }
.dot-zero-price { background: var(--zero-price); }

.code-card .count {
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.types {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Tip dağılımı: kopyala satırının altında */
.types.types-breakdown {
    margin-top: 12px;
    padding: 10px 11px 8px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.types.types-breakdown::before {
    content: "Dağılım";
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.types li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

.types li span:last-child {
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

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

/* Kopyala: listenin hemen altı — üst köşeler listeyle birleşik görünür */
.code-actions--under-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-top: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: linear-gradient(180deg, #f1f5f9 0%, #e8eef4 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.code-card.code-yellow .code-actions--under-list {
    background: linear-gradient(180deg, #fffbeb 0%, #f8fafc 100%);
    border-color: rgba(253, 230, 138, 0.45);
}

.code-card.code-orange .code-actions--under-list {
    background: linear-gradient(180deg, #fff5ec 0%, #f8fafc 100%);
    border-color: rgba(254, 215, 170, 0.55);
}

.code-actions--under-list .copy-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.code-actions--under-list .copy-feedback {
    text-align: center;
    min-height: 1.25em;
}

.code-actions .btn { padding: 8px 14px; font-size: 13px; }

.copy-feedback {
    font-size: 12px;
    color: var(--muted);
}

.copy-feedback[data-kind="ok"]   { color: var(--brand); font-weight: 600; }
.copy-feedback[data-kind="warn"] { color: var(--yellow-text); }
.copy-feedback[data-kind="err"]  { color: #b91c1c; }

.code-list {
    margin: 0;
    flex: 0 0 auto;
    padding: 12px 14px;
    height: 280px;
    overflow: auto;
    white-space: pre;
    word-break: break-all;
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-bottom: none;
    user-select: all;
    scrollbar-width: thin;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.code-list::-webkit-scrollbar { width: 8px; }
.code-list::-webkit-scrollbar-track { background: transparent; }
.code-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.code-list:empty::before {
    content: "Bu grupta etiket yok.";
    font-family: inherit;
    font-style: italic;
    color: var(--muted);
}

.details {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

details.details[open] {
    padding-bottom: 4px;
}

details.details[open] summary {
    margin-bottom: 4px;
}

.details summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.details summary::-webkit-details-marker { display: none; }
.details summary:hover { color: var(--brand); }

.details-chevron {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: var(--surface-soft);
    transition: background .15s ease;
}

.details-chevron::after {
    content: "";
    border: solid var(--muted);
    border-width: 0 1.5px 1.5px 0;
    display: block;
    width: 5px;
    height: 5px;
    margin-top: -2px;
    transform: rotate(45deg);
    transition: transform .2s ease, border-color .15s ease;
}

details[open] .details-chevron {
    background: var(--brand-soft);
}

details[open] .details-chevron::after {
    margin-top: 2px;
    transform: rotate(-135deg);
    border-color: var(--brand);
}

.label-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.label-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.label-table th,
.label-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: left;
    vertical-align: top;
}

.label-table th {
    background: var(--surface-soft);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
}

.label-table tbody tr {
    transition: background .12s ease;
}

.label-table tbody tr:hover { background: var(--surface-soft); }
.label-table tbody tr:last-child td { border-bottom: none; }
.label-table td:nth-child(6) { white-space: normal; min-width: 180px; }

.pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.pill-yellow {
    background: var(--yellow-soft);
    color: var(--yellow-text);
    border-color: var(--yellow-border);
}

.pill-orange {
    background: var(--orange-soft);
    color: var(--orange-text);
    border-color: var(--orange-border);
}

.pill-manav {
    background: var(--manav-soft);
    color: var(--manav-text);
    border-color: var(--manav-border);
}

.pill-zero-price {
    background: var(--zero-price-soft);
    color: var(--zero-price-text);
    border-color: var(--zero-price-border);
}

.result-footer { margin-top: 16px; }

/* Manav · sadece manav etiketi varsa görünür (3. blok) */
.manav-section {
    margin-top: 22px;
    padding: 20px 18px 18px;
    background: linear-gradient(165deg, var(--manav-soft) 0%, #f0fdf9 100%);
    border: 1px solid var(--manav-border);
    border-left: 4px solid var(--manav);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.manav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.manav-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.manav-head-title h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--manav-text);
}

.manav-head .count {
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--manav-text);
}

.manav-note {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--manav-text);
    opacity: 0.85;
}

.manav-section .code-grid { gap: 12px; }
.manav-section .code-card { background: var(--surface); }

/* Fiyat 0,00 · manav gibi ayrı blok */
.zero-price-section {
    margin-top: 22px;
    padding: 20px 18px 18px;
    background: linear-gradient(165deg, var(--zero-price-soft) 0%, #f5f7ff 100%);
    border: 1px solid var(--zero-price-border);
    border-left: 4px solid var(--zero-price);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.zero-price-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.zero-price-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.zero-price-head-title h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--zero-price-text);
}

.zero-price-head .count {
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--zero-price-text);
}

.zero-price-note {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--zero-price-text);
    opacity: 0.88;
}

.zero-price-section .code-grid { gap: 12px; }
.zero-price-section .code-card { background: var(--surface); }

/* Hata */
.error-card {
    border-color: #fecaca;
    background: #fef2f2;
}

.error-card h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #b91c1c;
}

/* Alt */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

footer p {
    margin: 0;
    max-width: 36em;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.92;
}

footer strong {
    font-weight: 700;
    color: var(--text-secondary);
}

@media (max-width: 520px) {
    .page { padding-left: 14px; padding-right: 14px; }
    .card { padding: 18px 16px; }
    .hero { padding: 2px 16px; }
    .code-card { padding: 14px 12px 10px; }
    .code-list { height: 220px; font-size: 11.5px; }
    .btn-install .install-label { display: none; }
    .btn-install { padding: 8px; }
    .topbar { margin-bottom: 18px; }
}

@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
    }
}

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

    .dropzone:hover .dropzone-icon,
    .dropzone.is-drag .dropzone-icon {
        transform: none;
    }

    .code-card:hover {
        transform: none;
    }
}
