/* ============================================================
   ADMIN.CSS - Admin Paneli Stilleri
   ============================================================ */

:root {
    --admin-btn-green: #16a34a;
    --admin-btn-green-hover: #15803d;
    --admin-btn-green-active: #166534;
    --admin-btn-green-shadow: rgba(22, 163, 74, 0.22);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ========== BASKET VIEWER (Dashboard) ========== */
.basket-viewer { padding: 6px 0 0; }
.basket-viewer-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.basket-viewer-input-row .form-control {
    flex: 1;
    min-width: 0;
        --page-header-action-height: 34px;
}
.basket-viewer-result-inner {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.bv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.bv-item:last-of-type { border-bottom: none; }
.bv-qty {
    min-width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    border-radius: 6px; font-size: 0.78rem; font-weight: 700;
    flex-shrink: 0;
}
.bv-name { flex: 1; font-weight: 500; color: var(--text); }
.bv-name.notfound { color: var(--text-light); font-style: italic; }
.bv-unit { font-size: 0.77rem; color: var(--text-light); }
.bv-price { font-weight: 700; color: var(--text); white-space: nowrap; }
.bv-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg);
    border-top: 2px solid var(--border);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
}
.bv-error {
    color: var(--danger, #e74c3c);
    font-size: 0.85rem;
    padding: 8px 2px;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: stretch;
    background: #0f172a;
    overflow: hidden;
}

/* Left — brand panel */
.login-brand-panel {
    flex: 0 0 44%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 60%, #1a1040 100%);
    overflow: hidden;
    padding: 2rem 2.5rem;
    height: 100vh;
    max-height: 100vh;
}
.login-brand-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 430px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}
.login-brand-slider {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    flex: 1;
    overflow: hidden;
}
.login-brand-slides {
    position: relative;
    display: grid;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.login-brand-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.login-brand-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.login-brand-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 0.6rem;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(56,189,248,0.14));
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    animation: login-float 4s ease-in-out infinite;
}
.login-brand-logo svg {
    width: 36px;
    height: 36px;
}
@keyframes login-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.login-brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.login-brand-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}
.login-brand-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #dbeafe;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}
.login-brand-story-title {
    margin: 0 0 0.55rem;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.04em;
    color: #fff;
}
.login-brand-story-desc {
    margin: 0 0 0.8rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    line-height: 1.55;
}
.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.login-brand-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.8);
}
.lbf-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dbeafe;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.lbf-icon svg {
    width: 18px;
    height: 18px;
}
.login-brand-visual-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 0.8rem;
    border-radius: 20px;
    padding: 0.7rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 24px 50px rgba(15, 23, 42, 0.24);
    max-height: 160px;
}
.login-brand-visual-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(56,189,248,0.16), transparent 38%);
    pointer-events: none;
}
.login-brand-visual-card-alt::before {
    background: radial-gradient(circle at top right, rgba(34,197,94,0.16), transparent 38%);
}
.login-brand-visual-svg {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 140px;
}
.login-brand-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}
.login-brand-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 0;
    padding: 0.65rem 0.65rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}
.login-brand-metric-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}
.login-brand-metric-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.35;
}
.login-brand-slider-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.8rem;
}
.login-brand-slider-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.24);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.login-brand-slider-dot.is-active {
    background: #f8fafc;
    transform: scale(1.18);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.08);
}
.login-brand-slider-dot:hover {
    background: rgba(255,255,255,0.48);
}
/* Back to home link in brand panel */
.login-brand-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}
.login-brand-back-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.login-brand-back-icon svg {
    width: 16px;
    height: 16px;
}
.login-brand-back-link:hover {
    color: #fff;
}
/* Fixed lang picker top-right */
.login-fixed-lang {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 999;
}
.login-fixed-lang.hidden { display: none; }
/* Decorative orbs */
.login-brand-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}
.login-brand-orb-1 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(99,179,237,0.18) 0%, transparent 70%);
    top: -80px;
    right: -60px;
}
.login-brand-orb-2 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(167,139,250,0.15) 0%, transparent 70%);
    bottom: -40px;
    left: -40px;
}

/* Right — form panel */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 2rem 2rem;
    overflow-y: auto;
    height: 100vh;
}
.login-box {
    width: 100%;
    max-width: 400px;
}
.login-box-header {
    margin-bottom: 2rem;
}
.login-box-header h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.3rem;
    letter-spacing: -0.3px;
}
.login-box-sub {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}
.login-box .form-group {
    margin-bottom: 1.1rem;
}
.login-box label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
/* Input wrapper with icon */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.login-input-icon {
    position: absolute;
    left: 13px;
    color: #94a3b8;
    pointer-events: none;
    flex-shrink: 0;
}
.login-input-wrap input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.93rem;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.login-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,62,80,0.1);
}
.login-input-wrap input::placeholder {
    color: #c8d0dc;
}
/* Password show/hide toggle */
.login-pw-toggle {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.login-pw-toggle:hover {
    color: var(--primary);
}
/* reCAPTCHA */
.login-recaptcha { display: flex; justify-content: center; margin: 10px 0 4px; }
.login-recaptcha .g-recaptcha { transform-origin: center; }
@media (max-width: 340px) {
    .login-recaptcha .g-recaptcha { transform: scale(0.9); }
}
/* Submit button */
.login-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.97rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 10px;
    margin-top: 6px;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(44,62,80,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}
.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44,62,80,0.45);
}
.login-submit-btn:active {
    transform: translateY(0);
}
.login-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}
.login-forgot-row {
    text-align: center;
    margin-top: 14px;
}
.login-forgot-link {
    color: #64748b;
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.2s;
}
.login-forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
.login-signup-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.login-signup-label {
    font-size: 0.84rem;
    color: #64748b;
}
.login-signup-btn {
    color: #64748b;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.2s;
}
.login-signup-btn:hover {
    color: var(--primary);
    text-decoration: underline;
}
.login-lang-row {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}
/* License info banner (shown when arriving via email auto-login link) */
.login-license-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.83rem;
    color: #0369a1;
    margin-bottom: 14px;
    line-height: 1.4;
}
/* ========== SIMPLE LOGIN PAGE (forgot-password, reset-password) ========== */
.login-page.login-page-simple {
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 24px 16px;
}
.login-page.login-page-simple .login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    max-width: 420px;
    width: 100%;
    margin: 0;
}
.login-page.login-page-simple .login-box h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    text-align: center;
}
.login-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 28px;
    text-align: center;
}
/* Mobile: stack vertically */
@media (max-width: 768px) {
    .login-page {
        flex-direction: column;
        background: #f8fafc;
        height: auto;
        max-height: none;
    }
    .login-brand-panel {
        display: none;
    }
    .login-brand-logo {
        width: 64px;
        height: 64px;
        margin-bottom: 0.5rem;
    }
    .login-brand-title {
        font-size: 1.7rem;
    }
    .login-brand-content {
        text-align: center;
        max-width: 100%;
    }
    .login-brand-slider {
        min-height: 0;
    }
    .login-brand-slides {
        min-height: 360px;
    }
    .login-brand-story-title {
        font-size: 1.6rem;
    }
    .login-brand-desc,
    .login-brand-story-desc {
        margin-bottom: 1.2rem;
    }
    .login-brand-feature {
        justify-content: center;
    }
    .login-brand-metrics {
        grid-template-columns: 1fr;
    }
    .login-brand-metric {
        min-height: 0;
    }
    .login-brand-slider-nav,
    .login-brand-back-link {
        justify-content: center;
    }
    .login-form-panel {
        padding: 1.5rem 1.25rem 2rem;
        height: auto;
    }
}


.login-lang-picker {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text);
    position: relative;
}
.table-missing-text {
    color: #dc2626;
}
.login-lang-picker:hover {
    border-color: var(--primary);
}
.lang-dropdown-up {
    bottom: calc(100% + 6px);
    top: auto !important;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #0f172a;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.18);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logo-mark {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
}
.sidebar-info {
    min-width: 0;
}
.sidebar-header h2 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}
.sidebar-header .sidebar-subtitle {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.42);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.nav-section-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: rgba(255,255,255,0.28);
    padding: 12px 16px 4px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    color: rgba(255,255,255,0.6);
    font-size: 0.83rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    border-radius: 0;
    position: relative;
}
.nav-item:hover {
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.06);
}
.nav-item.active {
    color: #fff;
    background: rgba(99,102,241,0.18);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}
.nav-item-onerilen {
    color: rgba(250,204,21,0.75) !important;
    margin-top: 2px;
}
.nav-item-onerilen:hover {
    color: rgba(250,204,21,1) !important;
    background: rgba(250,204,21,0.08) !important;
}
.nav-item-onerilen .nav-icon {
    opacity: 1;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.pro-feature-locked {
    position: relative;
}

.pro-feature-locked:not(.pro-feature-accessible) {
    opacity: 0.8;
}

.pro-feature-locked:not(.pro-feature-accessible):hover {
    cursor: not-allowed;
}

.pro-feature-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(147, 51, 234, 0.32);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(126, 34, 206, 0.14));
    color: #7e22ce;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar .pro-feature-badge {
    margin-left: auto;
}

.qa-item .pro-feature-badge,
.btn-auto-translate .pro-feature-badge,
.btn-auto-desc .pro-feature-badge,
.bulk-actions-menu .pro-feature-badge {
    margin-left: auto;
}

.pro-feature-badge svg {
    width: 11px;
    height: 11px;
    display: block;
    flex-shrink: 0;
}

.btn-auto-desc.pro-feature-locked,
.btn-auto-translate.pro-feature-locked,
.qa-item.pro-feature-locked {
    padding-right: 10px;
}

.pro-feature-locked:not(.pro-feature-accessible) .pro-feature-badge {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.nav-lisans-gun {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 6px;
    white-space: nowrap;
    line-height: 1.6;
    flex-shrink: 0;
}
.nav-lisans-gun.lg-ok   { background: rgba(22,163,74,0.22);  color: #4ade80; }
.nav-lisans-gun.lg-warn { background: rgba(234,179,8,0.22);  color: #fbbf24; }
.nav-lisans-gun.lg-crit { background: rgba(239,68,68,0.22);  color: #f87171; }

.sidebar-footer {
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* Sidebar flag picker */
.sidebar-lang-wrap {
    margin-bottom: 8px;
}
.sidebar-lang-picker {
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
    padding: 5px 10px;
    gap: 7px;
}
.sidebar-lang-picker .lang-picker-label {
    flex: 1;
}
.sidebar-lang-picker .lang-picker-flag {
    width: 1.3em;
    height: 1em;
    border-radius: 2px;
}
.sidebar-lang-picker .lang-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    opacity: 0.8;
}
.sidebar-lang-picker .lang-dropdown {
    top: auto;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: unset;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 9999;
}
.sidebar-lang-picker .lang-dropdown::-webkit-scrollbar { width: 4px; }
.sidebar-lang-picker .lang-dropdown::-webkit-scrollbar-track { background: transparent; }
.sidebar-lang-picker .lang-dropdown::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
.sidebar-lang-picker .lang-option {
    display: flex;
    align-items: center;
    gap: 7px;
}
.sidebar-lang-picker .lang-option .fi {
    width: 1.3em;
    height: 1em;
    border-radius: 2px;
    flex-shrink: 0;
}
.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.logout-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 2px 16px 16px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
    --page-header-action-height: 34px;
}
#page-categories .page-header,
#page-products .page-header,
#page-qr-ayarlari .page-header {
    position: relative;
    margin-bottom: 1px;
    gap: 1px;
    min-height: 78px;
    padding-right: 180px;
}

#page-duyurular .page-header {
    margin-bottom: 2px;
    gap: 2px;
    min-height: 0;
    padding-right: 0;
}
#page-categories .page-header-top,
#page-categories .page-header-bottom,
#page-products .page-header-top,
#page-products .page-header-bottom {
    gap: 1px;
    padding-right: 0;
}

#page-duyurular .page-header-top,
#page-duyurular .page-header-bottom {
    gap: 2px;
    padding-right: 0;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}
.page-header-title-with-note {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.page-header-inline-note {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.4;
}
.page-title-with-count {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#page-categories .page-title-with-count,
#page-products .page-title-with-count {
    gap: 2px;
    margin-bottom: 0;
}

#page-duyurular .page-title-with-count {
    gap: 6px;
    margin-bottom: 0;
}

#page-categories .page-header-top,
#page-products .page-header-top {
    margin-bottom: 0;
}

#page-duyurular .page-header-top {
    margin-bottom: 0;
}

#page-categories .page-header-bottom,
#page-products .page-header-bottom {
    margin-top: 0;
}

#page-duyurular .page-header-bottom {
    margin-top: 0;
}
.page-header-top,
.page-header-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.page-header-top {
    justify-content: space-between;
    flex-wrap: nowrap;
}
.page-header-bottom {
    justify-content: flex-start;
}
.page-header-top .page-title-with-count {
    flex: 1 1 auto;
    min-width: 0;
}
.page-header-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    margin-left: auto;
}
.page-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* Önerilen ürün grid — 2 sütun arası dikey çizgi */
.onerilen-urun-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 50px;
    padding: 0 14px 12px 14px;
    position: relative;
}
.onerilen-urun-grid::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(0,0,0,0.18);
    border-radius: 2px;
}

/* AI menu import results */
.ai-menu-summary-card {
    padding: 8px 14px;
    margin-top: 8px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.92), rgba(255, 255, 255, 0.98));
}
.ai-menu-summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}
.ai-menu-summary-copy {
    display: flex;
    align-items: center;
    flex: 1 1 280px;
    min-width: 0;
    max-width: 100%;
}
.ai-menu-summary-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.ai-menu-summary-pages-label,
.ai-menu-source-pages-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ai-menu-source-page-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}
.ai-menu-source-page-badge.is-compact {
    padding: 2px 7px;
    font-size: 0.68rem;
}
.ai-menu-summary-actions {
    display: flex;
    flex: 0 1 100%;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}
.ai-menu-action-btn {
    min-height: auto !important;
    padding: 4px 12px !important;
    max-width: 100%;
}
.ai-menu-action-btn-danger {
    border-color: rgba(220, 38, 38, 0.22) !important;
    color: #ffffff !important;
    background: #b91c1c !important;
}
.ai-menu-category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.ai-menu-category-block {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    transition: border-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.ai-menu-category-block.is-selected {
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.08);
}
.ai-menu-category-block.is-unselected {
    opacity: 0.82;
}
.ai-menu-category-header-row {
    display: flex;
    align-items: stretch;
    background: rgba(99, 102, 241, 0.06);
    transition: background 0.15s ease;
}
.ai-menu-category-block.is-unselected .ai-menu-category-header-row {
    background: rgba(0, 0, 0, 0.02);
}
.ai-menu-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}
.ai-menu-block-checkbox {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--primary);
}
.ai-menu-category-header-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ai-menu-category-header-copy-compact {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ai-menu-category-inline-edit {
    display: grid;
    grid-template-columns: minmax(300px, 2fr) minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-width: 0;
    flex: 1 1 340px;
}
.ai-menu-category-subline,
.ai-menu-product-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.ai-menu-category-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.ai-menu-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 1px 8px;
    line-height: 1.3;
    white-space: nowrap;
    align-self: center;
}
.ai-menu-category-tools {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px 4px 0;
}
.ai-menu-category-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 6px;
    background: rgba(254, 242, 242, 0.95);
    color: #b91c1c;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}
.ai-menu-category-body {
    display: block;
    border-top: 1px solid var(--border);
}
.ai-menu-category-body.is-collapsed {
    display: none;
}
.ai-menu-product-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    padding: 2px 10px 6px;
    position: relative;
}
.ai-menu-product-list::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 2px;
}
.ai-menu-product-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 2px 4px;
    border-radius: 5px;
}
.ai-menu-product-thumb {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    cursor: zoom-in;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.ai-menu-product-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.ai-menu-product-row.is-selected {
    background: rgba(99, 102, 241, 0.06);
}
.ai-menu-product-row.is-unselected {
    background: transparent;
}
.ai-menu-product-checkbox {
    width: 14px;
    height: 14px;
    margin-top: 7px;
}
.ai-menu-product-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ai-menu-product-compact-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(0, 1.35fr) 80px;
    gap: 6px;
    min-width: 0;
    align-items: center;
}
.ai-menu-category-header-copy-compact .ai-menu-source-pages,
.ai-menu-product-compact-row .ai-menu-source-pages {
    gap: 4px;
    flex-wrap: nowrap;
}
.ai-menu-category-header-copy-compact .ai-menu-source-pages-label,
.ai-menu-product-compact-row .ai-menu-source-pages-label {
    font-size: 0.64rem;
    letter-spacing: 0.05em;
}
.ai-menu-category-header-copy-compact .ai-menu-source-page-badge,
.ai-menu-product-compact-row .ai-menu-source-page-badge {
    padding: 2px 6px;
    font-size: 0.64rem;
}
.ai-menu-category-input-name {
    width: 100%;
}
.ai-menu-category-input-desc {
    width: 100%;
}
.ai-menu-category-input,
.ai-menu-product-name,
.ai-menu-product-desc,
.ai-menu-product-price {
    min-height: 28px;
}
.ai-menu-input {
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 0.78rem;
    line-height: 1.2;
}
.ai-menu-product-name {
    width: 198px;
    font-size: 0.78rem;
}
.ai-menu-product-desc {
    width: 100%;
    font-size: 0.77rem;
}
.ai-menu-product-price {
    text-align: right;
    max-width: none;
}
.ai-menu-category-empty {
    margin: 0 10px 8px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 0.76rem;
}
.ai-menu-category-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.ai-menu-category-card.is-selected {
    border-color: rgba(99, 102, 241, 0.24);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.08);
}
.ai-menu-category-card.is-unselected {
    opacity: 0.78;
}
.ai-menu-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.ai-menu-category-card.is-selected .ai-menu-category-head {
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.86), rgba(255, 255, 255, 0.96));
}
.ai-menu-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ai-menu-toggle-title {
    flex: 1;
}
.ai-menu-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary);
}
.ai-menu-check-copy,
.ai-menu-entity-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ai-menu-check-copy strong,
.ai-menu-entity-title {
    font-size: 0.92rem;
    line-height: 1.15;
    color: var(--text);
}
.ai-menu-check-eyebrow,
.ai-menu-entity-subtitle {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ai-menu-category-count,
.ai-menu-product-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-light);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}
.ai-menu-category-meta,
.ai-menu-product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.ai-menu-source-pages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.ai-menu-category-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 10px;
    padding: 12px 16px;
}
.ai-menu-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

/* AI Analyze indeterminate progress bar */
.ai-analyze-progress {
    width: 100%;
    height: 4px;
    background: rgba(99,102,241,0.12);
    border-radius: 4px;
    overflow: hidden;
    display: none;
}
.ai-analyze-progress.active {
    display: block;
}
.ai-analyze-progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #22c55e, #6366f1);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: ai-progress-slide 1.6s ease-in-out infinite, ai-progress-gradient 2s ease infinite;
}
@keyframes ai-progress-slide {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(233%); }
    100% { transform: translateX(-100%); }
}
@keyframes ai-progress-gradient {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.ai-menu-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    gap: 6px;
    font-family: var(--font);
}
.ai-menu-upload-btn {
    cursor: pointer;
}
.ai-menu-toolbar .btn-add-new,
.ai-menu-toolbar .btn-auto-translate {
    order: 0;
}
.ai-menu-toolbar .btn-auto-translate {
    border-width: 1.5px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
}
.ai-menu-page-header > div:first-child {
    flex: 1 1 320px;
}
.ai-menu-page-header .ai-menu-toolbar {
    flex: 0 0 auto;
}
.ai-menu-intro-row {
    display: block;
}
.ai-menu-intro-copy {
    min-width: 0;
}
.ai-menu-intro-text {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.35;
}
.ai-menu-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 12px;
    align-items: start;
}
.ai-menu-demo-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 32 / 18;
    padding: 0;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.ai-menu-demo-card,
.ai-menu-demo-card video,
.ai-menu-demo-card img,
.ai-menu-demo-video,
.ai-menu-demo-play,
.ai-menu-demo-overlay,
.ai-menu-demo-overlay *,
.ai-menu-demo-expand {
    cursor: pointer !important;
}
.ai-menu-demo-card video,
.ai-menu-demo-card img,
.ai-menu-demo-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}
.ai-menu-demo-thumb {
    object-position: center;
}
.page-header-demo-video {
    position: absolute;
    top: 0;
    right: 0;
    width: 168px;
    min-width: 168px;
    height: 75px;
    aspect-ratio: auto;
    z-index: 3;
    margin: 0;
}

#page-categories .page-header-demo-video,
#page-products .page-header-demo-video {
    position: fixed;
    top: 4px;
    right: 16px;
    z-index: 95;
}
.page-section.non-pro-video-only {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#page-categories.non-pro-video-only > :not(.page-header),
#page-products.non-pro-video-only > :not(.page-header),
#page-qr-ayarlari.non-pro-video-only > :not(.page-header),
#page-print-qr.non-pro-video-only > :not(.pqr-controls-card),
#page-ai-import.non-pro-video-only > :not(.card) {
    display: none !important;
}

#page-categories.non-pro-video-only .page-header,
#page-products.non-pro-video-only .page-header,
#page-qr-ayarlari.non-pro-video-only .page-header,
#page-ai-import.non-pro-video-only .card,
#page-print-qr.non-pro-video-only .pqr-controls-card {
    width: min(100%, 420px);
    margin-left: auto;
    margin-right: auto;
}

#page-qr-ayarlari.non-pro-video-only .page-header > :not(.page-header-demo-video) {
    display: none !important;
}

#page-categories.non-pro-video-only .page-header,
#page-products.non-pro-video-only .page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#page-categories.non-pro-video-only .page-header-top,
#page-products.non-pro-video-only .page-header-top,
#page-categories.non-pro-video-only .header-search-wrap,
#page-products.non-pro-video-only .header-search-wrap {
    display: none !important;
}

#page-categories.non-pro-video-only .page-header-bottom,
#page-products.non-pro-video-only .page-header-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#page-categories.non-pro-video-only .page-header-bottom > button,
#page-products.non-pro-video-only .page-header-bottom > button,
#page-categories.non-pro-video-only .page-header-bottom > details > summary,
#page-products.non-pro-video-only .page-header-bottom > details > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
}

#page-categories.non-pro-video-only .page-header-bottom > button span:not(.pro-feature-badge),
#page-products.non-pro-video-only .page-header-bottom > button span:not(.pro-feature-badge),
#page-categories.non-pro-video-only .page-header-bottom > details > summary span:not(.pro-feature-badge),
#page-products.non-pro-video-only .page-header-bottom > details > summary span:not(.pro-feature-badge) {
    display: none !important;
}

#page-categories.non-pro-video-only .page-header-bottom > details > .excel-dropdown-menu,
#page-products.non-pro-video-only .page-header-bottom > details > .excel-dropdown-menu {
    display: none !important;
}

#page-categories.non-pro-video-only .page-header-bottom > details[open],
#page-products.non-pro-video-only .page-header-bottom > details[open] {
    pointer-events: none;
}

#page-categories.non-pro-video-only .page-header-demo-video,
#page-products.non-pro-video-only .page-header-demo-video,
#page-qr-ayarlari.non-pro-video-only .page-header-demo-video {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 32 / 18;
}

#page-ai-import.non-pro-video-only .page-header,
#page-print-qr.non-pro-video-only .page-header,
#page-ai-import.non-pro-video-only .card > :not(.ai-menu-preview-layout),
#page-print-qr.non-pro-video-only .pqr-control-fields {
    display: none !important;
}

#page-ai-import.non-pro-video-only .card,
#page-print-qr.non-pro-video-only .pqr-controls-card {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

#page-ai-import.non-pro-video-only .ai-menu-preview-layout,
#page-print-qr.non-pro-video-only .print-qr-controls-shell {
    display: block;
}

#page-ai-import.non-pro-video-only .ai-menu-preview-layout > :not(.ai-menu-demo-card) {
    display: none !important;
}

#page-ai-import.non-pro-video-only .ai-menu-demo-card,
#page-print-qr.non-pro-video-only .pqr-side-video,
#page-print-qr.non-pro-video-only .pqr-ai-demo-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

#page-print-qr.non-pro-video-only .pqr-side-video {
    max-width: none;
}
.ai-menu-demo-play {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(8,15,33,0.78);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15,23,42,0.28);
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease, background 0.18s ease;
    pointer-events: none;
}
.ai-menu-demo-card:hover .ai-menu-demo-play,
.ai-menu-demo-card:focus-visible .ai-menu-demo-play {
    background: rgba(16,185,129,0.9);
    transform: translate(-50%, -50%) scale(1.04);
}
.ai-menu-demo-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(15,23,42,0.82);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ai-menu-demo-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 8px 8px;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.86) 100%);
    color: #fff;
    text-align: left;
}
.ai-menu-demo-title {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}
.ai-menu-demo-hint {
    font-size: 0.6rem;
    line-height: 1.2;
    color: rgba(255,255,255,0.78);
}
.ai-menu-demo-expand {
    display: none;
}
.ai-menu-demo-card:focus-visible {
    outline: 2px solid rgba(16,185,129,0.75);
    outline-offset: 2px;
}
.modal.ai-menu-video-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(384px, 68.4vw, 1152px) !important;
    height: 80vh;
    max-width: clamp(384px, 68.4vw, 1152px) !important;
    max-height: 92vh;
    padding: 0;
    overflow: visible;
    resize: none;
    min-width: 320px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    border: none;
}
#ai-menu-video-modal {
    background: rgba(0,0,0,0.88);
}
.ai-menu-video-modal-header {
    position: absolute;
    top: -40px;
    right: 0;
    z-index: 3;
    padding: 0;
    background: transparent;
    border: none;
    cursor: default;
    user-select: none;
    flex-shrink: 0;
}
.ai-menu-video-modal-header h3 {
    display: none;
}
.ai-menu-video-modal-header .modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 1.2rem;
    transition: background 0.15s;
}
.ai-menu-video-modal-header .modal-close:hover {
    background: rgba(255,255,255,0.3);
}
.ai-menu-video-modal-body {
    padding: 0;
    background: transparent;
    flex: 1 1 auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.ai-menu-demo-video-large {
    display: block;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #000;
    cursor: pointer !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.ai-menu-demo-youtube-modal {
    border: 0;
}
.ai-menu-camera-modal {
    max-width: min(92vw, 760px);
    padding: 0;
    overflow: hidden;
    background: #020617;
}
.ai-menu-site-modal {
    max-width: min(92vw, 620px);
    padding: 0;
    overflow: hidden;
}
.ai-menu-site-modal-header {
    background: #0f172a;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ai-menu-site-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.ai-menu-site-modal-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}
.ai-menu-site-status {
    min-height: 18px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-light);
}
.ai-menu-site-status.is-error {
    color: #b91c1c;
}
.ai-menu-site-status.is-success {
    color: #166534;
}
.ai-menu-camera-modal-header {
    background: #0f172a;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ai-menu-camera-modal-body {
    padding: 12px;
    background: #020617;
}
.ai-menu-camera-stage {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-menu-camera-video {
    display: block;
    width: 100%;
    min-height: 280px;
    max-height: 68vh;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
    cursor: pointer !important;
    visibility: hidden;
}
.ai-menu-camera-video.is-ready {
    visibility: visible;
}
.ai-menu-camera-empty {
    position: absolute;
    inset: auto 16px 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15,23,42,0.7);
    color: rgba(255,255,255,0.86);
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: center;
}
.ai-menu-camera-status {
    min-height: 18px;
    margin-top: 10px;
    color: rgba(255,255,255,0.78);
    font-size: 0.82rem;
    line-height: 1.35;
}
.ai-menu-video-modal-body video,
.ai-menu-video-modal-body iframe {
    cursor: pointer;
    max-height: none;
}
@media (max-width: 600px) {
    .modal.ai-menu-video-modal {
        width: min(92vw, 1152px) !important;
        max-width: min(92vw, 1152px) !important;
        height: auto;
        max-height: 78vh;
    }
    .ai-menu-video-modal-header {
        top: -36px;
        right: 4px;
    }
}
.ai-menu-camera-modal-footer {
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.ai-menu-input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ai-menu-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #fff;
}
.ai-menu-category-empty {
    margin: 0 16px 10px;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 0.82rem;
    background: rgba(148, 163, 184, 0.06);
}
.ai-menu-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 12px;
}
.ai-menu-product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.ai-menu-product-card.is-selected {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.06);
}
.ai-menu-product-card.is-unselected {
    background: rgba(148, 163, 184, 0.04);
    opacity: 0.76;
}
.ai-menu-product-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ai-menu-product-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.ai-menu-product-inline-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1.7fr) minmax(78px, 0.42fr);
    gap: 8px;
    min-width: 0;
    align-items: center;
}
.ai-menu-product-name {
    font-weight: 600;
    font-size: 0.84rem;
}
.ai-menu-product-desc {
    font-size: 0.84rem;
}
.ai-menu-product-inline-row .ai-menu-input {
    padding: 8px 10px;
    min-height: 36px;
    font-size: 0.82rem;
}
.ai-menu-price-input {
    width: 100%;
    max-width: 96px;
    text-align: right;
}

/* Lisans tarih badge — dashboard sağ üst */
.lisans-tarih-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.lt-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    line-height: 1.4;
}
.lt-label {
    color: var(--text-light);
    font-weight: 500;
}
.lt-val {
    font-weight: 700;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 7px;
    min-width: 78px;
    text-align: center;
    letter-spacing: 0.3px;
}
.lt-val-end {
    color: var(--primary);
    border-color: var(--primary);
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
#page-categories > .card,
#page-products > .card {
    padding-left: 3px;
    padding-right: 3px;
    padding-top: 5px;
    padding-bottom: 0;
    margin-top: -2px;
    margin-bottom: 0;
}
#page-categories,
#page-products {
    margin-left: -13px;
    margin-right: -13px;
    overflow-x: clip;
}

/* ===== FULL-HEIGHT TABLE FLEX CHAIN (categories & products) ===== */

/* All page-sections: fill main-content, scroll by default */
.page-section {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Category & product pages: flex column, no scroll at page level */
#page-categories:not(.hidden),
#page-products:not(.hidden) {
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
}

/* page-header: fixed size */
#page-categories > .page-header,
#page-products > .page-header {
    flex-shrink: 0;
}

#page-duyurular > .page-header {
    flex-shrink: 0;
}

/* card: fill remaining space, flex column */
#page-categories > .card,
#page-products > .card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#page-duyurular > .card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* table-responsive: fill card, scroll vertically — thead stays sticky */
#page-categories > .card > .table-responsive,
#page-products > .card > .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: auto;
}

#page-duyurular > .card > .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: auto;
}

#page-categories > .card .table-responsive,
#page-products > .card .table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
}

#page-duyurular > .card .table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
}

#page-categories > .card,
#page-products > .card {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

#page-duyurular > .card {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

#page-categories .page-header,
#page-products .page-header {
    max-width: 100%;
    overflow-x: clip;
}

#page-duyurular .page-header {
    max-width: 100%;
    overflow-x: clip;
}

/* ===== QUICK ACCESS ===== */
.qa-card { padding-bottom: 4px; }
.qa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 6px;
}
.qa-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s, box-shadow 0.18s, transform 0.15s, border-color 0.18s;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text, #111827);
    font-family: inherit;
}
.qa-item:hover {
    background: var(--card-bg, #fff);
    border-color: var(--primary-light, #a5b4fc);
    box-shadow: 0 4px 16px rgba(99,102,241,0.10);
    transform: translateY(-2px);
}
.qa-item:active { transform: translateY(0); box-shadow: none; }
.qa-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.qa-label { flex: 1; line-height: 1.3; }
.qa-arrow { color: var(--text-light, #9ca3af); flex-shrink: 0; transition: transform 0.15s; }
.qa-item:hover .qa-arrow { transform: translateX(3px); color: var(--primary, #6366f1); }
@media (max-width: 600px) {
    .qa-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .qa-grid { grid-template-columns: 1fr; }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Table */
.table-responsive {
    display: block;
    position: relative;
    max-height: 80vh;
    overflow-x: auto;
    overflow-y: auto;
    isolation: isolate;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}
.table-responsive.table-responsive-tall {
    max-height: min(calc(80vh + 170px), calc(100vh - 70px));
}
@media (max-width: 768px) {
    .table-responsive { max-height: 63vh; }
    .table-responsive.table-responsive-tall {
        max-height: min(calc(63vh + 170px), calc(100vh - 50px));
    }
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.data-table th, .data-table td {
    padding: 4px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}
.data-table th:last-child, .data-table td:last-child {
    border-right: none;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
}
.data-table tbody tr {
    cursor: pointer;
}
#categories-table tbody tr,
#products-table tbody tr {
    cursor: default;
}

#categories-table,
#products-table {
    table-layout: fixed;
}

#categories-table .category-name-cell,
#products-table .product-name-cell,
#products-table .product-category-cell {
    max-width: 0;
    overflow: hidden;
}

#categories-table .category-name-cell strong,
#products-table .product-name-cell strong {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#categories-table .category-name-cell .table-name-text,
#products-table .product-name-cell .table-name-text,
#products-table .product-category-cell .table-name-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
}

#products-table .product-category-cell {
    white-space: nowrap;
}

#products-table td.product-actions-cell,
#products-table th:last-child {
    vertical-align: middle;
}

#products-table td.product-actions-cell {
    white-space: nowrap;
    text-align: center;
}

#products-table td.actions.product-actions-cell {
    text-align: center;
}

.product-allergen-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    flex: 0 0 auto;
}

.product-allergen-indicator svg {
    width: 12px;
    height: 12px;
    display: block;
}

.product-allergen-icon-list {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
}

.product-allergen-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.22);
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.product-allergen-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.08);
    transform-origin: center center;
    display: block;
    background: #fff;
}

.product-allergen-icon.is-fallback {
    background: rgba(245, 158, 11, 0.14);
}

.product-allergen-icon-more {
    width: auto;
    min-width: 20px;
    padding: 0 5px;
    font-size: 0.62rem;
}

#categories-table th,
#categories-table td,
#products-table th,
#products-table td {
    padding-left: 3px !important;
}
#categories-table th:first-child,
#categories-table td:first-child,
#products-table th:first-child,
#products-table td:first-child {
    width: 34px;
    max-width: 34px;
    padding-right: 2px !important;
}
#categories-table .thumb-cell,
#products-table .thumb-cell {
    width: 62px;
    padding: 4px 4px 4px 3px !important;
}
#categories-table th:nth-child(3),
#categories-table td:nth-child(3) {
    width: 28%;
}

#categories-table th:nth-child(4),
#categories-table td:nth-child(4) {
    width: 17%;
}

#products-table th:nth-child(3),
#products-table td:nth-child(3) {
    width: 22%;
}

#products-table th:nth-child(4),
#products-table td:nth-child(4) {
    width: 15%;
}

.data-table tbody tr:hover {
    background: rgba(0,0,0,0.02);
}
.table-desc-cell {
    max-width: 260px;
    min-width: 180px;
    color: var(--text-light);
    font-size: 0.82rem;
    line-height: 1.4;
}
.table-desc-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    cursor: default;
}
.table-desc-empty {
    opacity: 0.55;
}
#categories-table .table-desc-cell {
    max-width: 220px;
    min-width: 130px;
}

#products-table .table-desc-cell {
    max-width: 200px;
    min-width: 120px;
}

.table-lang-cell {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    white-space: normal;
    line-height: 1.32;
    font-size: 0.84rem;
    vertical-align: middle;
}
.table-lang-cell span {
    display: inline-block;
    margin-bottom: 2px;
}
/* Table thumbnail */
.thumb-cell {
    width: 76px;
    padding: 4px 8px !important;
}
.table-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    display: block;
    background: var(--bg);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.table-thumb:hover {
    opacity: 0.85;
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .table-desc-cell {
        min-width: 150px;
        max-width: 180px;
    }
    .table-lang-cell {
        width: 78px;
        min-width: 78px;
        max-width: 78px;
    }
}
.data-table td.actions {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
    padding: 6px 10px !important;
}

.data-table td.actions > .btn-icon + .btn-icon,
.data-table td.actions > button + button {
    margin-left: 6px;
}

#page-users .data-table {
    table-layout: fixed;
}

#page-users .data-table th.users-log-col,
#page-users .data-table td.users-log-cell,
#page-users .data-table th.users-actions-col,
#page-users .data-table td.users-actions-cell {
    width: 88px;
    min-width: 88px;
    text-align: center;
}

#page-users .data-table td.users-log-cell,
#page-users .data-table td.users-actions-cell {
    vertical-align: middle;
    padding: 6px 8px !important;
}

#page-users .data-table td.users-log-cell .btn-icon,
#page-users .data-table td.users-actions-cell .btn-icon {
    margin: 0 auto;
}

@media (max-width: 640px) {
    /* ── Global overflow lock — prevents ANY child causing horizontal scroll ── */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* ── Reset desktop negative margins that widen page-sections ── */
    #page-categories:not(.hidden),
    #page-products:not(.hidden) {
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    #page-categories > .card,
    #page-products > .card {
        display: block !important;
        overflow: visible !important;
        height: auto !important;
    }

    #page-categories .table-responsive,
    #page-products .table-responsive {
        overflow: visible;
        max-height: none;
        display: block !important;
        height: auto !important;
    }

    #categories-table,
    #products-table {
        display: block !important;
        border: none;
        background: transparent;
        table-layout: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    #categories-table thead,
    #products-table thead {
        display: none;
    }

    #categories-table tbody,
    #products-table tbody {
        display: block !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #categories-table th:first-child,
    #categories-table td:first-child,
    #products-table th:first-child,
    #products-table td:first-child,
    #categories-table th:nth-child(3),
    #categories-table td:nth-child(3),
    #categories-table th:nth-child(4),
    #categories-table td:nth-child(4),
    #products-table th:nth-child(3),
    #products-table td:nth-child(3),
    #products-table th:nth-child(4),
    #products-table td:nth-child(4),
    #categories-table .thumb-cell,
    #products-table .thumb-cell,
    #categories-table .category-name-cell,
    #products-table .product-name-cell,
    #products-table .product-category-cell,
    #categories-table .table-desc-cell,
    #products-table .table-desc-cell,
    #categories-table .table-lang-cell,
    #products-table .table-lang-cell,
    #categories-table .product-status-cell,
    #products-table .product-status-cell {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    #categories-table tbody tr[data-id],
    #products-table tbody tr[data-id] {
        display: grid !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-bottom: 6px;
        padding: 8px 8px 6px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 12px;
        background: var(--card-bg, #fff);
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
        column-gap: 6px;
        row-gap: 3px;
        box-sizing: border-box;
        overflow: visible;
    }

    #categories-table tbody tr[data-id] {
        grid-template-columns: 24px 46px minmax(0, 1fr) auto;
        grid-template-areas:
            "order image name   status"
            "order image lang   lang"
            "order image actions actions";
        align-items: start;
    }

    #products-table tbody tr[data-id] {
        grid-template-columns: 24px 46px minmax(0, 1fr) fit-content(88px);
        grid-template-areas:
            "order image name     price"
            "order image cat      portion"
            "order image lang     calorie"
            "order image actions  status";
        align-items: start;
    }

    #categories-table tbody tr[data-id] > td,
    #products-table tbody tr[data-id] > td {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent;
        float: none !important;
    }

    /* Inline display:none koruması (ERP kapalıyken) */
    #categories-table tbody tr[data-id] > td[style*="display:none"],
    #products-table tbody tr[data-id] > td[style*="display:none"] {
        display: none !important;
    }

    /* === GRID AREAS === */
    #categories-table tbody tr[data-id] .category-order-cell,
    #products-table tbody tr[data-id] .product-order-cell {
        grid-area: order;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #categories-table tbody tr[data-id] .category-image-cell,
    #products-table tbody tr[data-id] .product-image-cell {
        grid-area: image;
        align-self: start;
    }

    #categories-table tbody tr[data-id] .category-name-cell,
    #products-table tbody tr[data-id] .product-name-cell {
        grid-area: name;
        min-width: 0;
        align-self: center;
        padding-top: 1px !important;
    }

    /* Categories: lang / Products: cat+lang+portion+calorie merged into "info" row */
    #categories-table tbody tr[data-id] .category-lang-cell {
        grid-area: lang;
    }

    #categories-table tbody tr[data-id] .category-status-cell {
        grid-area: status;
        justify-self: end;
        align-self: center;
    }

    #categories-table tbody tr[data-id] .category-actions-cell {
        grid-area: actions;
        align-self: center;
    }

    #products-table tbody tr[data-id] .product-price-cell {
        grid-area: price;
        justify-self: end;
        align-self: center;
        font-weight: 700;
        font-size: 0.85rem !important;
        color: var(--text) !important;
        border-right: none !important;
        white-space: nowrap;
        padding-top: 1px !important;
        overflow: visible !important;
        min-width: 0;
    }

    #products-table tbody tr[data-id] .product-category-cell {
        grid-area: cat;
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0 4px;
    }

    #products-table tbody tr[data-id] .product-category-cell .table-name-text {
        display: inline !important;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        font-weight: 600;
        color: var(--text);
        font-size: 0.8rem;
    }

    #products-table tbody tr[data-id] .product-lang-cell {
        grid-area: lang;
    }

    #products-table tbody tr[data-id] .product-portion-cell {
        grid-area: portion;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        font-size: 0.74rem;
        color: var(--text-light);
        white-space: nowrap;
    }

    #products-table tbody tr[data-id] .product-calorie-cell {
        grid-area: calorie;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        font-size: 0.74rem;
        color: var(--text-light);
        white-space: nowrap;
    }

    /* ERP — still hidden */
    #products-table tbody tr[data-id] .product-erp-cell {
        display: none !important;
    }

    #products-table tbody tr[data-id] .product-status-cell {
        grid-area: status;
        justify-self: end;
        align-self: center;
    }

    #products-table tbody tr[data-id] .product-actions-cell {
        grid-area: actions;
        align-self: center;
    }

    /* === NAME BLOCK === */
    #categories-table tbody tr[data-id] .mobile-card-name-block,
    #products-table tbody tr[data-id] .mobile-card-name-block {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    #categories-table tbody tr[data-id] .category-name-cell strong,
    #products-table tbody tr[data-id] .product-name-cell strong {
        display: flex !important;
        align-items: center;
        gap: 5px;
        width: 100%;
        min-width: 0;
        font-size: 0.9rem;
        line-height: 1.25;
        overflow: visible !important;
    }

    #categories-table tbody tr[data-id] .category-name-cell .table-name-text,
    #products-table tbody tr[data-id] .product-name-cell .table-name-text {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: none !important;
    }

    #categories-table tbody tr[data-id] .mobile-inline-desc,
    #products-table tbody tr[data-id] .mobile-inline-desc {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        overflow: hidden;
        font-size: 0.72rem;
        line-height: 1.3;
        color: var(--text-light);
        margin: 0;
    }

    /* === META & STAT CELLS — plain, no borders === */
    #categories-table tbody tr[data-id] .mobile-card-meta,
    #products-table tbody tr[data-id] .mobile-card-meta,
    #products-table tbody tr[data-id] .mobile-card-stat {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 4px;
        padding: 0 !important;
        border: none !important;
        border-radius: 0;
        background: transparent;
        font-size: 0.75rem;
        color: var(--text-light);
        line-height: 1.4;
    }

    #categories-table tbody tr[data-id] .mobile-card-meta::before,
    #products-table tbody tr[data-id] .mobile-card-meta::before,
    #products-table tbody tr[data-id] .mobile-card-stat::before {
        content: attr(data-mobile-label) ":";
        display: inline;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--text-light);
        opacity: 0.7;
        white-space: nowrap;
        flex-shrink: 0;
        margin-right: 2px;
    }

    /* Category + lang cells — font color */
    #products-table tbody tr[data-id] .product-category-cell {
        font-size: 0.75rem;
        color: var(--text);
    }

    #products-table tbody tr[data-id] .product-category-cell .table-name-text {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: none !important;
        font-weight: 600;
        color: var(--text);
    }

    #categories-table tbody tr[data-id] .table-lang-cell,
    #products-table tbody tr[data-id] .table-lang-cell {
        width: auto;
        min-width: 0;
        max-width: none;
        white-space: normal;
        line-height: 1.4;
        font-size: 0.75rem;
    }

    #categories-table tbody tr[data-id] .table-lang-cell span,
    #products-table tbody tr[data-id] .table-lang-cell span {
        writing-mode: horizontal-tb;
    }

    /* DESC CELLS — always hidden */
    #categories-table tbody tr[data-id] td.table-desc-cell,
    #products-table tbody tr[data-id] td.table-desc-cell {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: 0 none !important;
        margin: 0 !important;
    }

    /* === THUMB === */
    #categories-table tbody tr[data-id] .thumb-cell,
    #products-table tbody tr[data-id] .thumb-cell {
        padding: 0 !important;
    }

    #categories-table tbody tr[data-id] .table-thumb,
    #products-table tbody tr[data-id] .table-thumb {
        width: 46px;
        height: 46px;
        border-radius: 8px;
    }

    /* === SORT HANDLE === */
    #categories-table tbody tr[data-id] .sort-handle,
    #products-table tbody tr[data-id] .sort-handle {
        padding: 2px;
    }

    #categories-table tbody tr[data-id] .drag-icon,
    #products-table tbody tr[data-id] .drag-icon {
        font-size: 0.9rem;
    }

    #categories-table tbody tr[data-id] .drag-num,
    #products-table tbody tr[data-id] .drag-num {
        font-size: 0.68rem;
        min-width: 10px;
    }

    /* === ACTION BUTTONS === */
    #categories-table tbody tr[data-id] .actions,
    #products-table tbody tr[data-id] .actions {
        display: flex;
        align-items: center;
        gap: 3px;
        padding: 0 !important;
        flex-wrap: wrap;
        max-width: 100%;
    }

    #categories-table tbody tr[data-id] .btn-icon,
    #products-table tbody tr[data-id] .btn-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    /* === PRICE ZERO INPUT === */
    #products-table tbody tr[data-id] .product-zero-price-input {
        width: 80px !important;
        min-width: 0;
        padding: 3px 5px;
        font-size: 0.82rem;
    }

    /* === FONT SIZE OVERRIDES === */
    #categories-table tbody tr[data-id] .table-lang-cell,
    #products-table tbody tr[data-id] .table-lang-cell,
    #products-table tbody tr[data-id] .product-category-cell,
    #products-table tbody tr[data-id] .product-price-cell {
        font-size: 0.78rem;
    }

    /* === STATUS CELL === */
    #categories-table tbody tr[data-id] .product-status-cell,
    #products-table tbody tr[data-id] .product-status-cell {
        width: auto;
        min-width: 0;
        max-width: none;
    }

    /* Category name overflow */
    #categories-table .category-name-cell,
    #products-table .product-name-cell,
    #products-table .product-category-cell {
        max-width: none !important;
        overflow: visible !important;
    }

    #products-table tbody tr[data-id] .product-status-cell + .product-actions-cell,
    #categories-table tbody tr[data-id] .category-actions-cell {
        justify-content: flex-end;
    }
}

@media (max-width: 420px) {
    #categories-table tbody tr[data-id],
    #products-table tbody tr[data-id] {
        grid-template-columns: 24px 42px minmax(0, 1fr) auto;
        column-gap: 5px;
        row-gap: 3px;
    }

    #categories-table tbody tr[data-id] .table-thumb,
    #products-table tbody tr[data-id] .table-thumb {
        width: 42px;
        height: 42px;
    }

    #categories-table tbody tr[data-id] .category-actions-cell,
    #products-table tbody tr[data-id] .product-actions-cell {
        justify-content: flex-start;
    }
}

/* Icon-only action buttons */
.mobile-card-name-block {
    min-width: 0;
}

.mobile-inline-desc {
    display: none;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 0;
    transition: background 0.15s, transform 0.1s;
    vertical-align: middle;
}
.btn-icon:hover { transform: scale(1.12); }
.btn-icon-edit  { color: #6366f1; }
.btn-icon-edit:hover  { background: #ede9fe; }
.btn-icon-preview { color: #0ea5e9; }
.btn-icon-preview:hover { background: #e0f2fe; }
.btn-icon-delete { color: #ef4444; }
.btn-icon-delete:hover { background: #fee2e2; }
.btn-icon-key   { color: #6366f1; }
.btn-icon-key:hover   { background: #ede9fe; }
.btn-icon-log   { color: #0f766e; }
.btn-icon-log:hover   { background: #ccfbf1; }

.user-login-logs-header {
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
}

.user-login-logs-header-main {
    flex: 1 1 auto;
    min-width: 0;
}

.user-login-logs-subtitle {
    margin-top: 3px;
    font-size: 0.82rem;
    color: var(--text-light);
}

.user-login-logs-modal-shell {
    max-height: min(86vh, 760px);
}

.user-login-logs-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.user-login-logs-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.user-login-logs-summary-header {
    flex: 0 0 auto;
    width: min(100%, 520px);
}

.user-login-log-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.user-login-log-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.user-login-log-card strong {
    font-size: 0.95rem;
    color: var(--text);
}

.user-login-logs-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.user-login-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.user-login-status.is-online {
    background: #dcfce7;
    color: #166534;
}

.user-login-status.is-idle {
    background: #fef3c7;
    color: #92400e;
}

.user-login-status.is-logged-out {
    background: #e2e8f0;
    color: #475569;
}

.user-login-status.is-never {
    background: #fee2e2;
    color: #b91c1c;
}

.user-login-logs-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.user-login-logs-pagination-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.user-login-logs-pagination-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .user-login-logs-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .user-login-logs-summary {
        grid-template-columns: 1fr;
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-active {
    background: #d4edda;
    color: #155724;
}
.badge-inactive {
    background: #f8d7da;
    color: #721c24;
}
.badge-toggle {
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    user-select: none;
}
.badge-toggle:hover {
    opacity: 0.75;
    transform: scale(1.08);
}

/* Toggle Switch */
.toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: default;
    user-select: none;
}
.product-status-cell {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    overflow: hidden;
}
.product-status-cell .toggle-wrap {
    display: flex;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
}
.toggle-wrap .toggle-label {
    display: none;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 21px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #e74c3c;
    border-radius: 21px;
    transition: background 0.22s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.22s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle-switch input:checked + .toggle-slider {
    background: #27ae60;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(17px);
}
.toggle-switch:hover .toggle-slider {
    filter: brightness(0.9);
}

.admin-duyuru-list-card {
    margin-bottom: 10px;
}

.admin-duyuru-page-header {
    gap: 4px;
    margin-bottom: 4px;
}

.admin-duyuru-page-header .page-header-top {
    align-items: center;
}

.admin-duyuru-page-header .page-header-bottom {
    margin-top: -2px;
}

.admin-duyuru-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-duyuru-form-header h3 {
    margin: 0;
    font-size: 0.95rem;
}

.admin-duyuru-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.admin-duyuru-form-group-full {
    grid-column: 1 / -1;
}

.admin-duyuru-form-toggle-group {
    display: flex;
    align-items: center;
}

.admin-duyuru-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
    width: 100%;
    min-height: 30px;
}

.admin-duyuru-image-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#admin-duyuru-modal .admin-duyuru-image-preview {
    width: 100%;
    min-height: 110px;
    max-height: 138px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(248,250,252,0.9), rgba(241,245,249,0.75));
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    padding: 10px 12px;
}

#admin-duyuru-modal .admin-duyuru-image-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 116px;
    min-height: 0;
    padding: 0;
    margin: 0 auto;
    object-fit: contain;
}

#admin-duyuru-modal .admin-duyuru-image-preview.is-loading {
    cursor: progress;
    pointer-events: none;
}

.admin-duyuru-inline-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(15, 23, 42, 0.16);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: tspin 0.7s linear infinite;
}

.admin-duyuru-image-placeholder {
    padding: 10px 12px;
    font-size: 0.73rem;
    text-align: center;
    color: var(--text-light);
    line-height: 1.3;
}

.user-login-logs-table {
    table-layout: fixed;
}

.user-login-logs-table th,
.user-login-logs-table td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.user-login-logs-table th:nth-child(1),
.user-login-logs-table td:nth-child(1) {
    width: 160px;
}

.user-login-logs-table th:nth-child(2),
.user-login-logs-table td:nth-child(2) {
    width: 220px;
}

.user-login-inline-meta {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-login-browser-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
}

.menu-view-logs-table th:nth-child(1),
.menu-view-logs-table td:nth-child(1),
.menu-view-logs-table th:nth-child(5),
.menu-view-logs-table td:nth-child(5) {
    width: 148px;
}

.menu-view-logs-table th:nth-child(2),
.menu-view-logs-table td:nth-child(2) {
    width: 210px;
}

.menu-view-logs-table th:nth-child(4),
.menu-view-logs-table td:nth-child(4) {
    width: 120px;
}

.admin-duyuru-image-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-duyuru-image-note {
    font-size: 0.72rem;
    color: var(--text-light);
}

.admin-duyuru-modal textarea {
    min-height: 62px;
    resize: vertical;
}

.admin-duyuru-translation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.admin-duyuru-translation-summary {
    flex: 1 1 220px;
    font-size: 0.76rem;
    color: var(--text-light);
    line-height: 1.45;
}

.admin-duyuru-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.admin-duyuru-form-status {
    min-height: 16px;
    font-size: 0.78rem;
    color: var(--text-light);
}

.admin-duyuru-modal-footer {
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.admin-duyuru-preview-modal {
    position: relative;
    max-width: min(94vw, 980px);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    overflow: hidden;
    overflow-y: hidden;
}

.admin-duyuru-preview-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 22px rgba(15,23,42,0.16);
}

.admin-duyuru-preview-modal-close:hover {
    background: #fff;
}

.admin-duyuru-preview-modal-header {
    align-items: flex-start;
}

.admin-duyuru-preview-modal-subtitle {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-light);
}

.admin-duyuru-preview-modal-body {
    padding: 46px 22px 24px;
    overflow-y: hidden;
}

.admin-duyuru-preview-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(220px, 1fr);
    gap: 28px;
    align-items: center;
}

.admin-duyuru-preview-phone-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

.admin-duyuru-preview-modal .phone-wrap {
    position: relative;
    width: 375px;
    z-index: 2;
    transform: scale(0.68);
    transform-origin: top center;
}

.admin-duyuru-preview-modal .phone-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.admin-duyuru-preview-modal .phone-frame {
    width: 375px;
    background: #0f172a;
    border-radius: 52px;
    padding: 18px 16px 26px;
    box-shadow: 0 50px 100px rgba(15,23,42,0.3), 0 20px 40px rgba(15,23,42,0.2), 0 0 0 1px rgba(255,255,255,0.07);
    position: relative;
}

.admin-duyuru-preview-modal .phone-notch {
    width: 90px;
    height: 10px;
    background: #1e293b;
    border-radius: 5px;
    margin: 0 auto 12px;
}

.admin-duyuru-preview-modal .phone-notch::before {
    display: none;
}

.admin-duyuru-preview-modal .phone-screen {
    background: #f8fafc;
    border-radius: 36px;
    overflow: hidden;
    height: 667px;
    position: relative;
}

.admin-duyuru-preview-modal .phone-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 36px;
    background: linear-gradient(145deg, rgba(255,255,255,0.12), transparent 35%);
    z-index: 2;
    pointer-events: none;
}

.admin-duyuru-preview-modal .admin-duyuru-preview-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 36px;
    z-index: 1;
    background: #fff;
}

.admin-duyuru-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.94));
    color: #1d4ed8;
    z-index: 3;
    border-radius: 36px;
}

.admin-duyuru-preview-loading.is-hidden {
    display: none;
}

.admin-duyuru-preview-loading-text {
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
}

.admin-duyuru-preview-iframe {
    position: absolute;
    inset: 0;
    width: calc(100% + 17px);
    height: 100%;
    border: none;
    display: block;
    background: #fff;
}

@keyframes adminDuyuruPhoneGlow {
    0% { transform: scale(0.92); opacity: 0.72; }
    100% { transform: scale(1.08); opacity: 1; }
}

.admin-duyuru-preview-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-duyuru-preview-side-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}

.admin-duyuru-preview-side-date {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
}

.admin-duyuru-preview-side-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-duyuru-preview-side-note {
    margin: 0;
    max-width: 320px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #475569;
}

.admin-duyuru-preview-open-link {
    align-self: flex-start;
}

.admin-duyuru-translations-modal .modal-header {
    align-items: flex-start;
}

.admin-duyuru-translation-source-note {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-light);
}

.admin-duyuru-translations-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-duyuru-translations-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-duyuru-translations-note {
    margin: 0;
    max-width: 560px;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text-light);
}

.admin-duyuru-translations-table-wrap {
    max-height: min(62vh, 520px);
}

.admin-duyuru-translations-table th,
.admin-duyuru-translations-table td {
    vertical-align: top;
}

.admin-duyuru-translation-lang {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.admin-duyuru-translation-lang .fi,
.admin-duyuru-translation-flag-fallback {
    flex: 0 0 auto;
    width: 22px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.admin-duyuru-translation-lang-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-duyuru-translation-lang-copy strong {
    font-size: 0.83rem;
    line-height: 1.1;
}

.admin-duyuru-translation-lang-copy span {
    font-size: 0.74rem;
    color: var(--text-light);
    line-height: 1.2;
}

.admin-duyuru-translation-source-chip {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-duyuru-translation-input {
    width: 100%;
    min-height: 88px;
    resize: vertical;
}

.admin-duyuru-translation-input[readonly] {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-light);
}

.admin-duyuru-translations-footer {
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 900px) {
    .admin-duyuru-preview-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .admin-duyuru-preview-side {
        align-items: center;
        text-align: center;
    }

    .admin-duyuru-preview-open-link {
        align-self: center;
    }

    .admin-duyuru-preview-side-note {
        max-width: none;
    }

    .admin-duyuru-preview-phone-wrap {
        min-height: 560px;
    }

    .admin-duyuru-translations-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .admin-duyuru-preview-modal-body {
        padding: 14px 12px 18px;
    }

    .admin-duyuru-preview-phone-wrap {
        min-height: 500px;
    }

    .admin-duyuru-preview-modal .phone-frame {
        width: 230px;
        padding: 12px 10px 16px;
        border-radius: 34px;
    }

    .admin-duyuru-preview-modal .phone-screen {
        height: 440px;
        border-radius: 22px;
    }

    .admin-duyuru-preview-modal .admin-duyuru-preview-viewport,
    .admin-duyuru-preview-loading,
    .admin-duyuru-preview-iframe {
        border-radius: 22px;
    }

    .admin-duyuru-preview-loading-text {
        font-size: 0.78rem;
    }
}

.admin-duyuru-modal-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-duyuru-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
}

.admin-duyuru-save-btn.is-loading {
    cursor: wait;
}

.admin-duyuru-blocking-loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(6px);
    z-index: 2;
    pointer-events: auto;
}

.admin-duyuru-blocking-loader.is-visible {
    display: flex;
}

.admin-duyuru-blocking-loader-card {
    min-width: min(320px, calc(100vw - 48px));
    max-width: 420px;
    padding: 22px 24px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.admin-duyuru-blocking-loader-card .admin-duyuru-inline-spinner {
    flex: 0 0 auto;
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
}

.admin-duyuru-blocking-loader-text {
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.4;
}

#admin-duyuru-modal .modal-header {
    padding: 9px 14px;
}

#admin-duyuru-modal .modal-body {
    padding: 6px 14px;
}

#admin-duyuru-modal .modal-footer {
    padding: 8px 14px;
}

#admin-duyuru-modal .form-group {
    margin-bottom: 0;
}

#admin-duyuru-modal .form-group label {
    margin-bottom: 4px;
    font-size: 0.8rem;
}

#admin-duyuru-modal .btn.btn-sm {
    padding-top: 5px;
    padding-bottom: 5px;
}

#page-duyurular .data-table th,
#page-duyurular .data-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.admin-duyuru-text {
    max-width: 520px;
    white-space: pre-wrap;
    line-height: 1.45;
    font-size: 0.92rem;
}

.admin-duyuru-text.has-image {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.admin-duyuru-row-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 48px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.admin-duyuru-row-text {
    min-width: 0;
}

.admin-duyuru-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.admin-duyuru-status-badge.is-active {
    background: rgba(39, 174, 96, 0.12);
    color: #1f8b4c;
}

.admin-duyuru-status-badge.is-passive {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

@media (max-width: 860px) {
    .admin-duyuru-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-duyuru-modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-duyuru-modal-actions {
        width: 100%;
    }

    .admin-duyuru-modal-actions .btn {
        flex: 1 1 0;
    }

    .admin-duyuru-translation-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-duyuru-translations-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

.admin-duyuru-row-meta {
    margin-top: 4px;
    font-size: 0.74rem;
    color: var(--text-light);
}

/* Modal Inline Image */
.modal-img-area {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.modal-img-preview {
    width: 100%;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    padding: 2px;
    box-sizing: border-box;
    transition: background 0.15s;
}
#product-modal .modal-img-preview img {
    max-height: 110px !important;
}
.modal-img-preview:hover { background: var(--bg-hover, #f5f5f5); }
.modal-img-preview span { color: var(--text-light); font-size: 0.88rem; }
.modal-img-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px;
    flex-wrap: wrap;
}

.modal-img-controls > [id$="-img-status"] {
    flex-basis: 100%;
}

/* Wide modal */
.modal-wide { max-width: 680px; }

/* Top row: image + meta side by side */
.modal-top-row {
    margin-bottom: 2px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border);
}
.modal-img-area--compact {
    width: 130px;
    min-width: 130px;
    flex-shrink: 0;
}
.modal-meta-row {
    display: flex;
    flex: 1;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.product-meta-group-category {
    order: 1;
}
.product-meta-group-menu-option {
    order: 2;
}
.product-meta-group-gram-unit {
    order: 3;
}
.product-meta-group-discount {
    order: 4;
}
.product-ingredient-group {
    order: 5;
}
.product-meta-group-gram {
    order: 6;
}
.product-meta-group-calorie-estimate {
    order: 7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: center;
}
.product-meta-group-calorie {
    order: 8;
}
.modal-aktif-group { min-width: 80px; max-width: 110px; }

/* Main language card */
.main-lang-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    padding: 8px 12px 4px;
    margin-bottom: 6px;
}
.main-lang-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.main-lang-card-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
    padding-top: 3px;
}
/* Body: inputlar sola, resim alanı sağa */
.main-lang-card-body {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.main-lang-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.main-lang-img-area {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    align-self: stretch;
}
.main-lang-img-area .modal-img-preview {
    min-height: 120px;
    padding: 4px;
}
.main-lang-img-area .modal-img-preview img {
    max-height: 140px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.main-lang-img-area .modal-img-controls {
    padding: 3px 5px;
    gap: 3px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.main-lang-img-area .modal-img-controls > span:not([id$="-img-status"]) {
    font-size: 0.64rem !important;
    white-space: nowrap;
}
.main-lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e40af;
}
.main-lang-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3b82f6;
    background: #dbeafe;
    padding: 2px 4px;
    border-radius: 20px;
}
.main-lang-input {
    font-size: 0.96rem !important;
    border-color: #93c5fd !important;
}
.main-lang-input textarea,
textarea.main-lang-input {
    min-height: 34px;
    resize: none;
    overflow: hidden;
}
.desc-field-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.main-lang-input:focus { border-color: #3b82f6 !important; }

/* Other languages compact table */
.other-langs-section { margin-top: 4px; }
/* Ad + Durum yan yana satırı */
.name-durum-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.name-durum-row .name-field { flex: 2.5; min-width: 0; }
.name-durum-row .durum-field { flex: 0 0 90px; }
.name-durum-row .product-name-inline-price-group {
    flex: 0 0 82px;
    min-width: 82px;
}
.name-durum-row .product-name-inline-erp-group {
    flex: 0 0 84px;
    min-width: 84px;
}
.other-langs-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.btn-clear-langs {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 500;
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    background: var(--card-bg);
    color: var(--text-light);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-clear-langs:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fee2e2;
}
.other-langs-table {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 180px;
}
.other-langs-col-headers {
    display: grid;
    grid-template-columns: 70px 1fr 1fr;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}
.other-langs-col-headers span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 6px 10px;
}
.other-langs-col-headers .olch-name,
.other-langs-col-headers .olch-desc {
    border-left: 1px solid var(--border);
}
.other-lang-row {
    display: grid;
    grid-template-columns: 70px 1fr 1fr;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.other-lang-row:last-child { border-bottom: none; }
.other-lang-row input,
.other-lang-row textarea {
    border: none !important;
    border-radius: 0 !important;
    border-left: 1px solid var(--border) !important;
    padding: 6px 10px !important;
    font-size: 0.85rem !important;
    background: transparent !important;
    box-sizing: border-box;
    width: 100%;
    font-family: var(--font);
}
.other-lang-row input { height: 100%; }
.other-lang-row textarea {
    resize: none;
    overflow: hidden;
    padding: 3px 10px !important;
    min-height: 25px !important;
    line-height: 1.3;
    display: block;
}
.other-lang-row input:focus,
.other-lang-row textarea:focus {
    background: #f0f9ff !important;
    outline: none !important;
    box-shadow: none !important;
}

.product-modal-detail-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    width: fit-content;
    max-width: 100%;
    flex: 0 1 auto;
    min-width: auto;
}

.product-modal-detail-tab {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-light);
    border-radius: 0;
    padding: 6px 1px 7px;
    margin-bottom: -1px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.product-modal-detail-tab + .product-modal-detail-tab {
    position: relative;
    margin-left: 10px;
}

.product-modal-detail-tab + .product-modal-detail-tab::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    width: 1px;
    height: 14px;
    background: var(--border);
    transform: translateY(-50%);
}

.product-modal-detail-tab.is-active {
    background: transparent;
    border-bottom-color: var(--accent);
    color: var(--text-primary);
}

.product-modal-detail-tab:hover {
    color: var(--text-primary);
}

.product-modal-detail-panel {
    display: none;
}

.product-modal-detail-panel.is-active {
    display: block;
}

.product-other-langs-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px;
    color: var(--text-light);
    background: var(--bg);
    font-size: 0.86rem;
}

.product-nutrition-summary {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px dashed rgba(15, 23, 42, 0.16);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(14, 165, 233, 0.06));
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.product-nutrition-summary.is-empty {
    display: none;
}

.product-nutrition-summary-copy {
    line-height: 1.45;
}

.product-nutrition-summary-copy strong {
    color: var(--text);
}

.product-nutrition-summary-sep {
    opacity: 0.45;
    margin: 0 6px;
}

.product-ai-calorie-btn {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 5px;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 800;
}

.product-nutrition-reset-btn,
#product-inline-ingredient-calorie-btn {
    flex-shrink: 0;
}

.product-ingredient-grid {
    border-radius: 10px;
    overflow: hidden;
    max-height: none;
}

.product-ingredient-grid-body {
    max-height: 240px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.product-ingredient-grid-headers,
.product-ingredient-grid-row {
    display: grid;
    grid-template-columns: 70px 48px minmax(0, 1fr) 116px;
    align-items: center;
}

.product-ingredient-grid-headers {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.product-ingredient-grid-head {
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-sizing: border-box;
}

.product-ingredient-grid-head-toggle {
    justify-self: stretch;
    text-align: center;
}

.product-ingredient-grid-head-actions {
    justify-self: stretch;
    text-align: right;
    border-left: 1px solid var(--border);
}

.product-ingredient-grid-head + .product-ingredient-grid-head {
    border-left: 1px solid var(--border);
}

.product-ingredient-grid-headers .product-ingredient-grid-head:nth-child(3) {
    border-left: 1px solid transparent;
}

.product-ingredient-grid-row {
    border-bottom: 1px solid var(--border);
}

.product-ingredient-grid-row:last-child {
    border-bottom: none;
}

.product-ingredient-grid-input {
    min-width: 0;
    border-left: 1px solid var(--border);
}

.product-ingredient-grid-input input[type="text"] {
    width: 100%;
    border: none !important;
    border-radius: 0 !important;
    padding: 6px 10px !important;
    background: transparent !important;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem !important;
}

.product-ingredient-grid-input input[type="text"]:focus {
    background: #f0f9ff !important;
    outline: none !important;
    box-shadow: none !important;
}

.product-inline-ingredient-lang-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-inline-ingredient-lang-head small {
    font-size: 0.72rem;
    color: var(--text-light);
}

.product-inline-ingredient-indicator-head,
.product-inline-ingredient-indicator-cell {
    text-align: center;
}

.product-inline-allergen-match-cell {
    min-width: 0;
    border-left: 1px solid var(--border);
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.product-inline-allergen-badge-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100%;
}

.product-inline-allergen-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    padding: 4px 0;
    color: var(--text-primary);
}

.product-inline-allergen-badge.is-empty {
    color: var(--text-light);
}

.product-inline-allergen-badge-more {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 4px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-weight: 700;
}

.product-inline-allergen-badge-thumb,
.product-inline-allergen-badge-fallback {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.product-inline-allergen-badge-thumb {
    object-fit: cover;
    object-position: center center;
    transform: scale(1.56);
    transform-origin: center center;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #fff;
}

.product-inline-allergen-badge-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.product-inline-allergen-badge-fallback svg {
    width: 13px;
    height: 13px;
    display: block;
}

.product-inline-allergen-badge-label {
    display: none;
}

.product-inline-ingredient-metric-head,
.product-inline-ingredient-metric-cell {
    width: 92px;
    min-width: 92px;
}

.product-inline-ingredient-indicator-btn {
    border: 1.5px solid transparent;
    background: transparent;
    padding: 3px;
    cursor: pointer;
    border-radius: 999px;
    opacity: 0.38;
    transition: opacity 0.15s, transform 0.12s, border-color 0.15s, background-color 0.15s, color 0.15s;
}

.product-inline-ingredient-indicator-btn:hover {
    opacity: 0.72;
    transform: scale(1.06);
}

.product-inline-ingredient-indicator-btn.is-active {
    opacity: 1;
    background: rgba(34, 197, 94, 0.14);
    border-color: #166534;
    color: #166534;
}

.product-inline-ingredient-indicator-btn.is-locked {
    cursor: default;
}

.product-inline-ingredient-indicator-btn.is-locked:hover {
    transform: none;
}

.product-inline-ingredient-actions-head,
.product-inline-ingredient-actions-cell {
    text-align: right;
}

.product-inline-ingredient-actions-cell {
    border-left: 1px solid var(--border);
    padding: 0 10px;
}

.product-inline-ingredient-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.product-inline-ingredient-indicator-empty {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.product-inline-ingredient-empty-row {
    text-align: center;
    color: var(--text-light);
    padding: 18px 10px;
    font-size: 0.86rem;
}

@media (max-width: 767px) {
    .user-login-logs-header {
        flex-direction: column;
        align-items: stretch;
        padding-right: 42px;
    }

    .user-login-logs-summary-header {
        width: 100%;
    }

    .product-nutrition-summary {
        align-items: flex-start;
        flex-direction: column;

    .user-login-logs-table th:nth-child(1),
    .user-login-logs-table td:nth-child(1) {
        width: 132px;
    }

    .user-login-logs-table th:nth-child(2),
    .user-login-logs-table td:nth-child(2) {
        width: 170px;
    }

    .menu-view-logs-table th:nth-child(1),
    .menu-view-logs-table td:nth-child(1),
    .menu-view-logs-table th:nth-child(5),
    .menu-view-logs-table td:nth-child(5) {
        width: 132px;
    }

    .menu-view-logs-table th:nth-child(2),
    .menu-view-logs-table td:nth-child(2) {
        width: 168px;
    }

    .menu-view-logs-table th:nth-child(4),
    .menu-view-logs-table td:nth-child(4) {
        width: 108px;
    }
    }
    .product-ingredient-grid {
        --product-ingredient-actions-width: 96px;
    }
    .product-ingredient-grid-headers,
    .product-ingredient-grid-row {
        grid-template-columns: 58px 40px minmax(0, 1fr) 96px;
    }
    .product-inline-ingredient-actions-cell {
        padding: 0 6px;
    }
    .product-inline-allergen-match-cell {
        padding: 0 1px;
    }
    .product-ingredient-grid-head-toggle {
        justify-self: stretch;
    }
    .product-ingredient-grid-head-actions {
        justify-self: stretch;
    }
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 3;
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--bg);
    box-shadow: 0 2px 0 var(--border);
}
/* Column resize handle */
.col-resize-handle {
    position: absolute;
    top: 0; right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 2;
    border-right: 2px solid transparent;
    transition: border-color 0.15s;
}
.col-resize-handle:hover { border-right-color: #93c5fd; }
/* Resizable main data-table header cells */
.data-table[data-col-resizable] th {
    white-space: nowrap;
    text-overflow: ellipsis;
}
.other-lang-flag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}
.other-lang-flag small {
    font-size: 0.70rem;
    color: var(--text-light);
}

/* Form */
.form-group {
    margin-bottom: 0.3rem;
}
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.form-group .form-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}
.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group {
    flex: 1;
}

/* Language Grid — 2 sütun */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
}
.lang-section {
    padding-bottom: 2px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 10px;
    min-width: 0;
}
.lang-section:nth-last-child(-n+2):nth-child(odd),
.lang-section:last-child {
    border-bottom: none;
}
.lang-section-header {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 3px 9px;
    margin-bottom: 7px;
    border: 1px solid var(--border);
}
.lang-divider { display: none; }

/* Modal header actions */
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 10px;
}
/* Translate + Clear buton grubu */
.other-langs-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex: 0 0 auto;
    flex-wrap: wrap;
}
.btn-auto-translate {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 500;
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    background: var(--card-bg);
    color: var(--text-light);
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-auto-translate:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99,102,241,0.07);
}
.btn-auto-translate:disabled { opacity: 0.55; cursor: not-allowed; }
/* Mobile-only label spans — hidden by default on desktop */
.btn-mobile-label { display: none; }
.btn-add-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
    font-family: var(--font);
}
.btn-add-new:hover { background: #15803d; }
.btn-add-new:disabled { opacity: 0.65; cursor: not-allowed; }

/* Page-header action buttons — normalize all action heights */
.page-header .btn-auto-translate,
.page-header .btn-add-new,
.page-header .btn-excel {
    min-height: var(--page-header-action-height) !important;
    height: var(--page-header-action-height) !important;
    box-sizing: border-box;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    justify-content: center;
}

.page-header .btn-auto-translate,
.page-header .btn-add-new {
    padding: 0 14px !important;
    gap: 6px !important;
}

.page-header .btn {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    min-height: var(--page-header-action-height) !important;
    line-height: 1 !important;
    gap: 6px !important;
}

/* Excel import/export dropdown */
.excel-dropdown {
    position: relative;
    display: inline-block;
    margin: 0;
}

.excel-dropdown summary {
    list-style: none;
}

.excel-dropdown summary::-webkit-details-marker {
    display: none;
}

.btn-excel-toggle {
    min-height: var(--page-header-action-height) !important;
    height: var(--page-header-action-height) !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    gap: 6px !important;
    justify-content: center;
    min-width: 108px;
}

.excel-toggle-arrow {
    transition: transform 0.16s ease;
    flex-shrink: 0;
}

.excel-dropdown[open] .excel-toggle-arrow {
    transform: rotate(180deg);
}

.excel-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    display: none;
    flex-direction: column;
    gap: 6px;
    min-width: 190px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 18px 36px rgba(15,23,42,0.16);
    backdrop-filter: blur(10px);
}

.excel-dropdown[open] > .excel-dropdown-menu {
    display: flex;
}

.excel-dropdown-menu .btn-excel {
    width: 100%;
    justify-content: flex-start;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
}

.bulk-actions-toggle {
    min-width: 126px;
}

.bulk-actions-menu .btn-auto-translate {
    width: 100%;
    justify-content: flex-start !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
}

.bulk-actions-menu .btn-auto-translate span {
    white-space: nowrap;
}

.excel-dropdown-menu .btn-excel span {
    white-space: nowrap;
}

.btn-excel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: var(--text-light);
    white-space: nowrap;
    transition: background 0.13s, color 0.13s;
    text-decoration: none;
    line-height: 1;
}
.btn-excel:hover { background: var(--bg); color: var(--text); }
.btn-excel-dl:hover { color: #16a34a; background: rgba(22,163,74,0.08); }
.btn-excel-ul:hover { color: var(--primary); background: rgba(99,102,241,0.09); }
.translate-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tspin 0.7s linear infinite;
}
@keyframes tspin { to { transform: rotate(360deg); } }

.auto-translate-progress {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1300;
    width: min(360px, calc(100vw - 24px));
}

.auto-translate-progress.is-blocking {
    inset: 0;
    right: auto;
    bottom: auto;
    z-index: 10020;
    width: auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
}

.auto-translate-progress-card {
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(14px);
}

.auto-translate-progress.is-blocking .auto-translate-progress-card {
    width: min(520px, 100%);
    max-height: min(80vh, 760px);
    overflow: auto;
}

.auto-translate-progress-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.auto-translate-progress-head-side {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.auto-translate-progress-title {
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.25;
}

.auto-translate-progress-status {
    margin-top: 4px;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.78);
}

.auto-translate-progress-percent {
    font-size: 1rem;
    font-weight: 800;
    color: #a5b4fc;
    white-space: nowrap;
}

.auto-translate-progress-close {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}

.auto-translate-progress-close:hover {
    background: rgba(30, 41, 59, 0.92);
}

.auto-translate-progress-bar-wrap {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
    margin-top: 14px;
}

.auto-translate-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1 0%, #22c55e 100%);
    transition: width 0.28s ease;
}

.auto-translate-progress-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.auto-translate-progress-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.auto-translate-progress-meta-label {
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auto-translate-progress-meta-item strong,
.auto-translate-progress-current strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
}

.auto-translate-progress-current,
.auto-translate-progress-steps-wrap,
.auto-translate-progress-recent-wrap {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auto-translate-progress-steps {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auto-translate-progress-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.auto-translate-progress-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.auto-translate-progress-step-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.auto-translate-progress-step-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 800;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(51, 65, 85, 0.55);
    color: rgba(226, 232, 240, 0.92);
}

.auto-translate-progress-step.is-done .auto-translate-progress-step-icon {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(20, 83, 45, 0.55);
    color: #bbf7d0;
}

.auto-translate-progress-step.is-active .auto-translate-progress-step-icon {
    border-color: rgba(96, 165, 250, 0.34);
    background: rgba(30, 64, 175, 0.45);
    color: #bfdbfe;
}

.auto-translate-progress-step-percent,
.auto-translate-progress-step-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.84);
    white-space: nowrap;
    flex-shrink: 0;
}

.auto-translate-progress-step-bar-wrap {
    position: relative;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(51, 65, 85, 0.7);
}

.auto-translate-progress-step-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.92), rgba(56, 189, 248, 0.92));
}

.auto-translate-progress-step.is-done .auto-translate-progress-step-bar {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.92), rgba(74, 222, 128, 0.92));
}

.auto-translate-progress-step.is-failed .auto-translate-progress-step-bar,
.auto-translate-progress-step.is-stopped .auto-translate-progress-step-bar {
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.92), rgba(252, 165, 165, 0.92));
}

.auto-translate-progress-step.is-stopped .auto-translate-progress-step-icon,
.auto-translate-progress-step.is-failed .auto-translate-progress-step-icon {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(127, 29, 29, 0.45);
    color: #fecaca;
}

.auto-translate-progress-step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f8fafc;
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-translate-progress-step-inline-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.84);
    white-space: nowrap;
    flex-shrink: 0;
}

.auto-translate-progress-current strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auto-translate-progress-recent {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auto-translate-progress-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.auto-translate-progress-resume,
.auto-translate-progress-actions .auto-translate-progress-close {
    width: auto;
    min-height: auto !important;
    padding: 6px 12px !important;
    border-radius: 999px;
}

.auto-translate-progress-resume {
    border-color: rgba(110, 231, 183, 0.38) !important;
    color: #d1fae5 !important;
    background: rgba(6, 95, 70, 0.32) !important;
}

.auto-translate-progress-resume:hover {
    background: rgba(4, 120, 87, 0.44) !important;
}

.auto-translate-progress-stop {
    min-height: auto !important;
    padding: 6px 14px !important;
    border-color: rgba(248, 113, 113, 0.42) !important;
    color: #fecaca !important;
    background: rgba(127, 29, 29, 0.26) !important;
}

.auto-translate-progress-stop:hover:not(:disabled) {
    background: rgba(153, 27, 27, 0.38) !important;
}

.auto-translate-progress-stop:disabled {
    opacity: 0.56;
    cursor: wait;
}

.auto-translate-progress-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    color: #e0e7ff;
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 720px) {
    .auto-translate-progress {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }

    .auto-translate-progress.is-blocking {
        inset: 0;
        right: 0;
        left: 0;
        bottom: 0;
        padding: 16px;
    }

    .auto-translate-progress-card {
        padding: 14px;
    }

    .auto-translate-progress-meta {
        grid-template-columns: 1fr;
    }
}

/* (eski tab stilleri — artık kullanılmıyor ama bırakılıyor) */
.lang-tabs { display: none; }
.lang-tab-content { display: block; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;                      /* always viewport-anchored, immune to page overflow */
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

#onerilen-translate-notice-modal {
    z-index: 1100;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease;
}
.modal.admin-duyuru-preview-modal {
    max-height: calc(100vh - 32px);
    overflow: hidden;
    overflow-y: hidden;
}

.modal.admin-duyuru-preview-modal .admin-duyuru-preview-modal-body {
    overflow-y: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}
.modal-header-lang {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 12px;
    padding: 3px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}
.header-lang-sublabel {
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 400;
}
.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover {
    background: #eee;
    color: var(--text);
}
.modal-close-contrast {
    background: rgba(15, 23, 42, 0.88);
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.modal-close-contrast:hover {
    background: rgba(15, 23, 42, 1);
    color: #fff !important;
}
.modal-body {
    padding: 8px 18px;
}

#lang-modal .modal {
    overflow: visible;
}

#lang-modal .modal-body {
    overflow: visible;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
}

/* Payment page */
.odeme-overview-card,
.odeme-method-card {
    margin-bottom: 12px;
    padding: 16px 20px;
}

.odeme-top-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.35fr) minmax(260px, 1fr) minmax(220px, 0.95fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .odeme-top-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .odeme-top-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .odeme-overview-card,
    .odeme-method-card {
        padding: 14px;
    }

    .odeme-plan-grid {
        grid-template-columns: 1fr 1fr;
    }

    .odeme-price-card {
        text-align: left;
    }

    .odeme-price-row {
        justify-content: flex-start;
    }

    .odeme-price-display {
        font-size: 1.5rem;
    }

    .odeme-method-grid {
        flex-direction: column;
    }

    .odeme-method-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

.odeme-status-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.odeme-status-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.odeme-section-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.odeme-current-plan {
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 600;
}

.odeme-plan-card,
.odeme-coupon-card,
.odeme-price-card {
    min-width: 0;
}

.odeme-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.odeme-plan-option {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.odeme-plan-option:disabled {
    cursor: not-allowed;
}

.odeme-plan-option-pro {
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.12), rgba(250, 204, 21, 0.03));
}

.odeme-plan-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
}

.odeme-plan-title {
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
}

.odeme-plan-price {
    margin-top: 5px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.odeme-plan-note {
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    min-height: 1.2em;
}

.odeme-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text);
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.odeme-plan-badge-accent {
    background: rgba(250, 204, 21, 0.18);
    color: #92400e;
}

.odeme-plan-summary {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.odeme-plan-summary-main {
    font-size: 0.78rem;
    color: var(--text);
    font-weight: 700;
}

.odeme-plan-summary-sub,
.odeme-plan-action-note {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.odeme-coupon-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.odeme-coupon-input-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.odeme-coupon-input {
    width: 100%;
    height: 38px;
    padding: 0 36px 0 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.78rem;
}

.odeme-coupon-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    line-height: 1;
}

.odeme-coupon-apply {
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--primary, #6366f1);
    background: transparent;
    color: var(--primary, #6366f1);
    font-weight: 800;
    font-size: 0.74rem;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.odeme-coupon-info {
    margin-top: 8px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.74rem;
    line-height: 1.45;
}

.odeme-price-card {
    text-align: right;
}

.odeme-price-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
}

.odeme-price-caption {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.odeme-price-caption-discount,
.odeme-price-discount,
.odeme-price-discount-percent {
    color: #16a34a;
}

.odeme-price-caption-strong {
    color: var(--text);
    font-weight: 700;
}

.odeme-price-normal {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.odeme-price-discount-percent {
    font-size: 0.82rem;
    font-weight: 800;
}

.odeme-price-discount {
    font-size: 0.9rem;
}

.odeme-price-payable,
.odeme-price-display {
    font-weight: 800;
    color: var(--primary, #6366f1);
}

.odeme-price-payable {
    font-size: 1.15rem;
}

.odeme-price-display {
    font-size: 1.95rem;
    line-height: 1.15;
}

.odeme-price-sub {
    margin-top: 4px;
    font-size: 0.73rem;
    color: var(--text-secondary);
}

.odeme-method-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.odeme-method-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.84rem;
    line-height: 1.1;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
}

.odeme-method-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.odeme-method-btn-primary {
    background: var(--primary, #6366f1);
    color: #fff;
}

.odeme-method-btn-global {
    background: #0f766e;
    color: #fff;
}

.odeme-method-btn-surface {
    background: var(--surface, #f3f4f6);
    color: var(--text);
    border-color: var(--border);
}

.odeme-method-btn-wu {
    background: #facc15;
    color: #111827;
    border-color: #eab308;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08);
}

.odeme-method-hint {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.odeme-method-modal-shell {
    max-width: 980px;
    width: min(980px, calc(100vw - 32px));
    max-height: min(88vh, 920px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.09), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

.odeme-method-modal-shell .modal-header {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.88));
    flex-shrink: 0;
}

.odeme-method-modal-shell .modal-header h3 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.odeme-method-modal-shell .modal-close {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #334155;
}

.odeme-method-modal-shell .modal-close:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary, #6366f1);
}

.odeme-method-modal-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 14px 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    background: transparent;
}

.odeme-method-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.odeme-method-summary-box,
.odeme-method-info-card,
.odeme-transfer-panel,
.odeme-western-panel {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.odeme-method-summary-box {
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.03)),
        rgba(255,255,255,0.96);
}

.odeme-method-summary-box::after {
    display: none;
}

.odeme-method-info-card {
    border-left: 4px solid var(--primary, #6366f1);
    background: linear-gradient(180deg, rgba(99,102,241,0.04), rgba(255,255,255,0.94));
}

.odeme-method-info-card-wu {
    border-left-color: #f59e0b;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.12), rgba(255, 247, 237, 0.96));
    border-color: rgba(245, 158, 11, 0.24);
}

.odeme-method-summary-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.odeme-method-summary-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary, #6366f1);
    font-weight: 800;
}

.odeme-method-summary-plan {
    margin-top: 1px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}

.odeme-method-summary-amount {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary, #6366f1);
    text-align: right;
    line-height: 1.1;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(99, 102, 241, 0.14);
}

.odeme-method-summary-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-top: 6px;
}

.odeme-method-summary-meta div {
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.82);
    padding: 4px 6px;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.odeme-method-summary-meta span {
    display: block;
    font-size: 0.64rem;
    color: var(--text-secondary);
    margin-bottom: 1px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.odeme-method-summary-meta strong {
    font-size: 0.78rem;
    color: #0f172a;
    line-height: 1.2;
}

.odeme-method-summary-detail,
.odeme-method-copy,
.odeme-method-note,
.odeme-transfer-help {
    margin-top: 2px;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

.odeme-method-copy {
    margin-top: 0;
    color: #0f172a;
    font-weight: 700;
}

.odeme-method-note {
    color: #475569;
}

.odeme-method-feature-list {
    margin-top: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 3px;
}

.odeme-method-feature-item {
    border-radius: 6px;
    background: rgba(255,255,255,0.86);
    padding: 4px 6px;
    font-size: 0.7rem;
    color: #1e293b;
    line-height: 1.3;
    border: 1px solid rgba(99,102,241,0.1);
}

.odeme-method-continue-btn,
.odeme-copy-btn,
.odeme-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 10px;
    cursor: pointer;
}

.odeme-method-continue-btn {
    align-self: flex-end;
    border: none;
    background: linear-gradient(135deg, var(--primary, #6366f1), #4f46e5);
    color: #fff;
    padding: 8px 16px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.18);
}

.odeme-method-continue-btn:hover,
.odeme-copy-btn:hover,
.odeme-receipt-btn:hover {
    transform: translateY(-1px);
}

.odeme-transfer-title,
.odeme-western-title {
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: #0f172a;
}

.odeme-transfer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
}

.odeme-transfer-table tr + tr td {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.odeme-transfer-table td {
    padding: 3px 5px;
    vertical-align: top;
}

.odeme-transfer-table td:first-child {
    width: 90px;
    color: var(--text-secondary);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.odeme-transfer-table td:last-child {
    font-weight: 600;
    color: #0f172a;
}

.odeme-transfer-mono {
    font-family: monospace;
}

.odeme-copy-btn {
    margin-left: 8px;
    padding: 6px 11px;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid var(--primary, #6366f1);
    color: var(--primary, #6366f1);
    background: rgba(255,255,255,0.85);
}

.odeme-transfer-warning {
    margin-top: 4px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 0.73rem;
    font-weight: 800;
}

.odeme-western-grid {
    display: grid;
    grid-template-columns: minmax(190px, 0.85fr) minmax(260px, 1.2fr);
    gap: 6px;
}

.odeme-western-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 4px;
}

.odeme-western-form-grid label,
.odeme-method-section label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.odeme-method-section input,
.odeme-method-section textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255,255,255,0.96);
    border-radius: 10px;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.odeme-method-section input {
    height: 30px;
    padding: 0 8px;
    font-size: 0.8rem;
}

.odeme-method-section textarea {
    min-height: 40px;
    padding: 5px 8px;
    font-size: 0.8rem;
    resize: vertical;
}

.odeme-method-section input:focus,
.odeme-method-section textarea:focus {
    border-color: rgba(99, 102, 241, 0.42);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
}

.odeme-receipt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.odeme-receipt-btn {
    padding: 6px 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255,255,255,0.96);
    color: #111827;
    font-size: 0.76rem;
    font-weight: 700;
}

.odeme-receipt-status {
    font-size: 0.76rem;
    color: var(--text-secondary);
}

#western-union-receipt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary, #6366f1);
    font-size: 0.79rem;
    font-weight: 700;
    text-decoration: none;
}

.odeme-western-actions {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.odeme-western-amount {
    font-size: 0.74rem;
    color: #111827;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 4px 6px;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .odeme-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
        #categories-table tbody tr[data-id],
        #products-table tbody tr[data-id] {
            grid-template-columns: 24px 42px minmax(0, 1fr) auto;
            column-gap: 5px;
            row-gap: 3px;
        }

    .odeme-top-grid,
    .odeme-plan-grid,
    .odeme-western-grid {
        grid-template-columns: 1fr;
    }

    .odeme-method-summary-meta {
        grid-template-columns: repeat(2, 1fr);
    }

        #categories-table tbody tr[data-id] .table-thumb,
        #products-table tbody tr[data-id] .table-thumb {
            width: 42px;
            height: 42px;
        }
    .odeme-western-form-grid {
        grid-template-columns: 1fr;
    }

    .odeme-coupon-row,
    .odeme-western-actions,
    .odeme-method-summary-top {
        flex-direction: column;
        align-items: stretch;
    }

    .odeme-price-card,
    .odeme-method-summary-amount {
        text-align: left;
    }

    .odeme-price-row {
        justify-content: flex-start;
    }

    .odeme-method-modal-shell {
        width: calc(100vw - 18px);
        max-height: 92vh;
        border-radius: 20px;
    }

    .odeme-method-modal-shell .modal-header,
    .odeme-method-modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .odeme-method-summary-box,
    .odeme-method-info-card,
    .odeme-transfer-panel,
    .odeme-western-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .odeme-method-continue-btn,
    .odeme-method-btn,
    .odeme-western-actions .odeme-method-btn {
        width: 100%;
        justify-content: center;
    }

    .odeme-transfer-table,
    .odeme-transfer-table tbody,
    .odeme-transfer-table tr,
    .odeme-transfer-table td {
        display: block;
        width: 100%;
    }

    .odeme-transfer-table {
        border-spacing: 0 10px;
    }

    .odeme-transfer-table td:first-child,
    .odeme-transfer-table td:last-child {
        border-radius: 0;
    }

    .odeme-transfer-table tr {
        border-radius: 14px;
        overflow: hidden;
        padding: 0;
    }

    .odeme-transfer-table td:first-child {
        padding-bottom: 3px;
    }

    .odeme-copy-btn {
        margin-left: 0;
        margin-top: 8px;
    }
}
.product-modal-footer-note {
    margin-right: auto;
    align-self: center;
    color: var(--danger, #dc2626);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}
/* Modal butonları — ince, estetik, indigo renk  */
.modal-footer .btn {
    padding: 0.38rem 1.1rem;
    font-size: 0.84rem;
    font-weight: 500;
    border-radius: 7px;
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.modal-footer .btn-primary {
    background: #6366f1;
    color: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(99,102,241,0.18);
}
.modal-footer .btn-primary:hover {
    background: #5254cc;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(99,102,241,0.28);
    filter: none;
}
.modal-footer .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
}
.modal-footer .btn-outline:hover {
    background: var(--bg-secondary);
    border-color: #aaa;
    color: var(--text);
}

/* Modal içi formlar — global kompakt override */
.modal-body input,
.modal-body select,
.modal-body textarea {
    font-size: 0.88rem;
    padding: 0.42rem 0.7rem;
}
.modal-body textarea {
    resize: vertical;
    min-height: 52px;
}

/* Tables inside modals — tbody scrolls, modal sabit kalır */
.modal-body table {
    width: 100%;
    table-layout: fixed;
}
.modal-body table thead,
.modal-body table tbody {
    display: block;
    width: 100%;
}
.modal-body table thead tr,
.modal-body table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}
.modal-body table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg);
    box-shadow: 0 2px 0 var(--border);
}
.modal-body table tbody {
    max-height: 300px;
    overflow-y: auto;
}

/* Category/Product add-edit modals need a taller scroll area for language rows */
#category-modal .modal-body table tbody,
#product-modal .modal-body table tbody {
    max-height: 380px;
}

#category-modal .other-langs-table,
#product-modal .other-langs-table {
    max-height: 260px;
}

#product-modal .other-langs-table {
    max-height: 210px;
}

#product-modal .product-ingredient-grid {
    max-height: none;
    overflow: hidden;
}

#product-modal .product-ingredient-grid-body {
    max-height: 190px;
}

/* Color Picker */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.color-input-wrapper input[type="color"] {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
    cursor: pointer;
}
.color-input-wrapper input[type="text"] {
    flex: 1;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

/* Settings logo+form side-by-side layout */
.settings-logo-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.settings-logo-col {
    flex: 0 0 180px;
    min-width: 0;
}
.settings-form-col {
    flex: 1;
    min-width: 0;
}
.settings-section-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
    margin: 0 0 8px 0;
}
.settings-fatura-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.settings-split-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 10px;
    align-items: start;
}

.settings-split-card {
    box-sizing: border-box;
}

.settings-languages-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    /* JS sets max-height to match adjacent Fatura card */
}


.settings-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.settings-inline-header .settings-section-label {
    margin-bottom: 0;
}

.settings-inline-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.settings-inline-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    background: var(--bg);
    border-radius: 999px;
    padding: 4px 8px;
    min-width: 28px;
    text-align: center;
}

.settings-languages-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
    max-height: none;
}

.settings-languages-table-wrap .settings-languages-table {
    width: 100%;
    min-width: 0;
}

.settings-languages-table-wrap .settings-languages-table th:nth-child(1),
.settings-languages-table-wrap .settings-languages-table td:nth-child(1) {
    width: 104px;
    white-space: nowrap;
}

.settings-languages-table-wrap .settings-languages-table tbody tr {
    cursor: default;
}

.settings-languages-table-wrap .settings-languages-table th:nth-child(3),
.settings-languages-table-wrap .settings-languages-table td:nth-child(3) {
    width: 144px;
    min-width: 144px;
    white-space: nowrap;
}

.settings-languages-table-wrap .settings-languages-table th:nth-child(4),
.settings-languages-table-wrap .settings-languages-table td:nth-child(4) {
    width: 144px;
    min-width: 144px;
    white-space: nowrap;
}

.settings-languages-table-wrap .settings-languages-table th:nth-child(5),
.settings-languages-table-wrap .settings-languages-table td:nth-child(5) {
    width: 76px;
    min-width: 76px;
}

.settings-translation-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text);
    text-align: left;
}

.settings-translation-progress:disabled {
    opacity: 1;
    cursor: default;
}

.settings-translation-progress.is-clickable {
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.settings-translation-progress.is-clickable:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.28);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.settings-translation-progress.is-complete {
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: rgba(34, 197, 94, 0.22);
}

.settings-translation-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
    line-height: 1;
}

.settings-translation-progress-head strong {
    font-size: 0.83rem;
    font-weight: 800;
    color: var(--text);
}

.settings-translation-progress-head span:last-child {
    color: var(--text-light);
    font-weight: 700;
}

.settings-translation-progress-track {
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.18);
}

.settings-translation-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1 0%, #22c55e 100%);
    transition: width 0.22s ease;
}

.settings-languages-table-wrap .settings-languages-table td:nth-child(3) .settings-translation-progress,
.settings-languages-table-wrap .settings-languages-table td:nth-child(4) .settings-translation-progress {
    gap: 3px;
    padding: 4px 8px;
    border-radius: 10px;
}

.settings-languages-table-wrap .settings-languages-table td:nth-child(3) .settings-translation-progress-head,
.settings-languages-table-wrap .settings-languages-table td:nth-child(4) .settings-translation-progress-head {
    gap: 6px;
    font-size: 0.68rem;
}

.settings-languages-table-wrap .settings-languages-table td:nth-child(3) .settings-translation-progress-head strong,
.settings-languages-table-wrap .settings-languages-table td:nth-child(4) .settings-translation-progress-head strong {
    font-size: 0.76rem;
}

.settings-languages-table-wrap .settings-languages-table td:nth-child(3) .settings-translation-progress-track,
.settings-languages-table-wrap .settings-languages-table td:nth-child(4) .settings-translation-progress-track {
    height: 5px;
}

.settings-social-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.settings-bottom-row {
    align-items: start;
}

.settings-about-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.settings-about-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex: 1;
    min-height: 0;
}

.settings-about-copy {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.settings-about-copy textarea {
    flex: 1;
    min-height: 180px;
}

@media (max-width: 900px) {
    .settings-bottom-row {
        min-height: 0;
    }
}

.settings-social-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
}

.settings-languages-table-wrap .data-table th,
.settings-languages-table-wrap .data-table td,
.settings-social-table-wrap .data-table th,
.settings-social-table-wrap .data-table td {
    padding-top: 3px;
    padding-bottom: 3px;
    line-height: 1.25;
}

.settings-languages-table-wrap .data-table th,
.settings-social-table-wrap .data-table th {
    font-size: 0.76rem;
}

.settings-languages-table-wrap .data-table td,
.settings-social-table-wrap .data-table td {
    font-size: 0.84rem;
}

.settings-languages-table-wrap .data-table td.actions,
.settings-social-table-wrap .data-table td.actions {
    padding: 3px 8px !important;
}

.settings-languages-table-wrap .btn-icon,
.settings-social-table-wrap .btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

/* Drag handle */
.sort-handle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: grab;
    color: var(--text-light);
    user-select: none;
    padding: 4px 2px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
    -webkit-user-select: none;
    touch-action: none;   /* allows touch drag */
}
.sort-handle:hover {
    background: var(--bg);
    color: var(--accent);
}
.sort-handle:active {
    cursor: grabbing;
}
.drag-icon {
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.55;
}
.drag-num {
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 12px;
    text-align: center;
}

/* Row drag states */
tr.dragging {
    opacity: 0.35;
    background: var(--bg) !important;
}
tr.drag-over {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: rgba(231,76,60,0.06) !important;
}
tr.drag-over td:first-child::before {
    content: '▶';
    color: var(--accent);
    margin-right: 4px;
    font-size: 0.7rem;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* ===== DASHBOARD QR WIDGET (compact horizontal, top-right in page-header) ===== */
.menu-qr-widget {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px 10px 10px;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
#dashboard-qr-box {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border);
    line-height: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#dashboard-qr-box:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
#dashboard-qr-box canvas,
#dashboard-qr-box img {
    display: block;
    width: 80px !important;
    height: 80px !important;
}
.menu-qr-widget-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.menu-qr-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.menu-qr-url {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: block;
    line-height: 1.4;
}
.menu-qr-url:hover { text-decoration: underline; }
.menu-qr-dl-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
    gap: 5px;
    align-self: flex-start;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
}
.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}
/* Split card styles removed — no longer used */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.stat-icon.cat { background: #dff0ff; color: #2980b9; }
.stat-icon.prod { background: #fef3e2; color: #e67e22; }
.stat-icon.lang { background: #e8f8f5; color: #27ae60; }
.stat-icon.social { background: #fde2e8; color: #e74c3c; }

.stat-info .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}
.stat-info .stat-label {
    font-size: 0.74rem;
    color: var(--text-light);
}

/* Logo Upload Area */
.logo-upload-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.logo-preview-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    min-height: 84px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
}

.logo-preview-frame {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    flex-shrink: 0;
}

.logo-preview-frame img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.logo-preview-frame #logo-placeholder {
    position: absolute;
    inset: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}
.logo-upload-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Product image in modal */
#urun-resim-preview-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
}

/* ============================================================
   HEADER SEARCH — search input in page-header beside buttons
   ============================================================ */

.header-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.header-search-wrap svg {
    position: absolute;
    left: 9px;
    color: var(--text-light);
    pointer-events: none;
    flex-shrink: 0;
}

/* Description input with AI button */
.desc-input-wrap {
    display: flex;
    gap: 6px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}
.desc-input-wrap textarea {
    flex: 1;
    min-width: 0;
    min-height: 100%;
}
.btn-auto-desc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: normal;
    text-align: center;
    flex-shrink: 0;
    transition: opacity 0.15s;
    line-height: 1.4;
    max-width: 90px;
    align-self: flex-end;
    margin-top: auto;
}
.btn-auto-desc:hover {
    opacity: 0.85;
}
.btn-auto-desc:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-auto-desc .pro-feature-badge {
    margin-left: 0;
}

/* Auto-fill confirm modal overlay */
.auto-fill-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
.auto-fill-confirm-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.auto-fill-confirm-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 28px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.auto-fill-confirm-box h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}
.auto-fill-confirm-box p {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: var(--text-light);
}
.auto-fill-confirm-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}
.auto-fill-confirm-list li {
    padding: 5px 0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.auto-fill-confirm-list li::before {
    content: '○';
    color: var(--primary);
    font-weight: 700;
}
.auto-fill-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.auto-fill-confirm-actions button {
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    transition: background 0.15s;
}
.auto-fill-confirm-actions .btn-confirm-yes {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.auto-fill-confirm-actions .btn-confirm-yes:hover {
    opacity: 0.85;
}

.header-search {
    padding: 7px 34px 7px 32px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--card-bg);
    color: var(--text);
    width: 200px;
    transition: border-color 0.15s, width 0.2s;
}

.header-search::-webkit-search-cancel-button,
.header-search::-webkit-search-decoration,
.header-search::-webkit-search-results-button,
.header-search::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

.header-search-clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-light);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.header-search-clear.is-visible {
    display: inline-flex;
}

.header-search-clear:hover {
    background: rgba(15, 23, 42, 0.14);
    color: var(--text);
}

.header-search:focus {
    border-color: var(--primary);
    outline: none;
    width: 240px;
}

/* ============================================================
   EXCEL-STYLE COLUMN FILTER
   ============================================================ */

/* Filterable column header */
.col-filter-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.col-filter-th:hover {
    background: #f0f1fa;
}

.col-filter-icon {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.45;
    vertical-align: middle;
    transition: opacity 0.15s, color 0.15s;
}

.col-filter-th:hover .col-filter-icon,
.col-filter-th.col-filter-active .col-filter-icon {
    opacity: 1;
}

.col-filter-th.col-filter-active .col-filter-icon {
    color: var(--primary);
}

/* Aktif filtre göstergesi — sütun başlığının sağ üstünde kırmızı nokta */
.col-filter-th.col-filter-active {
    position: relative;
}
.col-filter-th.col-filter-active::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 1.5px var(--card-bg, #fff);
    pointer-events: none;
}

/* Floating dropdown popup */
.col-filter-dropdown {
    position: absolute;
    z-index: 9999;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    min-width: 160px;
    padding: 4px 0;
    font-size: 0.88rem;
    animation: dropdownFadeIn 0.12s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.col-filter-item {
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

.col-filter-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

.col-filter-item.active {
    color: var(--primary);
    font-weight: 600;
}

.col-filter-item.active::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-right: -2px;
}

/* ============================================================
   IMAGE ACTION BUTTONS in modals (upload / delete)
   ============================================================ */

.btn-img-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--card-bg);
    color: var(--text);
    transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn-img-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.07);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.btn-img-action:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-img-action.btn-img-google {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(37, 99, 235, 0.08);
}

.btn-img-action.btn-img-google:hover {
    color: #1d4ed8;
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.13);
}

.btn-img-action.btn-img-picker {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
    border-color: var(--admin-btn-green);
    background: linear-gradient(135deg, var(--admin-btn-green) 0%, #22c55e 100%);
    color: #fff;
    box-shadow: 0 10px 22px var(--admin-btn-green-shadow);
}

.btn-img-action.btn-img-archive {
    color: #0f766e;
    border-color: rgba(13, 148, 136, 0.28);
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(204, 251, 241, 0.7));
}

.btn-img-action.btn-img-archive:hover {
    color: #115e59;
    border-color: #0f766e;
    background: linear-gradient(180deg, rgba(204, 251, 241, 0.9), rgba(153, 246, 228, 0.88));
}

.btn-img-action.btn-img-delete {
    color: #ef4444;
    border-color: rgba(248, 113, 113, 0.34);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(254, 242, 242, 0.92));
}

.btn-img-action.btn-img-delete:hover {
    background: linear-gradient(180deg, rgba(254, 226, 226, 0.96), rgba(254, 202, 202, 0.92));
    border-color: #ef4444;
}

.btn-img-action.btn-img-picker:hover,
.btn-img-action.btn-img-archive.btn-img-picker:hover,
.btn-img-action.btn-img-delete.btn-img-picker:hover,
.img-paste-hint.btn-img-picker:hover {
    background: linear-gradient(135deg, var(--admin-btn-green-hover) 0%, var(--admin-btn-green) 100%);
    border-color: var(--admin-btn-green-hover);
    color: #fff;
    box-shadow: 0 12px 24px rgba(21, 128, 61, 0.26);
}

.btn-img-action.btn-img-picker:active,
.btn-img-action.btn-img-archive.btn-img-picker:active,
.btn-img-action.btn-img-delete.btn-img-picker:active,
.img-paste-hint.btn-img-picker:active {
    background: linear-gradient(135deg, var(--admin-btn-green-active) 0%, var(--admin-btn-green-hover) 100%);
    border-color: var(--admin-btn-green-active);
    color: #fff;
    box-shadow: 0 8px 16px rgba(22, 101, 52, 0.24);
}

.btn-img-action.btn-img-archive.btn-img-picker,
.btn-img-action.btn-img-delete.btn-img-picker,
.img-paste-hint.btn-img-picker {
    border-color: var(--admin-btn-green);
    background: linear-gradient(135deg, var(--admin-btn-green) 0%, #22c55e 100%);
    color: #fff;
}

.img-paste-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.45);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.88));
}

/* Shared green action buttons */
.login-submit-btn,
.btn,
.btn-add-new,
.btn-auto-translate,
.btn-excel,
.btn-clear-langs,
.btn-img-action,
.logout-btn,
.pqr-btn {
    background: linear-gradient(135deg, var(--admin-btn-green) 0%, #22c55e 100%);
    border-color: var(--admin-btn-green);
    color: #fff;
    box-shadow: 0 10px 22px var(--admin-btn-green-shadow);
}

.login-submit-btn:hover,
.btn:hover,
.btn-add-new:hover,
.btn-auto-translate:hover,
.btn-excel:hover,
.btn-clear-langs:hover,
.btn-img-action:hover,
.logout-btn:hover,
.pqr-btn:hover {
    background: linear-gradient(135deg, var(--admin-btn-green-hover) 0%, var(--admin-btn-green) 100%);
    border-color: var(--admin-btn-green-hover);
    color: #fff;
    box-shadow: 0 12px 24px rgba(21, 128, 61, 0.26);
}

.login-submit-btn:active,
.btn:active,
.btn-add-new:active,
.btn-auto-translate:active,
.btn-excel:active,
.btn-clear-langs:active,
.btn-img-action:active,
.logout-btn:active,
.pqr-btn:active {
    background: linear-gradient(135deg, var(--admin-btn-green-active) 0%, var(--admin-btn-green-hover) 100%);
    border-color: var(--admin-btn-green-active);
    color: #fff;
    box-shadow: 0 8px 16px rgba(22, 101, 52, 0.24);
}

.btn:disabled,
.btn-add-new:disabled,
.btn-auto-translate:disabled,
.btn-excel:disabled,
.btn-clear-langs:disabled,
.btn-img-action:disabled,
.login-submit-btn:disabled,
.pqr-btn:disabled {
    box-shadow: none;
}

.modal-footer .btn-primary,
.modal-footer .btn-outline,
#page-settings .btn.btn-primary,
.btn-excel-dl,
.btn-excel-ul,
.btn-img-action.btn-img-google,
.btn-img-action.btn-img-archive,
.btn-img-action.btn-img-delete {
    background: linear-gradient(135deg, var(--admin-btn-green) 0%, #22c55e 100%);
    border-color: var(--admin-btn-green);
    color: #fff;
}

.modal-footer .btn-primary:hover,
.modal-footer .btn-outline:hover,
#page-settings .btn.btn-primary:hover,
#page-settings .btn.btn-primary:focus,
.btn-excel-dl:hover,
.btn-excel-ul:hover,
.btn-img-action.btn-img-google:hover,
.btn-img-action.btn-img-archive:hover,
.btn-img-action.btn-img-delete:hover {
    background: linear-gradient(135deg, var(--admin-btn-green-hover) 0%, var(--admin-btn-green) 100%);
    border-color: var(--admin-btn-green-hover);
    color: #fff;
    box-shadow: 0 12px 24px rgba(21, 128, 61, 0.26);
}

.modal-footer .btn-primary:active,
.modal-footer .btn-outline:active,
#page-settings .btn.btn-primary:active,
.btn-excel-dl:active,
.btn-excel-ul:active,
.btn-img-action.btn-img-google:active,
.btn-img-action.btn-img-archive:active,
.btn-img-action.btn-img-delete:active {
    background: linear-gradient(135deg, var(--admin-btn-green-active) 0%, var(--admin-btn-green-hover) 100%);
    border-color: var(--admin-btn-green-active);
    color: #fff;
    box-shadow: 0 8px 16px rgba(22, 101, 52, 0.24);
}

.img-paste-hint:hover {
    color: #475569;
    border-color: rgba(100, 116, 139, 0.55);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 232, 240, 0.92));
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

    html, body,
    .admin-layout,
    .main-content,
    .page-section,
    .card,
    .dashboard-top-row,
    .page-header,
    .page-header-top,
    .page-header-bottom,
    .page-header-cta,
    .header-search-wrap,
    .menu-qr-widget,
    .menu-qr-widget-body,
    .page-header-title-with-note {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: flex;
    }
    .sidebar-overlay.open {
        display: block;
    }

    /* Layout */
    .admin-layout {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    .main-content {
        margin-left: 0;
        padding: 2px 8px 8px;
        min-width: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
        height: auto;
        min-height: 100vh;
    }

    /* ── Page header — sticky, vertical stack on mobile ── */
    .page-header {
        --page-header-action-height: 34px;
        position: sticky !important;
        top: 0;
        z-index: 80;
        background: var(--bg, #f8fafc);
        margin: 0 0 10px;
        padding: 8px 10px 8px 58px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px;
        /* Override desktop absolute-positioning helpers */
        min-height: 0 !important;
        padding-right: 10px !important;
        /* Prevent header from widening page */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: clip;
    }
    .page-header h1 {
        font-size: 1.05rem;
        white-space: normal;
        overflow-wrap: anywhere;
        min-width: 0;
        margin-right: 0;
    }
    .page-header-title-with-note {
        width: 100%;
        gap: 6px;
    }
    .page-header-inline-note {
        font-size: 0.72rem;
    }

    /* ── Top row: title — always full width ── */
    .page-header-top {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        overflow: visible !important;
        align-items: center !important;
        justify-content: space-between;
        padding-bottom: 0;
    }

    /* ── Demo video — compact strip below buttons ── */
    .page-header-demo-video {
        position: relative !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 56px;
        aspect-ratio: auto !important;
        margin: 0 !important;
        border-radius: 8px;
        order: 10;
        overflow: hidden;
    }
    .page-header-demo-video video {
        object-position: center top;
    }
    .page-header-demo-video .ai-menu-demo-play {
        width: 28px;
        height: 28px;
    }
    .page-header-demo-video .ai-menu-demo-play svg {
        width: 13px;
        height: 13px;
    }
    .page-header-demo-video .ai-menu-demo-overlay {
        padding: 4px 8px 4px;
    }
    .page-header-demo-video .ai-menu-demo-title {
        font-size: 0.62rem;
    }
    .page-header-demo-video .ai-menu-demo-hint {
        font-size: 0.52rem;
    }
    #page-qr-ayarlari .page-header-demo-video {
        height: 64px;
    }

    /* ── Bottom row: search (own row) + action buttons (second row) ── */
    .page-header-bottom {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        overflow: visible !important;
        align-items: center !important;
        justify-content: flex-start;
        padding-bottom: 0;
        order: 2;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ── Categories & Products specific overrides ── */
    #page-categories .page-header,
    #page-products .page-header,
    #page-qr-ayarlari .page-header {
        min-height: 0 !important;
        padding-right: 10px !important;
        margin: 0 0 6px !important;
        gap: 6px;
    }

    .page-header-cta {
        margin-left: 0;
        justify-content: flex-start;
        flex: 1 1 100%;
        gap: 5px !important;
    }

    /* ── Search input — full row on mobile, no sharing with buttons ── */
    .header-search-wrap {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .header-search-wrap .header-search {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* ── Add button (+ Kategori Ekle / + Ürün Ekle) ── */
    .btn-add-new {
        font-size: 0.78rem;
        height: var(--page-header-action-height) !important;
        min-height: var(--page-header-action-height) !important;
        padding: 0 8px;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }
    .btn-add-new span[data-i18n] { display: none !important; }
    .btn-add-new span.btn-mobile-label { display: inline !important; font-weight: 700; }
    .btn-add-new svg { width: 13px; height: 13px; }

    /* ── Secondary buttons — icon + short mobile label ── */
    .btn-auto-translate span[data-i18n],
    .btn-excel span:not(.btn-mobile-label) {
        display: none !important;
    }
    .btn-mobile-label {
        display: inline !important;
        font-size: 0.75rem;
        font-weight: 600;
    }
    .bulk-actions-toggle .btn-mobile-label,
    .bulk-actions-menu .btn-auto-translate .btn-mobile-label {
        display: inline !important;
    }
    .btn-auto-translate {
        width: auto !important;
        height: var(--page-header-action-height) !important;
        min-height: var(--page-header-action-height) !important;
        padding: 0 7px !important;
        font-size: 0.74rem !important;
        gap: 3px !important;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
    .btn-auto-translate svg { width: 13px !important; height: 13px !important; }

    /* ── Page-header generic .btn ── */
    .page-header .btn {
        font-size: 0.8rem !important;
        min-height: var(--page-header-action-height) !important;
        height: var(--page-header-action-height) !important;
        padding: 0 10px !important;
        flex: 0 0 auto !important;
        justify-content: center !important;
        max-width: 100%;
        white-space: nowrap;
    }

    /* ── Excel & bulk-actions dropdowns — compact, even share ── */
    .excel-dropdown,
    .bulk-actions-dropdown {
        flex: 1 1 auto;
        min-width: 0;
    }
    .btn-excel-toggle,
    .bulk-actions-toggle {
        min-width: 0 !important;
        width: 100% !important;
        padding: 0 7px !important;
        justify-content: center;
    }
    .excel-btn-grp {
        gap: 2px;
        min-height: var(--page-header-action-height) !important;
    }
    .btn-excel {
        height: calc(var(--page-header-action-height) - 4px);
        min-height: calc(var(--page-header-action-height) - 4px);
        padding: 0 6px !important;
        justify-content: center;
    }
    .btn-excel svg { display: block !important; width: 13px; height: 13px; }
    .excel-dropdown-menu,
    .bulk-actions-dropdown .excel-dropdown-menu,
    .bulk-actions-menu {
        left: auto;
        right: 0;
        min-width: 170px;
    }

    /* ── Lisans tarih badge — inline with h1 on mobile ── */
    .lisans-tarih-badge {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        flex: 0 0 auto;
    }
    .lt-row { font-size: 0.64rem; gap: 4px; }
    .lt-val { font-size: 0.68rem; min-width: auto; padding: 1px 5px; }

    /* Cards */
    .card {
        padding: 14px;
    }

    /* Stats */
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    /* Dashboard QR */
    .menu-qr-widget {
        align-self: stretch;
    }
    .stat-card {
        padding: 12px;
        gap: 8px;
    }
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .stat-info .stat-value {
        font-size: 1.3rem;
    }

    /* Table */
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* contain scroll within this element, never widen the page */
        display: block;
    }
    .data-table {
        min-width: 480px;  /* forces horizontal scroll instead of squishing */
    }
    .data-table th,
    .data-table td {
        padding: 5px 6px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    .data-table .actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .data-table .actions button {
        padding: 6px 10px;
        min-height: 34px;
        font-size: 0.8rem;
    }

    /* Forms */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .settings-logo-row {
        flex-direction: column;
    }
    .settings-logo-col {
        flex: none;
        width: 100%;
    }
    .settings-split-row {
        grid-template-columns: 1fr;
    }
    #page-settings .settings-fatura-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    #page-settings .settings-fatura-grid .form-group[style*="span 2"],
    #page-settings .settings-fatura-grid .form-group[style*="span 3"] {
        grid-column: span 2 !important;
    }
    #page-settings .form-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px !important;
    }
    #page-settings .form-row .form-group {
        flex: none !important;
        min-width: 0 !important;
        width: auto !important;
    }

    /* Modal — overlay uses inset:0 so no positioning fix needed here,
       just ensure content fits in the viewport */
    .modal {
        max-height: 88vh;
        width: 100%;
        max-width: calc(100vw - 24px);
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-header h3 {
        font-size: 1rem;
    }
    .modal-body {
        padding: 14px 16px;
    }
    .modal-footer {
        padding: 12px 16px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .modal-footer .btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
    .product-modal-footer-note {
        flex: 1 1 100%;
        margin-right: 0;
    }
    .lang-grid {
        grid-template-columns: 1fr;
    }
    .lang-section {
        border-bottom: 1px dashed var(--border);
    }

    /* Logo upload */
    .logo-upload-area {
        flex-direction: column;
        align-items: flex-start;
    }
    .logo-upload-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Color picker */
    .color-input-wrapper input[type="color"] {
        width: 40px;
        height: 40px;
    }

    /* Önerilen modal — 1 sütun ürün grid */
    .onerilen-urun-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .onerilen-urun-grid::after {
        display: none;
    }
    #onerilen-modal .modal {
        max-height: 92vh;
    }
    #onerilen-kategoriler {
        max-height: calc(80vh - 180px) !important;
    }

    .ai-menu-summary-content {
        flex-direction: column;
        align-items: stretch;
    }
    .ai-menu-summary-copy {
        min-width: 0;
    }
    .ai-menu-summary-actions {
        width: 100%;
    }
    .ai-menu-summary-actions .ai-menu-action-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
    .ai-menu-summary-pages {
        align-items: flex-start;
    }
    .ai-menu-intro-row {
        display: block;
    }
    .ai-menu-preview-layout {
        grid-template-columns: 1fr;
    }
    .ai-menu-demo-card {
        max-width: 320px;
    }
    /* AI Import page-header — tighter on mobile */
    .ai-menu-page-header {
        gap: 4px !important;
        margin-bottom: 6px !important;
        padding-bottom: 6px !important;
    }
    .ai-menu-page-header > div:first-child {
        flex: 1 1 auto;
    }
    .ai-menu-page-header > div:first-child p {
        font-size: 0.78rem;
        line-height: 1.25;
        margin-top: 2px;
    }
    .ai-menu-toolbar {
        gap: 5px;
        justify-content: flex-start;
    }
    .ai-menu-toolbar-btn {
        min-height: 30px;
        padding: 4px 10px;
        font-size: 0.76rem;
    }
    .ai-menu-category-header-row,
    .ai-menu-category-header,
    .ai-menu-category-head,
    .ai-menu-product-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .ai-menu-collapse-btn {
        margin: 0;
    }
    .ai-menu-category-tools {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 10px 8px;
    }
    .ai-menu-category-subline,
    .ai-menu-product-title-row,
    .ai-menu-category-meta,
    .ai-menu-product-meta,
    .ai-menu-source-pages {
        justify-content: flex-start;
    }
    .ai-menu-category-count,
    .ai-menu-product-order {
        align-self: flex-start;
    }
    .ai-menu-category-header-copy-compact {
        width: 100%;
        align-items: flex-start;
    }
    .ai-menu-category-inline-edit {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }
    .ai-menu-category-fields,
    .ai-menu-product-grid {
        grid-template-columns: 1fr;
    }
    .ai-menu-product-list {
        gap: 4px;
    }
    .ai-menu-product-compact-row,
    .ai-menu-product-edit-grid,
    .ai-menu-product-inline-row {
        width: 100%;
        grid-template-columns: 1fr;
    }
    .ai-menu-category-input-name,
    .ai-menu-category-input-desc,
    .ai-menu-product-name {
        width: 100%;
    }
    .ai-menu-price-input {
        width: 100%;
        max-width: none;
    }

    /* ── Ürün / Kategori ekleme modalı — mobil ── */
    /* Modal-top-row (resim + meta) → tek sütun */
    .modal-top-row {
        flex-direction: column;
        gap: 6px;
    }
    .modal-img-area--compact {
        width: 100%;
        min-width: 0;
    }

    /* Kategori + Menü Seçeneği → yan yana */
    .modal-meta-row {
        gap: 8px;
    }
    .modal-meta-row .form-group {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
        width: auto !important;
    }
    .product-meta-group-gram,
    .product-meta-group-calorie-estimate,
    .product-meta-group-calorie,
    .product-meta-group-discount {
        flex: 1 1 calc(50% - 4px) !important;
    }
    .product-allergen-group {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
    }
    .product-ingredient-group {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
    }

    .product-ingredient-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .product-ingredient-item {
        grid-template-columns: 1fr;
    }

    /* Ana dil kartı — resim alanı yatay şeritte */
    .main-lang-card-body {
        flex-direction: column;
        gap: 8px;
    }
    .main-lang-img-area {
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }
    .main-lang-img-area .modal-img-preview {
        width: 64px;
        min-width: 64px;
        min-height: 52px;
        flex-shrink: 0;
    }
    .main-lang-img-area .modal-img-controls {
        flex: 1;
        flex-wrap: wrap;
        gap: 6px;
        min-width: 0;
    }

    .modal-img-controls > [id$="-img-status"] {
        width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* Ad-Fiyat-ERP-Durum → ikili satırlar */
    .name-durum-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .name-durum-row .name-field {
        flex: 1 1 calc(52% - 4px);
        min-width: 0;
    }
    .name-durum-row .product-name-inline-price-group {
        flex: 1 1 calc(42% - 4px) !important;
        min-width: 0 !important;
    }
    .name-durum-row .product-name-inline-erp-group {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
    }
    .name-durum-row .durum-field {
        flex: 1 1 calc(43% - 4px);
        min-width: 80px;
    }

    /* Diğer diller tablosu → 3 sütunu mobilde de koru */
    .other-langs-col-headers {
        grid-template-columns: 46px 1fr 1fr;
    }
    .other-langs-col-headers .olch-desc {
        display: block;
    }
    .other-lang-row {
        grid-template-columns: 46px 1fr 1fr;
    }
    .other-lang-row textarea.other-lang-desc {
        grid-column: auto;
        border-left: 1px solid var(--border) !important;
        border-top: none !important;
    }

}

@media (max-width: 480px) {
    .main-content {
        padding: 2px 6px 6px;
    }

    /* Page header — tighter on small phones */
    .page-header {
        padding-left: 48px !important;
        gap: 4px;
    }
    .page-header h1 {
        font-size: 0.95rem;
    }
    /* Video — even more compact on small phones */
    .page-header-demo-video {
        height: 44px;
        border-radius: 6px;
    }
    .page-header-demo-video .ai-menu-demo-overlay {
        display: none;
    }
    /* Stack buttons vertically on very small screens */
    .page-header-bottom {
        gap: 4px !important;
    }
    .btn-add-new {
        padding: 0 8px;
        font-size: 0.75rem;
    }
    .header-search-wrap {
        flex: 1 1 100%;
        max-width: none;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Fatura bilgileri — 480px'de de 2 sütun */
    #page-settings .settings-fatura-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    #page-settings .settings-fatura-grid .form-group[style*="span 2"],
    #page-settings .settings-fatura-grid .form-group[style*="span 3"] {
        grid-column: span 2 !important;
    }

    /* Modal */
    .modal {
        max-width: calc(100vw - 16px);
        max-height: 90vh;
    }
    .modal-overlay {
        padding: 8px;
    }
    .archive-image-searchbar {
        flex-direction: column;
        align-items: stretch;
    }
    .modal-header {
        padding: 12px 14px;
    }
    .modal-body {
        padding: 12px 14px;
    }
    .modal-footer {
        padding: 10px 14px;
    }

    /* Lang tabs */
    .lang-tab {
        padding: 7px 10px;
        font-size: 0.8rem;
    }

    /* Quick access buttons on dashboard */
    #page-dashboard .card div[style] {
        flex-direction: column;
    }
    #page-dashboard .card .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========== DASHBOARD TOP ROW ========== */
.dashboard-top-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dashboard-top-row .stats-row {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.dashboard-top-row .menu-qr-widget {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .dashboard-top-row {
        flex-direction: column;
    }
    .dashboard-top-row .menu-qr-widget {
        width: 100%;
    }
}

/* ========== SETTINGS PAGE — Compact inputs/selects/buttons ========== */
#page-settings .card {
    padding: 12px 14px;
    margin-bottom: 2px;
}
#page-settings .settings-logo-row {
    gap: 14px;
}
#page-settings .settings-grid {
    gap: 5px;
}
#page-settings .settings-split-row {
    gap: 6px;
}
#page-settings .settings-bottom-row {
    align-items: start;
}
#page-settings .settings-fatura-grid {
    gap: 5px;
}
#page-settings .form-group {
    margin-bottom: 3px;
}
#page-settings .form-row {
    gap: 8px;
    margin-top: 4px !important;
}
#page-settings .form-group[style*="margin-top"] {
    margin-top: 4px !important;
}
#page-settings [style*="margin-top:10px"],
#page-settings [style*="margin-top: 10px"] {
    margin-top: 5px !important;
}
#page-settings .form-group label {
    font-size: 0.75rem;
    margin-bottom: 2px;
}
#page-settings .settings-section-label {
    font-size: 0.72rem;
    margin-bottom: 4px;
}
#page-settings input,
#page-settings select,
#page-settings textarea {
    font-size: 0.82rem;
    padding: 2px 6px;
}
#page-settings .color-input-wrapper {
    height: 28px;
}
#page-settings .color-input-wrapper input[type="color"] {
    height: 26px;
    width: 36px;
}
#page-settings .btn {
    padding: 5px 12px;
    font-size: 0.82rem;
}
#page-settings .btn-sm {
    padding: 3px 8px;
    font-size: 0.78rem;
}
#page-settings h3 {
    font-size: 0.92rem;
    margin-bottom: 8px;
}
#page-settings .card-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
}
#page-settings .settings-inline-header {
    margin-bottom: 6px;
}
#page-settings .settings-inline-header-actions .btn {
    white-space: nowrap;
}
#page-settings .settings-languages-table-wrap {
    max-height: none;
}
#page-settings .settings-social-table-wrap {
    max-height: none;
}
#page-settings small,
#page-settings .hint {
    font-size: 0.72rem;
}

#page-settings .settings-save-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

#page-settings .settings-share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
}

#page-settings .settings-share-toggle-text {
    white-space: nowrap;
}

/* Settings save buttons — green */
#page-settings .btn.btn-primary {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
#page-settings .btn.btn-primary:hover,
#page-settings .btn.btn-primary:focus {
    background: #16a34a;
    border-color: #16a34a;
}

#page-settings .settings-comments-card {
    margin-top: 12px;
}

#page-settings .settings-comments-list {
    display: block;
}

#page-settings .settings-comments-empty {
    padding: 18px 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-light);
    font-size: 0.84rem;
    text-align: center;
}

#page-settings .settings-comment-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 12px 14px;
    display: grid;
    gap: 8px;
}

#page-settings .settings-comment-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#page-settings .settings-comment-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
}

#page-settings .settings-comment-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#page-settings .settings-comment-author {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

#page-settings .settings-comment-email,
#page-settings .settings-comment-date,
#page-settings .settings-comment-domain,
#page-settings .settings-comment-product {
    font-size: 0.78rem;
    color: var(--text-light);
}

#page-settings .settings-comments-tree-wrap {
    overflow-x: auto;
}

#page-settings .settings-comments-tree-table {
    width: 100%;
    min-width: 760px;
}

#page-settings .settings-comment-parent-row.is-expanded > td {
    background: rgba(34, 197, 94, 0.07);
}

#page-settings .settings-comment-child-row > td {
    background: #f8fafc;
    padding: 0;
}

#page-settings .settings-comment-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#page-settings .settings-comment-toggle,
#page-settings .settings-comment-toggle-placeholder {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

#page-settings .settings-comment-toggle {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

#page-settings .settings-comment-toggle-placeholder {
    color: var(--text-light);
}

#page-settings .settings-comment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

#page-settings .settings-comment-badge.is-allowed {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

#page-settings .settings-comment-badge.is-blocked {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

#page-settings .settings-comment-products-panel {
    padding: 12px;
}

#page-settings .settings-comment-products-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

#page-settings .settings-comment-products-table th,
#page-settings .settings-comment-products-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    text-align: left;
}

#page-settings .settings-comment-products-table tbody tr:last-child td {
    border-bottom: none;
}

#page-settings .settings-comment-product-thumb,
#page-settings .settings-comment-product-thumb-fallback {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
}

#page-settings .settings-comment-product-sub {
    margin-top: 3px;
    font-size: 0.74rem;
    color: var(--text-light);
}

#page-settings .settings-comments-empty-inline {
    color: var(--text-light);
    text-align: center;
}

#page-settings .settings-comment-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

#page-settings .settings-comment-stars {
    letter-spacing: 0.06em;
}

#page-settings .settings-comment-body {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 768px) {
    #page-settings .settings-comment-top {
        flex-direction: column;
        align-items: stretch;
    }

    #page-settings .settings-comment-rating {
        align-self: flex-start;
    }
}

/* ========== SEARCHABLE SELECT ========== */
.ss-hidden { display: none !important; }

.ss-wrap {
    position: relative;
}

.ss-input {
    width: 100%;
    cursor: pointer;
    background: var(--surface, #f8f9fa);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 32px 7px 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-sizing: border-box;
    transition: border-color 0.15s;
    user-select: none;
}

.ss-value {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 32px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-wrap:not(.ss-has-value) .ss-value,
.ss-wrap.ss-open .ss-value {
    display: none;
}

.ss-wrap.ss-has-value:not(.ss-open) .ss-input {
    color: transparent;
}

.ss-wrap.ss-has-value:not(.ss-open) .ss-input::placeholder {
    color: transparent;
}

.ss-wrap.ss-open .ss-input {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
    cursor: text;
    user-select: auto;
}

.ss-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.ss-wrap.ss-open .ss-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.ss-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 210px;
    overflow-y: auto;
    z-index: 200;
}

.ss-wrap.ss-open .ss-dropdown {
    display: block;
}

.product-allergen-group {
    margin-top: 2px;
}

.product-ingredient-group {
    margin-top: 2px;
}

.product-ingredient-trigger {
    width: 100%;
    min-height: 32px;
    padding: 7px 12px;
    font-size: 0.83rem;
    justify-content: center;
}

.product-ingredient-summary {
    display: none;
}

.product-ingredient-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.product-ingredient-toolbar-text {
    font-size: 0.82rem;
    color: var(--text-light);
}

.product-ingredient-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 430px;
    overflow-y: auto;
}

.product-ingredient-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    color: var(--text-light);
    background: var(--surface, #f8f9fa);
}

.product-ingredient-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.77rem;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.product-ingredient-item-main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 96px 110px auto;
    gap: 10px;
    align-items: end;
}

.product-ingredient-item .form-group {
    margin-bottom: 0;
}

.product-ingredient-translations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.product-ingredient-translation-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-ingredient-lang-badge {
    min-width: 42px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.product-ingredient-translation-row input {
    flex: 1;
}

.product-ingredient-edit-main-card {
    margin-bottom: 12px;
}

.product-ingredient-edit-meta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 160px));
    gap: 12px;
    margin-top: 12px;
}

#product-ingredient-edit-main-input {
    width: 100%;
}

#product-ingredient-edit-main-input[readonly] {
    background: var(--surface, #f8f9fa);
    color: var(--text-primary);
    cursor: pointer;
}

.ss-wrap.ss-has-value:not(.ss-open) #product-ingredient-edit-main-input[readonly] {
    color: transparent;
}

#product-ingredient-edit-translations .other-lang-row textarea[disabled] {
    background: var(--bg) !important;
    color: var(--text-light) !important;
}

.multi-ss {
    position: relative;
}

#product-modal .modal {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#product-modal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}
#product-modal .modal-header {
    flex-shrink: 0;
}
#product-modal .modal-footer {
    flex-shrink: 0;
}
#product-modal .modal-top-row,
#product-modal .modal-meta-row,
#product-modal .product-allergen-group,
#product-modal .product-ingredient-group,
#product-modal .multi-ss {
    overflow: visible;
}

.multi-ss-control {
    min-height: 40px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 96px 110px auto;
    padding: 7px 36px 7px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    cursor: pointer;
    overflow: visible;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.multi-ss.is-open .multi-ss-control {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.multi-ss-placeholder {
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

.multi-ss-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: none;
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.multi-ss-chip-media,
.multi-ss-option-media {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #b45309;
}

.multi-ss-chip-media img,
.multi-ss-option-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.12);
    transform-origin: center center;
}

.multi-ss-chip-media.is-fallback,
.multi-ss-option-media.is-fallback {
    background: rgba(245, 158, 11, 0.12);
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.multi-ss-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-ss-chip-more {
    background: color-mix(in srgb, var(--text-light) 16%, #fff);
}

.multi-ss-remove {
    border: 0;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 0.95rem;
}

.multi-ss-remove:hover {
    color: var(--danger, #dc2626);
}

.multi-ss-chevron {
    position: absolute;
    right: 12px;
    top: 13px;
    width: 12px;
    height: 12px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: transform 0.2s;
}

.multi-ss.is-open .multi-ss-chevron {
    transform: rotate(180deg);
}

.multi-ss-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 220;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    padding: 10px;
}

.multi-ss.is-open .multi-ss-dropdown {
    display: block;
}

.multi-ss-search {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.84rem;
    margin-bottom: 8px;
}

.multi-ss-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
}

.multi-ss-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
    justify-content: flex-start;
}

.multi-ss-option:hover {
    background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.multi-ss-option input {
    margin-top: 2px;
    pointer-events: none;
}

.multi-ss-option-body {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
}

.multi-ss-option-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.multi-ss-empty {
    padding: 10px 4px 4px;
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

.suggest-wrap {
    position: relative;
}

.suggest-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 210;
}

.suggest-wrap.is-open .suggest-dropdown {
    display: block;
}

.suggest-option {
    padding: 9px 12px;
    font-size: 0.83rem;
    cursor: pointer;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    width: 100%;
    text-align: left;
}

.suggest-option:hover,
.suggest-option.is-active {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
}

.ss-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.83rem;
    cursor: pointer;
    color: var(--text-primary);
}

.ss-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-flag {
    width: 1.25em;
    height: 1em;
    border-radius: 2px;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
}

.ss-flag-emoji {
    width: auto;
    height: auto;
}

.ss-option:hover,
.ss-option.ss-highlighted {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
}

.ss-option[style*="none"] { display: none; }

/* ========== PRINT QR PAGE ========== */
#page-print-qr .card {
    padding: 16px;
    margin-bottom: 14px;
}

#page-print-qr .card-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.pqr-controls-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.print-qr-controls {
    padding: 0;
}

.print-qr-controls-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 10px;
    align-items: start;
}

.pqr-control-fields {
    min-width: 0;
    width: 100%;
}

.pqr-side-video {
    min-width: 0;
    width: 168px;
    max-width: 168px;
    align-self: start;
}

.pqr-ai-demo-card {
    aspect-ratio: 16 / 10;
    min-height: 0;
}

/* Masaüstü: tüm alanlar tek satırda (orijinal görünüm) */
.pqr-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.pqr-span2 {
    grid-column: span 1;
}

@media (max-width: 1080px) {
    .print-qr-controls-shell {
        grid-template-columns: 1fr;
    }

    .pqr-side-video {
        width: 100%;
        max-width: 240px;
        justify-self: end;
    }

    .pqr-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Sadece mobil: satırda 2 input */
@media (max-width: 639px) {
    .pqr-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pqr-span2 {
        grid-column: span 2;
    }
}

.print-qr-controls .form-group {
    margin-bottom: 0;
}

.print-qr-controls {
    --pqr-control-height: 32px;
}

.pqr-logo-toggle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
}

.pqr-logo-toggle-group > label:first-child {
    width: 100%;
    text-align: center;
}

.pqr-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: auto;
    min-width: auto;
    margin-bottom: 0;
    min-height: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
}

.pqr-logo-disabled {
    opacity: 0.55;
}

.pqr-logo-disabled select,
.pqr-logo-disabled input {
    pointer-events: none;
}

.print-qr-controls .form-group > select,
.print-qr-controls .form-group > .pqr-num-wrap,
.print-qr-controls .form-group > .pqr-num-wrap-unit,
.print-qr-controls .form-group > .pqr-range-wrap {
    width: 100%;
    min-width: 0;
}

/* +/- buton wrap */
.pqr-num-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
    min-height: var(--pqr-control-height);
}
.pqr-num-wrap input[type="number"] {
    flex: 1;
    min-width: 0;
}

.pqr-num-wrap-unit .pqr-input-unit {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.pqr-input-unit input[type="number"] {
    width: 100%;
    height: var(--pqr-control-height);
    padding-right: 48px;
}

.pqr-input-suffix {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-light);
    pointer-events: none;
}

.pqr-custom-paper-fields {
    display: none;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface, #f8f9fa) 92%, #ffffff 8%);
}

.pqr-custom-paper-fields.is-visible {
    display: block;
}

.pqr-custom-paper-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pqr-custom-paper-col {
    min-width: 0;
}

.pqr-custom-paper-col label {
    margin-bottom: 4px;
}

.pqr-range-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--pqr-control-height);
    height: var(--pqr-control-height);
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface, #f8f9fa);
    box-sizing: border-box;
}

.pqr-range-wrap input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
    accent-color: var(--accent);
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.pqr-range-wrap input[type="range"]:focus {
    outline: none;
    box-shadow: none;
}

.pqr-range-value {
    min-width: 38px;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pqr-btn {
    display: none; /* masaüstünde gizli */
}
@media (max-width: 639px) {
    .print-qr-controls .form-group > select,
    .print-qr-controls .form-group > .pqr-num-wrap,
    .print-qr-controls .form-group > .pqr-num-wrap-unit,
    .print-qr-controls .form-group > .pqr-range-wrap {
        width: 100%;
        min-width: 0;
    }

    .pqr-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 30px;
        height: 30px;
        background: var(--accent);
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    .pqr-btn:active {
        opacity: 0.75;
    }

    .pqr-num-wrap-unit .pqr-input-unit {
        flex: 1 1 auto;
        width: auto;
    }

    .pqr-side-video {
        max-width: none;
        justify-self: stretch;
    }

    .pqr-custom-paper-grid {
        grid-template-columns: 1fr;
    }
}

.print-qr-controls label {
    font-size: 0.66rem;
    margin-bottom: 3px;
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
}

.print-qr-controls select,
.print-qr-controls input[type="number"],
.print-qr-controls input[type="text"] {
    font-size: 0.76rem;
    padding: 4px 7px;
    width: 100%;
    min-height: var(--pqr-control-height);
    height: var(--pqr-control-height);
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface, #f8f9fa);
    color: var(--text-primary);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.print-qr-controls select:focus,
.print-qr-controls input[type="number"]:focus,
.print-qr-controls input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Spin butonlarını her zaman görünür yap */
.print-qr-controls input[type="number"]::-webkit-inner-spin-button,
.print-qr-controls input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
}

.qr-print-preview {
    padding: 12px 12px 12px 28px;
    background: #e8e8e8;
    overflow: auto;
    max-height: 700px;
    border-radius: var(--radius);
}

/* Cetvel wrapper */
.ruler-wrap {
    display: inline-grid;
    grid-template-columns: 20px auto;
    grid-template-rows: 20px auto;
    gap: 0;
    position: relative;
}
.ruler-corner {
    background: #d0d0d0;
    grid-column: 1;
    grid-row: 1;
    width: 20px;
    height: 20px;
    border-right: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
}

/* Cetvel çubuğu */
.ruler {
    background: #d8d8d8;
    position: relative;
    overflow: hidden;
    user-select: none;
}
.ruler-h {
    grid-column: 2;
    grid-row: 1;
    height: 20px;
    border-bottom: 1px solid #bbb;
}
.ruler-v {
    grid-column: 1;
    grid-row: 2;
    width: 20px;
    border-right: 1px solid #bbb;
}

/* Cetvel çizgileri */
.ruler-tick {
    position: absolute;
    background: #666;
}
.ruler-tick-h {
    bottom: 0;
    width: 1px;
}
.ruler-tick-v {
    right: 0;
    height: 1px;
}

/* Cetvel etiketleri */
.ruler-lbl {
    position: absolute;
    font-size: 8px;
    color: #444;
    font-family: sans-serif;
    line-height: 1;
}
.ruler-lbl:not(.ruler-lbl-v) {
    bottom: 11px;
}
.ruler-lbl-v {
    right: 11px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.print-pages-container {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #e8e8e8;
    padding: 0 16px 16px 0;
}

.print-page {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.print-qr-item {
    display: flex;
    justify-content: center;
    align-items: center;
    page-break-inside: avoid;
    break-inside: avoid;
}
.print-qr-item canvas { display: block; }

.print-qr-combo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.print-qr-combo[data-logo-position="top"],
.print-qr-combo[data-logo-position="bottom"] {
    flex-direction: column;
}

.print-qr-combo[data-logo-position="top"] {
    flex-direction: column-reverse;
}

.print-qr-combo[data-logo-position="left"] {
    flex-direction: row-reverse;
}

.print-qr-combo[data-logo-position="right"] {
    flex-direction: row;
}

.print-qr-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex: 0 0 auto;
    border-radius: 0;
}

.print-qr-logo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    background: transparent;
}

.print-qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.print-qr-caption {
    width: 100%;
    text-align: center;
    color: #111827;
    font-size: 12px;
    line-height: 1.25;
    word-break: break-word;
}

@media print {
    /* Yeni pencereden yazdırılıyor, bu CSS sadece yedek */
    .ruler-wrap, .ruler, .ruler-corner { display: none !important; }
}

/* QR önizlemede sadece 1. sayfa görünsün */
#print-pages-container .print-page:not(:first-child) {
    display: none;
}
#print-pages-container .print-preview-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #92400e;
}

/* ========== IMAGE LIGHTBOX (from menu.html) ========== */
.img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.img-lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-close {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    margin-bottom: 6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-inner {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 72vw;
    width: auto;
}
.lightbox-inner img {
    max-width: 72vw;
    max-height: 55vh;
    width: auto;
    height: auto;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    display: block;
    transform: scale(0.92);
    transition: transform 0.2s;
}
.img-lightbox.open .lightbox-inner img { transform: scale(1); }

.archive-image-searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.archive-image-searchbar input {
    flex: 1;
    min-width: 0;
}

.archive-image-note {
    margin: 0 0 10px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-light);
}

.archive-image-feedback {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.82rem;
    line-height: 1.45;
}

.archive-image-feedback.is-error {
    border-color: rgba(239, 68, 68, 0.26);
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.archive-image-feedback.is-success {
    border-color: rgba(22, 163, 74, 0.26);
    background: rgba(22, 163, 74, 0.08);
    color: #166534;
}

.archive-image-feedback.is-info {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
}

.archive-image-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    min-height: 120px;
}

.archive-image-results.is-empty {
    display: block;
}

.archive-image-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    text-align: left;
}

.archive-image-result:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.archive-image-thumb {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.archive-image-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.archive-image-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-image-keywords {
    font-size: 0.72rem;
    color: var(--text-light);
    line-height: 1.45;
    min-height: 2.1em;
}

.archive-image-empty {
    padding: 22px 10px;
    color: var(--text-light);
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.02);
}

.lightbox-caption {
    width: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    border-radius: 0 0 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 4px;
}
.lightbox-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
}
.lightbox-desc {
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    width: 100%;
}

.lightbox-title-row {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.lightbox-ingredients {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.lightbox-ingredient-allergen-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(239,68,68,0.18);
    color: #fecaca;
    border: 1px solid rgba(254,202,202,0.22);
    flex: 0 0 auto;
}

.lightbox-ingredient-allergen-icon svg {
    width: 16px;
    height: 16px;
}

.lightbox-ingredient-item {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.88);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.lightbox-ingredient-name {
    color: rgba(255,255,255,0.92);
    font-weight: 600;
    flex: 0 0 auto;
    min-width: 0;
}

.lightbox-ingredient-metrics {
    color: rgba(255,255,255,0.72);
    white-space: nowrap;
    flex-shrink: 0;
}

.lightbox-meta-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.lightbox-name-metrics {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    flex-wrap: wrap;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    color: rgba(255,255,255,0.78);
}

.lightbox-name-metric {
    white-space: nowrap;
    color: rgba(255,255,255,0.82);
}

.lightbox-name-metric-separator {
    color: rgba(255,255,255,0.46);
    margin: 0;
}

.lightbox-price {
    margin-left: auto;
    order: 2;
}

.lightbox-product-metrics {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.lightbox-metric-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
}

.lightbox-metric-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.lightbox-metric-value {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.lightbox-allergen-indicator {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: transparent;
    color: #fecaca;
    border: none;
    flex-shrink: 0;
    order: 3;
}

.lightbox-allergen-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #fecaca;
    border: 1px solid rgba(254,202,202,0.22);
    flex: 0 0 auto;
}

.lightbox-allergen-indicator svg {
    width: 16px;
    height: 16px;
}

.lightbox-allergen-icon svg {
    width: 12px;
    height: 12px;
}

.lightbox-allergen-copy {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    font-size: 0.74rem;
    line-height: 1.4;
}

.lightbox-allergen-label {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-weight: 700;
}

.lightbox-allergen-value {
    color: rgba(255,255,255,0.84);
}

.lightbox-allergen-list {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    min-width: 0;
}

.lightbox-allergen-entry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.92);
}

.lightbox-allergen-entry-media {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    flex: 0 0 auto;
}

.lightbox-allergen-entry-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.lightbox-allergen-entry-media.is-fallback {
    background: rgba(255,255,255,0.12);
    color: #fecaca;
    border: 1px solid rgba(254,202,202,0.22);
}

.lightbox-allergen-entry-media.is-fallback svg {
    width: 12px;
    height: 12px;
}

.lightbox-allergen-entry-name {
    color: rgba(255,255,255,0.88);
    font-size: 0.73rem;
    font-weight: 500;
    line-height: 1.3;
}

.lightbox-price {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
    background: rgba(255,255,255,0.12);
    border-radius: 5px;
    padding: 3px 12px;
}

.lightbox-floating-comment-btn {
    position: absolute;
    left: 16px;
    bottom: 8px;
    z-index: 5;
    appearance: none;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(15,23,42,0.82);
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.lightbox-floating-comment-btn:hover {
    transform: translateY(-1px);
    background: rgba(30,41,59,0.92);
}

.lightbox-floating-comment-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .lightbox-title-row { gap: 6px; }
    .lightbox-name { font-size: 0.94rem; }
    .lightbox-name-metrics { font-size: 0.74rem; gap: 0; }
    .lightbox-inner { max-width: 88vw; }
    .lightbox-inner img { max-width: 88vw; max-height: 42vh; }
    .lightbox-floating-comment-btn {
        left: 12px;
        bottom: 6px;
        padding: 9px 14px;
        font-size: 0.8rem;
    }
}

/* ===== SOSYAL MEDYA PLATFORM PICKER ===== */
.social-platform-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 4px;
}
.sp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.2;
    text-align: center;
}
.sp-card:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent-light, #f0f4ff);
    color: var(--accent);
}
.sp-card-active {
    border-color: var(--accent) !important;
    background: var(--accent-light, #f0f4ff) !important;
    color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 79,70,229), 0.12);
}
.sp-card:disabled { opacity: 0.55; cursor: not-allowed; }
.sp-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.sp-icon svg { width: 22px; height: 22px; }
.sp-label { font-size: 0.67rem; }

/* Tablo platform sütunu */
.social-badge-cell {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}
.social-badge-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.social-badge-icon svg { width: 18px; height: 18px; }

/* ── QR Ayarları Toggle Rows ── */
.qray-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border: 1px solid var(--border);
    background: var(--surface);
    user-select: none;
}
.qray-toggle-row:hover { background: var(--surface-hover, #f1f5f9); }
.qray-toggle-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qray-toggle-label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.qray-toggle-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
/* Hide real checkbox */
.qray-cb { position: absolute; opacity: 0; width: 0; height: 0; }
/* Custom slider */
.qray-slider {
    flex-shrink: 0;
    width: 42px; height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}
.qray-slider::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.2s;
}
.qray-cb:checked ~ .qray-slider { background: var(--success, #22c55e); }
.qray-cb:checked ~ .qray-slider::after { transform: translateX(18px); }
.qray-toggle-row.qray-active { border-color: var(--success, #22c55e); background: rgba(34, 197, 94, 0.10); }

.qray-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 12px;
    align-items: flex-start;
}

.qray-top-grid > .card {
    margin-bottom: 0 !important;
    height: auto;
    align-self: flex-start;
}

#page-qr-ayarlari .qray-top-grid {
    margin-bottom: 10px;
}

.qray-info-card {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.qray-info-card-compact {
    position: relative;
    min-height: 0;
    max-height: none;
    height: auto;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.qray-info-card-compact::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    background: linear-gradient(180deg, rgba(241, 245, 249, 0), rgba(241, 245, 249, 0.96));
    pointer-events: none;
}

.qray-info-card-compact .qray-info-kicker {
    margin-bottom: 4px;
    font-size: 0.68rem;
}

.qray-info-card-compact .qray-info-title {
    margin-bottom: 4px;
    font-size: 0.86rem;
    line-height: 1.2;
}

.qray-info-card-compact .qray-info-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 0.74rem;
    line-height: 1.34;
    margin-bottom: 0;
}

.qray-info-card-compact .qray-info-note {
    display: none;
}

.qray-info-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f766e;
    margin-bottom: 5px;
}

.qray-info-title {
    margin: 0 0 5px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text);
}

.qray-info-text,
.qray-info-note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.qray-info-list {
    margin: 10px 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.qray-info-note {
    padding-top: 10px;
    border-top: 1px dashed rgba(148, 163, 184, 0.34);
}

.qray-info-expand {
    position: absolute;
    right: 16px;
    bottom: 8px;
    z-index: 1;
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f766e;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(15, 118, 110, 0.16);
    padding: 4px 8px;
    border-radius: 999px;
}

.qray-info-modal-body {
    display: grid;
    gap: 10px;
}

.qray-preview-layout {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.qray-preview-main {
    flex: 2 1 0;
    min-width: 0;
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.qray-preview-qr-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.qray-preview-qr-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.qray-preview-mini-image {
    width: 120px;
    border-radius: 6px;
    border: 1px solid var(--border);
    object-fit: cover;
    cursor: pointer;
}

.qray-preview-text {
    flex: 1 1 0;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.76rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    color: var(--text);
    overflow-x: auto;
}

.qray-preview-side {
    flex: 1 1 0;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    justify-content: flex-start;
}

.qray-preview-side-image {
    width: 100%;
    max-width: none;
    height: auto;
    display: block;
    align-self: flex-start;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #fff;
    cursor: pointer;
}

/* ── QR Ayarları Grid ── */
.qray-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
}
.qray-opts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 7px;
}
.qray-format-card {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
    background: var(--surface);
}
.qray-format-card:hover { border-color: var(--primary, #6366f1); background: var(--accent-light, #f0f4ff); }
.qray-format-card.qray-format-active {
    border-color: var(--primary, #6366f1);
    background: var(--accent-light, #f0f4ff);
    box-shadow: 0 0 0 1px var(--primary, #6366f1);
}
.qray-fc-icon { font-size: 0.95rem; font-family: monospace; font-weight: 700; flex-shrink: 0; }
.qray-fc-lbl  { font-weight: 700; font-size: 0.84rem; color: var(--text); }
/* Small toggle row variant for the grid */
.qray-tr-sm { padding: 7px 10px; }
.qray-tr-sm .qray-toggle-label { font-size: 0.84rem; }
.qray-tr-sm .qray-toggle-desc  { display: none; }

.qray-erp-head {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

.qray-demo-card {
    width: 336px;
    min-width: 336px;
    aspect-ratio: 16 / 5;
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .qray-top-grid {
        grid-template-columns: 1fr;
    }

    .qray-preview-layout {
        flex-direction: column;
    }

    .qray-preview-main {
        flex-direction: column;
    }

    .qray-preview-qr-wrap {
        justify-content: flex-start;
    }

    .qray-preview-side {
        min-width: 0;
    }

    .qray-preview-side-image {
        max-width: 100%;
    }

    .qray-erp-head {
        flex-wrap: wrap;
    }

    .qray-demo-card {
        width: 100%;
        min-width: 0;
    }
}

/* ========== REFERANS INFO CARD (Dashboard) ========== */
.referans-info-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light, #f0f4ff);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary, #6366f1);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.referans-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.referans-badge svg {
    flex-shrink: 0;
    opacity: 0.6;
}
.referans-badge > span:not(.referans-eposta) {
    font-weight: 600;
    color: var(--text);
}
.referans-badge .referans-eposta {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.referans-badge::before {
    content: 'Referans:';
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}
