/* style.css - Fiyat Etiketi Jeneratörü Kurumsal Stil Dosyası */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Violet Theme Variables */
    --primary: #635BFF;
    --primary-hover: #4F46E5;
    --primary-light: #F0EFFF;
    
    --brand-red: #635BFF; /* Primary accent for buttons/icons on screen */
    --brand-yellow: #FEF3C7; /* Soft pastel warning background */
    --brand-dark: #0F172A; /* Deep Slate */
    --brand-dark-gray: #475569;
    --brand-light-gray: #F8FAFC;
    --brand-border: #E2E8F0;
    
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --bg-main: #F1F5F9;
    --bg-card: #FFFFFF;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 25px -5px rgba(99, 91, 255, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(99, 91, 255, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 80px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Navigation Bar */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid var(--brand-border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #635BFF 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #635BFF 0%, #8B5CF6 100%);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(99, 91, 255, 0.3);
}

.navbar-menu {
    display: flex;
    gap: 12px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Station badge custom override */
.station-badge {
    background-color: var(--brand-light-gray) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--brand-border) !important;
    padding: 8px 16px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.station-badge i {
    color: #F59E0B !important; /* Gold pump */
}

/* Logout action link */
.navbar-menu a[href="logout.php"] {
    color: #DC2626 !important;
    background-color: #FEE2E2 !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.navbar-menu a[href="logout.php"]:hover {
    background-color: #FCA5A5 !important;
    color: #9B1C1C !important;
    transform: translateY(-1px);
}

/* Page Container */
.container {
    max-width: 1240px;
    margin: 40px auto;
    padding: 0 24px;
}

/* Card Component */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--brand-border);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 16px;
    letter-spacing: -0.3px;
}

.card-title i {
    color: var(--primary) !important;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    font-family: var(--font-primary);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    background-color: #FFFFFF;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.12);
}

textarea.form-control {
    resize: vertical;
    font-family: monospace;
    font-size: 13px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #FEF3C7;
    color: #D97706;
    border: 1px solid #FCD34D;
}

.btn-secondary:hover {
    background-color: #FDE68A;
}

.btn-danger {
    background-color: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.btn-danger:hover {
    background-color: #FCA5A5;
    color: #9B1C1C;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--brand-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--brand-light-gray);
    border-color: var(--text-secondary);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: #DEF7EC;
    color: #03543F;
    border-left: 4px solid #31C48D;
}

.alert-danger {
    background-color: #FDE8E8;
    color: #9B1C1C;
    border-left: 4px solid #F98080;
}

.alert-info {
    background-color: #E1EFFE;
    color: #1E429F;
    border-left: 4px solid #3F83F8;
}

/* Custom UI Elements (Queued Labels, Table) */
.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

.data-table th {
    background-color: var(--brand-light-gray);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 2px solid var(--brand-border);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--brand-border);
    font-size: 14px;
    color: var(--text-primary);
    background-color: #FFFFFF;
    transition: background-color 0.15s ease;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: #F8FAFC;
}

/* Barcode Quick Input Wrapper */
.barcode-input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.barcode-input-wrapper input {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 18px 24px 18px 56px;
    border-width: 2px;
    border-color: var(--brand-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.barcode-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(99, 91, 255, 0.12);
}

.barcode-input-wrapper .barcode-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary);
}

/* Unit Cost Helper Card */
.calculator-box {
    background-color: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 15px;
    border: 1px dashed rgba(99, 91, 255, 0.3);
}

/* Login Page Custom Styling Override */
html body .login-card {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--brand-border) !important;
    overflow: hidden;
    background-color: var(--bg-card) !important;
}

html body .login-header {
    background: linear-gradient(135deg, #635BFF 0%, #8B5CF6 100%) !important;
    color: #FFFFFF !important;
    border-bottom: none !important;
    padding: 40px 30px !important;
}

html body .login-logo {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #FFFFFF !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 12px !important;
    width: 54px !important;
    height: 54px !important;
    font-size: 24px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

html body .login-footer {
    background-color: var(--brand-light-gray) !important;
    border-top: 1px solid var(--brand-border) !important;
    color: var(--text-secondary) !important;
}

/* PRINT PREVIEW & PRINT BACKGROUND OVERRIDES */
/* ========================================= */

/* We force the original brand values inside print pages and labels to keep them fully intact */
.print-a4-page,
.label-box {
    --brand-red: #DD1D21 !important;
    --brand-yellow: #FFD500 !important;
    --brand-dark: #1E1E1E !important;
    --brand-dark-gray: #333333 !important;
    --brand-light-gray: #F4F4F6 !important;
    --brand-border: #E5E5EA !important;
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Bu kısım A4 etiket baskısı için özel tasarlanmıştır */
.print-a4-page {
    width: 210mm;
    background-color: #FFFFFF;
    margin: 0 auto;
    padding: 11.5mm 8mm; /* A4 kenar boşlukları, 296mm toplam yükseklik (1mm güvenlik payı) */
    display: grid;
    grid-template-columns: 96mm 96mm; /* 2 sütun */
    grid-template-rows: repeat(7, 39mm); /* 7 satır */
    gap: 0mm; /* Boşluk yok, kesme çizgileri birleşir */
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
    page-break-inside: avoid;
    page-break-after: always;
}

.print-a4-page:last-of-type {
    page-break-after: avoid;
    break-after: avoid;
}

/* Etiket Kutusu */
.label-box {
    width: 96mm;
    height: 39mm;
    border: 0.1mm dotted #BBBBBB; /* Kesme kılavuz çizgileri */
    box-sizing: border-box;
    padding: 2.5mm 3.5mm;
    position: relative;
    overflow: hidden;
    background-color: #FFFFFF;
    color: #000000;
    font-family: var(--font-primary);
}

/* Kurumsal Fiyat Etiketi Tasarımı (Kutulu Model) */
.label-logos-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 6.5mm;
    margin-bottom: 1.5mm;
}

.logo-left, .logo-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.yerli-uretim-logo {
    height: 5.5mm;
    width: auto;
}

.brand-logo {
    height: 6mm;
    width: auto;
}

.label-middle-row {
    display: flex;
    justify-content: space-between;
    gap: 2.5mm;
    height: 14.5mm;
    margin-bottom: 1.5mm;
}

.label-col-left {
    display: flex;
    flex-direction: column;
    width: 51mm;
}

.label-col-right {
    display: flex;
    flex-direction: column;
    width: 35mm;
}

.section-title {
    font-size: 2.4mm;
    font-weight: 800;
    color: #000000;
    margin-bottom: 0.8mm;
    text-align: left;
    white-space: nowrap;
}

.section-title .kdv-text {
    font-size: 2mm;
    font-weight: 500;
    font-style: italic;
}

.box-product-name {
    border: 0.25mm solid #000000;
    height: 10mm;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5mm 1.5mm;
    font-weight: 800;
    font-size: 3.2mm;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    word-break: break-word;
    box-sizing: border-box;
}

.box-product-price {
    border: 0.25mm solid #000000;
    height: 10mm;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 4.8mm;
    text-align: center;
    color: #000000;
    box-sizing: border-box;
}

.label-bottom-row {
    display: flex;
    justify-content: space-between;
    gap: 2.5mm;
    height: 9.5mm;
}

.box-date-unit {
    border: 0.25mm solid #000000;
    height: 9.5mm;
    padding: 0.8mm 1.5mm;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 0;
    margin: 0;
    font-size: 2.2mm;
    font-weight: 800;
    color: #000000;
    line-height: 1.3;
}

.info-label {
    text-align: left;
}

.info-val {
    text-align: right;
}

.box-origin {
    border: 0.25mm solid #000000;
    height: 9.5mm;
    padding: 0.8mm 1.5mm;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.origin-title {
    font-size: 2.2mm;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.5mm;
}

.origin-val {
    font-size: 2.6mm;
    font-weight: 500;
    color: #000000;
    line-height: 1;
}

/* Tarayıcı Baskı Ayarları */
@media print {
    @page {
        margin: 0; /* Tarayıcının varsayılan alt/üst bilgilerini (URL, tarih, sayfa no) gizler */
    }
    
    :root {
        --brand-red: #DD1D21 !important;
        --brand-yellow: #FFD500 !important;
        --brand-dark: #1E1E1E !important;
        --brand-dark-gray: #333333 !important;
        --brand-light-gray: #F4F4F6 !important;
        --brand-border: #E5E5EA !important;
    }
    
    body {
        background-color: #FFFFFF;
        padding: 0;
        margin: 0;
    }
    
    .navbar, .navbar-menu, .container, .btn-print-actions, .no-print {
        display: none !important; /* Baskıda arayüz butonlarını gizle */
    }
    
    .print-a4-page {
        box-shadow: none;
        margin: 0;
        padding: 11.5mm 8mm; /* Güvenlik paylı A4 yerleşimi */
        page-break-inside: avoid;
        page-break-after: always;
    }
    
    .print-a4-page:last-of-type {
        page-break-after: avoid;
        break-after: avoid;
    }

    .label-box {
        border: 0.1mm dotted #CCCCCC; /* Baskıda kesim çizgileri ince kalsın */
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Modal ve Yükleme Efektleri */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 8% auto;
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--brand-border);
    width: 500px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Responsive screen layer */
img,
svg,
canvas,
video {
    max-width: 100%;
}

.card > div[style*="overflow-x: auto"],
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.card > div[style*="overflow-x: auto"] .data-table,
.table-scroll .data-table {
    margin-bottom: 2px;
}

.card > div[style*="justify-content: space-between"],
.preview-header {
    flex-wrap: wrap;
    gap: 12px;
}

.card > div[style*="justify-content: space-between"] > div,
.preview-header > div {
    flex-wrap: wrap;
}

@media screen and (max-width: 1024px) {
    .navbar {
        padding: 14px 20px;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .navbar-brand {
        font-size: 19px;
        min-width: 0;
    }

    .navbar-brand span {
        overflow-wrap: anywhere;
    }

    .navbar-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .navbar-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-link,
    .station-badge {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .container {
        margin: 24px auto;
        padding: 0 16px;
    }

    .admin-container {
        display: block !important;
    }

    .admin-sidebar {
        width: 100% !important;
        margin-bottom: 16px;
    }

    .menu-list {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .menu-list::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        flex: 0 0 auto;
        border-bottom: none !important;
        border-right: 1px solid var(--brand-border);
    }

    .menu-link {
        white-space: nowrap;
    }

    .select-station-wrapper {
        align-items: stretch !important;
        flex-direction: column;
    }

    .select-station-wrapper .form-control {
        width: 100% !important;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding-bottom: 32px;
    }

    .container {
        margin: 16px auto;
        padding: 0 12px;
    }

    .card {
        padding: 18px;
        margin-bottom: 18px;
        border-radius: 12px;
    }

    .card:hover {
        transform: none;
    }

    .card-title {
        font-size: 17px;
        gap: 9px;
        margin-bottom: 16px;
        padding-bottom: 12px;
        align-items: flex-start;
    }

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

    .form-control {
        min-height: 46px;
        font-size: 16px;
        padding: 11px 14px;
    }

    .btn {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .barcode-input-wrapper {
        margin-bottom: 18px;
    }

    .barcode-input-wrapper input {
        font-size: 16px;
        padding: 15px 16px 15px 48px;
    }

    .barcode-input-wrapper .barcode-icon {
        left: 17px;
        font-size: 20px;
    }

    .search-result-item {
        align-items: flex-start;
        gap: 10px;
    }

    .search-result-price {
        white-space: nowrap;
    }

    .alert {
        align-items: flex-start;
        padding: 13px 14px;
        margin-bottom: 16px;
    }

    .data-table {
        min-width: 700px;
    }

    .data-table th,
    .data-table td {
        padding: 11px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .data-table td:nth-child(3),
    .data-table th:nth-child(3) {
        white-space: normal;
        min-width: 190px;
    }

    .modal {
        padding: 12px;
        overflow-y: auto;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        padding: 18px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        border-radius: 14px;
    }

    .modal-header {
        align-items: flex-start;
        gap: 12px;
    }

    .station-card-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .station-card {
        padding: 16px !important;
    }

    .station-card-header,
    .station-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .station-actions .btn {
        flex: 1 1 130px;
    }

    .paste-zone {
        padding: 28px 14px !important;
        min-height: 155px !important;
    }

    .paste-zone-icon {
        font-size: 34px !important;
    }

    .paste-zone-title {
        font-size: 15px !important;
    }

    .preview-header {
        align-items: stretch !important;
    }

    .preview-header > h3,
    .preview-header > div {
        width: 100%;
    }

    .preview-header .btn {
        flex: 1 1 145px;
    }

    .card > div[style*="justify-content: space-between"] {
        align-items: stretch !important;
    }

    .card > div[style*="justify-content: space-between"] > h2,
    .card > div[style*="justify-content: space-between"] > h3,
    .card > div[style*="justify-content: space-between"] > div,
    .card > div[style*="justify-content: space-between"] > button {
        width: 100%;
    }

    .card > div[style*="justify-content: space-between"] .btn {
        flex: 1 1 160px;
    }
}

@media screen and (max-width: 520px) {
    .navbar {
        padding: 12px;
    }

    .brand-logo-icon {
        width: 32px;
        height: 32px;
        font-size: 17px;
    }

    .nav-link,
    .station-badge {
        min-height: 38px;
        padding: 8px 11px !important;
        font-size: 12.5px !important;
    }

    .container {
        padding: 0 10px;
    }

    .card {
        padding: 15px;
    }

    .grid-2,
    .grid-3 {
        gap: 14px;
    }

    .data-table {
        min-width: 640px;
    }

    .modal-content form > div[style*="display: flex"] {
        flex-direction: column;
    }

    .modal-content form > div[style*="display: flex"] .btn {
        width: 100%;
    }
}

@media screen and (max-width: 900px) {
    .btn-print-actions,
    .print-control-bar {
        flex-wrap: wrap;
        padding: 10px !important;
        gap: 8px !important;
    }

    .print-a4-page {
        transform: scale(0.86);
        transform-origin: top center;
        margin-bottom: -38mm !important;
    }
}

@media screen and (max-width: 760px) {
    .print-a4-page {
        transform: scale(0.72);
        margin-bottom: -78mm !important;
    }
}

@media screen and (max-width: 620px) {
    .print-a4-page {
        transform: scale(0.58);
        margin-bottom: -122mm !important;
    }
}

@media screen and (max-width: 480px) {
    .print-a4-page {
        transform: scale(0.44);
        margin-bottom: -166mm !important;
    }
}

@keyframes modalSlideUp {
    from {transform: translateY(30px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #DC2626;
    background-color: #FEE2E2;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(99, 91, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

.inline-edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 14px;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
}

.inline-edit-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.row-editing {
    background-color: #FFFBEB !important;
}

/* Autocomplete Arama Sonuçları Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 6px;
}

.search-result-item {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-bottom: 2px;
    border-bottom: none;
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-item:hover, .search-result-item.selected {
    background-color: var(--primary-light);
    color: var(--primary);
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.search-result-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.search-result-item:hover .search-result-name,
.search-result-item.selected .search-result-name {
    color: var(--primary);
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.search-result-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.search-result-item:hover .search-result-price,
.search-result-item.selected .search-result-price {
    background-color: var(--primary);
    color: #FFFFFF;
}
