* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0;
    padding-bottom: 0;
    position: relative;
    margin: 0;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    border: none;
}

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 25px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.header-top {
    margin-bottom: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 48px;
    background: rgba(255,255,255,0.15);
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.logo-text .subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

header h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 12px 24px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-btn.active {
    background: white;
    color: #1e3c72;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.page {
    display: none;
    padding: 20px;
    overflow-x: visible;
    max-width: 100%;
    width: 100%;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

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

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 15px;
    border: 1px solid rgba(30, 60, 114, 0.3);
    background: white;
    color: #1e3c72;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.view-btn:hover {
    background: #f8f9fa;
}

.view-btn.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

.page-header h2 {
    color: #1e3c72;
    font-size: 24px;
    font-weight: 600;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    font-weight: 500;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a5298 0%, #3d6bb3 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.table-container {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    position: relative;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

tbody tr:hover {
    background: #f8f9fa;
}

.loading {
    text-align: center;
    color: #6c757d;
    padding: 40px !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: flex-end;
}

.barkod-okut-container {
    max-width: 800px;
    margin: 0 auto;
}

.barkod-input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.teslim-bilgileri {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #dee2e6;
}

.teslim-bilgileri h3 {
    color: #1e3c72;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s;
}

.form-group textarea:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: #2a5298;
}

.checkbox-label span {
    font-size: 14px;
    color: #495057;
}

.required {
    color: #dc3545;
    font-size: 12px;
    font-weight: normal;
}

.barkod-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

.barkod-input-section input {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.miktar-input {
    margin-bottom: 15px;
}

.result-box {
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.result-box.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.result-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons button {
    padding: 6px 12px;
    font-size: 12px;
}

/* Kart Görünümü */
.cards-container {
    margin-top: 20px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.urun-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #dee2e6;
}

.urun-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.card-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 5px 0;
}

.card-body {
    margin: 15px 0;
}

.card-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.card-info-row:last-child {
    border-bottom: none;
}

.card-info-label {
    font-weight: 600;
    color: #495057;
}

.card-info-value {
    color: #212529;
}

.card-stok {
    font-size: 24px;
    font-weight: bold;
    color: #1e3c72;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
}

.card-qr-container {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.card-qr-container canvas,
.card-qr-container img {
    max-width: 100%;
    height: auto;
    border: 2px solid #dee2e6;
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.card-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

.view-btn.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-color: #1e3c72;
}

/* Footer */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.footer-text br {
    display: none;
}

@media (min-width: 768px) {
    .footer-text br {
        display: inline;
    }
}

/* Kategori Badge */
.kategori-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px 0;
}

/* Filter Section */
.filter-section {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-section label {
    font-weight: 600;
    color: #333;
}

.filter-section select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 250px;
    font-size: 14px;
}

/* Kategori hiyerarşi stilleri */
#kategoriler-table tr {
    transition: background-color 0.2s;
}

#kategoriler-table tr:hover {
    background-color: #f0f0f0 !important;
}

#kategoriler-table td {
    padding: 12px 8px;
    vertical-align: middle;
}

#kategori-ust-kategori option {
    padding: 5px;
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
}

.login-modal-content {
    position: relative;
    z-index: 10001;
}

.login-modal-content button,
.login-modal-content input,
.login-modal-content form {
    position: relative;
    z-index: 10002;
    pointer-events: auto !important;
}

.login-modal-content {
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.logo-icon-large {
    font-size: 64px;
    margin-bottom: 15px;
}

.login-header h2 {
    color: #1e3c72;
    margin-bottom: 5px;
}

.login-header .subtitle {
    color: #6c757d;
    font-size: 14px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Barkod Okutma Bildirimi */
.barkod-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    font-weight: 600;
    font-size: 14px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s;
}

.barkod-notification.success {
    background: #28a745;
    color: white;
}

.barkod-notification.error {
    background: #dc3545;
    color: white;
}

.barkod-notification.info {
    background: #17a2b8;
    color: white;
}

.barkod-notification.warning {
    background: #ff9800;
    color: white;
}

/* Düşük Stok Uyarısı */
.low-stock {
    background-color: #fff3cd !important;
    border-left: 4px solid #ff9800 !important;
}

.low-stock .stok-cell {
    color: #dc3545 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

.urun-card.low-stock {
    border: 2px solid #ff9800 !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
}

.urun-card.low-stock .card-stok {
    color: #dc3545 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ff9800;
}

/* Düşük Stok Badge */
.stok-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Düşük Stok Listesi */
.dusuk-stok-listesi {
    max-height: 500px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.dusuk-stok-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dusuk-stok-item:hover {
    background: #ffe69c;
}

.dusuk-stok-item-info {
    flex: 1;
}

.dusuk-stok-item-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.dusuk-stok-item-info p {
    margin: 3px 0;
    color: #666;
    font-size: 14px;
}

.dusuk-stok-item-stok {
    font-size: 24px;
    font-weight: 700;
    color: #dc3545;
    margin-left: 20px;
}

.dusuk-stok-bos {
    text-align: center;
    padding: 40px;
    color: #28a745;
    font-size: 18px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#karekod-container {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#karekod-container canvas,
#karekod-container img {
    max-width: 100%;
    height: auto;
    border: 2px solid #dee2e6;
    padding: 10px;
    background: white;
}

#karekod-info {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#karekod-info p {
    margin: 10px 0;
    color: #495057;
    font-size: 16px;
}

#karekod-info strong {
    color: #333;
    font-weight: 600;
}

#karekod-info code {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.karekod-print-preview {
    display: none;
}

@media print {
    @page {
        size: 9cm 14cm;
        margin: 0;
        padding: 0;
    }
    
    * {
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    html {
        width: 9cm !important;
        height: 14cm !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body {
        width: 9cm !important;
        height: 14cm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: white !important;
    }
    
    /* Tüm içeriği gizle - sadece karekod print preview görünsün */
    body > *:not(#karekod-print-preview) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Sadece karekod print preview'i göster */
    #karekod-print-preview {
        display: block !important;
        visibility: visible !important;
    }
    
    #karekod-print-preview * {
        visibility: visible !important;
    }
    
    #karekod-print-preview {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        z-index: 999999 !important;
    }
    
    .karekod-print-preview .print-content,
    #karekod-print-preview .print-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 9cm !important;
        height: 14cm !important;
        padding: 0 !important;
        margin: 0 !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        visibility: visible !important;
    }
    
    .karekod-print-preview .print-qr {
        text-align: center !important;
        width: 8cm !important;
        height: 8cm !important;
        max-width: 8cm !important;
        max-height: 8cm !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 auto !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        visibility: visible !important;
    }
    
    .karekod-print-preview .print-qr canvas,
    .karekod-print-preview .print-qr img,
    .karekod-print-preview .print-qr .print-qr-image,
    .karekod-print-preview .print-qr > div,
    #karekod-print-preview .print-qr canvas,
    #karekod-print-preview .print-qr img,
    #karekod-print-preview .print-qr .print-qr-image,
    #karekod-print-preview .print-qr > div,
    #karekod-print-preview .print-qr svg {
        width: 8cm !important;
        height: 8cm !important;
        max-width: 8cm !important;
        max-height: 8cm !important;
        min-width: 8cm !important;
        min-height: 8cm !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        background: white !important;
        display: block !important;
        object-fit: contain !important;
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        visibility: visible !important;
    }
    
    /* Diğer tüm elementleri gizle */
    .karekod-print-preview .print-info,
    .modal,
    .modal-content,
    .close, 
    .btn,
    h3,
    #karekod-container,
    #karekod-info,
    header,
    nav,
    .page,
    .container,
    .stats-container {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Rapor yazdırma */
    .rapor-container {
        display: block !important;
        visibility: visible !important;
    }
    
    .rapor-filtreler,
    .header-actions button,
    .page-header button {
        display: none !important;
    }
}

