/* ===== OxHijyen Tamir Sistemi - Ana CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.14);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft: rgba(79, 70, 229, 0.08);
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, 0.08);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.08);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.08);
    --purple: #9333ea;
    --purple-soft: rgba(147, 51, 234, 0.08);
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.08);
    --orange: #ea580c;
    --sidebar-w: 240px;
    --header-h: 56px;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);
}

html { font-size: 14px; max-width: 100%; overflow-x: hidden; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== LAYOUT ===== */
.app-wrapper { display: flex; min-height: 100vh; width: 100%; overflow-x: hidden; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.25s ease;
}

/* ===== SIDEBAR BRAND (Logo Alanı) ===== */
.sidebar-brand {
    padding: 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    text-decoration: none;
    transition: background-color 0.15s;
}
.sidebar-brand-link:hover { background-color: rgba(0,0,0,0.03); }
.sidebar-logo-wrap {
    width: 36px; height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-img {
    width: 36px; height: 36px;
    object-fit: cover; display: block;
}
.sidebar-brand-text {
    display: flex; flex-direction: column; gap: 0;
    min-width: 0;
}
.sidebar-brand-name {
    font-size: 14px; font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.sidebar-brand-sub {
    font-size: 10px; font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* Mobil sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
}
.sidebar-overlay.active { display: block; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-section-title {
    font-size: 10px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    padding: 0 10px 6px; margin-top: 14px;
}
.nav-section-title:first-child { margin-top: 0; }

.nav-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px; font-weight: 500;
    transition: background-color 0.15s, color 0.15s;
    margin-bottom: 1px;
    cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background-color: rgba(0,0,0,0.04); color: var(--text-primary); }
.nav-item.active {
    background-color: var(--accent-soft);
    color: var(--accent-hover);
}
.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff; font-size: 9px; font-weight: 700;
    padding: 2px 6px; border-radius: 20px;
}
.nav-item .nav-mob-badge {
    margin-left: auto; background: #16a34a; color: #fff;
    font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 20px;
}
.nav-item-mobile-return {
    background: rgba(245,158,11,0.1); color: #d97706;
    margin-top: 10px; font-weight: 600;
}

.sidebar-footer {
    padding: 12px 14px; border-top: 1px solid var(--border);
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
}
.sidebar-user .avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0; color: #fff;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-info .name {
    font-size: 12px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-info .role {
    font-size: 11px; color: var(--text-muted);
}
.logout-btn {
    color: var(--text-muted); text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 6px;
    transition: color 0.15s, background-color 0.15s;
    flex-shrink: 0;
}
.logout-btn:hover { color: var(--danger); background-color: var(--danger-soft); }

/* Main Content */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
}

/* ===== TOP BAR ===== */
.top-bar {
    height: var(--header-h);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 16px 0 20px; gap: 10px;
    position: sticky; top: 0; z-index: 50;
}
.top-bar .burger-btn {
    display: none;
    width: 34px; height: 34px;
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-secondary);
    align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
}
.top-bar .burger-btn:hover { background-color: rgba(0,0,0,0.04); color: var(--text-primary); }
.top-bar .page-title {
    font-size: 15px; font-weight: 600; color: var(--text-primary);
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-bar .top-actions {
    display: flex; gap: 6px; align-items: center;
    flex-shrink: 0;
}

.content-area { padding: 20px; flex: 1; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.card-header h3 {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    flex: 1;
}
.card-body { padding: 18px; }

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex; align-items: center; gap: 14px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    position: relative;
    overflow: hidden;
    will-change: transform;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.07;
    transform: translate(25px, -25px);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
a.stat-card.clickable { text-decoration: none; color: inherit; cursor: pointer; }
a.stat-card.clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
a.stat-card.clickable:active { transform: translateY(0); }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.stat-card.accent .stat-icon { background: var(--accent-soft); }
.stat-card.accent::before { background: var(--accent); }
.stat-card.success .stat-icon { background: var(--success-soft); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning-soft); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger .stat-icon { background: var(--danger-soft); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.purple .stat-icon { background: var(--purple-soft); }
.stat-card.purple::before { background: var(--purple); }
.stat-info .value {
    font-size: 24px; font-weight: 700; color: var(--text-primary);
    line-height: 1.1; margin-bottom: 3px;
}
.stat-info .label {
    font-size: 12px; color: var(--text-secondary); font-weight: 500;
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th {
    padding: 9px 12px;
    text-align: left;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: var(--bg-card);
}
table td {
    padding: 10px 12px;
    font-size: 13px; color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    vertical-align: middle;
}
table tr:last-child td { border-bottom: none; }
table tr:hover td { background-color: rgba(0,0,0,0.015); }
table td .primary-text { color: var(--text-primary); font-weight: 500; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px; font-weight: 600;
    white-space: nowrap;
    min-height: 22px; line-height: 1.1;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-accent  { background: var(--accent-soft);  color: var(--accent-hover); }
.badge-secondary { background: rgba(0,0,0,0.06); color: var(--text-secondary); }
.badge-purple  { background: var(--purple-soft);  color: var(--purple); }
.badge-blue    { background: var(--blue-soft);    color: var(--blue); }
.badge-orange  { background: rgba(240,136,62,0.12); color: var(--orange); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    font-family: 'Inter', sans-serif;
    border: none; cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(99,102,241,0.35); }
.btn-success { background: rgba(22,163,74,0.12); color: var(--success); border: 1px solid rgba(22,163,74,0.25); }
.btn-success:hover { background: var(--success); color: #fff; }
.btn-danger { background: rgba(220,38,38,0.1); color: var(--danger); border: 1px solid rgba(220,38,38,0.2); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-warning { background: rgba(217,119,6,0.1); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }
.btn-warning:hover { background: var(--warning); color: #fff; }
.btn-secondary { background: rgba(0,0,0,0.03); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; }
.btn-lg { padding: 11px 22px; font-size: 14px; border-radius: 9px; }

/* ===== FORMS ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px; font-family: 'Inter', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    max-width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(99,102,241,0.04);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.10);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.10); }
.search-bar input {
    background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 13px;
    font-family: 'Inter', sans-serif;
    flex: 1;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { color: var(--text-muted); font-size: 15px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
    padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%; max-width: 600px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }
.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
}
.modal-header h3 { font-size: 15px; font-weight: 600; flex: 1; }
.modal-close {
    width: 30px; height: 30px;
    background: rgba(0,0,0,0.04);
    border: none; border-radius: 7px;
    color: var(--text-secondary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 17px; transition: background-color 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex; align-items: center; gap: 5px;
    padding: 14px 18px; border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.page-btn {
    min-width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; font-size: 12px; font-weight: 500;
    cursor: pointer; transition: background-color 0.15s, color 0.15s;
    color: var(--text-secondary);
    border: none; background: none; text-decoration: none;
}
.page-btn:hover { background-color: rgba(0,0,0,0.04); color: var(--text-primary); }
.page-btn.active { background: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination .info { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent  { color: var(--accent-hover); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.justify-between { justify-content: space-between; }
.ml-auto { margin-left: auto; }
.fw-600 { font-weight: 600; }
.fs-13 { font-size: 13px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* Alert */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.alert-success { background: var(--success-soft); border: 1px solid rgba(22,163,74,0.2); color: var(--success); }
.alert-error   { background: var(--danger-soft);  border: 1px solid rgba(220,38,38,0.2);  color: var(--danger); }
.alert-warning { background: var(--warning-soft); border: 1px solid rgba(217,119,6,0.2); color: var(--warning); }
.alert-info    { background: var(--accent-soft);  border: 1px solid rgba(99,102,241,0.2); color: var(--accent-hover); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 44px; margin-bottom: 10px; opacity: 0.5; }
.empty-state h4 { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }

/* Sebil card on list */
.sebil-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    will-change: transform;
}
.sebil-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Tag input for islemler */
.islemler-list { display: flex; flex-direction: column; gap: 8px; }
.islem-row {
    display: flex; gap: 8px; align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
}
.islem-row select { flex: 1; }
.islem-row .islem-fiyat {
    width: 100px; text-align: right;
    color: var(--success); font-weight: 600;
}
.islem-row .remove-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 15px; padding: 2px 4px;
    transition: color 0.15s;
}
.islem-row .remove-btn:hover { color: var(--danger); }

.toplam-tutar-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px;
}
.toplam-tutar-box .label { font-size: 13px; color: var(--text-secondary); }
.toplam-tutar-box .value { font-size: 19px; font-weight: 700; color: var(--success); }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.info-list { display: flex; flex-direction: column; gap: 2px; }
.info-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--text-muted); width: 130px; flex-shrink: 0; }
.info-row .info-val { color: var(--text-primary); font-weight: 500; }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
    content: '';
    position: absolute; left: 9px; top: 0; bottom: 0;
    width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before {
    content: '';
    position: absolute; left: -20px; top: 4px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item .tl-date { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.timeline-item .tl-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}
.timeline-item .tl-card .tl-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.timeline-item .tl-card .tl-body { font-size: 12px; color: var(--text-secondary); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.18); }

/* Grid Layouts */
.cari-grid { display: grid; grid-template-columns: 270px 1fr; gap: 18px; align-items: start; }
.duzenle-grid { display: grid; grid-template-columns: 380px 1fr; gap: 18px; }
.editor-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; padding-bottom: 80px; }

/* Toast */
#toast-container {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.2s ease;
    max-width: 340px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Loading spinner */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(0,0,0,0.08);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FİLTRE PİLL BİLEŞENİ ===== */
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600; line-height: 1;
    border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-secondary);
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.filter-pill:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-pill .pill-count {
    font-size: 11px; font-weight: 700;
    background: rgba(0,0,0,0.06); color: inherit;
    padding: 1px 6px; border-radius: 10px; min-width: 16px; text-align: center;
}
.filter-pill.active .pill-count { background: rgba(255,255,255,0.22); }
.filter-pill.is-warning.active { background: var(--warning); border-color: var(--warning); color:#fff; }
.filter-pill.is-success.active { background: var(--success); border-color: var(--success); color:#fff; }
.filter-pill.is-danger.active  { background: var(--danger);  border-color: var(--danger);  color:#fff; }
.filter-pill.is-blue.active    { background: var(--blue);    border-color: var(--blue);    color:#fff; }
.filter-pill.is-purple.active  { background: var(--purple);  border-color: var(--purple);  color:#fff; }

/* ===== COUNT BADGE ===== */
.count-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    background: var(--bg-tertiary); border: 1px solid var(--border);
    padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}

/* ===== ROW ACTIONS ===== */
.row-actions { display: inline-flex; gap: 5px; align-items: center; flex-wrap: nowrap; }

/* ===== ACCORDION (Fiyat Listesi) ===== */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--bg-card); }
.accordion-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 14px; cursor: pointer; user-select: none;
    background: var(--bg-tertiary); font-weight: 600; font-size: 13px;
    color: var(--text-primary); border-bottom: 1px solid var(--border);
    transition: background-color 0.15s;
    border-radius: var(--radius-sm);
}
.accordion-header:hover { background-color: rgba(0,0,0,0.04); }
.accordion-header::after { content: '▼'; font-size: 11px; transition: transform 0.15s; }
.accordion-header.active::after { transform: rotate(180deg); }
.accordion-body { display: none; padding: 10px 14px; }
.accordion-body.active { display: block; }
.accordion-item .accordion-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,0.03); font-size: 13px;
}
.accordion-item .accordion-row:last-child { border-bottom: none; }
.accordion-item .accordion-label { flex: 1; color: var(--text-primary); font-weight: 500; }
.accordion-item .accordion-value { text-align: right; color: var(--text-secondary); min-width: 75px; }
.accordion-item .accordion-actions { margin-left: auto; display: flex; gap: 5px; flex-shrink: 0; }

/* ===== FİYAT LİSTESİ ACCORDION ===== */
.fiyat-accordion { margin: 0; padding: 0; }
.fiyat-category {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 10px;
}
.fiyat-category-header {
    padding: 12px 14px; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center;
    background: var(--bg-tertiary); font-weight: 600;
    user-select: none; transition: background-color 0.15s;
    border-radius: var(--radius-sm);
}
.fiyat-category-header:hover { background-color: rgba(0,0,0,0.04); }
.fiyat-category-header .fiyat-category-arrow { font-size: 11px; transition: transform 0.15s; color: var(--text-muted); }
.fiyat-category-header.open .fiyat-category-arrow { transform: rotate(90deg); }
.fiyat-category-header.open { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.fiyat-category-items { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.fiyat-category-items.open { max-height: 4000px; }
.fiyat-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,0.03);
    font-size: 13px;
}
.fiyat-item:last-child { border-bottom: none; }
.fiyat-item-name { flex: 1; color: var(--text-primary); font-weight: 500; }
.fiyat-item-price { text-align: right; color: var(--success); font-weight: 700; min-width: 75px; }
.fiyat-item-actions { margin-left: 9px; display: flex; gap: 5px; flex-shrink: 0; }

/* ===== TOPLU İŞLEM BARI ===== */
.bulk-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    display: none; align-items: center; gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.bulk-bar.active { display: flex; }
input.row-check, #selectAll {
    width: 18px; height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    vertical-align: middle;
    margin: 0;
}

/* DataTables uyum */
.dataTables_wrapper { color: var(--text-secondary); }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { color: var(--text-secondary); font-size: 12px; padding: 9px 14px; }
.dataTables_wrapper .dataTables_length select {
    background: var(--bg-tertiary); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px 6px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary); border-radius: var(--radius-sm);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--accent); color: #fff; border-color: var(--accent);
}
table.dataTable thead th { position: relative; }
tr.dt-filters th { padding: 5px 7px; background: var(--bg-tertiary); }
tr.dt-filters input, tr.dt-filters select {
    width: 100%; box-sizing: border-box; padding: 4px 6px; font-size: 12px;
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
tr.dt-filters input::placeholder { color: var(--text-muted); }
table.dataTable tbody tr { background: transparent; }
#sebilTable td.sel-td { text-align: center; padding: 0; }
#sebilTable td.sel-td label.sel-lbl {
    display: flex; align-items: center; justify-content: center;
    padding: 12px 10px; margin: 0; cursor: pointer;
}

/* ===== SEPET FLOATING BANNER ===== */
.sepet-banner {
    position: fixed; bottom: 20px; right: 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff; padding: 10px 18px; border-radius: 50px;
    display: none; align-items: center; gap: 12px;
    box-shadow: 0 6px 24px rgba(79,70,229,0.40);
    z-index: 999; font-size: 13px; font-weight: 600;
    animation: slideUp 0.2s ease;
}
.sepet-banner.active { display: flex; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.btn-sepet-git {
    background: rgba(255,255,255,0.2);
    color: #fff; border: 1px solid rgba(255,255,255,0.3);
    border-radius: 30px; padding: 5px 14px; font-size: 12px;
    font-weight: 700; text-decoration: none; white-space: nowrap;
    transition: background-color 0.15s;
}
.btn-sepet-git:hover { background: rgba(255,255,255,0.32); }

/* ===== MOBİL STICKY ÖZET ===== */
.mob-sticky-summary {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 10px 18px;
    background: var(--bg-card); border-top: 1px solid var(--border);
    box-shadow: 0 -3px 18px rgba(0,0,0,.10);
}
.mob-sticky-summary .toplam-tutar-box { margin: 0; padding: 0; border: none; background: none; flex: 1; }
.mob-sticky-summary .btn { flex-shrink: 0; margin: 0; min-height: 42px; padding: 0 22px; font-size: 13px; }

/* ===== MOBİL ARAYÜZ SINIFLAR (mob-*) ===== */
body.mob-body { background: #f1f5f9; overflow-x: hidden; }
.mob-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f1f5f9; position: relative; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.mob-header { background: #fff; border-bottom: 1px solid rgba(0,0,0,0.08); padding: 12px 16px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.mob-back { font-size: 14px; color: #4f46e5; text-decoration: none; padding: 8px 4px; font-weight: 600; white-space: nowrap; }
.mob-title { flex: 1; font-size: 15px; font-weight: 700; text-align: center; color: #0f172a; }
.mob-header-icon { font-size: 20px; text-decoration: none; padding: 4px; }
.mob-status-banner { padding: 12px 18px; font-size: 17px; font-weight: 700; text-align: center; letter-spacing: 0.3px; }
.mob-status-banner.s1 { background: #fef3c7; color: #d97706; }
.mob-status-banner.s2 { background: #dbeafe; color: #2563eb; }
.mob-status-banner.s3 { background: #dcfce7; color: #16a34a; }
.mob-status-banner.s4 { background: #fee2e2; color: #dc2626; }
.mob-card { background: #fff; border-radius: 16px; margin: 10px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.mob-card-title { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.mob-musteri-name { font-size: 21px; font-weight: 800; color: #0f172a; margin-bottom: 4px; line-height: 1.2; }
.mob-marka-text { font-size: 14px; color: #475569; margin-bottom: 8px; }
.mob-ox-code { display: inline-flex; align-items: center; gap: 6px; background: rgba(79,70,229,0.1); color: #4338ca; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; font-family: monospace; }
.mob-tutar-big { font-size: 34px; font-weight: 800; color: #16a34a; line-height: 1; }
.mob-tutar-label { font-size: 12px; color: #64748b; margin-top: 2px; }
.mob-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; border-radius: 13px; font-size: 16px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; padding: 0 18px; transition: opacity 0.15s, transform 0.15s; font-family: 'Inter', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; user-select: none; }
.mob-btn:active { transform: scale(0.97); opacity: 0.88; }
.mob-btn-primary { background: #4f46e5; color: #fff; }
.mob-btn-success { background: #16a34a; color: #fff; }
.mob-btn-warning { background: #d97706; color: #fff; }
.mob-btn-danger { background: #dc2626; color: #fff; }
.mob-btn-secondary { background: #e2e8f0; color: #334155; }
.mob-btn-blue { background: #2563eb; color: #fff; }
.mob-btn-whatsapp { background: #25D366; color: #fff; }
.mob-btn-outline { background: #fff; color: #4f46e5; border: 2px solid #4f46e5; }
.mob-btn-disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
.mob-btn-sm { min-height: 40px; font-size: 14px; border-radius: 10px; padding: 0 14px; }
.mob-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 10px 10px; }
.mob-actions .mob-full { grid-column: 1 / -1; }
.mob-inline-form { background: #fff; border-radius: 16px; margin: 10px; padding: 18px; box-shadow: 0 4px 20px rgba(79,70,229,0.12); border: 2px solid #4f46e5; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.mob-form-label { display: block; font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; }
.mob-form-row { margin-bottom: 14px; }
.mob-select, .mob-input { width: 100%; padding: 13px 14px; background: #f1f5f9; border: 1.5px solid rgba(0,0,0,0.1); border-radius: 10px; font-size: 16px; color: #0f172a; font-family: 'Inter', system-ui, sans-serif; -webkit-appearance: none; }
.mob-select:focus, .mob-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.mob-radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mob-radio-option { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #f1f5f9; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600; color: #334155; border: 2px solid transparent; transition: border-color 0.15s, background-color 0.15s; }
.mob-radio-option input[type=radio] { width: 18px; height: 18px; accent-color: #4f46e5; flex-shrink: 0; }
.mob-radio-option:has(input:checked) { background: rgba(79,70,229,0.08); border-color: #4f46e5; color: #4338ca; }
.mob-info-row { display: flex; align-items: flex-start; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,0.05); gap: 10px; font-size: 14px; }
.mob-info-row:last-child { border-bottom: none; }
.mob-info-label { color: #64748b; flex-shrink: 0; width: 110px; }
.mob-info-val { color: #0f172a; font-weight: 600; text-align: right; flex: 1; }
.mob-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mob-badge-accent { background: rgba(79,70,229,0.1); color: #4338ca; }
.mob-badge-warning { background: #fef3c7; color: #d97706; }
.mob-badge-blue { background: #dbeafe; color: #2563eb; }
.mob-badge-success { background: #dcfce7; color: #16a34a; }
.mob-badge-danger { background: #fee2e2; color: #dc2626; }
.mob-badge-secondary { background: #f1f5f9; color: #64748b; }
.mob-flash { margin: 10px; padding: 13px 14px; border-radius: 11px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.mob-flash-success { background: #dcfce7; color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.mob-flash-error { background: #fee2e2; color: #dc2626; border: 1px solid rgba(220,38,38,0.2); }
.mob-flash-info { background: #dbeafe; color: #2563eb; border: 1px solid rgba(37,99,235,0.2); }
.mob-bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid rgba(0,0,0,0.1); display: flex; z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -3px 16px rgba(0,0,0,0.07); }
.mob-bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 9px 4px; text-decoration: none; color: #94a3b8; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.15s; min-height: 54px; }
.mob-bottom-nav a .nav-emoji { font-size: 21px; }
.mob-bottom-nav a.active { color: #4f46e5; }
.mob-stats { display: grid; gap: 9px; margin: 10px; }
.mob-stats-3 { grid-template-columns: repeat(3, 1fr); }
.mob-stats-2 { grid-template-columns: repeat(2, 1fr); }
.mob-stat-card { background: #fff; border-radius: 13px; padding: 13px 9px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.mob-stat-num { font-size: 24px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.mob-stat-lbl { font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.mob-qr-section { margin: 10px; }
.mob-qr-placeholder { background: #fff; border-radius: 16px; padding: 38px 18px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 2px dashed rgba(79,70,229,0.25); }
.mob-qr-placeholder .qr-icon { font-size: 52px; margin-bottom: 10px; }
.mob-qr-placeholder h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 5px; }
.mob-qr-placeholder p { font-size: 13px; color: #64748b; margin-bottom: 18px; }
#qr-reader { border-radius: 12px; overflow: hidden; }
#qr-reader video { border-radius: 12px; }
.mob-search-row { display: flex; gap: 8px; margin: 10px; align-items: center; }
.mob-search-wrap { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 13px; padding: 11px 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1.5px solid transparent; transition: border-color 0.15s; }
.mob-search-wrap:focus-within { border-color: #4f46e5; }
.mob-search-wrap input { flex: 1; background: none; border: none; outline: none; font-size: 16px; color: #0f172a; font-family: 'Inter', system-ui, sans-serif; }
.mob-search-wrap input::placeholder { color: #94a3b8; }
.mob-search-icon { font-size: 17px; }
.teslim-list { margin: 0 10px; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.teslim-item { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #fff; border-bottom: 1px solid rgba(0,0,0,0.05); text-decoration: none; color: inherit; transition: background-color 0.15s; -webkit-tap-highlight-color: transparent; }
.teslim-item:last-child { border-bottom: none; }
.teslim-item:active { background-color: #f8fafc; }
.teslim-item.biz-gidecek { border-left: 4px solid #2563eb; }
.teslim-left { flex: 1; min-width: 0; }
.teslim-kod { font-size: 11px; font-weight: 700; color: #4f46e5; margin-bottom: 2px; font-family: monospace; }
.teslim-musteri { font-size: 15px; font-weight: 700; color: #0f172a; }
.teslim-marka { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teslim-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.teslim-tutar { font-size: 14px; font-weight: 700; color: #16a34a; }
.teslim-arrow { font-size: 19px; color: #cbd5e1; }
.mob-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 7px 0; }
.mob-section-title { padding: 14px 12px 7px; font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.mob-safe-bottom { height: calc(80px + env(safe-area-inset-bottom, 0px)); }

/* ===== MOBİL TESLİM ACTION BUTTON ===== */
.teslim-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 9px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 700; border: none;
    cursor: pointer; transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap; min-height: 42px;
}
.teslim-action-btn:active { transform: scale(0.97); opacity: 0.9; }
.teslim-action-btn.success { background: #16a34a; color: #fff; }

/* ===== TESLİM ONAY MODAL ===== */
.teslim-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 1000;
    align-items: center; justify-content: center; padding: 18px;
}
.teslim-modal-overlay.active { display: flex; }
.teslim-modal {
    background: #fff; border-radius: 12px; max-width: 400px;
    padding: 18px; box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.teslim-modal-header { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.teslim-modal-body { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; }
.teslim-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.teslim-modal-actions .btn { min-height: 38px; }

/* ===== ERİŞİLEBİLİR ODAK HALKASI ===== */
.btn:focus-visible, .filter-pill:focus-visible, .nav-item:focus-visible,
.form-control:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Burger btn sadece mobilde görünür */
.top-bar .burger-btn { display: none; }

@media (max-width: 900px) {
    .cari-grid, .duzenle-grid, .editor-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-bar .burger-btn { display: flex; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.15); }
    .main-content { margin-left: 0; width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .form-grid { grid-template-columns: 1fr; gap: 12px; }
    .desktop-only { display: none; }
    .top-bar { position: sticky; top: 0; z-index: 50; }
    .form-group { margin-bottom: 12px; }
    .form-group label { margin-bottom: 5px; font-size: 11px; }
    .form-control { font-size: 16px; padding: 11px 12px; min-height: 42px; }
    textarea.form-control { min-height: 90px; }
    .form-actions { display: flex; gap: 8px; margin-top: 16px; }
    .form-actions .btn { flex: 1; min-height: 42px; }
    .action-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
    .action-buttons .btn.full-width { grid-column: 1 / -1; }
    .bulk-bar { flex-wrap: wrap; gap: 7px; padding: 7px 10px; }
    .bulk-bar select { max-width: 100%; }
    .search-bar { max-width: 100%; }
    .filter-pills { gap: 5px; }
    .filter-pill { padding: 5px 10px; font-size: 12px; }
    .pagination { padding: 10px 14px; gap: 4px; font-size: 12px; }
    .page-btn { min-width: 28px; height: 28px; font-size: 12px; }
    .pagination .info { font-size: 11px; margin-left: auto; width: 100%; text-align: right; margin-top: 6px; }
    /* Table → card on mobile */
    table thead { display: none; }
    table tbody { display: flex; flex-direction: column; gap: 10px; padding: 0; }
    table tr { display: grid; grid-template-columns: 1fr; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; gap: 7px; }
    table td { display: flex; justify-content: space-between; align-items: center; border: none; padding: 0; font-size: 13px; min-height: auto; text-align: left; }
    table td:first-child { display: flex; justify-content: center; padding: 0; }
    table td:not(:first-child)::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); flex-shrink: 0; margin-right: 8px; min-width: 95px; font-size: 11px; }
    table td:last-child { flex-direction: column; align-items: stretch; gap: 7px; }
    table td:last-child::before { display: none; }
    table td:last-child > * { flex: 1; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; gap: 9px; }
    .stat-card { padding: 12px 13px; }
    .stat-icon { width: 38px; height: 38px; font-size: 17px; }
    .stat-info .value { font-size: 21px; }
    .stat-info .label { font-size: 11px; }
    .top-bar { padding: 0 14px; }
    .content-area { padding: 14px; }
}

@media (max-width: 1024px) {
    .btn { min-height: 38px; }
    .btn-sm { min-height: 36px; padding: 7px 12px; font-size: 12px; }
    .btn-xs { min-height: 32px; padding: 5px 10px; font-size: 11px; }
    .btn-icon { width: 38px; height: 38px; }
    a, button { -webkit-tap-highlight-color: transparent; }
}
