/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
input,
select,
textarea {
    font-size: 16x !important;
}

:root {
    --bg-main: #f4f6fb;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-topbar: #ffffff;
    --accent-blue: #2563eb;
    --accent-green: #16a34a;
    --accent-orange: #f97316;
    --accent-purple: #7c3aed;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-subtle: #e5e7eb;
    --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
    --radius-lg: 14px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* LAYOUT */

.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 12px rgba(148, 163, 184, 0.15);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 10px;
    border-radius: 10px;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: conic-gradient(
        from 180deg,
        #3b82f6,
        #ec4899,
        #22c55e,
        #f97316,
        #3b82f6
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #111827;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* nav */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: background 0.16s, border 0.16s, color 0.16s, transform 0.1s;
}

.sidebar-link:hover {
    background: #eef2ff;
    color: #1f2937;
    border-color: #c7d2fe;
    transform: translateY(-1px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #ffffff;
    border-color: transparent;
}

.sidebar-link.active .nav-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-link.small {
    font-size: 0.84rem;
}

/* nav icons */

.nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}

.nav-icon-rewards {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.nav-icon-prices {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.nav-icon-python {
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
}

.nav-icon-profile {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

/* logout icon biraz sade kalsın */
.nav-icon-logout {
    font-size: 0.85rem;
    background: rgba(148, 163, 184, 0.18);
    color: #111827;
}

.nav-label {
    white-space: nowrap;
}

/* MAIN */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* TOPBAR */

.topbar {
    height: 60px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 12px;
    background: var(--bg-topbar);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 5px 8px;
    color: #111827;
    font-size: 1rem;
    cursor: pointer;
}

.topbar-center {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.topbar-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* user section */

.topbar-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f9fafb;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name {
    font-size: 0.86rem;
    color: #111827;
}

.user-email {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* CONTENT */

.content {
    padding: 18px 18px 24px;
}

.section {
    max-width: 1080px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.section-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* cards */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px 14px 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.card + .card {
    margin-top: 12px;
}

.card-title-sm {
    font-size: 0.95rem;
    margin-bottom: 6px;
    font-weight: 600;
    color: #111827;
}

.card-text {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* list */

.list {
    list-style: disc;
    padding-left: 18px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.list li + li {
    margin-top: 4px;
}

/* grid */

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 14px;
}

/* profile rows */

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    color: var(--text-muted);
}

.profile-value {
    font-weight: 500;
    color: #111827;
}

/* buttons */

.btn-primary,
.btn-outline,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.16s, border 0.16s, transform 0.1s, box-shadow 0.16s;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #f9fafb;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 25px rgba(15, 23, 42, 0.24);
}

.btn-outline {
    background: #ffffff;
    color: #111827;
    border-color: #c7d2fe;
}

.btn-outline:hover {
    border-color: #4f46e5;
    background: #eef2ff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

/* textarea */

.textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 0.86rem;
    padding: 8px 10px;
    resize: vertical;
    min-height: 120px;
    outline: none;
    margin-top: 4px;
}

.textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
}

.card-label {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* python footer */

.python-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.python-note {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* AUTH (login page) */

.auth-body {
    background: radial-gradient(circle at top, #e0ecff, #eef2ff);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 18px 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
}

.auth-title {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: #111827;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.auth-error {
    background: #fee2e2;
    border-radius: 10px;
    padding: 7px 9px;
    font-size: 0.8rem;
    border: 1px solid #ef4444;
    margin-bottom: 10px;
    color: #991b1b;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.auth-label input {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 0.9rem;
    padding: 7px 9px;
    outline: none;
}

.auth-label input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
}

.auth-btn {
    width: 100%;
    margin-top: 4px;
}

.auth-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-hint code {
    font-size: 0.78rem;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease-out;
        z-index: 40;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .main {
        flex: 1;
    }

    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .content {
        padding: 14px 12px 20px;
    }
}


/* REWARDS */

.reward-layout {
    align-items: flex-start;
}

.reward-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reward-subtext {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.reward-status-badge {
    font-size: 0.78rem;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #d1fae5;
    background: #ecfdf5;
    color: #15803d;
    white-space: nowrap;
}

.reward-status-badge.is-max {
    border-color: #fee2e2;
    background: #fef2f2;
    color: #b91c1c;
}

.reward-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.reward-stat {
    padding: 8px 9px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.reward-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.reward-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.reward-stat-max {
    color: var(--accent-green);
}

/* bar */

.reward-bar-block {
    margin-top: 4px;
}

.reward-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.reward-bar-title {
    font-size: 0.84rem;
    color: #111827;
}

.reward-bar-percent {
    font-size: 0.88rem;
    font-weight: 600;
    color: #111827;
}

.reward-bar-bg {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.reward-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f46e5, #22c55e);
    box-shadow:
        0 0 8px rgba(79, 70, 229, 0.4),
        0 0 12px rgba(34, 197, 94, 0.4);
    transition: width 0.4s ease-out;
}

.reward-bar-target-marker {
    position: absolute;
    right: 0;
    top: 50%;
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, #f97316, #ec4899);
    transform: translateY(-50%);
}

.reward-bar-bottom {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.reward-bar-bottom span:first-child {
    color: #111827;
    font-weight: 500;
}

.reward-bar-note {
    color: var(--text-muted);
}

.reward-updated-note {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* mobile */
@media (max-width: 768px) {
    .reward-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .reward-bar-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* PRICES */

.prices-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.prices-count {
    color: var(--text-muted);
}

.prices-view-toggle {
    display: inline-flex;
    padding: 2px;
    border-radius: 999px;
    background: #e5e7eb;
    gap: 2px;
}

.view-toggle-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #4b5563;
}

.view-toggle-btn.is-active {
    background: #ffffff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

/* wrapper */

.prices-wrapper {
    margin-top: 6px;
}

/* grid mode */

.prices-wrapper[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

/* list mode */

.prices-wrapper[data-view="list"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* cards */

.pet-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 9px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pet-card-main {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pet-card-thumb {
    flex-shrink: 0;
}

.pet-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: conic-gradient(
        from 180deg,
        #4f46e5,
        #ec4899,
        #22c55e,
        #f97316,
        #4f46e5
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f9fafb;
}

.pet-card-content {
    flex: 1;
    min-width: 0;
}

.pet-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}

.pet-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.pet-code {
    display: none;
}

.pet-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3px;
    gap: 6px;
}

.pet-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-green);
}

.pet-tier {
    font-size: 0.73rem;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pet-tier.tier-high {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.pet-tier.tier-mid {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.pet-tier.tier-low {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

/* extra row (slug + note) */

.pet-card-extra {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.pet-slug {
    opacity: 0.8;
}

/* list modunda kartlar daha yatay dursun */
.prices-wrapper[data-view="list"] .pet-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.prices-wrapper[data-view="list"] .pet-card-main {
    flex: 1;
}

@media (max-width: 768px) {
    .prices-wrapper[data-view="grid"] {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* PRICES */

.prices-toolbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.prices-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Küçük, yuvarlak search input */
.prices-search input {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    min-width: 160px;
    outline: none;
}

.prices-search input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Variant dropdown küçük ve uyumlu olsun */
.prices-variant-filter {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.prices-variant-filter select {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    font-size: 0.8rem;
    outline: none;
}

.prices-variant-filter select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}


.prices-count {
    color: var(--text-muted);
}

.prices-view-toggle {
    display: inline-flex;
    padding: 2px;
    border-radius: 999px;
    background: #e5e7eb;
    gap: 2px;
}

.view-toggle-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #4b5563;
}

.view-toggle-btn.is-active {
    background: #ffffff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

/* wrapper */

.prices-wrapper {
    margin-top: 6px;
}

/* grid mode */

.prices-wrapper[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

/* list mode */

.prices-wrapper[data-view="list"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* PET CARD */

.pet-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 9px 10px;
}

/* iç düzen: sol blok + sağ blok */
.pet-card-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;   /* tier’i yukarı sabitle */
    gap: 10px;
}

/* SOL TARAF */

.pet-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pet-left-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pet-card-thumb {
    flex-shrink: 0;
}

.pet-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: conic-gradient(
        from 180deg,
        #4f46e5,
        #ec4899,
        #22c55e,
        #f97316,
        #4f46e5
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f9fafb;
}

.pet-img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
}

.pet-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pet-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.pet-code {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Variant satırı */

.pet-variant-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.pet-variant-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.pet-variant-select {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #fff;
    font-size: 12px;
}

/* SAĞ TARAF: TIER + FİYAT */

.pet-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 70px;
}

/* Tier badge kartın sağ üstünde */
.pet-tier {
    font-size: 0.73rem;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pet-tier.tier-high {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.pet-tier.tier-mid {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.pet-tier.tier-low {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

/* Fiyat */

.pet-price-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-green);
}

.pet-price-prefix {
    font-size: 0.85rem;
}

/* LIST MODE’da kart hizası */

.prices-wrapper[data-view="list"] .pet-card {
    width: 100%;
}

@media (max-width: 768px) {
    .prices-wrapper[data-view="grid"] {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* PYTHON CALC */

.python-calc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.python-calc-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.python-ref-button {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.python-ref-icon {
    font-size: 0.95rem;
}

.python-results-card {
    margin-top: 12px;
}

.python-results-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.86rem;
}

.python-results-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.python-results-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.python-results-total {
    text-align: right;
}

.python-results-total-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.python-results-total-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-green);
}

/* results table */

.python-results-table-wrapper {
    max-height: 340px;
    overflow: auto;
    margin-top: 4px;
}

.python-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.python-results-table th,
.python-results-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #e5e7eb;
}

.python-results-table th {
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
    background: #f9fafb;
    position: sticky;
    top: 0;
}

.python-results-table th.is-numeric,
.python-results-table td.is-numeric {
    text-align: right;
}

.python-line-error {
    color: #b91c1c;
}

.python-line-ok {
    color: #15803d;
}

/* PRICE REFERENCE MODAL */

.price-ref-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 12px;
}

.price-ref-backdrop.is-open {
    display: flex;
}

.price-ref-modal {
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 14px 16px 12px;
}

.price-ref-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.price-ref-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.price-ref-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.price-ref-close {
    border: none;
    background: #e5e7eb;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.price-ref-toolbar {
    margin-top: 10px;
    margin-bottom: 8px;
}

.price-ref-search {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 6px 10px;
    font-size: 0.8rem;
}

.price-ref-list {
    overflow: auto;
    padding-right: 2px;
}

.price-ref-item {
    padding: 6px 4px;
    border-bottom: 1px dashed #e5e7eb;
}

.price-ref-item-name {
    font-size: 0.86rem;
    font-weight: 500;
}

.price-ref-item-variants {
    margin-top: 3px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.price-ref-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .price-ref-modal {
        max-width: none;
        border-radius: 16px;
    }
}

/* ========== PRICES – MOBILE LAYOUT FIX ========== */
@media (max-width: 768px) {
    /* Üstteki bar dikey hizalansın */
    .prices-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* "265 items" solda, kontroller (search + All + Grid/List) altta */
    .prices-count {
        font-size: 0.8rem;
    }

    .prices-controls {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: space-between;
        align-items: center;
    }

    /* Search alanı tam genişlik alsın */
    .prices-search {
        flex: 1 1 100%;
    }

    .prices-search input {
        width: 100%;
        min-width: 0;
    }

    /* Variant filtresi + Grid/List daha sıkı dursun */
    .prices-variant-filter {
        flex: 0 0 auto;
        font-size: 0.78rem;
    }

    .prices-variant-filter select {
        font-size: 0.78rem;
        padding: 3px 6px;
        max-width: 80px;
    }

    .prices-view-toggle {
        flex: 0 0 auto;
    }

    /* Kartlar zaten tek kolon ama garanti olsun */
    .prices-wrapper[data-view="grid"] {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Mobile zoom fix (sadece odaklanınca 16px olur) */
@media (max-width: 768px) {
    input:focus,
    select:focus,
    textarea:focus {
        font-size: 16px !important;
    }
}

.prices-variant-filter select {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    font-size: 0.8rem;
    outline: none;
}

.prices-variant-filter select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.pet-variant-select {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #fff;
    font-size: 12px;
}
.prices-variant-filter select,
.pet-variant-select {
    padding: 4px 26px 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: #ffffff;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    cursor: pointer;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 10px;
}

.prices-variant-filter select:focus,
.pet-variant-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.35),
        0 4px 10px rgba(15, 23, 42, 0.08);
}
/* === Python tools / calc === */

.python-calc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.python-calc-text {
    min-width: 0;
}

.python-calc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.python-ref-button,
.python-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-inline: 10px;
    white-space: nowrap;
}

.python-ref-icon {
    font-size: 14px;
}

.python-copy-btn.is-copied {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

