/* Hamur360 Yönetim Sistemi - %100 Tam Uyumlu Responsive CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Renk Paleti - Açık Renk & Fırın Vurguları */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e2e8f0;
    
    --primary: #f59e0b;        /* Sıcak Fırın Turuncusu / Kehribar */
    --primary-hover: #d97706;
    --primary-light: #fffbeb;
    
    --secondary: #3b82f6;      /* Bilgi / Mavi */
    --secondary-light: #eff6ff;
    
    --success: #10b981;        /* Yeşil / Tamamlandı */
    --success-light: #ecfdf5;
    
    --danger: #ef4444;         /* Kırmızı / Fire / Uyarı */
    --danger-light: #fef2f2;
    
    --warning: #f97316;        /* Uyarı / Şüpheli OCR */
    --warning-light: #fff7ed;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

@media (max-width: 600px) {
    .public-site-link-label {
        display: none;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Layout Yapısı */
#app-container {
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Backdrop (Mobil Ekran Karartması) */
.sidebar-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Yan Menü (Sidebar) */
sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.brand-title h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.brand-title p {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.nav-list {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 44px;
}

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

.nav-item.active .nav-link {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* Ana İçerik Alanı */
main {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    transition: margin-left 0.3s ease;
    overflow-x: hidden;
}

/* Üst Header (Topbar) */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mobile-menu-btn {
    display: none;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-main);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    flex-shrink: 0;
}

.date-badge input {
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--primary-hover);
    outline: none;
    cursor: pointer;
    font-size: 12px;
    max-width: 110px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.offline-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
}

.offline-status.online {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.offline-status.offline {
    background-color: var(--warning-light);
    color: var(--warning);
    border: 1px solid #fed7aa;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-main);
    padding: 3px 8px 3px 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.user-info {
    line-height: 1.2;
}

.user-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
}

.user-role-select {
    font-size: 10px;
    color: var(--primary-hover);
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* Dashboard & Modül Sayfaları */
.content-wrapper {
    padding: 20px;
    flex: 1;
    padding-bottom: 90px;
    max-width: 100%;
    box-sizing: border-box;
}

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

.page-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.page-title p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: auto;
}

/* Stat Kartları Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.primary { background-color: var(--primary-light); color: var(--primary); }
.stat-icon.success { background-color: var(--success-light); color: var(--success); }
.stat-icon.danger { background-color: var(--danger-light); color: var(--danger); }
.stat-icon.secondary { background-color: var(--secondary-light); color: var(--secondary); }
.stat-icon.warning { background-color: var(--warning-light); color: var(--warning); }

.stat-details {
    min-width: 0;
}

.stat-details h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-details .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 2px;
}

.stat-details .subtext {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Tablolar & Kart Konteynırları */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

/* Tablo Stilleri ve Dokunmatik Kaydırma */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

table.data-table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

table.data-table td {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table.data-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Rozetler ve Butonlar */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-secondary { background-color: var(--secondary-light); color: var(--secondary); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

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

.btn-secondary {
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

/* §19 Silme / tehlikeli işlem butonu */
.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
    min-height: 32px;
}

/* OCR Modülü Özel Stilleri */
.ocr-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.ocr-dropzone {
    border: 2px dashed var(--primary);
    background-color: var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.ocr-preview-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.scan-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
    box-shadow: 0 0 15px #f59e0b;
    display: none;
    z-index: 10;
}

.scan-line.scanning {
    display: block;
    animation: scanAnimation 2.5s infinite linear;
}

@keyframes scanAnimation {
    0% { top: 0%; }
    50% { top: 95%; }
    100% { top: 0%; }
}

.suspicious-row {
    background-color: #fef2f2 !important;
}

/* Modallar */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 12px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.2s ease, max-width 0.2s ease, width 0.2s ease;
}

.modal.modal-xl {
    max-width: 1140px;
    width: 95vw;
}

.modal.modal-lg {
    max-width: 800px;
    width: 90vw;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background-color: var(--bg-main);
}

/* Form Elemanları */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
    min-height: 38px;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* MOBİL ALT GEZİNME ÇUBUĞU (Bottom Navigation Bar) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    z-index: 95;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    padding: 6px 0;
}

.bottom-nav-item i {
    font-size: 16px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* ==========================================================================
   KUSURSUZ MOBİL & TABLET KİRILMA NOKTALARI (Media Queries)
   ========================================================================== */

/* Masaüstü Ekranlar (1100px altı) */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Ekranlar (900px altı) */
@media (max-width: 900px) {
    sidebar {
        transform: translateX(-100%);
    }

    sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: block;
    }

    main {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .ocr-container {
        grid-template-columns: 1fr;
    }
}

/* Telefon Ekranları (640px altı - TAM RESPONSIVE FİX) */
@media (max-width: 640px) {
    header {
        padding: 10px 12px;
        gap: 6px;
    }

    .header-left {
        gap: 6px;
    }

    .header-right {
        gap: 6px;
    }

    .date-label {
        display: none; /* Mobile sığması için Tarih: yazısını gizle */
    }

    .date-badge {
        padding: 4px 8px;
    }

    .date-badge input {
        max-width: 95px;
        font-size: 11px;
    }

    #status-text {
        display: none; /* Mobilde sadece renkli durum noktasını göster, yazıyı gizle */
    }

    .offline-status {
        padding: 6px;
        border-radius: 50%;
    }

    .user-name {
        display: none; /* Mobilde ismi gizle, sadece avatara odaklan */
    }

    .user-profile {
        padding: 2px;
        border: none;
        background: transparent;
    }

    .content-wrapper {
        padding: 12px;
        padding-bottom: 75px;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-details .value {
        font-size: 15px;
    }

    .page-header {
        margin-bottom: 14px;
    }

    .page-title h1 {
        font-size: 17px;
    }

    /* Sadece sayfa başlığındaki ana aksiyon butonları tam genişlik olsun;
       tablo içi / modal / küçük butonlar satır içi kalsın (düzen bozulmasın) */
    .page-header > .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .page-header > .header-actions > .btn,
    .page-header > .header-actions > a.btn {
        width: 100%;
    }
    /* Tablo, modal ve küçük butonlar asla tam genişlik olmasın */
    .data-table .btn,
    td .btn,
    .btn-sm,
    .modal .btn,
    .notif-panel .btn {
        width: auto !important;
    }

    .card {
        padding: 12px;
    }
}

/* Çok Küçük Telefon Ekranları (400px altı) */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   GÜNLÜK OPERASYON FORMU & OCR UYARI SİSTEMİ STİLLERİ
   ========================================================================== */
.form-paper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #fff;
    border: 2px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-md);
}

.form-paper-header {
    grid-column: span 2;
    text-align: center;
    border-bottom: 2px solid #1e293b;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.form-paper-header h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #0f172a;
    text-transform: uppercase;
}

.form-paper-meta {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-top: 4px;
}

.form-paper-meta input {
    border: none;
    border-bottom: 1px dashed #64748b;
    padding: 2px 6px;
    font-weight: 700;
    outline: none;
    background: transparent;
}

/* Renkli Uyarı Hücreleri (Confidence Color Coding) */
.ocr-input {
    width: 100%;
    min-width: 46px;
    padding: 4px 4px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
    outline: none;
}

/* Sayı kutularındaki artır/azalt oklarını gizle (rakamlara tam yer aç) */
.ocr-input[type=number]::-webkit-outer-spin-button,
.ocr-input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ocr-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.ocr-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
    background-color: #fff !important;
}

/* High Confidence (>90%) */
.ocr-cell-success {
    background-color: #ecfdf5 !important;
    border: 1.5px solid #10b981 !important;
    color: #065f46 !important;
}

/* Medium Confidence (70-89%) */
.ocr-cell-warning {
    background-color: #fffbe6 !important;
    border: 1.5px solid #f59e0b !important;
    color: #b45309 !important;
}

/* Low Confidence / Unread / Missing (<70% veya Boş) */
.ocr-cell-danger {
    background-color: #fef2f2 !important;
    border: 2px solid #ef4444 !important;
    color: #991b1b !important;
    animation: dangerPulse 1.8s infinite;
}

@keyframes dangerPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ocr-summary-bar {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ocr-stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.closed-day-stamp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: 800;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ==========================================================================
   YAZDIRMA / PDF (Raporlama §4.8)
   ========================================================================== */
@media print {
    sidebar, #main-sidebar, header, .mobile-bottom-nav, .sidebar-backdrop,
    .no-print, .header-actions.no-print { display: none !important; }
    main { margin: 0 !important; }
    .content-wrapper, #main-content { padding: 0 !important; margin: 0 !important; }
    body { background: #fff !important; }
    .report-title-print { display: block !important; text-align: center; margin-bottom: 14px; }
    .report-title-print h2 { margin: 0; font-size: 18px; }
    .report-title-print p { margin: 4px 0 0; font-size: 12px; color: #555; }
    .card { break-inside: avoid; box-shadow: none !important; border: 1px solid #e2e8f0 !important; }
    .report-grid, .report-grid3 { grid-template-columns: 1fr 1fr !important; }
    canvas { max-height: 240px; }
    .page-header .page-title p { display: none; }
    @page { margin: 12mm; }
}

/* ==========================================================================
   GİRİŞ EKRANI (RBAC §5)
   ========================================================================== */
.login-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: linear-gradient(135deg, #b45309, #78350f);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
    background: #fff; border-radius: 18px; padding: 32px 28px; width: 100%; max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: center;
}
.login-logo {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 16px;
    background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.login-card h2 { margin: 6px 0 2px; font-size: 20px; color: #1e293b; }
.login-sub { margin: 0 0 18px; color: #64748b; font-size: 13px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin: 10px 0 4px; }
.login-card input {
    width: 100%; padding: 11px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: 15px; box-sizing: border-box; transition: border-color .15s;
}
.login-card input:focus { outline: none; border-color: #f59e0b; }
.login-error { color: #ef4444; font-size: 13px; margin-top: 10px; min-height: 18px; text-align: center; }
.login-hint { margin-top: 16px; font-size: 11px; color: #94a3b8; line-height: 1.5; }
.user-role-badge { text-transform: capitalize; }
/* Rol gizleme */
.nav-item.role-hidden, .bottom-nav-item.role-hidden { display: none !important; }

/* ==========================================================================
   BİLDİRİMLER (Çan / Stok uyarıları)
   ========================================================================== */
.notif-wrap { position: relative; }
.notif-bell {
    position: relative; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border, #e2e8f0); background: #fff; cursor: pointer;
    font-size: 17px; color: #475569; transition: background .15s;
}
.notif-bell:hover { background: #f8fafc; }
.notif-bell.has-alert { color: #b45309; }
.notif-bell.has-alert i { animation: bell-shake 1.4s ease-in-out infinite; transform-origin: top center; }
@keyframes bell-shake { 0%,92%,100% { transform: rotate(0); } 94% { transform: rotate(12deg); } 96% { transform: rotate(-10deg); } 98% { transform: rotate(6deg); } }
.notif-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff;
}
.notif-panel {
    position: absolute; top: 48px; right: 0; width: 340px; max-width: 90vw; max-height: 70vh; overflow: auto;
    background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18); padding: 8px; z-index: 1200; display: none;
}
.notif-panel.open { display: block; }
.notif-panel .notif-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; border-bottom: 1px solid #f1f5f9; }
.notif-panel .notif-head strong { font-size: 14px; color: #1e293b; }
.notif-item {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-radius: 8px; cursor: pointer;
    border-bottom: 1px solid #f8fafc;
}
.notif-item:hover { background: #f8fafc; }
.notif-item .ni-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.notif-item.level-danger .ni-icon { background: #fee2e2; color: #dc2626; }
.notif-item.level-warning .ni-icon { background: #fef3c7; color: #d97706; }
.notif-item .ni-body { flex: 1; min-width: 0; }
.notif-item .ni-title { font-size: 13px; font-weight: 600; color: #1e293b; }
.notif-item .ni-detail { font-size: 12px; color: #64748b; margin-top: 1px; }
.notif-empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 22px 8px; }
@media (max-width: 640px) { .notif-panel { position: fixed; top: 60px; right: 8px; left: 8px; width: auto; } }

/* ==========================================================================
   MOBİL / TABLET İNCE AYAR (tam responsive — telefon & tablet yönetimi)
   ========================================================================== */
@media (max-width: 820px) {
    /* Günlük operasyon "kağıt" formu tablette de tek sütun okunur */
    .form-paper-grid { grid-template-columns: 1fr; }
    .form-paper-header { grid-column: span 1; }
    /* Rapor ve genel 2'li/3'lü gridler tek sütuna insin */
    .report-grid, .report-grid3 { grid-template-columns: 1fr !important; }
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:1.15fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr 1fr"],
    div[style*="repeat(3,1fr)"],
    div[style*="repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
    /* Kasa mini giriş kutuları (4'lü) telefonda 2 sütun */
    div[style*="repeat(4,1fr)"],
    div[style*="repeat(4, 1fr)"] { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 640px) {
    /* Başlık + aksiyon dikey diz */
    .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .page-title h1 { font-size: 16px; }

    /* Modal neredeyse tam ekran, footer butonları sığsın */
    .modal { max-width: 100%; margin: 0 8px; border-radius: 16px; }
    .modal-body { max-height: 72vh; padding: 14px; }
    .modal-footer { flex-wrap: wrap; gap: 8px; }
    .modal-footer .btn { flex: 1 1 auto; min-width: 120px; }

    /* Tablolar: yatay kaydırma + dokunmatik ivme + biraz küçük font */
    .table-responsive { -webkit-overflow-scrolling: touch; }
    table.data-table { font-size: 12px; }
    table.data-table th, table.data-table td { padding: 8px 8px; }

    /* Tablo içi aksiyon butonları: satır içi, kaydırmasız, dokunulabilir */
    table.data-table td .btn.btn-sm {
        padding: 7px 9px; margin: 2px 1px; font-size: 12px;
    }
    table.data-table td .btn.btn-sm i { margin: 0; }

    /* Dokunmatik hedef: girişler ve butonlar en az ~42px yükseklik */
    .btn { min-height: 40px; }
    input, select, textarea { font-size: 16px; }  /* iOS zoom engeli */
    .ocr-input { font-size: 14px; min-height: 34px; }

    /* Reçete/veri modallarındaki mini inputlar taşmasın */
    .modal-body input[type="number"] { max-width: 100%; }

    /* Bildirim çanı ve durum kompakt */
    .notif-bell { width: 38px; height: 38px; }

    /* İçerik alt boşluğu (alt menü çakışmasın) */
    .content-wrapper { padding-bottom: 80px; }
}

/* Çok küçük telefonlar */
@media (max-width: 380px) {
    .date-badge input { max-width: 84px; }
    .brand-title p { display: none; }
    table.data-table th, table.data-table td { padding: 7px 6px; }
}

/* Yatay (landscape) küçük yükseklik: modal taşmasın */
@media (max-height: 520px) {
    .modal-body { max-height: 62vh; }
    .login-card { padding: 20px; }
}

/* ==========================================================================
   AKILLI REÇETE GİRİŞİ, TARİF & RAF ÖMRÜ STİLLERİ (Gelişmiş Tasarım)
   ========================================================================== */
.smart-recipe-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #faf7f2;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #e8dfd1;
    font-family: inherit;
}

.smart-recipe-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4eee3;
    border: 1px solid #e0d5c2;
    padding: 16px 20px;
    border-radius: 12px;
}
.smart-recipe-top-bar .recipe-sub {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #92400e;
    text-transform: uppercase;
}
.smart-recipe-top-bar h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1c1917;
    margin: 2px 0 0;
}
.smart-recipe-top-bar p {
    font-size: 12px;
    color: #78716c;
    margin-top: 2px;
}

.smart-recipe-import-card {
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1.2fr 180px;
    gap: 16px;
    align-items: center;
}
.smart-recipe-import-card .import-title {
    font-size: 10px;
    font-weight: 800;
    color: #a8a29e;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.smart-recipe-import-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #292524;
    margin: 2px 0;
}
.smart-recipe-import-card p {
    font-size: 11px;
    color: #78716c;
}
.smart-recipe-import-textarea {
    width: 100%;
    height: 72px;
    border: 2px dashed #f59e0b;
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    font-family: inherit;
    resize: none;
    outline: none;
    background: #fffbeb;
}
.btn-dark-green {
    background-color: #143626 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    transition: background-color 0.2s !important;
    cursor: pointer;
}
.btn-dark-green:hover {
    background-color: #0b2318 !important;
}

.smart-recipe-main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 18px;
    align-items: start;
}
.smart-recipe-form-card {
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    padding: 20px;
}

/* Reçete Sonuç Kartı (Koyu Yeşil Sidebar) */
.smart-recipe-result-card {
    background: #143626;
    color: #ffffff;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(20, 54, 38, 0.25);
    position: sticky;
    top: 20px;
}
.smart-recipe-result-card .res-header {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #86efac;
    text-transform: uppercase;
}
.smart-recipe-result-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}
.res-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.res-row span {
    color: #cbd5e1;
    font-weight: 500;
}
.res-row strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}
.res-unit-cost-box {
    background: #d97706;
    color: #ffffff;
    border-radius: 10px;
    padding: 14px;
    text-align: left;
    margin-top: 4px;
}
.res-unit-cost-box .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.9;
}
.res-unit-cost-box .val {
    font-size: 26px;
    font-weight: 900;
    margin-top: 2px;
}

.recipe-ai-insight {
    margin: -4px 0 16px;
    padding: 12px 14px;
    border: 1px solid #c4b5fd;
    border-radius: 9px;
    background: #f5f3ff;
    color: #4c1d95;
    font-size: 12px;
    line-height: 1.45;
}
.recipe-ai-insight p { margin: 5px 0; }
.recipe-ai-insight ul { margin: 5px 0 8px 18px; padding: 0; }
.recipe-ai-insight span { color: #6b7280; font-size: 11px; }

/* Referans reçete & maliyet çalışma ekranı */
.recipe-workspace-loading { padding: 48px; text-align: center; color: #64748b; }
.recipe-reference-page { min-height: calc(100vh - 120px); margin: -20px; background: #f7f8f5; color: #172019; }
.recipe-reference-toolbar { min-height: 72px; padding: 12px 24px; display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid #e6e9e3; }
.recipe-back { border: 0; background: transparent; color: #657063; font-weight: 700; cursor: pointer; font-size: 12px; }
.recipe-brand { display: flex; gap: 8px; align-items: center; min-width: 150px; }
.recipe-brand > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #183d27; color: #fff; font-weight: 900; font-size: 18px; }
.recipe-brand strong, .recipe-brand small { display: block; }.recipe-brand strong { font-size: 14px; }.recipe-brand small { font-size: 9px; color: #788178; letter-spacing: .7px; font-weight: 800; }
.recipe-saved-select { flex: 1; max-width: 350px; border: 1px solid #d8ddd6; border-radius: 8px; padding: 10px; color: #283328; background: #fbfcfa; }
.recipe-reference-tabs { display: flex; gap: 20px; padding: 0 32px; background: #fff; border-bottom: 1px solid #e6e9e3; }
.recipe-reference-tabs button { padding: 14px 0 11px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #6f776e; font-size: 12px; font-weight: 800; cursor: pointer; }.recipe-reference-tabs button.active { color: #173e28; border-bottom-color: #d99018; }
.recipe-reference-content { position: relative; max-width: 1180px; margin: auto; padding: 32px 350px 45px 32px; }
.recipe-reference-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }.recipe-reference-head span { color: #a16a14; font-size: 10px; font-weight: 900; letter-spacing: 1px; }.recipe-reference-head h1 { margin: 4px 0; font-size: 29px; color: #1b241c; }.recipe-reference-head p { margin: 0; color: #778076; font-size: 13px; }.recipe-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.recipe-reference-fields { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 12px; margin: 28px 0 14px; }.recipe-reference-fields label, .recipe-method-card label { font-size: 11px; font-weight: 800; color: #657063; }.recipe-reference-fields input, .recipe-reference-fields select { display: block; box-sizing: border-box; width: 100%; margin-top: 5px; padding: 10px; border: 1px solid #d9dfd8; border-radius: 7px; background: #fff; color: #29332a; }
.recipe-reference-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #e2e7df; border-radius: 10px; overflow: hidden; background: #fff; }.recipe-reference-stats div { padding: 15px; border-right: 1px solid #e2e7df; }.recipe-reference-stats div:last-child { border: 0; }.recipe-reference-stats small { display: block; color: #879086; font-size: 9px; font-weight: 900; letter-spacing: .6px; }.recipe-reference-stats strong { display: block; margin-top: 5px; color: #1e3827; font-size: 18px; }
.recipe-manual-yield { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 15px; border: 1px solid #cae2cf; border-radius: 9px; background: #f2faf3; }.recipe-manual-yield strong, .recipe-manual-yield span { display: block; }.recipe-manual-yield span { font-size: 11px; color: #677268; }.recipe-manual-yield input { width: 95px; margin-left: auto; border: 1px solid #9fc5a7; border-radius: 7px; padding: 8px; font-weight: 800; text-align: center; }.recipe-manual-yield > span { font-weight: 800; }
.recipe-paste-row { margin: 16px 0; display: flex; gap: 10px; align-items: stretch; }.recipe-paste-row textarea { flex: 1; min-height: 62px; padding: 10px; border: 1px dashed #d39b35; border-radius: 8px; background: #fffcf4; font: inherit; font-size: 12px; }
.recipe-parse-warning { margin: -6px 0 16px; padding: 10px 12px; border: 1px solid #f2c97d; border-radius: 8px; background: #fff8e9; color: #8a5a0a; font-size: 12px; }.recipe-stock-note { padding: 10px 22px; background: #f4f8f2; color: #426149; font-size: 12px; border-bottom: 1px solid #e3ebe1; }.recipe-stock-note i { margin-right: 5px; }.recipe-stock-ok { color: #23613c !important; font-weight: 700; }.recipe-stock-short { color: #b42318 !important; font-weight: 800; }.recipe-stock-short small { display: block; margin-top: 3px; font-weight: 600; }.recipe-auto-overhead { display: flex; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid #d9e6d8; border-radius: 8px; background: #f7fbf6; color: #49614d; font-size: 12px; }.recipe-auto-overhead span { padding-right: 10px; border-right: 1px solid #d9e6d8; }.recipe-auto-overhead span:last-child { border: 0; }
.recipe-stock-created { margin: -6px 0 16px; padding: 10px 12px; border: 1px solid #b7dfc0; border-radius: 8px; background: #f0fbf3; color: #25633a; font-size: 12px; }
.recipe-ingredients-card, .recipe-method-card { padding: 20px; border: 1px solid #e0e6dc; border-radius: 12px; background: #fff; }.recipe-ingredients-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }.recipe-ingredients-title h2 { margin: 0; font-size: 20px; }.recipe-ingredients-title p { margin: 3px 0 0; font-size: 11px; color: #788178; }
.recipe-reference-table { width: 100%; border-collapse: collapse; font-size: 12px; }.recipe-reference-table th { padding: 10px; text-align: left; color: #818a80; font-size: 10px; letter-spacing: .5px; border-bottom: 1px solid #e6ebe4; }.recipe-reference-table td { padding: 9px 10px; border-bottom: 1px solid #edf0eb; }.recipe-reference-table select, .recipe-reference-table input { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid #dce3d9; border-radius: 6px; background: #fff; }.recipe-reference-table tfoot { background: #f4f8f2; color: #1b4529; font-weight: 900; }.recipe-line-remove { border: 0; background: #fff1f1; color: #bd3030; border-radius: 5px; width: 24px; height: 24px; cursor: pointer; font-size: 18px; }.recipe-empty { text-align: center; color: #8b9489; padding: 24px !important; }
.recipe-ingredients-card { padding: 0; overflow: hidden; border-color: #d9dfd7; box-shadow: 0 10px 18px rgba(36, 56, 40, .05); }.recipe-ingredients-title { margin: 0; padding: 20px 22px; border-bottom: 1px solid #e7ebe5; }.recipe-ingredients-title h2 { font-size: 19px; }.recipe-reference-table { font-size: 14px; }.recipe-reference-table th { padding: 12px 22px; background: #f9faf8; color: #747d73; font-size: 11px; }.recipe-reference-table th:first-child { width: 42%; }.recipe-reference-table th:nth-child(2) { width: 21%; }.recipe-reference-table th:nth-child(3) { width: 17%; }.recipe-reference-table th:nth-child(4) { width: 17%; text-align: right; }.recipe-reference-table td { padding: 12px 22px; }.recipe-reference-table td:nth-child(4) { text-align: right; color: #102b1b; font-size: 16px; }.recipe-reference-table select, .recipe-reference-table input { height: 54px; padding: 10px 18px; border-color: #d6ddd4; border-radius: 10px; font-size: 16px; }.recipe-reference-table td:nth-child(3) select { min-width: 120px; }.recipe-reference-table tfoot td { padding: 14px 22px; }.recipe-line-remove { width: 40px; height: 38px; border-radius: 10px; background: #f6f3ef; color: #a75848; }.recipe-ingredients-title .btn { color: #164c2c; background: transparent !important; padding: 7px 0 !important; }
.recipe-reference-table th:first-child { width: 32%; }.recipe-reference-table th:nth-child(2) { width: 15%; }.recipe-reference-table th:nth-child(3) { width: 14%; }.recipe-reference-table th:nth-child(4) { width: 16%; text-align: left; }.recipe-reference-table th:nth-child(5) { width: 17%; text-align: right; }.recipe-reference-table td:nth-child(5) { text-align: right; color: #102b1b; font-size: 16px; }
.recipe-method-card { margin-top: 16px; }.recipe-method-card textarea { display: block; box-sizing: border-box; width: 100%; min-height: 100px; margin-top: 7px; border: 1px solid #dce3d9; border-radius: 7px; padding: 10px; resize: vertical; font: inherit; }
.recipe-reference-result { position: absolute; top: 32px; right: 32px; width: 280px; box-sizing: border-box; padding: 22px; border-radius: 13px; background: #173e28; color: #fff; box-shadow: 0 12px 26px rgba(16, 57, 35, .2); }.recipe-reference-result > small { color: #a6d9a9; font-size: 10px; font-weight: 900; letter-spacing: .8px; }.recipe-reference-result h2 { margin: 9px 0 18px; font-size: 20px; }.recipe-reference-result > div { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.15); font-size: 12px; }.recipe-reference-result > div span { color: #d2ddd4; }.recipe-reference-result .recipe-result-cost { display: block; margin-top: 15px; padding: 14px; border: 0; border-radius: 9px; background: #d58310; }.recipe-result-cost small, .recipe-result-cost strong { display: block; }.recipe-result-cost strong { margin-top: 4px; font-size: 28px; }.recipe-reference-result p { color: #c4d2c7; font-size: 11px; line-height: 1.5; }
@media (max-width: 1100px) { .recipe-reference-content { padding-right: 32px; }.recipe-reference-result { position: static; width: 100%; margin-top: 16px; }.recipe-reference-page { margin: -14px; } }
@media (max-width: 760px) { .recipe-reference-toolbar { padding: 10px; flex-wrap: wrap; }.recipe-saved-select { order: 4; min-width: 100%; max-width: none; }.recipe-reference-tabs { padding: 0 14px; gap: 12px; overflow-x: auto; }.recipe-reference-content { padding: 20px 12px; }.recipe-reference-head { display: block; }.recipe-head-actions { margin-top: 12px; }.recipe-reference-fields, .recipe-reference-stats { grid-template-columns: repeat(2, 1fr); }.recipe-reference-stats div:nth-child(2) { border-right: 0; }.recipe-reference-stats div:nth-child(-n+2) { border-bottom: 1px solid #e2e7df; }.recipe-paste-row { display: block; }.recipe-paste-row button { width: 100%; margin-top: 8px; }.recipe-manual-yield { flex-wrap: wrap; }.recipe-manual-yield input { margin-left: 0; } }

/* Raf ömrü rozeti */
.shelf-life-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Reçete Editörü Mobil & Tablet Duyarlılık (Responsive) */
@media (max-width: 900px) {
    .modal.modal-xl {
        width: 98vw !important;
        max-width: 98vw !important;
        margin: 4px auto !important;
    }
    .smart-recipe-import-card {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 14px !important;
    }
    .smart-recipe-main-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .smart-recipe-top-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        text-align: center !important;
        padding: 12px !important;
    }
    .smart-recipe-top-bar .btn {
        width: 100% !important;
    }
    .smart-recipe-result-card {
        position: static !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 600px) {
    .smart-recipe-wrapper {
        padding: 8px !important;
        gap: 10px !important;
    }
    .smart-recipe-form-card {
        padding: 10px !important;
    }
    .smart-recipe-import-textarea {
        height: 80px !important;
    }
}


/* ===== Günlük Operasyon Formu (basılı A4 form düzeni) ===== */
.form-grup-sutun { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.form-grup-tablo th.form-grup-baslik {
    background: #1e293b; color: #fff; text-align: left; font-size: 11px; font-weight: 800;
    letter-spacing: .5px; padding: 5px 8px;
}
.form-grup-tablo thead tr:nth-child(2) th { font-size: 10px; text-align: center; }
.form-grup-tablo thead tr:nth-child(2) th:first-child { text-align: left; }
.fiyat-hassas { font-variant-numeric: tabular-nums; }
.islem-onizleme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.islem-onizleme > div { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; background: #f8fafc; }
.islem-onizleme small { display: block; font-size: 10px; font-weight: 800; color: #64748b; letter-spacing: .3px; }
.islem-onizleme strong { font-size: 15px; }
@media (max-width: 720px) { .islem-onizleme { grid-template-columns: 1fr; } }
/* Uyarı kutuları (sistem genelinde "alert" sınıfı kullanılıyordu ama tanımlı değildi) */
.alert { padding: 9px 12px; border-radius: 8px; border: 1px solid transparent; line-height: 1.5; }
.alert-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.alert-danger  { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }
/* Verim kutusundaki uyarı metinleri satır içi akmalı (başlık strong'u blok kalır) */
.recipe-manual-yield div[style] strong, .recipe-manual-yield div[style] span { display: inline; }
.recipe-manual-yield .badge { display: inline-block !important; }

/* Ürün Yönetimi — kompakt tablo (tek ekrana sığar) */
table.data-table.urun-tablo th, table.data-table.urun-tablo td { padding: 7px 8px; vertical-align: middle; }
table.data-table.urun-tablo td { font-size: 13px; }
table.data-table.urun-tablo .urun-meta { font-size: 11px; color: #64748b; margin-top: 2px; white-space: nowrap; }
table.data-table.urun-tablo td small { font-size: 11px; }
table.data-table.urun-tablo .urun-islem { white-space: nowrap; }
table.data-table.urun-tablo .urun-islem .btn.btn-sm { padding: 5px 8px; margin: 1px; }
