/* Belgico POS Admin — modern panel theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --pos-sidebar-w: 240px;
  --pos-topbar-h: 56px;
  --pos-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pos-brand: #2563eb;
  --pos-brand-dark: #1d4ed8;
  --pos-brand-light: #dbeafe;
  --pos-sidebar-bg: #0f172a;
  --pos-sidebar-text: #94a3b8;
  --pos-sidebar-text-active: #f1f5f9;
  --pos-sidebar-hover: rgba(255, 255, 255, 0.06);
  --pos-sidebar-active: rgba(37, 99, 235, 0.22);
  --pos-page-bg: #f8fafc;
  --pos-bg: #f8fafc;
  --pos-text: #0f172a;
  --pos-card-bg: #ffffff;
  --pos-topbar-bg: #0f172a;
  --pos-card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --pos-radius: 12px;
  --pos-radius-sm: 8px;
}

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

body.pos-app {
  font-family: var(--pos-font);
  background: var(--pos-bg);
  color: var(--pos-text);
  -webkit-font-smoothing: antialiased;
  overflow: auto;
}

/* —— Login —— */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.pos-login-wrap {
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.pos-login-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(168,85,247,0.1) 0%, transparent 50%);
  animation: loginGlow 15s ease-in-out infinite alternate;
}

@keyframes loginGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, 5%); }
}

.pos-login-card {
  max-width: 440px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(30,41,59,0.85);
  animation: cardFadeIn 0.6s ease-out;
  position: relative;
  z-index: 1;
}

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

.pos-login-card .card-body {
  padding: 2.5rem 2rem !important;
}

.pos-login-card h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.pos-login-card .text-muted {
  color: #cbd5e1 !important;
}

.pos-login-card .form-label {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.85rem;
}

.pos-login-card .input-group-text {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #60a5fa;
  border-radius: 12px 0 0 12px;
  padding: 0.75rem 1rem;
}

.pos-login-card .form-control {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f1f5f9;
  border-radius: 0 12px 12px 0;
  padding: 0.75rem 1rem;
  transition: all 0.2s;
}

.pos-login-card .form-control::placeholder {
  color: #64748b;
}

.pos-login-card .form-control:focus {
  background: rgba(15,23,42,0.7);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  color: #f1f5f9;
}

.pos-login-card .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 12px;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(37,99,235,0.4);
}

.pos-login-card .btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 6px 20px rgba(37,99,235,0.5);
  transform: translateY(-1px);
}

.pos-login-card .btn-primary:active {
  transform: translateY(0);
}

.pos-login-card .btn-link,
.pos-login-card button.btn-link {
  color: #93c5fd !important;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.pos-login-card .btn-link:hover,
.pos-login-card button.btn-link:hover {
  color: #bfdbfe !important;
}

.pos-login-card .alert-danger {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: 12px;
  font-size: 0.85rem;
}

.pos-login-card .alert-success {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
  border-radius: 12px;
  font-size: 0.85rem;
}

.pos-login-card .btn-outline-secondary {
  border-color: rgba(255,255,255,0.1);
  color: #94a3b8;
  border-radius: 0 12px 12px 0;
}

.pos-login-card .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
  color: #f1f5f9;
}

.pos-login-card .btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(245,158,11,0.3);
  transition: all 0.2s;
}

.pos-login-card .btn-warning:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
  transform: translateY(-1px);
}

.pos-login-card h6 {
  color: #f1f5f9 !important;
}

.pos-login-card hr {
  border-color: rgba(255,255,255,0.06) !important;
}

.pos-login-card .btn-link.btn-sm {
  color: #64748b;
}

.pos-login-card hr {
  border-color: rgba(255,255,255,0.08);
}
  border-color: var(--pos-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pos-login-card .btn-primary {
  padding: 0.65rem 1rem;
  font-weight: 600;
  border-radius: var(--pos-radius-sm);
  background: var(--pos-brand);
  border-color: var(--pos-brand);
}

.pos-login-card .btn-primary:hover {
  background: var(--pos-brand-dark);
  border-color: var(--pos-brand-dark);
}

.pos-login-card .form-control {
  border-radius: var(--pos-radius-sm);
  padding: 0.6rem 0.85rem;
}

/* —— Layout —— */
.pos-topbar {
  height: var(--pos-topbar-h);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.pos-topbar .fw-semibold {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.pos-topbar .badge {
  font-weight: 500;
  padding: 0.4em 0.75em;
}

.pos-sidebar {
  width: var(--pos-sidebar-w);
  position: fixed;
  top: var(--pos-topbar-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--pos-sidebar-bg);
  border-right: none;
  z-index: 1020;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.pos-sidebar::-webkit-scrollbar {
  width: 6px;
}

.pos-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.pos-sidebar #mainNav {
  padding: 0.5rem 0.6rem 1.5rem !important;
}

/* —— Accordion Groups —— */
.pos-nav-group {
  margin-bottom: 0.25rem;
}

.pos-nav-group-label {
  color: var(--pos-sidebar-text);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.75rem;
  border-radius: var(--pos-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pos-nav-group-label:hover {
  background: var(--pos-sidebar-hover);
  color: var(--pos-sidebar-text-active);
}

.pos-nav-group-label i:first-child {
  opacity: 1;
  color: var(--pos-brand);
  width: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
}

.pos-nav-chevron {
  font-size: 0.6rem;
  opacity: 0.5;
  transition: transform 0.25s ease;
}

.pos-nav-group-label[aria-expanded="true"] .pos-nav-chevron {
  transform: rotate(0deg);
}

.pos-nav-group-label[aria-expanded="false"] .pos-nav-chevron {
  transform: rotate(-90deg);
}

.pos-nav-group-items {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.pos-nav-group-items .pos-nav-link {
  padding-left: 1rem;
  font-size: 0.82rem;
}

.pos-sidebar .pos-nav-link {
  color: var(--pos-sidebar-text);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
  margin-bottom: 1px;
  border-radius: var(--pos-radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.pos-sidebar .pos-nav-link i {
  opacity: 1;
  width: 1.25rem;
  text-align: center;
  color: var(--pos-sidebar-text);
}

.pos-sidebar .pos-nav-link:hover {
  color: var(--pos-sidebar-text-active);
  background: var(--pos-sidebar-hover);
}

.pos-sidebar .pos-nav-link.active {
  color: #fff !important;
  font-weight: 600;
  background: var(--pos-sidebar-active) !important;
  border-color: rgba(37, 99, 235, 0.35);
}

.pos-sidebar .pos-nav-link.active i.text-primary {
  color: #93c5fd !important;
}

.pos-main {
  margin-left: var(--pos-sidebar-w);
  margin-top: var(--pos-topbar-h);
  padding: 1.5rem 1.75rem 2rem;
  min-height: calc(100vh - var(--pos-topbar-h));
  overflow-y: auto;
}

.pos-sidebar-backdrop {
  display: none;
  position: fixed;
  top: var(--pos-topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1019;
  backdrop-filter: blur(2px);
}

.pos-sidebar-backdrop.show {
  display: block;
}

@media (max-width: 991.98px) {
  .pos-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
  }

  .pos-sidebar.show {
    transform: translateX(0);
  }

  .pos-main {
    margin-left: 0;
    padding: 1rem;
  }
}

/* —— Page headers —— */
.pos-view > .d-flex h1,
.pos-view > h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

/* —— Cards & stats —— */
.pos-main .card {
  border: 1px solid #e2e8f0;
  border-radius: var(--pos-radius);
  box-shadow: var(--pos-card-shadow);
  overflow: hidden;
}

.pos-main .card-header {
  background: var(--pos-card-bg, #fff);
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: var(--pos-radius) var(--pos-radius) 0 0;
}

.pos-main .card-body {
  background: var(--pos-card-bg, #fff);
  border-radius: 0;
}

.pos-main .card-body:last-child {
  border-radius: 0 0 var(--pos-radius) var(--pos-radius);
}

.pos-stat-card {
  border: none;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pos-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.pos-stat-card .card-body {
  padding: 1.15rem 1.25rem;
  position: relative;
}

.pos-stat-card .text-secondary {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
}

.pos-stat-card .pos-stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}

.pos-view .row.g-3 > div:nth-child(1) .pos-stat-card .card-body {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 60%);
}

.pos-view .row.g-3 > div:nth-child(2) .pos-stat-card .card-body {
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%);
}

.pos-view .row.g-3 > div:nth-child(3) .pos-stat-card .card-body {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 60%);
}

.pos-view .row.g-3 > div:nth-child(4) .pos-stat-card .card-body {
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 60%);
}

.pos-sidebar-brand {
  padding: 0.85rem 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.15rem;
}

.pos-sidebar-brand .brand-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.pos-sidebar-brand .brand-sub {
  color: var(--pos-sidebar-text);
  font-size: 0.68rem;
  margin-top: 0.1rem;
}

/* —— Tables —— */
.pos-table-wrap {
  max-height: min(68vh, 640px);
  overflow: auto;
}

.pos-main .table {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.pos-main .table thead th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  padding: 0.75rem 1rem;
}

.pos-main .table tbody td {
  padding: 0.7rem 1rem;
  vertical-align: middle;
  border-color: #f1f5f9;
}

/* DataTables tablo overflow */
.pos-main .card .dataTables_wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-main .card .dataTables_wrapper table {
  min-width: 100%;
  white-space: nowrap;
}

.pos-main .card .dataTables_wrapper table th,
.pos-main .card .dataTables_wrapper table td {
  white-space: nowrap;
}

/* Scroll yapısını düzelt - çift tablo sorunu */
.pos-main .card .dataTables_scroll {
  overflow: visible !important;
}

.pos-main .card .dataTables_scrollHead {
  display: none !important;
}

.pos-main .card .dataTables_scrollBody {
  overflow: visible !important;
}

.pos-main .card .dataTables_scrollBody table {
  width: 100% !important;
}

.pos-main .table-hover tbody tr:hover {
  background: #f8fafc;
}

.pos-main .card-footer {
  background: var(--pos-card-bg, #fafbfc);
  border-top: 1px solid #e2e8f0;
  padding: 0.65rem 1rem;
  border-radius: 0 0 var(--pos-radius) var(--pos-radius);
}

/* —— DataTables —— */
.pos-main .card .dataTables_wrapper {
  padding: 0.75rem 1rem;
}

.pos-main .card .dataTables_wrapper .dataTables_length,
.pos-main .card .dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}

.pos-main .card .dataTables_wrapper .dataTables_filter input {
  border: 1px solid #e2e8f0;
  border-radius: var(--pos-radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}

.pos-main .card .dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--pos-brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.pos-main .card .dataTables_wrapper .dataTables_length select {
  border: 1px solid #e2e8f0;
  border-radius: var(--pos-radius-sm);
  padding: 0.25rem 1.8rem 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.pos-main .card .dataTables_wrapper .dataTables_info {
  font-size: 0.8rem;
  color: #64748b;
  padding-top: 0.75rem;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate {
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 2px;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--pos-radius-sm) !important;
  margin: 0 !important;
  border: 1px solid #e2e8f0 !important;
  font-size: 0.78rem !important;
  padding: 0.15rem 0.45rem !important;
  line-height: 1.3 !important;
  min-width: 26px !important;
  height: auto !important;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--pos-brand) !important;
  border-color: var(--pos-brand) !important;
  color: #fff !important;
  font-weight: 600;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: default;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate .ellipsis {
  padding: 0.15rem 0.3rem !important;
  font-size: 0.78rem !important;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
}

/* Bootstrap pagination override */
.pos-main .card .dataTables_wrapper .dataTables_paginate ul.pagination {
  margin: 0 !important;
  gap: 2px !important;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate ul.pagination .page-item .page-link,
.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 2px 6px !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  min-height: auto !important;
  height: auto !important;
  border-radius: 4px !important;
}

/* DataTables Bootstrap5 specific overrides */
.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0 !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  height: auto !important;
  min-height: unset !important;
}

.pos-main .card .dataTables_wrapper .dataTables_paginate .paginate_button .page-link {
  padding: 2px 7px !important;
  font-size: 0.75rem !important;
  line-height: 1.3 !important;
  min-height: auto !important;
  height: auto !important;
  border-radius: 4px !important;
  border: 1px solid #e2e8f0 !important;
}

.pos-main .card .dataTables_wrapper .dataTables_processing {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--pos-radius);
  font-size: 0.9rem;
  color: var(--pos-brand);
  padding: 1rem;
}

.pos-main .card table.dataTable thead .sorting:before,
.pos-main .card table.dataTable thead .sorting:after,
.pos-main .card table.dataTable thead .sorting_asc:before,
.pos-main .card table.dataTable thead .sorting_asc:after,
.pos-main .card table.dataTable thead .sorting_desc:before,
.pos-main .card table.dataTable thead .sorting_desc:after {
  opacity: 0.4;
}

.pos-main .card table.dataTable thead .sorting_asc:before,
.pos-main .card table.dataTable thead .sorting_desc:after {
  opacity: 1;
  color: var(--pos-brand);
}

/* —— Buttons —— */
.pos-main .btn-primary {
  background: var(--pos-brand);
  border-color: var(--pos-brand);
  font-weight: 600;
  border-radius: var(--pos-radius-sm);
}

.pos-main .btn-primary:hover {
  background: var(--pos-brand-dark);
  border-color: var(--pos-brand-dark);
}

.pos-main .btn-outline-primary {
  color: var(--pos-brand);
  border-color: #93c5fd;
  font-weight: 500;
  border-radius: var(--pos-radius-sm);
}

.pos-main .btn-outline-primary:hover {
  background: var(--pos-brand-light);
  border-color: var(--pos-brand);
  color: var(--pos-brand-dark);
}

.pos-main .btn-sm {
  border-radius: 6px;
}

/* —— Forms —— */
.pos-main .form-control,
.pos-main .form-select {
  border-radius: var(--pos-radius-sm);
  border-color: #cbd5e1;
  font-size: 0.875rem;
}

.pos-main .form-control:focus,
.pos-main .form-select:focus {
  border-color: var(--pos-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* —— Badges —— */
.badge {
  font-weight: 500;
}

/* —— Modals —— */
.modal-content {
  border: none;
  border-radius: var(--pos-radius);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.25rem;
}

.modal-body .form-label,
.modal-body label.form-label {
  display: block !important;
  visibility: visible !important;
  color: #334155 !important;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.modal-body .mb-2 > .form-label,
.modal-body .mb-3 > .form-label {
  display: block !important;
}
.modal-body .form-control,
.modal-body .form-select {
  color: #0f172a;
}
.modal-body .form-control::placeholder {
  color: #94a3b8;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
  padding: 0.85rem 1.25rem;
}

/* —— Toast —— */
.toast {
  border-radius: var(--pos-radius-sm);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

/* —— Categories tree —— */
.pos-cat-tree {
  padding: 0.75rem;
}

.pos-cat-list {
  padding-left: 0;
  list-style: none;
}

.pos-cat-item > .pos-cat-list {
  margin-left: 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid #e2e8f0;
}

.pos-cat-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--pos-radius-sm);
  background: #fff;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.4rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pos-cat-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.pos-cat-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.pos-cat-thumb-empty {
  display: inline-block;
  width: 42px;
  height: 42px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
}

.pos-cat-name {
  min-width: 0;
  font-weight: 500;
}

/* —— Media / product thumbs —— */
.pos-media-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--pos-radius-sm);
  border: 1px solid #e2e8f0;
}

.pos-product-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.pos-media-preview-wrap {
  flex-shrink: 0;
}

.pos-crop-toolbar {
  background: rgba(15, 23, 42, 0.85);
}
.pos-crop-wrap {
  min-height: min(55vh, 480px);
  max-height: min(70vh, 520px);
  overflow: hidden;
  border-radius: var(--pos-radius-sm);
}

.pos-crop-wrap img {
  max-width: 100%;
  display: block;
}

/* —— Drag sort —— */
.pos-drag-handle {
  cursor: grab;
  padding: 0 0.35rem;
  user-select: none;
  color: #94a3b8;
}

.pos-drag-handle:active {
  cursor: grabbing;
}

tr.sortable-ghost {
  opacity: 0.45;
  background: var(--pos-brand-light) !important;
}

/* —— Alerts —— */
#globalAlert {
  border-radius: var(--pos-radius-sm);
  border: none;
}

#loginError {
  border-radius: var(--pos-radius-sm);
}

/* —— Pagination —— */
.pagination-sm .page-link {
  border-radius: 6px;
  margin: 0 2px;
  border-color: #e2e8f0;
  color: #475569;
}

.pagination-sm .page-item.active .page-link {
  background: var(--pos-brand);
  border-color: var(--pos-brand);
}

/* —— Empty states in tables —— */
.pos-main .table .text-muted {
  color: #94a3b8 !important;
}

/* —— Focus Visible (Erişilebilirlik) —— */
:focus-visible {
  outline: 2px solid var(--pos-brand);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--pos-brand);
  outline-offset: 2px;
  border-radius: var(--pos-radius-sm);
}

/* —— Dashboard —— */
#dashWarnings .alert {
  border-left: 4px solid #f59e0b;
  border-radius: var(--pos-radius-sm);
}

#dashChart {
  max-height: 260px;
}

#dashRecentOrders .font-monospace {
  font-variant-numeric: tabular-nums;
}

#dashActivities .list-group-item {
  border-left: none;
  border-right: none;
  font-size: 0.82rem;
}

#dashActivities .list-group-item:first-child {
  border-top: none;
}

#dashTopProducts td {
  padding: 0.5rem 0.75rem;
}

.pos-stat-card .pos-stat-value small {
  font-size: 0.75rem;
  font-weight: 500;
}

/* —— Skip to Content —— */
.pos-skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--pos-brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 var(--pos-radius-sm) 0;
  text-decoration: none;
}

.pos-skip-link:focus {
  top: 0;
}

/* —— Skeleton Loading —— */
.pos-skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: pos-shimmer 1.5s infinite;
  border-radius: var(--pos-radius-sm);
  min-height: 1rem;
}

@keyframes pos-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pos-skeleton-text { height: 0.85rem; margin-bottom: 0.5rem; }
.pos-skeleton-text:last-child { width: 60%; }
.pos-skeleton-card { height: 80px; border-radius: var(--pos-radius); }
.pos-skeleton-row { height: 2.5rem; margin-bottom: 0.25rem; }

/* —— Toast Variants —— */
.toast.text-bg-warning {
  background-color: #f59e0b !important;
  color: #fff !important;
}

.toast.text-bg-info {
  background-color: #0ea5e9 !important;
  color: #fff !important;
}

/* —— Empty State —— */
.pos-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.pos-empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.pos-empty-state h6 {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.pos-empty-state p {
  color: #64748b;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* —— Sidebar Nav Groups (old — overridden by accordion) —— */
/* Accordion styles are defined above in the sidebar section */

/* —— Form Validation States —— */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.invalid-feedback {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

/* —— Keyboard Shortcut Badge —— */
.pos-kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-family: var(--pos-font);
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 1px 0 #cbd5e1;
  line-height: 1.4;
}

/* —— Print Styles —— */
@media print {
  .pos-topbar,
  .pos-sidebar,
  .pos-sidebar-backdrop,
  #btnSidebar,
  .toast-container,
  .modal-backdrop {
    display: none !important;
  }

  .pos-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
}
