/* BissoPos - tasarım sistemi */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --brand-pink: #e91e8c;
    --brand-pink-soft: #fce7f3;
    --nav-teal: #14b8a6;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --bg: #f4f7f6;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --sidebar-brand: #23485f;
    --sidebar-brand-dark: #183546;
    --sidebar-hover-bg: #2f5d7a;
    --sidebar-active-bg: #3a6f92;
    --sidebar-submenu-bg: #1c3f57;
    --sidebar-text: #ffffff;
    --sidebar-text-muted: #93b1c5;
    --sidebar-icon: #8fb3c8;
    --sidebar-icon-hover: #66c4d8;
    --sidebar-active-bar: #66c4d8;
    --sidebar-g1: #274f6b;
    --sidebar-g2: #1f4359;
    --sidebar-g3: #183546;
    --bh-panel-head: #2c3d49;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;
    color: var(--text);
}

/* ============= SİDEBAR MENÜ (BH 1:1 renk + geçiş) ============= */
.menu-item {
    position: relative;
    min-height: 44px;
    padding: 0 14px 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    background: transparent;
    transition: background 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
}
a.menu-item-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
    border: none;
    font: inherit;
    text-align: left;
}
button.menu-item.menu-parent {
    width: 100%;
    box-sizing: border-box;
    border: none;
    font: inherit;
    text-align: left;
}
.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 0 2px 2px 0;
    background: var(--sidebar-active-bar);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.24s ease;
}
.menu-item:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.menu-item:hover::before {
    transform: scaleY(1);
}
.menu-item:active {
    background: var(--sidebar-active-bg);
}
.menu-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text);
    font-weight: 700;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.18);
}
.menu-item.active::before {
    transform: scaleY(1);
}
.menu-item-text {
    flex: 1;
    min-width: 0;
    color: var(--sidebar-text);
    transition: color 0.24s ease;
}
.menu-badge {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    line-height: 1.2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menu-item:hover .menu-badge {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.menu-badge-pro {
    background: var(--warning-light);
    color: #b45309;
}
.menu-badge-new {
    background: #5cbf7b;
    color: #fff;
}
.menu-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: var(--sidebar-icon);
    transition: color 0.24s ease, filter 0.24s ease, transform 0.24s ease;
}
.menu-item:hover i {
    color: var(--sidebar-icon-hover);
    filter: drop-shadow(0 0 5px rgba(91, 191, 123, 0.55));
    transform: scale(1.06);
}
.menu-item.active i,
.menu-parent.is-open i {
    color: var(--sidebar-icon-hover);
}
.submenu-arrow { flex-shrink: 0; margin-left: 4px; opacity: 0.75; color: inherit; }
.submenu-plus {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.7;
    color: var(--sidebar-text-muted);
    transition: transform 0.24s ease, color 0.24s ease, opacity 0.24s ease;
}
.menu-parent:hover .submenu-plus {
    opacity: 1;
    color: var(--sidebar-icon-hover);
}
.menu-parent.is-open {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.16);
}
.menu-parent.is-open::before {
    transform: scaleY(1);
}
.menu-parent.is-open .submenu-plus {
    opacity: 1;
    color: var(--sidebar-text);
}

/* Alt menü paneli */
.submenu {
    background: var(--sidebar-submenu-bg);
    margin-left: 0;
    box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.22);
    animation: bhSubmenuIn 0.24s ease-out;
}
@keyframes bhSubmenuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.menu-child {
    min-height: 38px;
    padding: 0 14px 0 36px !important;
    font-size: 12.5px !important;
    font-weight: 500;
    color: var(--sidebar-text-muted) !important;
    background: transparent !important;
    transition: background 0.24s ease, color 0.24s ease !important;
}
.menu-child::before {
    display: none;
}
.menu-child:hover {
    background: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-text) !important;
    box-shadow: none;
    padding-left: 36px !important;
    transform: none;
}
.menu-child:hover span {
    text-shadow: none;
}
.menu-child.active {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-text) !important;
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--sidebar-active-bar);
}
.menu-parent .submenu-arrow { transition: transform 0.24s ease; }
.sidebar-nav-divider {
    height: 1px;
    margin: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* POS Ödeme butonları */
.pos-pay-btn {
    color: white;
    border: none;
    border-radius: 10px;
    padding: 18px 8px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    transition: 0.2s;
}
.pos-pay-btn:hover { transform: translateY(-2px); }
.pos-pay-btn .num { font-size: 18px; display:block; margin-bottom:4px; }
.pos-pay-nakit { background: #10b981; }
.pos-pay-pos { background: #06b6d4; }
.pos-pay-acik { background: #f59e0b; }
.pos-pay-parcali { background: #fbbf24; }
.pos-pay-odeme { background: #ef4444; }

/* Kategori sekmeleri */
.cat-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.cat-tab { padding: 6px 14px; background: #f1f5f9; color: #64748b; font-size: 12px; font-weight: 700; cursor: pointer; border-radius: 6px; }
.cat-tab.active { background: #3b82f6; color: white; }

/* Marka grid */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.brand-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    transition: 0.15s;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-card:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* —— Hızlı Satış (POS) —— */
.pos-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}
.pos-layout {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    gap: 14px;
    padding: 14px;
    align-items: stretch;
}
.pos-layout-main {
    flex: 1.55;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}
.pos-layout-side {
    flex: 1;
    min-width: 320px;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pos-pos-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.pos-pos-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pos-pos-head-text strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.pos-pos-head-text strong i {
    margin-right: 8px;
    color: var(--primary);
}
.pos-pos-head-text span {
    font-size: 12px;
    color: var(--text-muted);
}
.pos-toolbar-top {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 200px;
}
.pos-select-fiyat {
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 700;
    background: var(--border-light);
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
}
.pos-toolbar-search {
    position: relative;
    flex: 1;
    min-width: 160px;
}
.pos-toolbar-search > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}
.pos-search-input {
    width: 100%;
    padding: 10px 12px 10px 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: var(--card);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pos-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.pos-tool-btn {
    height: 42px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: transform 0.15s, filter 0.15s;
}
.pos-tool-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.pos-tool-btn--info {
    background: var(--info);
    color: #fff;
}
.pos-tool-btn--muted {
    background: var(--text-light);
    color: #fff;
}
.pos-tool-btn--primary {
    background: var(--primary);
    color: #fff;
}
.pos-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--border-light);
}
.pos-stat {
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border-light);
}
.pos-stat label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.pos-stat-val {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.pos-stat--green .pos-stat-val { color: var(--success); }
.pos-stat--blue .pos-stat-val { color: var(--primary); }
.pos-stat--red .pos-stat-val { color: var(--danger); }
.pos-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    background: #fafbfc;
    font-size: 12px;
}
.pos-filter-bar b {
    color: var(--text-light);
    font-weight: 700;
}
.pos-filter-bar .sep {
    color: var(--border);
    user-select: none;
}
.pos-filter-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pos-filter-inline .pos-sum {
    color: var(--text);
    font-weight: 800;
}
.pos-isk-input {
    width: 64px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
}
.pos-isk-select {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--card);
}
.pos-sepet-wrap {
    flex: 1;
    min-height: 120px;
    overflow: auto;
}
.pos-table {
    width: 100%;
    border-collapse: collapse;
}
.pos-table thead {
    background: var(--border-light);
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border);
}
.pos-table th {
    padding: 10px 8px;
    text-align: left;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pos-table th.num { text-align: center; }
.pos-table th.price { text-align: right; }
.pos-sepet-row td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.pos-line-title { font-weight: 700; color: var(--text); }
.pos-line-sub { font-size: 11px; color: var(--text-muted); }
.pos-qty-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pos-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pos-qty-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.pos-qty-val {
    min-width: 24px;
    text-align: center;
    font-weight: 800;
}
.pos-cell-num { text-align: center; }
.pos-cell-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.pos-cell-total {
    text-align: right;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.pos-line-del {
    color: var(--danger);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
}
.pos-line-del:hover { background: var(--danger-light); }
.pos-empty-sepet td {
    text-align: center;
    padding: 36px 16px;
    color: var(--text-muted);
    font-size: 14px;
}
.pos-footer-actions {
    padding: 12px 16px;
    background: var(--border-light);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.pos-footer-meta {
    font-size: 12px;
    color: var(--text-light);
}
.pos-footer-meta b {
    color: var(--primary);
    font-weight: 800;
}
.pos-customer-panel {
    background: var(--card);
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.pos-customer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.pos-customer-head span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pos-btn-mini {
    background: var(--success);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s;
}
.pos-btn-mini:hover { filter: brightness(1.05); }
.pos-customer-field {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    background: var(--border-light);
    cursor: pointer;
    font-size: 13px;
    box-sizing: border-box;
}
.pos-customer-name {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}
.pos-cari-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
}
.pos-cari-mini > div {
    text-align: center;
    padding: 8px 4px;
    border-radius: 8px;
    background: var(--border-light);
}
.pos-cari-mini .lbl {
    color: var(--text-muted);
    margin-bottom: 2px;
}
.pos-cari-mini .val {
    font-weight: 800;
    color: var(--text);
}
.pos-marka-panel {
    background: var(--card);
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    flex: 1;
    min-height: 140px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pos-product-tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.pos-product-tile:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.14);
    transform: translateY(-2px);
}
.pos-product-tile .pos-product-name {
    font-weight: 700;
    font-size: 11px;
    line-height: 1.25;
    min-height: 28px;
    color: var(--text);
}
.pos-product-tile .pos-product-price {
    color: var(--primary);
    font-weight: 900;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.pos-product-tile .pos-product-stok {
    font-size: 10px;
    color: var(--text-muted);
}
.modal-box--pos-wide {
    width: min(560px, 96vw);
}

.pos-marka-grid-toolbar {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.pos-urun-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.pos-urun-bos {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: 14px;
}

.pos-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}
.pos-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}
.pos-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.pos-modal-close:hover {
    background: var(--border-light);
    color: var(--text);
}
.pos-modal-search {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pos-modal-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.pos-modal-list {
    max-height: 52vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 10px;
}
.pos-urun-sec-row {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background 0.12s;
}
.pos-urun-sec-row:last-child {
    border-bottom: none;
}
.pos-urun-sec-row:hover {
    background: var(--primary-light);
}
.pos-urun-sec-row .u-ad {
    font-weight: 700;
    color: var(--text);
}
.pos-urun-sec-row .u-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}
.pos-urun-sec-row .u-fiyat {
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.app-content:has(.pos-shell) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    gap: 0;
}

/* ============= KPI KARTLARI ============= */
.kpi-card {
    background: var(--card);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 110px;
    position: relative;
}
.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.kpi-icon.green { background: var(--success-light); color: var(--success); }
.kpi-icon.orange { background: var(--warning-light); color: var(--warning); }
.kpi-icon.blue { background: var(--primary-light); color: var(--primary); }
.kpi-icon.cyan { background: #cffafe; color: var(--info); }

.kpi-body { flex: 1; min-width: 0; }
.kpi-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
    text-align: right;
}
.kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    text-align: right;
    margin-top: 4px;
    line-height: 1;
}
.kpi-period {
    position: absolute;
    bottom: 14px;
    left: 20px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    color: white;
}
.kpi-period.today { background: var(--success); }
.kpi-period.month { background: var(--info); }

.kpi-trend {
    position: absolute;
    bottom: 14px;
    right: 20px;
    display: flex;
    gap: 6px;
}
.kpi-trend .badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--warning-light);
    color: var(--warning);
}
.kpi-trend .badge.up { background: var(--success-light); color: var(--success); }
.kpi-trend .badge.down { background: var(--danger-light); color: var(--danger); }

/* ============= KART (Card) ============= */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title .info {
    color: var(--text-muted);
    font-size: 13px;
    cursor: help;
}

/* ============= TABLOLAR ============= */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.data-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text);
}
.data-table tbody tr:hover { background: var(--bg); }
.data-table .empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}
.table-toolbar select, .table-toolbar input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.table-toolbar input:focus, .table-toolbar select:focus {
    border-color: var(--primary);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-light);
}
.pagination .pages { display: flex; gap: 6px; }
.pagination button {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.pagination button:hover { background: var(--bg); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============= BUTONLAR ============= */
.btn {
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-light { background: var(--bg); color: var(--text); border: 1px solid var(--border); }

/* ============= CHART CONTAINER ============= */
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

/* ============= TAB (Sekme) ============= */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.tab {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}
.tab:hover { color: var(--primary); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============= MODAL ============= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 500px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* ============= SCROLLBAR ============= */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============= UYGULAMA KABUĞU (Web + Mobil) ============= */
.app-body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    overflow: hidden;
    height: 100vh;
}

.app-shell {
    display: flex;
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
    background: linear-gradient(180deg, var(--sidebar-g1, #274f6b) 0%, var(--sidebar-g2, #1f4359) 55%, var(--sidebar-g3, #183546) 100%);
    border-right: 1px solid var(--sidebar-brand-dark);
    box-shadow: 2px 0 14px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    z-index: 1050;
}

.app-sidebar-brand {
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: inherit;
}

.app-sidebar-brand img,
.app-sidebar-logo {
    width: auto;
    max-width: 100%;
    height: 52px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.app-sidebar-logo.bh-panel-logo--custom,
.bh-panel-logo.bh-panel-logo--custom {
    height: 48px;
    max-width: 168px;
}
/* Yazi markasi (BissoPos) — logo yerine */
.app-sidebar-badge{width:36px !important;height:36px !important;border-radius:9px !important;background:linear-gradient(135deg,#5aa7c4,#3f78a2) !important;color:#fff !important;display:flex !important;align-items:center;justify-content:center;font-weight:800;font-size:17px !important;flex-shrink:0;box-shadow:0 3px 10px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.35);margin-right:11px;}
.app-sidebar-wm{font-weight:800;font-size:19px !important;color:#fff !important;letter-spacing:-.3px;line-height:1;white-space:nowrap;}
.app-sidebar-wm span{color:var(--sidebar-icon-hover,#66c4d8) !important;}

.bh-isletme-etiket {
    margin: 0 12px 10px;
    padding: 10px 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.35;
}
.bh-isletme-etiket.hidden { display: none !important; }

.bh-tenant-chip {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #059669;
    line-height: 1.35;
    margin-top: 2px;
}
.bh-isletme-etiket-ad { font-weight: 700; color: #065f46; word-break: break-word; }
.bh-isletme-etiket-plan { color: #059669; font-size: 10px; margin-top: 2px; font-weight: 600; }
.bh-isletme-etiket-sub { color: #047857; font-size: 11px; margin-top: 3px; word-break: break-all; }
.bh-isletme-etiket-btn {
    margin-top: 8px;
    padding: 4px 8px;
    border: 1px solid #6ee7b7;
    background: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #047857;
    cursor: pointer;
}

.app-mobile-hero-brand.has-custom-logo,
.m3-home-brand.has-custom-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-mobile-hero-brand .bh-panel-logo,
.m3-home-brand .bh-panel-logo {
    max-height: 38px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.m3-home-brand .bh-panel-logo {
    max-height: 34px;
    max-width: 150px;
}

.app-sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.app-sidebar-nav::-webkit-scrollbar { width: 5px; }
.app-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}
.app-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 191, 123, 0.45);
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.app-main-scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
    overflow: auto;
}

/* —— Masaüstü üst çubuk (web görünümü) —— */
.app-mobile-hero {
    display: none;
}

.app-topbar {
    flex-shrink: 0;
    min-height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    min-width: 0;
}

.app-topbar-firma {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.app-topbar-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: capitalize;
    white-space: nowrap;
}

.app-topbar-rates {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.app-topbar-rates .app-rate {
    padding: 3px 9px;
    border-radius: 3px;
    white-space: nowrap;
}
.app-topbar-rates .app-rate--usd { background: #337ab7; }
.app-topbar-rates .app-rate--eur { background: #d9534f; }
.app-rate-label { color: inherit; margin-right: 2px; opacity: .95; }

.app-topbar-search {
    flex: 1;
    max-width: 280px;
    position: relative;
    display: flex;
    align-items: center;
}

.app-topbar-search i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.app-topbar-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border 0.15s, box-shadow 0.15s;
}

.app-topbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    position: relative;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s, color 0.15s;
}

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

.app-bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.app-pill {
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    white-space: nowrap;
}

.app-pill-teal {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.35);
}

.app-stat-chip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 9px 14px;
    text-align: right;
    min-width: 110px;
    box-shadow: 0 1px 3px rgba(28, 45, 68, .08);
}

.app-stat-chip-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.app-stat-chip-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.app-link-gift {
    border: none;
    background: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    white-space: nowrap;
}

.app-link-gift:hover { text-decoration: underline; }

.app-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-light);
    cursor: default;
}

.app-topbar-user-text { text-align: left; }

.app-topbar-user-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.app-topbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.app-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(145deg, #cbd5e1, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* —— Mobil kahraman başlık + alt bar + FAB (mobil görünüm) —— */
.app-bottom-nav {
    display: none;
}

.app-fab-stack {
    display: none;
}

@media (max-width: 900px) {
    .sidebar-backdrop {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .app-shell.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
    }

    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-topbar {
        display: none;
    }

    .app-mobile-hero {
        display: block;
        position: relative;
        flex-shrink: 0;
        padding: 12px 16px 28px;
        background: linear-gradient(165deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%);
        color: #fff;
        border-radius: 0 0 32px 32px;
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
    }

    .app-mobile-hero::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -18px;
        transform: translateX(-50%);
        width: 120%;
        height: 36px;
        background: var(--bg);
        border-radius: 50%;
        z-index: 0;
    }

    .app-mobile-hero-top {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .app-mobile-hero-actions {
        display: flex;
        gap: 6px;
    }

    .app-mobile-hero .app-icon-btn {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
    }

    .app-mobile-hero .app-icon-btn:hover {
        background: rgba(255, 255, 255, 0.28);
        color: #fff;
    }

    .app-mobile-hero-brand {
        position: relative;
        z-index: 1;
        text-align: center;
        margin-top: 4px;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: -0.02em;
    }

    .app-mobile-logo-bisso { color: #fbcfe8; }
    .app-mobile-logo-pos {
        color: rgba(255, 255, 255, 0.95);
        margin-left: 2px;
    }

    .app-mobile-hero-user {
        position: relative;
        z-index: 1;
        text-align: center;
        margin-top: 10px;
    }

    .app-mobile-user-name {
        font-size: 20px;
        font-weight: 800;
    }

    .app-mobile-user-role {
        font-size: 13px;
        opacity: 0.9;
        margin-top: 2px;
    }

    .app-main-scroll {
        padding-bottom: 72px;
    }

    .app-content {
        padding: 12px;
    }

    .app-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 62px;
        padding: 6px 4px env(safe-area-inset-bottom, 8px);
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(10px);
        z-index: 1020;
        justify-content: space-around;
        align-items: center;
    }

    .app-bottom-nav-item {
        flex: 1;
        border: none;
        background: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 10px;
        font-weight: 600;
        color: var(--text-muted);
        cursor: pointer;
        font-family: inherit;
        padding: 4px 2px;
    }

    .app-bottom-nav-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .app-bottom-nav-item.is-active {
        color: var(--nav-teal);
    }

    .app-bottom-nav-item.is-active i {
        color: var(--nav-teal);
    }

    .app-fab-stack {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: fixed;
        right: 16px;
        bottom: 78px;
        z-index: 1025;
    }

    .app-fab {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
        transition: transform 0.15s;
    }

    .app-fab:hover { transform: scale(1.05); }

    .app-fab-pink {
        background: linear-gradient(145deg, var(--brand-pink), #db2777);
    }

    .app-fab-blue {
        background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    }

    /* —— Satış (POS) + Müşteriler: mobil düzen —— */
    #mainContent.app-content:has(.cari-module) {
        padding: 8px !important;
    }

    .app-content:has(.pos-layout) {
        padding: 0 !important;
        gap: 0 !important;
    }

    .pos-layout {
        flex-direction: column !important;
        padding: 8px !important;
        gap: 10px !important;
        height: auto !important;
        min-height: 100%;
    }

    .pos-layout-side {
        min-width: 0 !important;
        flex: 0 0 auto !important;
        max-width: none !important;
    }

    .pos-layout-main {
        flex: 1 1 auto !important;
        min-height: 220px;
    }

    .pos-toolbar-top {
        flex-wrap: wrap !important;
    }

    .pos-toolbar-search {
        flex: 1 1 100% !important;
        min-width: 0;
    }

    .pos-toolbar-top > button {
        flex: 1 1 calc(50% - 4px);
    }

    .pos-pay-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .pos-pay-btn {
        padding: 14px 6px !important;
        font-size: 12px !important;
    }

    .pos-pay-btn .num {
        font-size: 15px !important;
    }

    .pos-sepet-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pos-sepet-wrap table {
        min-width: 560px;
    }

    .pos-layout .brand-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cari-module .cari-module-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
        padding: 14px 16px !important;
    }

    .cari-module .cari-module-header > div:last-child {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .cari-module .cari-module-header .btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        font-size: 12px;
        padding: 10px 8px;
    }

    .cari-module .card {
        padding: 12px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cari-module .table-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }
}

@media (max-width: 1100px) {
    .app-link-gift { display: none; }
}

@media (max-width: 1200px) {
    .app-topbar-search { max-width: 240px; }
}
