/* =====================================================
   SANAYİ STOK TAKİP SİSTEMİ - ANA STİL DOSYASI
   Mobil Öncelikli • Ultra Kolay • Profesyonel
   ===================================================== */

/* RESET & GLOBAL */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1b2a4a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.4);
    --accent: #e94560;
    --accent-dark: #c23152;
    --green: #00c853;
    --green-dark: #00a844;
    --red: #ff1744;
    --red-dark: #d50032;
    --blue: #2979ff;
    --blue-dark: #2262cc;
    --orange: #ff9100;
    --purple: #7c4dff;
    --teal: #00bfa5;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --input-bg: var(--bg-card);
    --hover-bg: rgba(255,255,255,0.06);
}

/* LIGHT THEME */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7fa;
    --text-primary: #1a1a2e;
    --text-secondary: rgba(0,0,0,0.65);
    --text-muted: rgba(0,0,0,0.4);
    --border: rgba(0,0,0,0.1);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --input-bg: #f0f2f5;
    --hover-bg: rgba(0,0,0,0.04);
}
[data-theme="light"] .top-bar {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .bottom-nav {
    box-shadow: 0 -1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .back-btn,
[data-theme="light"] .btn-logout,
[data-theme="light"] .btn-icon {
    background: rgba(0,0,0,0.06);
}
[data-theme="light"] .stat-card,
[data-theme="light"] .category-manage-item,
[data-theme="light"] .profile-section {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-scan {
    border-color: var(--bg-secondary);
}
[data-theme="light"] .modal-content,
[data-theme="light"] .quick-cat-body {
    background: #ffffff;
}
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .cat-action-btn {
    background: rgba(0,0,0,0.05);
}
[data-theme="light"] .action-btn {
    background: #ffffff;
}
[data-theme="light"] .product-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .critical-item {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* =====================================================
   ÜST BAR
   ===================================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-left i { color: var(--accent); font-size: 20px; }

.app-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 13px;
    color: var(--text-secondary);
    display: none;
}
@media(min-width:480px) { .user-name { display: inline; } }

.btn-logout, .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-logout:active, .btn-icon:active { transform: scale(0.92); }

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
}

/* =====================================================
   ANA İÇERİK
   ===================================================== */
.main-content {
    padding: 76px 16px 100px;
    max-width: 600px;
    margin: 0 auto;
}

/* =====================================================
   İSTATİSTİK KARTLARI
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}
.stat-card:active { transform: scale(0.97); }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-blue .stat-icon { background: rgba(41,121,255,0.15); color: var(--blue); }
.stat-red .stat-icon { background: rgba(255,23,68,0.15); color: var(--red); }
.stat-green .stat-icon { background: rgba(0,200,83,0.15); color: var(--green); }
.stat-orange .stat-icon { background: rgba(255,145,0,0.15); color: var(--orange); }

.stat-info { display: flex; flex-direction: column; }
.stat-number { font-size: 24px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.stat-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,23,68,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(255,23,68,0); }
}

/* =====================================================
   ANA İŞLEM BUTONLARI
   ===================================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    font-family: inherit;
}
.action-btn:active { transform: scale(0.96); }

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.action-text {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.action-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.action-btn-primary {
    background: linear-gradient(135deg, #e94560, #c23152);
    border-color: transparent;
    padding: 28px 16px;
}
.action-btn-primary .action-icon {
    background: rgba(255,255,255,0.2);
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 34px;
}
.action-btn-primary .action-text { font-size: 18px; }

.action-btn-green .action-icon { background: rgba(0,200,83,0.15); color: var(--green); }
.action-btn-green { border-color: rgba(0,200,83,0.2); }

.action-btn-red .action-icon { background: rgba(255,23,68,0.15); color: var(--red); }
.action-btn-red { border-color: rgba(255,23,68,0.2); }

.action-btn-blue .action-icon { background: rgba(41,121,255,0.15); color: var(--blue); }
.action-btn-blue { border-color: rgba(41,121,255,0.2); }

.action-btn-purple .action-icon { background: rgba(124,77,255,0.15); color: var(--purple); }
.action-btn-purple { border-color: rgba(124,77,255,0.2); }

.action-btn-teal .action-icon { background: rgba(0,191,165,0.15); color: var(--teal); }
.action-btn-teal { border-color: rgba(0,191,165,0.2); }

.action-btn-dark .action-icon { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

.action-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

/* =====================================================
   KRİTİK STOK BÖLÜMÜ
   ===================================================== */
.critical-section {
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-header h2 i { color: var(--red); }

.critical-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.critical-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.critical-item:active { transform: scale(0.98); background: var(--bg-card-hover); }

.critical-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.critical-thumb, .critical-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}
.critical-thumb-placeholder {
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.critical-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.critical-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.critical-location {
    font-size: 12px;
    color: var(--text-muted);
}

.critical-item-right { flex-shrink: 0; text-align: right; }

.critical-qty {
    font-size: 18px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
}
.qty-zero { color: var(--red); background: rgba(255,23,68,0.12); }
.qty-low { color: var(--orange); background: rgba(255,145,0,0.12); }
.qty-normal { color: var(--green); }

/* =====================================================
   ALT NAVİGASYON BARI
   ===================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-family: inherit;
    transition: color 0.2s;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--accent); }
.nav-item:active { color: var(--accent); }

.nav-scan {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    margin-top: -24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(233,69,96,0.4);
    border: 3px solid var(--bg-secondary);
}
.nav-scan i { font-size: 22px; color: #fff; }
.nav-scan span { display: none; }

/* =====================================================
   BARKOD TARAYICI MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-fullscreen {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
}

.scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0,0,0,0.8);
    z-index: 10;
}

.scanner-close, .scanner-flash {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.scanner-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.scanner-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.scanner-viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-footer {
    padding: 20px 16px;
    padding-bottom: calc(20px + var(--safe-bottom));
    background: rgba(0,0,0,0.8);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scanner-status {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-manual-entry {
    padding: 14px 24px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* =====================================================
   ÜRÜN İŞLEM MODAL (STOK GİRİŞ/ÇIKIŞ)
   ===================================================== */
.modal-content {
    background: var(--bg-secondary);
    border-radius: 24px 24px 0 0;
    max-height: 95vh;
    width: 100%;
    max-width: 500px;
    overflow-y: auto;
    animation: slideUp 0.3s;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-action { padding: 0; }

.modal-action-header {
    padding: 16px;
    display: flex;
    justify-content: flex-end;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-action-body {
    padding: 0 20px 30px;
    padding-bottom: calc(30px + var(--safe-bottom));
}

.product-info-card {
    text-align: center;
    margin-bottom: 20px;
}

.product-photo-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 12px;
}
.product-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-photo-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-muted);
}

.product-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.product-barcode {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-current-stock {
    font-size: 16px;
    color: var(--text-secondary);
}
.product-current-stock strong {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 800;
}

/* İşlem Tipi Tabları */
.action-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.action-type-tab {
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-type-tab[data-type="in"].active {
    background: rgba(0,200,83,0.12);
    border-color: var(--green);
    color: var(--green);
}

.action-type-tab[data-type="out"].active {
    background: rgba(255,23,68,0.12);
    border-color: var(--red);
    color: var(--red);
}

/* Sayısal Tuş Takımı */
.numpad-section { margin-bottom: 16px; }

.numpad-display {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 2px solid var(--border);
}

.numpad-value {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    display: block;
}

.numpad-unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.numpad-btn {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.numpad-btn:active { transform: scale(0.94); background: var(--bg-card-hover); }

.numpad-clear { color: var(--orange); }
.numpad-back { color: var(--text-muted); }

.quick-amounts {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.quick-btn:active { background: var(--accent); color: #fff; border-color: var(--accent); }

.action-note { margin-bottom: 16px; }

.note-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.note-input:focus { border-color: var(--accent); }

.btn-save-action {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius);
    border: none;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,200,83,0.3);
}
.btn-save-action:active { transform: scale(0.97); }
.btn-save-action.btn-out {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 6px 20px rgba(255,23,68,0.3);
}
.btn-save-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   ARAMA MODAL
   ===================================================== */
.modal-search {
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 2;
}

.search-input {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 17px;
    font-family: inherit;
    outline: none;
}

.search-results {
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
}

.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.search-empty i { font-size: 48px; margin-bottom: 16px; display: block; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
}
.search-result-item:active { background: var(--bg-card); }

.search-result-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }

.search-result-info { flex: 1; overflow: hidden; }
.search-result-name { font-size: 15px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-barcode { font-size: 12px; color: var(--text-muted); }

.search-result-qty {
    font-size: 16px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* STOK TİP SEÇİCİ */
.modal-compact {
    max-height: auto;
    border-radius: 24px 24px 0 0;
    padding: 30px 20px;
    padding-bottom: calc(30px + var(--safe-bottom));
    text-align: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px;
}

.stock-select-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.method-btn {
    padding: 24px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.method-btn i { font-size: 30px; color: var(--accent); }
.method-btn:active { transform: scale(0.96); }

.btn-cancel {
    width: 100%;
    padding: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* =====================================================
   BAŞARI ANİMASYONU
   ===================================================== */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,200,83,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.success-content { text-align: center; }

.success-icon {
    font-size: 80px;
    color: #fff;
    animation: successBounce 0.5s;
}
@keyframes successBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-top: 16px;
}

/* =====================================================
   ÜRÜN LİSTESİ
   ===================================================== */
.search-bar-fixed {
    margin-bottom: 16px;
}

.search-form { margin-bottom: 12px; }

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input-wrapper > i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 16px;
}
.search-input-inline {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.search-input-inline:focus { border-color: var(--accent); }

.search-clear {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* Kategori Filtre */
.category-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.category-filter-scroll::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.category-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.product-list { display: flex; flex-direction: column; gap: 8px; }

.product-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 4px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}
.product-card:active { transform: scale(0.98); background: var(--bg-card-hover); }

.product-thumb {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.product-thumb-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.product-card-center {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-card-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-barcode, .product-card-location {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card-right {
    text-align: center;
    flex-shrink: 0;
}

.product-card-qty {
    font-size: 20px;
    font-weight: 800;
    display: block;
    padding: 4px 12px;
    border-radius: 8px;
}

.product-card-unit {
    font-size: 11px;
    color: var(--text-muted);
}

.qty-normal-bg { background: rgba(0,200,83,0.08); }
.qty-low-bg { background: rgba(255,145,0,0.08); }
.qty-zero-bg { background: rgba(255,23,68,0.08); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 60px; margin-bottom: 16px; display: block; color: var(--text-muted); }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

.empty-state-sm {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

/* =====================================================
   ÜRÜN DETAY SAYFASI
   ===================================================== */
.detail-hero {
    text-align: center;
    padding: 20px 0;
}

.detail-photo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    overflow: hidden;
    margin: 0 auto 16px;
}
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
}

.detail-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.detail-barcode {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.detail-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.detail-stock-card {
    text-align: center;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 2px solid;
}
.qty-normal-bg .detail-stock-card,
.detail-stock-card.qty-normal-bg { border-color: rgba(0,200,83,0.2); background: rgba(0,200,83,0.06); }
.detail-stock-card.qty-low-bg { border-color: rgba(255,145,0,0.2); background: rgba(255,145,0,0.06); }
.detail-stock-card.qty-zero-bg { border-color: rgba(255,23,68,0.2); background: rgba(255,23,68,0.06); }

.detail-stock-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.detail-stock-value { font-size: 56px; font-weight: 800; line-height: 1; }
.detail-stock-unit { font-size: 18px; color: var(--text-secondary); margin-top: 4px; }
.detail-stock-critical { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

.detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-action-btn {
    padding: 16px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    color: #fff;
}
.detail-action-btn:active { transform: scale(0.96); }
.detail-action-btn.green { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.detail-action-btn.red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }

.detail-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.detail-info-item > i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    margin-top: 2px;
}
.detail-info-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.detail-info-value { display: block; font-size: 15px; font-weight: 600; }

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* HAREKETLER */
.movements-list { display: flex; flex-direction: column; }

.movement-day-header {
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    margin-top: 8px;
}

.movement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: background 0.15s;
}
.movement-item:active { background: var(--bg-card); }

.movement-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.movement-in { background: rgba(0,200,83,0.12); color: var(--green); }
.movement-out { background: rgba(255,23,68,0.12); color: var(--red); }

.movement-info { flex: 1; overflow: hidden; }
.movement-product-name { font-size: 14px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movement-amount { font-size: 14px; font-weight: 700; display: block; }
.movement-detail { font-size: 12px; color: var(--text-muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-green { color: var(--green); }
.text-red { color: var(--red); }

.movement-date { text-align: right; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.movement-stock { display: block; font-size: 11px; color: var(--text-muted); }

/* =====================================================
   ÜRÜN FORM SAYFASI
   ===================================================== */
.product-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group-modern label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.form-group-modern label i { color: var(--text-muted); width: 16px; text-align: center; }

.form-group-modern input[type="text"],
.form-group-modern input[type="number"],
.form-group-modern textarea,
.form-select-modern {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.form-group-modern input:focus,
.form-group-modern textarea:focus,
.form-select-modern:focus {
    border-color: var(--accent);
}

.form-input-lg { font-size: 18px !important; font-weight: 600; }
.text-center { text-align: center; }

.form-select-modern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff60' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 14px) center;
    padding-right: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}
.input-with-btn input { flex: 1; }
.input-btn {
    padding: 14px 18px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Fotoğraf Yükleme */
.photo-upload-area {
    width: 100%;
    min-height: 160px;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}
.photo-upload-area:active { border-color: var(--accent); }

.photo-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}
.photo-placeholder i { font-size: 40px; display: block; margin-bottom: 10px; }
.photo-placeholder span { font-size: 14px; }

.photo-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

/* Sabit Kaydet */
.fixed-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--safe-bottom));
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.btn-save-product {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-save-product:active { transform: scale(0.97); }
.btn-save-product:disabled { opacity: 0.5; }

.btn-delete-product {
    width: 56px;
    padding: 16px;
    background: rgba(255,23,68,0.12);
    color: var(--red);
    border: 1px solid rgba(255,23,68,0.2);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
}

/* =====================================================
   TOAST BİLDİRİM
   ===================================================== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    z-index: 10000;
    animation: toastIn 0.3s;
    max-width: 90%;
    text-align: center;
}
.toast-success { background: var(--green); color: #fff; }
.toast-error { background: var(--red); color: #fff; }
.toast-info { background: var(--blue); color: #fff; }

@keyframes toastIn {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (min-width: 768px) {
    .main-content { max-width: 700px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .numpad-btn { padding: 22px; font-size: 24px; }
}

@media (max-width: 360px) {
    .stat-number { font-size: 20px; }
    .action-icon { width: 48px; height: 48px; font-size: 22px; }
    .numpad-btn { padding: 14px; font-size: 20px; }
    .numpad-value { font-size: 40px; }
}

/* =====================================================
   KATEGORİ YÖNETİM SAYFASI
   ===================================================== */
.category-manage-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    gap: 12px;
}
.category-manage-item:active { transform: scale(0.98); }

.cat-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.cat-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.cat-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.cat-item-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.cat-item-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.cat-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cat-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--hover-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cat-action-btn:active { transform: scale(0.9); }
.cat-action-delete { color: var(--red); }
.cat-action-delete:active { background: rgba(255,23,68,0.15); }

/* İkon Seçici */
.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icon-pick-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.icon-pick-btn.active {
    border-color: var(--accent);
    background: rgba(233,69,96,0.15);
    color: var(--accent);
}
.icon-pick-btn:active { transform: scale(0.9); }

/* Renk Seçici */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-pick-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.color-pick-btn.active {
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255,255,255,0.3);
}

/* Modal Form */
.modal-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 10px;
}
.modal-form-header h3 {
    font-size: 20px;
    font-weight: 800;
}

.modal-form-body {
    padding: 10px 20px 30px;
    padding-bottom: calc(30px + var(--safe-bottom));
}

/* Loading state */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* =====================================================
   PROFİL SAYFASI
   ===================================================== */
.profile-hero {
    text-align: center;
    padding: 24px 20px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(233,69,96,0.3);
}

.profile-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.profile-role {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    background: rgba(233,69,96,0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-last-login {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

.profile-section {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.profile-section .section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.profile-section .section-title i {
    color: var(--accent);
    font-size: 16px;
}

.profile-section .form-group-modern {
    margin-bottom: 14px;
}

.profile-section .form-group-modern label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-section .form-group-modern label i {
    color: var(--accent);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.profile-section input[type="text"],
.profile-section input[type="email"],
.profile-section input[type="password"],
.profile-section input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg, var(--bg-card));
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}
.profile-section input:focus {
    outline: none;
    border-color: var(--accent);
}

.profile-quick-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-quick-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--hover-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}
.profile-quick-link i:first-child {
    width: 22px;
    text-align: center;
    color: var(--accent);
    font-size: 16px;
}
.profile-quick-link span { flex: 1; }
.profile-quick-link i:last-child { color: var(--text-muted); font-size: 12px; }
.profile-quick-link:active { transform: scale(0.98); }

/* Design option checkbox */
.design-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.design-option label {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}
.design-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Otomatik barkod üret butonu */
.input-btn-generate {
    background: var(--purple) !important;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.theme-toggle:active { transform: scale(0.9); }
[data-theme="light"] .theme-toggle { background: rgba(0,0,0,0.06); }
[data-theme="light"] .theme-toggle i:before { content: "\f186"; } /* moon icon */
