/* ─── BizimEsnaf Global Styles ─── */
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css');

*, *::before, *::after { box-sizing: border-box; }

:root {
    --be-green:      #3B6D11;
    --be-green-lt:   #EAF3DE;
    --be-green-mid:  #639922;
    --be-amber:      #854F0B;
    --be-amber-lt:   #FAEEDA;
    --be-blue:       #185FA5;
    --be-blue-lt:    #E6F1FB;
    --be-red:        #A32D2D;
    --be-red-lt:     #FCEBEB;
    --be-gray:       #5F5E5A;
    --be-gray-lt:    #F1EFE8;
    --be-border:     rgba(0,0,0,0.1);
    --be-radius:     10px;
    --be-bg:         #f8f8f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    color: #1a1a1a;
    background: var(--be-bg);
}

/* ── TYPOGRAPHY ── */
h1 { font-size: 20px; font-weight: 500; margin: 0; }
h2 { font-size: 16px; font-weight: 500; margin: 0; }
a  { color: var(--be-green); text-decoration: none; }
a:hover { text-decoration: underline; }

.m-card-kart {
    padding: 0 12px 10px;
    overflow: hidden;
}

.m-kart-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    display: block;
}
/* ── BUTTONS ── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; background: var(--be-green); color: #fff;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary.btn-full { width: 100%; justify-content: center; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; background: transparent; color: var(--be-gray);
    border: 0.5px solid var(--be-border); border-radius: 8px; font-size: 13px;
    cursor: pointer;
}
.btn-ghost:hover { background: var(--be-gray-lt); }
.btn-mini {
    font-size: 11px; padding: 2px 8px; border-radius: 6px;
    border: 0.5px solid var(--be-border); background: #fff;
    cursor: pointer; margin-left: 6px;
}

/* ── ICON BUTTONS ── */
.icon-btn {
    width: 30px; height: 30px; border-radius: 8px;
    border: 0.5px solid var(--be-border); background: var(--be-gray-lt);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--be-gray); font-size: 15px;
}
.icon-btn:hover { background: #e5e5e2; }
.icon-btn.danger, .danger-sm { color: var(--be-red); }
.icon-btn-sm { all: unset; cursor: pointer; color: var(--be-gray); font-size: 15px; padding: 2px; }
.icon-btn-sm.danger { color: var(--be-red); }

/* ── BADGES ── */
.badge {
    display: inline-block; font-size: 11px;
    padding: 2px 8px; border-radius: 20px; font-weight: 500;
}
.badge-green { background: var(--be-green-lt); color: var(--be-green); }
.badge-blue  { background: var(--be-blue-lt);  color: var(--be-blue);  }
.badge-amber { background: var(--be-amber-lt); color: var(--be-amber); }
.badge-red   { background: var(--be-red-lt);   color: var(--be-red);   }
.badge-gray  { background: var(--be-gray-lt);  color: var(--be-gray);  }

/* ── ALERTS ── */
.alert-error {
    background: var(--be-red-lt); color: var(--be-red);
    border: 0.5px solid #f7c1c1; border-radius: 8px;
    padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}

/* ── PAGE HEADER ── */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
}
.page-title { font-size: 20px; font-weight: 500; }
.page-sub   { font-size: 13px; color: #888; margin-top: 2px; }

/* ── FORM ELEMENTS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 24px 24px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.form-card {
    background: #fff; border: 0.5px solid var(--be-border);
    border-radius: 12px; padding: 18px 20px;
}
.form-card-title {
    font-size: 13px; font-weight: 500; color: #888;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 14px;
}
.field { margin-bottom: 12px; }
.field label, label { font-size: 12px; color: #666; display: block; margin-bottom: 4px; }
.field input, .field textarea, .field select,
input[type="text"], input[type="number"], input[type="date"],
input[type="password"], textarea, select {
    width: 100%; padding: 8px 10px;
    border: 0.5px solid #ddd; border-radius: 8px;
    font-size: 14px; background: #fff; color: #1a1a1a;
    outline: none; transition: border-color 0.15s;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--be-green-mid); }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkbox-field label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.form-section-title { margin-bottom: 10px; }

/* ── STAT CARDS ── */
.stats-row {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 10px; padding: 0 24px 16px;
}
@media (max-width: 600px) { .stats-row { grid-template-columns: 1fr 1fr; } }
.stat-card { background: #fff; border-radius: 10px; padding: 12px 14px; border: 0.5px solid var(--be-border); }
.stat-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.stat-val { font-size: 22px; font-weight: 500; }
.stat-val.green  { color: var(--be-green); }
.stat-val.amber  { color: var(--be-amber); }

/* ── FILTER BAR ── */
.filter-bar {
    display: flex; gap: 8px; padding: 0 24px 16px; flex-wrap: wrap;
}
.filter-input {
    flex: 1; min-width: 160px; padding: 8px 12px;
    border: 0.5px solid #ddd; border-radius: 8px; font-size: 13px;
}
.filter-select {
    padding: 8px 10px; border: 0.5px solid #ddd; border-radius: 8px;
    font-size: 13px; background: #fff;
}

/* ── ESNAF CARDS (admin) ── */
.esnaf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 12px; padding: 0 24px 24px; }
.esnaf-card { background: #fff; border: 0.5px solid var(--be-border); border-radius: 12px; overflow: hidden; }
.card-body { padding: 14px 16px; }
.card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.logo-circle { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 500; flex-shrink: 0; }
.card-title { font-size: 14px; font-weight: 500; }
.card-sub { font-size: 12px; color: #888; margin-top: 2px; }
.card-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.card-footer { border-top: 0.5px solid var(--be-border); padding: 8px 16px; display: flex; gap: 6px; justify-content: flex-end; }

/* ── ÖDEME LİSTESİ ── */
.odeme-list { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.odeme-item { background: #fff; border: 0.5px solid var(--be-border); border-radius: 12px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; }
.odeme-left { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.odeme-blok { display: flex; align-items: flex-start; gap: 10px; }
.odeme-blok-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.odeme-blok-icon.aidat  { background: var(--be-green-lt); color: var(--be-green); }
.odeme-blok-icon.reklam { background: var(--be-blue-lt);  color: var(--be-blue);  }
.odeme-type { font-size: 13px; font-weight: 500; }
.odeme-dates { font-size: 12px; color: #888; }
.odeme-tutar { font-size: 14px; font-weight: 500; margin-left: auto; }
.aidat-clr { color: var(--be-green); }
.reklam-clr { color: var(--be-blue); }
.odeme-not { font-size: 12px; color: #888; padding: 4px 8px; background: var(--be-gray-lt); border-radius: 6px; }

/* ── OZELLIK FORMU ── */
.ozellik-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.ozellik-key-input { flex: 1; }
.ozellik-val-input { flex: 2; }

/* ── MODAL (müşteri) ── */
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; padding-bottom: 24px; }
.modal-handle { width: 36px; height: 4px; background: #ddd; border-radius: 2px; margin: 10px auto 14px; }
.modal-header { padding: 0 16px 14px; border-bottom: 0.5px solid #eee; }
.modal-logo { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 500; margin-bottom: 10px; }
.modal-name { font-size: 17px; font-weight: 500; }
.modal-cat  { font-size: 13px; color: #888; margin-top: 2px; }
.modal-body { padding: 12px 16px; }
.modal-row  { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid #f0f0f0; font-size: 14px; }
.modal-row:last-child { border: none; }
.modal-row i { font-size: 18px; color: #aaa; width: 20px; }
.modal-section { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 6px; }
.ozellik-row-modal { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 0.5px solid #f0f0f0; font-size: 13px; }
.ozellik-k { color: #888; }
.ozellik-v { font-weight: 500; }
.social-row { display: flex; gap: 8px; }
.social-btn { flex: 1; padding: 8px; border: 0.5px solid #ddd; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: #555; text-decoration: none; background: #f9f9f7; }

/* ── ÖDEME FORMU (slide panel) ── */
.odeme-form-panel { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 480px; padding-bottom: 24px; }
.form-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 0.5px solid #eee; }
.form-panel-body { padding: 16px 20px; }

/* ── MÜŞTERİ EKRANI ── */
.m-header { background: #27500A; padding: 24px 16px 44px; }
.m-breadcrumb { font-size: 12px; color: #97C459; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.m-title { font-size: 22px; font-weight: 500; color: #fff; margin: 0; }
.m-subtitle { font-size: 13px; color: #97C459; margin-top: 4px; }
.m-search-wrap { padding: 0 12px; margin-top: -22px; position: relative; z-index: 2; margin-bottom: 14px; }
.m-search { background: #fff; border: 0.5px solid #e0e0e0; border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.m-search input { border: none; outline: none; background: transparent; font-size: 14px; width: 100%; }
.m-search i { color: #aaa; font-size: 18px; }
.m-cats { display: flex; gap: 8px; padding: 0 12px 12px; overflow-x: auto; scrollbar-width: none; }
.m-cats::-webkit-scrollbar { display: none; }
.m-cat { padding: 6px 14px; border-radius: 20px; font-size: 12px; white-space: nowrap; border: 0.5px solid #ddd; background: #fff; color: #666; cursor: pointer; flex-shrink: 0; }
.m-cat.active { background: var(--be-green-lt); border-color: #97C459; color: var(--be-green); }
.m-count { font-size: 12px; color: #aaa; padding: 0 12px 10px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; padding: 0 12px 20px; }
.m-card { background: #fff; border: 0.5px solid var(--be-border); border-radius: 12px; overflow: hidden; cursor: pointer; }
.m-card-top { padding: 14px 12px 10px; }
.m-logo { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.m-name { font-size: 13px; font-weight: 500; line-height: 1.3; }
.m-cat-label { font-size: 11px; color: #888; }
.m-card-actions { border-top: 0.5px solid #f0f0f0; display: grid; grid-template-columns: 1fr 1fr; }
.m-action { padding: 8px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: #666; cursor: pointer; border: none; background: transparent; text-decoration: none; }
.m-action:first-child { border-right: 0.5px solid #f0f0f0; }
.m-action i { font-size: 14px; }

/* ── LOGIN ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border: 0.5px solid var(--be-border); border-radius: 14px; padding: 32px 28px; width: 100%; max-width: 340px; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-icon { width: 48px; height: 48px; background: var(--be-green-lt); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 22px; color: var(--be-green); }
.login-brand { font-size: 17px; font-weight: 500; }
.login-sub { font-size: 12px; color: #888; margin-top: 3px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 40px 20px; color: #aaa; }
.empty-state i { font-size: 40px; display: block; margin-bottom: 10px; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }


