/**
 * Opti Glass – main layout and UI styles (moved from layouts/main.php)
 */

/* Global: all table cells left-aligned */
table th,
table td {
    text-align: left !important;
}

/* Select2: yükseklik normal input (.form-control) ile aynı */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    border-radius: .35rem;
    border-color: #ddd;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    padding-left: 8px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}
/* Select2: arama kutusu her zaman görünsün */
.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 6px 10px;
    min-height: 32px;
    border: 1px solid #aaa;
}
.select2-container--default .select2-search--dropdown {
    padding: 8px;
    display: block;
}

/* ── Reset & Base ── */
*,*::before,*::after{box-sizing:border-box}
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #fafafa;
    color: #111;
    min-height: 100vh;
    font-size: .875rem;
}

/* ── Sidebar ── */
.og-sidebar {
    background: #0a0a0a;
    width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    bottom: 0;
    padding: 0 0 1.25rem 0;
    overflow-y: auto;
    z-index: 1020;
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
.og-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.og-sidebar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
}
.og-sidebar-brand:hover { color: #fff; text-decoration: none; }
.og-sidebar-bottom {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.og-sidebar-label {
    color: rgba(255,255,255,.3);
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 0 1.25rem .4rem;
    margin-top: .75rem;
}
.og-sidebar-label:first-child { margin-top: 0; }
.og-sidebar .nav-link {
    color: rgba(255,255,255,.7);
    padding: .5rem 1.25rem;
    font-size: .8rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-left: 3px solid transparent;
    transition: all .15s ease;
}
.og-sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: .82rem;
}
.og-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
    border-left-color: rgba(255,255,255,.15);
}
.og-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left-color: #fff;
    font-weight: 500;
}

/* ── Main Content ── */
.og-content {
    margin-left: 220px;
    padding: 1.75rem 2rem;
    min-height: 100vh;
}

/* ── Page Title ── */
.og-page-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: -.01em;
    text-align: center;
}

/* ── Cards ── */
.card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    background: #fff;
}
.card-title { font-weight: 600; }

/* ── Buttons ── */
.btn { font-size: .8rem; font-weight: 500; letter-spacing: .02em; border-radius: .35rem; }
.btn-dark { background: #111; border-color: #111; }
.btn-dark:hover { background: #222; border-color: #222; }
.btn-outline-dark { border-color: #111; color: #111; }
.btn-outline-dark:hover { background: #111; color: #fff; }
.btn-danger { background: #b00020; border-color: #b00020; }
.btn-danger:hover { background: #8e001a; border-color: #8e001a; }

/* ── Forms ── */
.form-control {
    font-size: .82rem;
    border-color: #ddd;
    border-radius: .35rem;
}
.form-control:focus {
    border-color: #111;
    box-shadow: 0 0 0 .15rem rgba(0,0,0,.08);
}
label {
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #555;
    margin-bottom: .25rem;
}

/* ── Tables ── */
.table thead th {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    border-bottom-width: 1px;
    font-weight: 600;
}
.table td { font-size: .82rem; vertical-align: middle; }

/* ── Tabs (i18n description tabs) ── */
.nav-tabs { border-bottom: 1px solid #e0e0e0; }
.nav-tabs .nav-link {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    border: none;
    border-bottom: 2px solid transparent;
    padding: .5rem .9rem;
}
.nav-tabs .nav-link.active {
    color: #111;
    border-bottom-color: #111;
    background: transparent;
}
.tab-content { padding: 1rem; }

/* ── Alerts ── */
.alert { font-size: .82rem; border-radius: .35rem; }

/* ── DataTables overrides ── */
.dataTables_wrapper { font-size: .8rem; }
.dataTables_wrapper .dataTables_filter input {
    font-size: .8rem;
    border: 1px solid #ddd;
    border-radius: .35rem;
    padding: .35rem .6rem;
    outline: none;
    transition: border-color .15s;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #111;
    box-shadow: 0 0 0 .12rem rgba(0,0,0,.06);
}
.dataTables_wrapper .dataTables_length select {
    font-size: .8rem;
    border: 1px solid #ddd;
    border-radius: .35rem;
    padding: .25rem .4rem;
    min-width: 80px;
    width: auto;
}
.dataTables_wrapper .dataTables_info {
    font-size: .75rem;
    color: #888;
    padding-top: .75rem;
}
/* DataTables pagination: Bootstrap mavisi yerine siyah */
.dataTables_wrapper .dataTables_paginate .page-link,
.dataTables_wrapper .dataTables_paginate a.paginate_button {
    color: #111 !important;
}
.dataTables_wrapper .dataTables_paginate .page-link:hover,
.dataTables_wrapper .dataTables_paginate a.paginate_button:hover:not(.disabled) {
    color: #111 !important;
    border-color: #111 !important;
}
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    font-size: .75rem;
    color: #888;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    padding: .75rem 1rem;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: .75rem;
}
table.dataTable { border-collapse: collapse !important; }
table.dataTable thead th { border-bottom: 1px solid #e8e8e8 !important; padding: .6rem 1rem !important; }
table.dataTable tbody td { padding: .55rem 1rem !important; border-bottom: 1px solid #f0f0f0; }
table.dataTable tbody tr:hover { background-color: #f8f8f8 !important; }
table.dataTable tbody tr:last-child td { border-bottom: none; }
/* DataTables selected row: mavi bant kaldırıldı, seçili satır hafif gri + sol çizgi */
table.dataTable > tbody > tr.selected,
table.dataTable > tbody > tr.selected > td,
table.dataTable > tbody > tr.selected > th,
table.dataTable.table-hover > tbody > tr.selected:hover,
table.dataTable.table-hover > tbody > tr.selected:hover > td,
table.dataTable.table-hover > tbody > tr.selected:hover > th {
    background-color: #eef0f2 !important;
    color: #000 !important;
    box-shadow: none !important;
}
table.dataTable > tbody > tr.selected > td:first-child,
table.dataTable.table-hover > tbody > tr.selected:hover > td:first-child {
    border-left: 3px solid #0a0a0a !important;
}

/* ── Remove horizontal scrollbar from DataTables ── */
.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: hidden !important;
}
.table-responsive {
    overflow-x: visible !important;
}
.dataTables_wrapper {
    overflow-x: hidden !important;
}

/* ── Responsive ── */
.og-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 1.1rem;
    padding: .35rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.og-sidebar-toggle:hover { color: #fff; }
.og-sidebar-toggle-fixed {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1010;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #0a0a0a;
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.og-sidebar-toggle-fixed:hover { background: #1a1a1a; color: #fff; }
@media (max-width: 991.98px) {
    .og-sidebar-toggle { display: inline-flex; }
    .og-sidebar-toggle-fixed { display: inline-flex; }
    .og-sidebar {
        transform: translateX(-100%);
        width: 240px;
    }
    .og-sidebar.open { transform: translateX(0); }
    .og-content { margin-left: 0; padding: 1.25rem 1rem; }
}

/* ── Scrollbar ── */
.og-sidebar::-webkit-scrollbar { width: 4px; }
.og-sidebar::-webkit-scrollbar-track { background: transparent; }
.og-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* ── SweetAlert2: Opti Glass theme ── */
.og-swal.swal2-popup {
    width: 400px;
    max-width: 92vw;
    padding: 0;
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(0,0,0,.2), 0 12px 24px rgba(0,0,0,.14);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.og-swal .swal2-icon {
    width: 64px;
    height: 64px;
    margin: 24px auto 0;
    border-width: 3px;
}
.og-swal .swal2-icon.swal2-warning {
    border-color: #f59e0b;
    color: #f59e0b;
}
.og-swal .swal2-icon.swal2-success {
    border-color: #10b981;
    color: #10b981;
}
.og-swal .swal2-icon.swal2-error {
    border-color: #ef4444;
    color: #ef4444;
}
.og-swal .swal2-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    padding: 16px 24px 4px;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0.02em;
}
.og-swal .swal2-html-container {
    font-size: 0.9375rem;
    color: #555;
    padding: 8px 24px 20px;
    line-height: 1.5;
    text-transform: none;
}
.og-swal .swal2-actions {
    margin: 0 0 20px;
    padding: 0 24px;
    gap: 10px;
}
.og-swal .swal2-styled {
    margin: 0;
    padding: 10px 22px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    transition: transform .12s ease, box-shadow .12s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.og-swal .swal2-styled:focus {
    box-shadow: none;
}
.og-swal .swal2-styled.swal2-confirm {
    background: #dc2626;
    color: #fff;
    border: none;
}
.og-swal .swal2-styled.swal2-confirm:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,.35);
}
.og-swal .swal2-styled.swal2-cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.og-swal .swal2-styled.swal2-cancel:hover {
    background: #e5e7eb;
    color: #111;
}
.og-swal-toast.swal2-popup {
    padding: 12px 20px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,.16);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.og-swal-toast .swal2-title {
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
}
.og-swal-toast .swal2-success { border-color: #10b981; color: #10b981; }
.og-swal-toast .swal2-error { border-color: #ef4444; color: #ef4444; }

/* ── Global uppercase: UI labels, buttons, headings (not form input values) ── */
.og-content .btn,
.og-content .card-header,
.og-content .card-title,
.og-content .og-page-title,
.og-content h1, .og-content h2, .og-content h3, .og-content h4, .og-content h5, .og-content h6 {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.og-content .form-control,
.og-content input:not([type="submit"]):not([type="button"]):not([type="reset"]),
.og-content textarea,
.og-content select {
    text-transform: none;
}

/* ── View utilities (replacing inline styles) ── */
.og-gap-4 { gap: 4px; }
.og-gap-15 { gap: .75rem; }
.og-gap-25 { gap: .25rem; }
.og-gap-35 { gap: .35rem; }
.og-gap-5 { gap: .5rem; }
.og-col-seq { width: 60px; }
.og-col-actions { width: 100px; }
.og-col-actions-lg { width: 160px; }
.og-col-actions-xl { width: 180px; }
.og-col-fav { width: 40px; }
.og-input-w-80 { width: 80px; }
.og-select-w-180 { width: 180px; }
.og-select-w-280 { width: 280px; }
.og-modal-header-border { border-bottom: 1px solid #e8e8e8; }
.og-modal-title-bold { font-weight: 600; }
.og-modal-footer-border { border-top: 1px solid #e8e8e8; }
.og-measure-entry-row { display: none; background: #fafafa; }
.og-measure-entry-row.show { display: table-row; }
.og-select-full { width: 100%; }
.og-readonly-bg { background: #f5f5f5; }
.og-auth-logo-mb { margin-bottom: 1.5rem; }
.og-auth-lang-span { font-size: .7rem; color: #888; text-transform: uppercase; letter-spacing: .08em; }
.og-card-body-muted { font-size: .82rem; color: #888; }
.og-hidden { display: none; }
/* Rapor modalı: başlık+KDV/İskonto sadece Fiyat Teklifi/Maliyet'te gösterilir; .d-flex ile çakışmasın diye burada !important */
#ogReportModal #ogReportModalHeaderOptions.og-hidden { display: none !important; }
/* Order items table col widths (use on table or colgroup) */
.order-items-table col:nth-child(1) { width: 34%; }
.order-items-table col:nth-child(2) { width: 9%; }
.order-items-table col:nth-child(3) { width: 9%; }
.order-items-table col:nth-child(4) { width: 6%; }
.order-items-table col:nth-child(5) { width: 10%; }
.order-items-table col:nth-child(6) { width: 10%; }
.order-items-table col:nth-child(7) { width: 16%; }
.order-items-table col:nth-child(8) { width: 80px; }
.layout-fields-table .og-label-m0 { margin: 0; cursor: pointer; }
.page-preview-box { width: 100%; max-width: 280px; aspect-ratio: 210/297; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; }
.label-preview-box-size { width: 220px; height: 150px; margin-bottom: 1rem; }
.composition-heading { font-weight: 600; font-size: .85rem; margin-bottom: .75rem; }
.og-panel-hidden { display: none; }
.og-panel-visible { display: block; }
.og-summary-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #888; }
.og-summary-value { font-size: 1.1rem; font-weight: 700; }
.og-movements-title { font-weight: 600; font-size: .9rem; }
.og-col-120 { width: 120px; }
.og-col-80 { width: 80px; }
.og-col-140 { width: 140px; }
.og-card-link { color: inherit; }
.og-card-hover { transition: box-shadow .15s, transform .15s; cursor: pointer; }
.og-card-icon-wrap { width: 36px; height: 36px; background: #111; border-radius: .5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.og-card-icon-wrap.mb { margin-bottom: .75rem; }
.og-card-icon { color: #fff; font-size: .85rem; }
.og-card-label { font-weight: 600; font-size: .85rem; }
.og-card-label.mb { margin-bottom: .25rem; }
.og-card-desc { font-size: .75rem; color: #888; line-height: 1.4; }

/* Dashboard anasayfa stat kartları (siyah-beyaz) */
.og-dash-stat-card {
    position: relative;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .6rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
    overflow: hidden;
}
.og-dash-stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #1a1a1a;
    opacity: 0;
    transition: opacity .2s ease;
}
.og-dash-stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    border-color: rgba(0,0,0,.12);
    transform: translateY(-2px);
}
.og-dash-stat-card:hover::before { opacity: 1; }
.og-dash-stat-card .card-body {
    padding: 1.1rem 1rem;
    position: relative;
}
.og-dash-stat-label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #666;
    margin-bottom: .4rem;
}
.og-dash-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin-bottom: .35rem;
}
.og-dash-stat-meta {
    font-size: .78rem;
    color: #888;
    line-height: 1.35;
}

/* Global rapor modalı (iframe ile rapor gösterimi) – içeriğe uygun genişlik */
#ogReportModal .modal-body { padding: 0; }
#ogReportModal #ogReportFrame { display: block; min-height: 70vh; width: 100%; }

/* Dashboard KPI cards (genel) */
.og-dash-card { transition: box-shadow .15s, transform .15s; cursor: pointer; }
.og-dash-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.15); transform: translateY(-2px); }
.og-dash-status-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); border-color: rgba(0,0,0,.2) !important; }
.og-dash-status-row:hover { background: rgba(0,0,0,.03); }
.og-status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: .5rem; flex-shrink: 0; }
.og-section-heading { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.og-section-desc { font-size: .78rem; color: #888; }
.og-section-desc-sm { font-size: .82rem; color: #888; }
.og-params-heading { font-weight: 600; font-size: .85rem; margin-bottom: 1rem; }
.og-gap-75 { gap: .75rem; }
.og-gap-1 { gap: 1rem; }
.og-label-override { text-transform: none; letter-spacing: 0; color: #111; font-size: .82rem; }
.og-type-credit { color: #2a7d2a; }
.og-type-debit { color: #b00020; }

/* ── Report label page (standalone) ── */
.label-settings-form .form-group { margin-bottom: 0.5rem; }
.label-settings-form label { font-size: 0.85rem; margin-bottom: 0.2rem; }
.label-drawer-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1040;
}
.label-drawer-overlay.open { display: block; }
.label-drawer {
    position: fixed; top: 0; right: -540px; width: 540px; max-width: 96vw;
    height: 100vh; background: #fff; z-index: 1050; box-shadow: -4px 0 24px rgba(0,0,0,.15);
    transition: right .25s ease; display: flex; flex-direction: column;
}
.label-drawer.open { right: 0; }
.label-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem 1rem; border-bottom: 1px solid #dee2e6; background: #f8f9fa;
}
.label-drawer-header h6 { margin: 0; font-weight: 600; }
.label-drawer-body { flex: 1; overflow-y: auto; padding: 1rem; }
.label-drawer-footer { padding: .6rem 1rem; border-top: 1px solid #dee2e6; background: #f8f9fa; text-align: right; }
.layout-fields-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.layout-fields-table th { padding: .35rem .4rem; border-bottom: 2px solid #dee2e6; text-align: center; font-weight: 600; white-space: nowrap; background: #f8f9fa; }
.layout-fields-table th:first-child { text-align: left; }
.layout-fields-table td { padding: .3rem .4rem; border-bottom: 1px solid #eee; vertical-align: middle; text-align: center; }
.layout-fields-table td:first-child { text-align: left; font-weight: 500; }
.layout-fields-table .coord-cell input {
    width: 56px; text-align: center; padding: .2rem .3rem;
    border: 1px solid #ced4da; border-radius: .2rem; font-size: .8rem;
}
.layout-fields-table .coord-cell input:focus { border-color: #333; outline: none; box-shadow: 0 0 0 2px rgba(0,0,0,.1); }
.layout-fields-table .vis-cell input { width: 16px; height: 16px; cursor: pointer; }
.label-preview-box { border: 2px solid #333; background: #fff; position: relative; box-sizing: border-box; margin: 0 auto; }
.label-preview-box .field-pos {
    position: absolute; font-size: 9px; padding: 1px 3px;
    border: 1px dashed #999; background: rgba(255,255,200,.6);
    min-height: 12px; white-space: nowrap; line-height: 1.3;
}
/* Report label page: uppercase overrides (standalone) */
body.bg-light .container-fluid .btn,
body.bg-light .container-fluid label,
body.bg-light .container-fluid h1, body.bg-light .container-fluid h2, body.bg-light .container-fluid h3, body.bg-light .container-fluid h4, body.bg-light .container-fluid h5 { text-transform: uppercase; letter-spacing: 0.02em; }
body.bg-light .container-fluid .form-control, body.bg-light .container-fluid input, body.bg-light .container-fluid textarea, body.bg-light .container-fluid select { text-transform: none; }

/* ── Auth page (login/register standalone) ── */
body.auth-page *, body.auth-page *::before, body.auth-page *::after { box-sizing: border-box; }
body.auth-page {
    min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
    background: #fafafa; color: #111; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: .875rem;
}
body.auth-page .auth-wrapper { width: 100%; max-width: 420px; padding: 1.5rem; }
body.auth-page .auth-logo { text-align: center; margin-bottom: 2rem; }
body.auth-page .auth-logo span { font-size: 1.25rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
body.auth-page .auth-card {
    background: #fff; border-radius: .75rem; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 24px 48px rgba(0,0,0,.08); padding: 2rem 1.75rem 1.75rem;
}
body.auth-page .nav-tabs { border-bottom: 1px solid #e8e8e8; margin-bottom: 1.5rem; }
body.auth-page .nav-tabs .nav-link {
    border: none; border-bottom: 2px solid transparent; font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .1em; color: #aaa; padding: .6rem 0; margin-right: 1.5rem;
}
body.auth-page .nav-tabs .nav-link.active { color: #111; border-bottom-color: #111; background: transparent; }
body.auth-page .form-control { font-size: .82rem; border-color: #e0e0e0; border-radius: .35rem; padding: .55rem .75rem; }
body.auth-page .select2-container--default .select2-selection--single {
    height: calc(1.1rem + 1.5em) !important; min-height: calc(1.1rem + 1.5em); padding-top: .55rem; padding-bottom: .55rem;
    border-radius: .35rem; border-color: #e0e0e0;
}
body.auth-page .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.5; padding-left: .75rem; }
body.auth-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }
body.auth-page .form-control:focus { border-color: #111; box-shadow: 0 0 0 .15rem rgba(0,0,0,.06); }
body.auth-page label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #888; margin-bottom: .2rem; }
body.auth-page .btn-auth {
    background: #111; color: #fff; border: none; width: 100%; padding: .6rem; font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em; border-radius: .35rem; cursor: pointer; transition: background .15s;
}
body.auth-page .btn-auth:hover { background: #222; color: #fff; }
body.auth-page .divider { display: flex; align-items: center; margin: 1.25rem 0; color: #ccc; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
body.auth-page .divider::before, body.auth-page .divider::after { content: ''; flex: 1; border-bottom: 1px solid #e8e8e8; }
body.auth-page .divider span { margin: 0 .75rem; }
body.auth-page .oauth-buttons { display: flex; flex-direction: column; gap: .5rem; }
body.auth-page .btn-oauth {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; padding: .55rem;
    border: 1px solid transparent; border-radius: .35rem; font-size: .78rem; font-weight: 500; cursor: pointer; transition: all .15s;
}
body.auth-page .btn-google { background: #fff; color: #333; border-color: #e0e0e0; }
body.auth-page .btn-google:hover { background: #111; border-color: #111; color: #fff; }
body.auth-page .btn-facebook { background: #1877f2; color: #fff; }
body.auth-page .btn-facebook:hover { background: #166fe5; color: #fff; }
body.auth-page .btn-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
body.auth-page .btn-instagram:hover { opacity: .95; color: #fff; }
body.auth-page .alert { font-size: .82rem; border-radius: .35rem; }
body.auth-page .auth-lang-switch { display: flex; align-items: center; }
body.auth-page .auth-lang-btn {
    display: inline-block; padding: .25rem .5rem; margin-left: 2px; font-size: .7rem; font-weight: 600; letter-spacing: .05em;
    color: #888; text-decoration: none; border: 1px solid #e0e0e0; border-radius: .25rem; transition: all .15s;
}
body.auth-page .auth-lang-btn:hover { color: #111; border-color: #111; background: #f5f5f5; text-decoration: none; }
body.auth-page .auth-lang-btn.active { background: #111; color: #fff; border-color: #111; }

/* ── Orders index (split layout + table selection) ── */
.orders-split-container {
    display: flex; flex-direction: column; height: calc(100vh - 11rem); min-height: 500px;
}
.orders-split-top { flex: 1 1 55%; max-height: 55%; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.orders-split-top .table-responsive { overflow-y: auto; flex: 1; }
.orders-split-bottom { flex: 1 1 45%; max-height: 45%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.orders-split-bottom .card-header { font-size: .8rem; padding: .4rem .75rem; flex-shrink: 0; }
.orders-split-bottom .card-body { overflow-y: auto; flex: 1; padding: .5rem .75rem; min-height: 0; }
.orders-split-bottom .table { font-size: .75rem; }
.orders-split-bottom .table th, .orders-split-bottom .table td { padding: .35rem .6rem; }
#ordersTable tbody tr { cursor: pointer; }
#ordersTable tbody tr.selected,
#ordersTable tbody tr.selected > td {
    background-color: #eef0f2 !important;
    color: #000 !important;
    box-shadow: none !important;
}
#ordersTable tbody tr.selected > td:first-child {
    border-left: 3px solid #0a0a0a !important;
}
#ordersTable tbody tr:hover:not(.selected) { background-color: rgba(0,0,0,.04) !important; }
#ordersTable .btn, #ordersTable a.btn { pointer-events: auto; }
#orderReportButtons .order-report-btn.disabled { pointer-events: none; opacity: .6; }

/* ── UI/UX polish pass (grayscale only) ── */

/* 1) Sidebar depth and hierarchy */
.og-sidebar {
    background: linear-gradient(180deg, #0f0f0f 0%, #090909 100%);
    box-shadow: 8px 0 22px rgba(0,0,0,.16);
}
.og-sidebar-top {
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding-bottom: 1.15rem;
}
.og-sidebar-brand {
    text-shadow: 0 2px 14px rgba(255,255,255,.08);
}
.og-sidebar-label {
    position: relative;
    margin-top: 1rem;
    padding-top: .75rem;
}
.og-sidebar-label::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    top: 0;
    height: 1px;
    background: rgba(255,255,255,.08);
}
.og-sidebar-label:first-of-type::before {
    display: none;
}
.og-sidebar .nav-link {
    margin: 0 .65rem;
    border-left: none;
    border-radius: .45rem;
    padding: .55rem .75rem;
}
.og-sidebar .nav-link:hover {
    background: rgba(255,255,255,.075);
}
.og-sidebar .nav-link.active {
    background: rgba(255,255,255,.12);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.og-sidebar-bottom .nav-link:last-child {
    opacity: .84;
}
.og-sidebar-bottom .nav-link:last-child:hover {
    opacity: 1;
}

/* 2) Cards */
.card {
    position: relative;
    border: 1px solid rgba(0,0,0,.065);
    border-radius: .62rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 6px 14px rgba(0,0,0,.03);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    border-color: rgba(0,0,0,.11);
}
.card:not(.og-dash-stat-card)::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: rgba(0,0,0,.9);
    opacity: .05;
}
.card-header {
    background: linear-gradient(180deg, #fbfbfb, #fff);
    border-bottom: 1px solid rgba(0,0,0,.06);
    font-weight: 600;
}

/* 3) Tables */
table.dataTable thead th,
.table thead th {
    background: #f8f9fa;
}
table.dataTable tbody tr {
    transition: background-color .15s ease;
}
table.dataTable tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,.015);
}
table.dataTable tbody tr td:first-child {
    border-left: 3px solid transparent;
    transition: border-left-color .15s ease;
}
table.dataTable tbody tr:hover td:first-child {
    border-left-color: rgba(0,0,0,.2);
}

/* 4) Buttons */
.btn {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-dark {
    box-shadow: 0 1px 3px rgba(0,0,0,.14);
}
.btn-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.btn-dark:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.btn-outline-dark:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* 5) Forms + Select2 */
.form-control {
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.form-control:hover:not(:focus) {
    border-color: #bfbfbf;
}
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
label {
    font-size: .76rem;
    color: #5e5e5e;
}
.select2-container--default .select2-selection--single {
    transition: border-color .18s ease, box-shadow .18s ease;
}
.select2-container--default .select2-selection--single:hover {
    border-color: #bfbfbf;
}
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #111;
    color: #fff;
}

/* 6) Page title */
.og-page-title {
    position: relative;
    margin-bottom: 1.45rem;
    padding-bottom: .68rem;
}
.og-page-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 42px;
    height: 2px;
    border-radius: 1px;
    background: #111;
    transform: translateX(-50%);
    opacity: .9;
}

/* 7) Modals */
.modal-content {
    border: none;
    border-radius: .62rem;
    box-shadow: 0 18px 52px rgba(0,0,0,.22);
    overflow: hidden;
}
.modal-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.modal-footer {
    border-top: 1px solid rgba(0,0,0,.06);
    gap: .4rem;
}
.modal.fade .modal-dialog {
    transition: transform .22s ease-out, opacity .22s ease-out;
    transform: translateY(10px);
}
.modal.show .modal-dialog {
    transform: translateY(0);
}
.modal-backdrop.show {
    opacity: .6;
}

/* 8) Dashboard cards */
.og-dash-stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
}
.og-dash-stat-meta {
    font-size: .79rem;
    color: #777;
}

/* 9) Global scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,.25);
}

/* 10) Auth page polish */
body.auth-page .auth-card {
    box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 28px 52px rgba(0,0,0,.09);
}
body.auth-page .nav-tabs .nav-link {
    transition: color .15s ease, border-color .15s ease, opacity .15s ease;
}
body.auth-page .form-group {
    margin-bottom: .95rem;
}
body.auth-page .btn-auth {
    box-shadow: 0 1px 3px rgba(0,0,0,.14);
}
body.auth-page .btn-auth:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,.22);
    transform: translateY(-1px);
}

/* 11) Micro-interactions */
@keyframes ogFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert {
    animation: ogFadeIn .28s ease;
}
a,
.nav-link,
.card-link {
    transition: color .15s ease, opacity .15s ease;
}
.tooltip-inner {
    background: #111;
    color: #fff;
    border-radius: .35rem;
    font-size: .74rem;
    letter-spacing: .02em;
}
.bs-tooltip-top .arrow::before {
    border-top-color: #111;
}
.bs-tooltip-bottom .arrow::before {
    border-bottom-color: #111;
}
.bs-tooltip-left .arrow::before {
    border-left-color: #111;
}
.bs-tooltip-right .arrow::before {
    border-right-color: #111;
}
#orderDetailPlaceholder {
    color: #737373 !important;
    letter-spacing: .01em;
}

/* 12) Orders split layout */
.orders-split-top.card {
    border-bottom-left-radius: .45rem;
    border-bottom-right-radius: .45rem;
}
.orders-split-bottom.card {
    border-top-left-radius: .45rem;
    border-top-right-radius: .45rem;
    border-top: 1px solid rgba(0,0,0,.08);
}
.orders-split-bottom .card-header {
    background: linear-gradient(180deg, #f7f7f7, #fff);
}
#orderReportButtons .btn {
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
#orderReportButtons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 9px rgba(0,0,0,.15);
}
.og-gap-8 {
    gap: .5rem;
}
#orderReportButtons .og-action-group,
#orderFormReportButtons .og-action-group {
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    border-radius: .25rem;
}
#orderReportButtons .og-action-group .btn,
#orderFormReportButtons .og-action-group .btn {
    min-width: 34px;
}

/* ── Orders optimization modals ── */
#optimizeGlassModal .list-group-item {
    border: 1px solid #eee;
    border-radius: .35rem;
}
#optimizeGlassModal .list-group-item + .list-group-item {
    margin-top: .35rem;
}
#optimizeResultModal .modal-dialog {
    max-width: 960px;
}
#optimizeResultModal .og-opt-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
    background: linear-gradient(180deg, #ffffff, #f5f5f5);
    border-bottom: 2px solid #222;
    padding: .6rem .75rem;
}
#optimizeResultModal .og-opt-svg-wrap {
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: .35rem;
    padding: 1rem;
    text-align: center;
    min-height: 240px;
}
#optimizeResultModal .og-opt-svg-wrap svg {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
.og-opt-svg {
    border: 3px solid #000;
}
#optimizeResultModal .og-opt-counter {
    font-size: .78rem;
    font-weight: 700;
    min-width: 110px;
    text-align: center;
    padding: .25rem .45rem;
    border: 1px solid #dcdcdc;
    border-radius: .3rem;
    background: #fff;
}
#optimizeResultModal .og-opt-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .35rem;
    margin-top: 0;
    margin-right: 0;
    width: 100%;
}
#optimizeResultModal .og-opt-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: .45rem;
    align-items: stretch;
    margin-top: 0;
    flex: 1 1 auto;
}
#optimizeResultModal .og-opt-stat-item {
    text-align: left;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: .35rem;
    background: #fff;
    padding: .4rem .55rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}
#optimizeResultModal .og-opt-stat-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
#optimizeResultModal .og-opt-stat-value {
    font-size: .88rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}
#optimizeResultModal .og-opt-stat-label {
    font-size: .56rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.15;
    margin-top: .12rem;
}
#optimizeResultModal .og-opt-header .d-flex.align-items-center.ml-auto {
    margin-left: 0 !important;
}
#optimizeResultModal .og-opt-actions {
    gap: .45rem;
}
#optimizeResultModal .og-opt-print-stack {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    width: 230px;
    max-width: 100%;
}
#optimizeResultModal #btnPrintOptimization {
    width: 100%;
}
#optimizeResultModal .og-opt-pager .btn {
    flex: 0 0 auto;
}
#optimizeResultModal .og-opt-pager .og-opt-counter {
    flex: 1 1 auto;
    min-width: 0;
}
@media (max-width: 1199.98px) {
    #optimizeResultModal .og-opt-stats {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
    #optimizeResultModal .og-opt-print-stack {
        width: 210px;
    }
}
@media (max-width: 767.98px) {
    #optimizeResultModal .og-opt-stats {
        grid-template-columns: 1fr;
    }
    #optimizeResultModal .og-opt-actions {
        width: 100%;
        justify-content: space-between;
    }
    #optimizeResultModal .og-opt-print-stack {
        width: calc(100% - 36px);
    }
}

#optimizeSetupModal .og-opt-setup-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
#optimizeSetupModal .og-opt-setup-summary-item {
    border: 1px solid #e0e0e0;
    border-radius: .4rem;
    background: #f8f8f8;
    padding: .85rem .95rem;
    text-align: center;
}
#optimizeSetupModal .og-opt-setup-summary-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
}
#optimizeSetupModal .og-opt-setup-summary-label {
    font-size: .68rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .05em;
}
#optimizeSetupModal .og-opt-setup-section-title {
    font-size: .76rem;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .45rem;
    border-bottom: 2px solid #111;
    padding-bottom: .3rem;
}
#optimizeSetupModal .og-opt-setup-sheet-item {
    border: 1px solid #e0e0e0;
    border-radius: .35rem;
    padding: .5rem .65rem;
    margin-bottom: .35rem;
    background: #fff;
    transition: background .15s;
}
#optimizeSetupModal .og-opt-setup-sheet-item:hover {
    background: #f5f5f5;
}
#optimizeSetupModal .og-opt-stock-qty {
    border: 1px solid #ccc;
    border-radius: .25rem;
    text-align: center;
    font-weight: 600;
}
#optimizeSetupModal .og-opt-priority-radio {
    cursor: pointer;
}
#optimizeSetupModal .og-opt-custom-sheets-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
#optimizeSetupModal .og-opt-custom-sheet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e0e0e0;
    border-radius: .35rem;
    background: #fff;
    padding: .5rem .65rem;
}
#optimizeSetupModal .og-opt-custom-sheet-item:hover {
    background: #f5f5f5;
}
.og-opt-sheet-dim {
    font-weight: 600;
    font-size: .88rem;
    color: #222;
}
.og-opt-sheet-qty-badge {
    font-size: .75rem;
    font-weight: 600;
    color: #555;
    background: #f0f0f0;
    border-radius: .2rem;
    padding: .1rem .4rem;
}
#optimizeSetupModal .modal-header {
    border-bottom: 2px solid #111;
    padding: .65rem 1rem;
}
#optimizeSetupModal .modal-header .modal-title {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
#optimizeSetupModal .modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: .55rem 1rem;
}
.og-opt-unplaced-wrap {
    margin-top: .75rem;
    padding: .75rem;
    border: 2px solid #dc3545;
    border-radius: .35rem;
    background: #fff5f5;
}
.og-opt-unplaced-title {
    font-size: .82rem;
    font-weight: 700;
    color: #dc3545;
    text-transform: uppercase;
    margin-bottom: .4rem;
}
.og-opt-unplaced-list {
    font-size: .78rem;
    color: #333;
}
.og-opt-unplaced-list span {
    display: inline-block;
    background: #fce4e4;
    border: 1px solid #f5c6cb;
    border-radius: .25rem;
    padding: .15rem .5rem;
    margin: .15rem .2rem;
    font-weight: 600;
}
