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

.hidden { display: none !important; }

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8e;
    --accent: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f0f4f8;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-w: 240px;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--user-bg, var(--bg));
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--primary);
    color: white;
    padding: 1.5rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem 1rem;
    background: transparent;
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-img {
    width: 100%;
    max-width: 200px;
    max-height: 72px;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.2));
    flex-shrink: 0;
}

.user-bg-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
}
.user-bg-picker input[type="color"] {
    width: 36px;
    height: 28px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.global-search-wrap {
    position: relative;
    padding: 0 0.75rem 0.75rem;
}

.global-search {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: white;
    font-size: 0.82rem;
}

.global-search::placeholder { color: rgba(255,255,255,.45); }
.global-search:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,.12);
}

.sidebar-user {
    margin-top: auto;
    padding: 1rem 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar-user-info {
    margin-bottom: 0.5rem;
}

.sidebar-user .user-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-user .user-role {
    display: block;
    font-size: 0.72rem;
    color: rgba(255,255,255,.55);
    margin-top: 0.1rem;
}

.btn-logout {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
}

.btn-logout:hover { background: rgba(255,255,255,.15); }

.sidebar { display: flex; flex-direction: column; }

.order-entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.order-entry-overlay-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: var(--primary);
    color: white;
}

.btn-close-overlay {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,.12);
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
}

.order-entry-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}

.global-search-results {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: 100%;
    margin-top: 4px;
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 280px;
    overflow-y: auto;
    z-index: 200;
    list-style: none;
}

.global-search-results li {
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.global-search-results li:hover { background: var(--bg); }
.global-search-results li strong { display: block; font-size: 0.88rem; }
.global-search-results li span { font-size: 0.75rem; color: var(--text-muted); }

.shortcuts-card kbd {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.image-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.stock-card img {
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.stock-card img:hover { transform: scale(1.03); }

nav { display: flex; flex-direction: column; gap: 2px; padding: 0 0.75rem; }

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.75);
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all .15s;
    width: 100%;
}

.nav-btn:hover { background: rgba(255,255,255,.1); color: white; }
.nav-btn.active { background: rgba(255,255,255,.15); color: white; font-weight: 600; }
.nav-btn .icon { font-size: 1.1rem; width: 24px; text-align: center; }

/* Content */
.content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
}

.page { display: none; }
.page.active { display: block; }

.page-header { margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.page-header p { color: var(--text-muted); margin-top: 0.25rem; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-card .label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 2rem; font-weight: 700; margin-top: 0.25rem; }
.stat-card.warning .value { color: var(--warning); }
.stat-card.success .value { color: var(--success); }
.stat-card.primary .value { color: var(--primary); }

/* Dashboard banner carousel */
.banner-carousel {
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card);
    min-height: 160px;
}

.banner-track { position: relative; }

.banner-slide {
    display: none;
    padding: 1.25rem 1.5rem;
    animation: bannerFade 0.45s ease;
}

.banner-slide.active { display: block; }

@keyframes bannerFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner-slide-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.banner-icon { font-size: 2rem; line-height: 1; }

.banner-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.banner-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.15rem;
}

.banner-slide.success .banner-value { color: var(--success); }
.banner-slide.warning .banner-value { color: var(--warning); }
.banner-slide.danger .banner-value { color: var(--danger); }

.banner-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.banner-list {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.4rem;
}

.banner-list-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
    padding: 0.45rem 0.65rem;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.85rem;
}

.banner-list-item small {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0 0.85rem;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    padding: 0;
}

.banner-dot.active { background: var(--accent); }

.product-image-preview {
    margin-top: 0.5rem;
}

.product-image-preview img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--bg);
}

.table-thumb-placeholder {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 6px;
    font-size: 1.1rem;
}

.stock-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.stock-badge.low {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stock-badge.critical {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--primary); }

/* Stock grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.stock-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    border-left: 4px solid var(--success);
}

.stock-card.low { border-left-color: var(--warning); }
.stock-card.critical { border-left-color: var(--danger); }

.stock-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg);
}

.stock-card .info { flex: 1; min-width: 0; }
.stock-card .name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-card .sku { font-size: 0.75rem; color: var(--text-muted); }
.stock-card .qty { font-size: 1.4rem; font-weight: 700; }
.stock-card .qty-label { font-size: 0.7rem; color: var(--text-muted); }

.stock-card .placeholder-img {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Forms */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    max-width: 700px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-group input { width: auto; }

/* File upload */
.file-upload { position: relative; }

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: block;
    padding: 1rem;
    border: 2px dashed var(--border);
    border-radius: 8px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
}

.file-upload:hover .file-label {
    border-color: var(--accent);
    background: rgba(59,130,246,.04);
    color: var(--accent);
}

.file-name { display: block; margin-top: 0.5rem; font-size: 0.85rem; color: var(--success); }

/* Item rows */
.items-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }

.item-row {
    display: grid;
    grid-template-columns: 2fr 80px 100px 36px;
    gap: 0.5rem;
    align-items: center;
}

.item-row select,
.item-row input { padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; }

.btn-remove {
    width: 36px;
    height: 36px;
    border: none;
    background: #fee2e2;
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-danger { background: #fee2e2; color: var(--danger); padding: 0.35rem 0.6rem; font-size: 0.8rem; }
.btn-link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.85rem; text-decoration: underline; }

/* Table */
.table-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.customer-row {
    cursor: pointer;
}

.customer-row:hover {
    background: #f8fafc;
}

.data-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: #f8fafc; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-alis { background: #d1fae5; color: #065f46; }
.badge-satis { background: #dbeafe; color: #1e40af; }
.badge-eticaret { background: #dbeafe; color: #1e40af; }
.badge-toptan { background: #fef3c7; color: #92400e; }

.action-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }

.tab-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.suggestions-panel {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    max-width: 700px;
}
.suggestions-panel.hidden { display: none; }
.suggestions-panel h4 { margin-bottom: 0.75rem; color: var(--primary); font-size: 0.95rem; }
.suggestion-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.suggestion-row {
    display: grid;
    grid-template-columns: 1fr 180px 70px 24px;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
}
.suggestion-text { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-product, .suggestion-qty {
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
}
.confidence-high { color: var(--success); }
.confidence-medium { color: var(--warning); }
.confidence-low { color: var(--text-muted); }
.hint-msg { font-size: 0.85rem; color: var(--warning); margin-bottom: 0.5rem; }

.form-card-wide { max-width: 900px; }

.invoice-type-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.invoice-tab {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border);
    background: var(--card);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all .15s;
}
.invoice-tab.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.order-items-header {
    display: grid;
    grid-template-columns: 2fr 70px 70px 100px 36px;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    padding: 0 0.25rem;
}
.order-item-row {
    display: grid;
    grid-template-columns: 2fr 70px 70px 100px 36px;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.order-item-row select,
.order-item-row input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
}

.order-summary {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}
.summary-line.total {
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    font-size: 1rem;
    color: var(--primary);
}

.badge-invoice { background: #e0e7ff; color: #3730a3; }
.badge-gelir { background: #d1fae5; color: #065f46; }
.badge-gider { background: #fee2e2; color: #991b1b; }
.badge-masraf { background: #fef3c7; color: #92400e; }
.badge-beklemede { background: #fef3c7; color: #92400e; }
.badge-tahsil, .badge-odendi { background: #d1fae5; color: #065f46; }

.finance-panel.hidden { display: none; }

/* Filter */
.filter-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.search-input, .select-input {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}
.search-input { flex: 1; max-width: 300px; }

/* Lists */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.list-item:last-child { border-bottom: none; }
.empty-msg { color: var(--text-muted); font-size: 0.85rem; padding: 0.5rem 0; }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.modal-content h3 { margin-bottom: 1rem; color: var(--primary); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 300;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    transition: all .3s;
}

.toast.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* Exchange rates bar */
.rates-bar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.rates-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.rates-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.rates-updated {
    font-size: 0.75rem;
    opacity: 0.8;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.rate-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 72px;
}

.rate-card.missing {
    opacity: 0.55;
}

.rate-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.rate-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.rate-name {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.rate-value {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.rate-value small {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
}

.rate-change {
    font-size: 0.72rem;
    font-weight: 600;
}

.rate-change.up { color: #86efac; }
.rate-change.down { color: #fca5a5; }

/* Announcements */
.announcements-panel {
    margin-bottom: 1rem;
}

.announcements-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.announcements-head h3 {
    margin: 0;
    font-size: 1rem;
}

.announcements-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 280px;
    overflow-y: auto;
}

.announcement-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: #fafbfc;
}

.announcement-item.ann-cat-onemli {
    border-color: #f59e0b;
    background: #fffbeb;
}

.announcement-item.ann-cat-guncelleme {
    border-color: #3b82f6;
    background: #eff6ff;
}

.announcement-item.ann-cat-haber {
    border-color: #10b981;
    background: #ecfdf5;
}

.announcement-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.announcement-head strong {
    color: var(--primary);
    font-size: 0.95rem;
}

.announcement-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.announcement-body {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text);
}

.announcement-time {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.paytr-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .paytr-layout {
        grid-template-columns: 1fr;
    }
}

/* Raporlar */
.report-filters { margin-bottom: 1rem; }
.sub-tab-bar { flex-wrap: wrap; }
.empty-cell { text-align: center; color: var(--text-muted); padding: 1.5rem !important; }
.text-success { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }
.text-muted { color: var(--text-muted); }
.paid-toggle { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; cursor: pointer; }
.paid-toggle input { cursor: pointer; }
.row-diff td { background: #fffbeb; }
.report-table-compact { font-size: 0.78rem; }
.report-table-compact th, .report-table-compact td { padding: 0.5rem 0.6rem; }

.sales-map-wrap { margin-bottom: 1rem; }
.sales-map-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}
.tr-map-panel, .top-products-panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}
.tr-map-panel h4, .top-products-panel h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 0.95rem;
}
.tr-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 4px;
    max-height: 420px;
    overflow-y: auto;
}
.tr-province-cell {
    border-radius: 6px;
    padding: 0.35rem 0.25rem;
    text-align: center;
    font-size: 0.62rem;
    line-height: 1.2;
    border: 1px solid rgba(255,255,255,0.6);
    min-height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: default;
}
.tr-province-name { font-weight: 600; color: var(--text); }
.tr-province-val { font-size: 0.58rem; color: var(--primary); margin-top: 2px; }
.top-products-list { display: flex; flex-direction: column; gap: 0.4rem; }
.top-product-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0.5rem;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.85rem;
}
.top-product-item .rank {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}
.top-product-item .val { font-weight: 600; color: var(--primary); white-space: nowrap; }

@media (max-width: 900px) {
    .sales-map-grid { grid-template-columns: 1fr; }
    .tr-map-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

@media (max-width: 900px) and (min-width: 769px) {
    .sidebar { width: 60px; }
    .sidebar .logo div:last-child,
    .nav-btn span:not(.icon) { display: none; }
    .logo { justify-content: center; padding: 0 0.5rem 1rem; }
    .nav-btn { justify-content: center; padding: 0.7rem; }
    .content { margin-left: 60px; padding: 1rem; }
    .two-col { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .item-row { grid-template-columns: 1fr; }
    .order-items-header { display: none; }
    .order-item-row { grid-template-columns: 1fr; }
}