@import url('colors.css');

body { margin: 0; padding: 0; background-color: var(--bg-primary); color: var(--text-primary); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: block; }

/* SADECE ANA MENÜ İÇİN */
.admin-index-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.admin-menu-container { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; max-width: 800px; padding: 20px; }
.admin-menu-btn { background-color: var(--card-bg); border: 3px solid var(--border-light); border-radius: 20px; width: 180px; height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-decoration: none; color: var(--text-primary); transition: all 0.3s ease; box-shadow: 0 4px 10px var(--card-shadow); gap: 15px; }
.admin-menu-btn:hover { transform: translateY(-5px); border-color: var(--btn-primary-bg); box-shadow: 0 10px 25px rgba(184, 115, 51, 0.2); }
.admin-menu-btn svg { width: 60px; height: 60px; stroke: var(--btn-primary-bg); stroke-width: 1.5; fill: none; transition: 0.3s; }
.admin-menu-btn:hover svg { stroke: var(--btn-primary-hover); transform: scale(1.05); }
.admin-menu-btn span { font-size: 16px; font-weight: 800; }

/* =========================================
   ÜRÜN EKLEME / YÖNETİM PANELLERİ
========================================= */
.admin-header { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; width: 100%; box-sizing: border-box; margin: 0 auto 25px auto; padding: 15px 30px; background-color: var(--navbar-bg); border-bottom: 2px solid var(--border-medium); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px var(--card-shadow); }
.back-btn { background: var(--btn-secondary-bg); border: 2px solid var(--border-medium); border-radius: 10px; width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.2s; }
.back-btn:hover { border-color: var(--btn-primary-bg); background: var(--btn-secondary-hover-bg); }
.back-btn svg { width: 24px; height: 24px; stroke: var(--text-primary); }

.header-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.action-btn { font-weight: bold; padding: 12px 18px; border: 2px solid var(--btn-primary-active); background-color: var(--btn-primary-bg); color: var(--btn-primary-text); border-radius: 10px; cursor: pointer; font-size: 14px; transition: all 0.2s; box-shadow: 0 4px 8px rgba(184, 115, 51, 0.2); }
.action-btn:hover { background-color: var(--btn-primary-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(184, 115, 51, 0.3); }

.outline-btn { background-color: var(--btn-secondary-bg); color: var(--btn-secondary-text); border: 2px solid var(--btn-secondary-border); box-shadow: none; border-radius: 10px; font-weight: bold; cursor: pointer; transition: 0.2s;}
.outline-btn:hover { background-color: var(--btn-secondary-hover-bg); transform: none; box-shadow: none; }

.danger-btn { background-color: var(--btn-danger-bg); border-color: var(--btn-danger-hover); color: var(--btn-danger-text); }
.danger-btn:hover { background-color: var(--btn-danger-hover); box-shadow: 0 6px 15px rgba(214, 69, 69, 0.3); }

.admin-container { display: flex; gap: 30px; max-width: 1400px; margin: 0 auto; padding: 0 30px 40px 30px; align-items: flex-start; }
.left-panel { flex: 1; background-color: var(--card-bg); border-radius: 15px; padding: 25px; box-shadow: 0 6px 20px var(--card-shadow); border: 2px solid var(--border-light); }
.right-panel { flex: 2.5; background-color: var(--card-bg); border-radius: 15px; padding: 25px; box-shadow: 0 6px 20px var(--card-shadow); border: 2px solid var(--border-light); }

.input-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 25px; }
.form-input, .form-select { flex: 1; min-width: 120px; padding: 12px; border: 2px solid var(--input-border); border-radius: 10px; font-size: 14px; color: var(--text-primary); background-color: var(--input-bg); outline: none; transition: border-color 0.2s; font-weight: 500; }
.form-input:focus, .form-select:focus { border-color: var(--input-border-focus); box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.1); }

.item-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.item-list li { display: flex; justify-content: space-between; align-items: center; border: 2px solid var(--border-medium); border-radius: 10px; padding: 12px 18px; font-weight: bold; background: var(--bg-secondary); }

.product-group { margin-bottom: 25px; }
.product-group-title { background-color: var(--bg-secondary); padding: 10px 18px; border-radius: 10px; font-weight: 900; margin-bottom: 12px; color: var(--text-primary); border-left: 4px solid var(--btn-primary-bg); }
.product-row { display: flex; align-items: center; gap: 15px; padding: 15px; border-bottom: 2px solid var(--border-light); flex-wrap: wrap; transition: background 0.2s; }
.product-row:hover { background: var(--bg-secondary); border-radius: 10px; border-bottom-color: transparent; }
.product-row:last-child { border-bottom: none; }

.img-wrapper { width: 55px; height: 55px; border: 2px solid var(--border-medium); border-radius: 10px; overflow: hidden; cursor: pointer; background: white;}
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.image-source-wrap { position: relative; flex-shrink: 0; }
.image-url-link-btn { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1px solid var(--border-medium); background: var(--btn-primary-bg); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,0.2); z-index: 2; }
.image-url-link-btn:hover { transform: scale(1.08); }
.inline-input { border: none; background: transparent; font-size: 14px; color: var(--text-primary); outline: none; border-bottom: 2px solid transparent; padding: 6px 0; font-weight: bold;}
.inline-input:focus { border-bottom-color: var(--input-border-focus); }
.trash-btn { background: none; border: none; color: var(--btn-danger-bg); cursor: pointer; font-size: 20px; padding: 5px; transition: transform 0.2s; }
.trash-btn:hover { transform: scale(1.1); }
.hidden { display: none !important; }

/* Modallar */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--overlay); z-index: 2000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-content { background: var(--card-bg); width: 90%; max-width: 500px; border-radius: 20px; padding: 30px; border: 2px solid var(--border-medium); box-shadow: 0 10px 40px rgba(0,0,0,0.2); max-height: 90vh; overflow-y: auto; position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border-light); padding-bottom: 15px; margin-bottom: 20px; }
.modal-header h3 { margin: 0; color: var(--text-primary); font-weight: 900; }
.modal-close-btn { position: absolute; top: 15px; right: 15px; background: var(--bg-secondary); border: none; border-radius: 50%; width: 35px; height: 35px; font-weight: bold; font-size: 16px; color: var(--text-secondary); cursor: pointer; display: flex; justify-content: center; align-items: center; z-index: 10; transition: 0.2s;}
.modal-close-btn:hover { background: var(--btn-danger-bg); color: var(--btn-danger-text); }

/* =========================================
   GEÇMİŞ SİPARİŞLER (Hesabım tasarımıyla eşlendi)
========================================= */
.order-list { display: flex; flex-direction: column; gap: 20px; margin-top: 15px; }
.order-card { border: 2px solid var(--border-medium); border-radius: 15px; background: var(--card-bg); overflow: hidden; box-shadow: 0 4px 15px var(--card-shadow); transition: border-color 0.2s; }
.order-card:hover { border-color: var(--btn-primary-bg); }
.order-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 2px solid var(--border-light); background: var(--bg-secondary); flex-wrap: wrap; gap: 15px; }
.order-header-col { display: flex; flex-direction: column; }
.order-header-label { font-size: 12px; color: var(--text-secondary); font-weight: bold; text-transform: uppercase; }
.order-header-val { font-size: 15px; font-weight: 800; color: var(--text-primary); margin-top: 4px; }
.order-buttons { display: flex; gap: 12px; align-items: center; }
.order-detail-btn { background: var(--card-bg); border: 2px solid var(--border-medium); border-radius: 10px; padding: 8px 18px; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 14px; color: var(--text-primary); }
.order-detail-btn:hover { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-bg); }
.upload-invoice-btn { background: var(--success-bg); color: var(--success-text); border: 2px solid var(--success-border); border-radius: 10px; padding: 8px 18px; font-weight: bold; cursor: pointer; font-size: 14px; transition: 0.2s; }
.upload-invoice-btn:hover { background: var(--success-text); color: var(--card-bg); }

.order-body { display: flex; justify-content: space-between; align-items: center; padding: 20px; flex-wrap: wrap; gap: 20px; }
.order-imgs { display: flex; gap: 12px; }
.order-img-box { width: 60px; height: 60px; border: 1px solid var(--border-medium); border-radius: 10px; object-fit: cover; background: white;}
.order-statuses { display: flex; gap: 20px; align-items: center; }
.order-status-col { display: flex; flex-direction: column; }
.order-status-label { font-size: 12px; color: var(--text-secondary); font-weight: bold; }
.order-status-val { font-size: 14px; font-weight: 800; color: var(--text-primary); }
.status-select { padding: 8px 12px; border: 2px solid var(--border-medium); border-radius: 10px; font-weight: bold; outline: none; background: var(--input-bg); color: var(--text-primary); font-family: inherit; font-size: 14px; cursor: pointer; transition: 0.2s; }
.status-select:focus { border-color: var(--input-border-focus); box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.1); }
.order-cancelled-text { color: var(--error-text) !important; background: var(--error-bg); padding: 4px 10px; border-radius: 6px; border: 1px solid var(--error-border); display: inline-block; margin-top: 5px; }

/* Sipariş Detay Modal */
.order-detail-modal-content { max-width: 900px; width: 95%; background: var(--bg-primary); }
.order-detail-layout { display: flex; gap: 25px; align-items: flex-start; margin-top: 20px; flex-wrap: wrap;}
.order-detail-left { flex: 1.5; min-width: 320px; border: 2px solid var(--border-medium); border-radius: 15px; padding: 20px; background: var(--card-bg); display: flex; flex-direction: column; gap: 15px; box-shadow: 0 4px 15px var(--card-shadow); }
.order-detail-right { flex: 1; min-width: 250px; display: flex; flex-direction: column; gap: 25px; }
.info-box { border: 2px solid var(--border-medium); border-radius: 15px; padding: 20px; background: var(--bg-secondary); }
.od-item { border: 1px solid var(--border-light); border-radius: 12px; padding: 15px; display: flex; align-items: center; gap: 15px; background: var(--card-bg); flex-wrap: wrap;}
.od-item-img { width: 60px; height: 60px; border: 1px solid var(--border-medium); border-radius: 8px; object-fit: cover;}
.od-item-info { flex: 1; min-width: 120px; }
.od-item-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; color: var(--text-primary); }
.od-item-net { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.od-item-gross { font-size: 17px; font-weight: 900; color: var(--price-discounted); }
.od-stepper-area { display: flex; gap: 15px; }
.od-stepper-col { display: flex; flex-direction: column; align-items: center; background: var(--bg-secondary); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-medium); }
.od-stepper-col span { font-size: 11px; font-weight: bold; color: var(--text-secondary); }
.od-stepper-col strong { font-size: 14px; margin-top: 4px; color: var(--text-primary); }
.od-total-box { align-self: flex-end; text-align: right; padding-top: 15px; border-top: 2px dashed var(--border-medium); width: 100%; margin-top: 15px;}
.od-total-title { font-size: 20px; font-weight: 900; color: var(--text-primary); }
.od-total-net { font-size: 14px; color: var(--text-secondary); margin: 5px 0; font-weight: bold; }
.od-total-gross { font-size: 26px; font-weight: 900; color: var(--price-discounted); }

/* --- GÜNLÜK CİRO PENCERESİ (BANNER) --- */
.daily-summary-banner { background-color: var(--btn-primary-bg); color: var(--btn-primary-text); padding: 15px 25px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; margin-top: 30px; box-shadow: 0 4px 12px rgba(184, 115, 51, 0.3); border: 2px solid var(--btn-primary-active); }
.daily-summary-banner:first-child { margin-top: 0; }
.daily-date { font-size: 18px; font-weight: 900; letter-spacing: 0.5px; }
.daily-totals { display: flex; gap: 20px; font-size: 15px; font-weight: bold; }
.daily-net { color: var(--bg-secondary); }
.daily-gross { color: #ffe6a0; font-weight: 900; font-size: 17px; }

/* --- YENİ EŞİTLENMİŞ ALT FİLTRE VE CİRO BARI --- */
.admin-bottom-bar { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--bg-secondary); border-top: 4px solid var(--btn-primary-bg); display: flex; justify-content: flex-end; align-items: center; padding: 18px 40px; box-sizing: border-box; z-index: 1000; gap: 25px; box-shadow: 0 -5px 20px var(--card-shadow); }
.filter-section { margin-right: auto; }
.filter-section select { background-color: var(--input-bg); color: var(--text-primary); border: 2px solid var(--input-border); padding: 12px 20px; border-radius: 10px; font-size: 15px; font-weight: bold; outline: none; cursor: pointer; transition: 0.2s; }
.filter-section select:hover { border-color: var(--input-border-focus); }
.grand-total-section { display: flex; align-items: center; gap: 30px; }
#bottom-net-total { color: var(--text-secondary); font-family: "Times New Roman", Times, serif; font-size: 18px; font-style: italic; font-weight: bold; }
#bottom-gross-total { color: var(--price-discounted); font-family: "Times New Roman", Times, serif; font-weight: 900; font-size: 26px; letter-spacing: 1px; }

@media (max-width: 768px) {
    .admin-header { position: sticky; top: 0; z-index: 1000; flex-direction: column; gap: 15px; padding: 15px; }
    .header-actions { justify-content: center; width: 100%; }
    .admin-container { flex-direction: column; padding: 0 15px 40px 15px; gap: 20px; }
    .left-panel, .right-panel { width: 100%; box-sizing: border-box; }
    
    .daily-summary-banner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 15px; }
    .daily-totals { flex-direction: column; gap: 5px; }
    
    .admin-bottom-bar { flex-direction: column; justify-content: center; gap: 15px; padding: 15px; border-top-width: 3px; }
    .filter-section { margin-right: 0; width: 100%; }
    .filter-section select { width: 100%; }
    .grand-total-section { width: 100%; justify-content: space-between; }
    #bottom-net-total { font-size: 16px; }
    #bottom-gross-total { font-size: 20px; }
}

/* Scroll Top Button */
.scroll-top-btn { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%; background: #fff; color: #111; border: 1px solid var(--border-medium); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 9999; }
.scroll-top-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.scroll-top-btn:hover { transform: translateY(-5px); background: var(--bg-secondary); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.scroll-top-btn.hidden { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(20px); }
