/* SK Inventory — custom layer on top of Tailwind */

:root { color-scheme: light; }
html.dark { color-scheme: dark; }

/* Smooth theme switch (but not on transform-heavy elements) */
body, aside, header, .card, button, a, input, select, textarea {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

/* Slim scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(120,120,135,.35) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(120,120,135,.30); border-radius: 9999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(120,120,135,.55); background-clip: content-box; }

/* Visible keyboard focus everywhere */
:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 6px; }

/* Card base used across pages */
.card {
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
}
html.dark .card { border-color: #2e2e34; background: #1a1a1a; }

/* Form controls — pill / rounded, no harsh borders */
.field {
  width: 100%;
  border-radius: .75rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  padding: .625rem .875rem;
  font-size: .875rem;
  color: rgb(15 23 42);
}
.field::placeholder { color: rgb(148 163 184); }
.field:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
html.dark .field { background: #202024; border-color: #2e2e34; color: rgb(226 232 240); }
html.dark .field::placeholder { color: rgb(100 116 139); }

select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.25rem; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; border-radius:9999px; font-weight:600; font-size:.875rem; padding:.625rem 1.1rem; transition: background-color .15s ease, color .15s ease, opacity .15s; cursor:pointer; }
.btn-primary { background:#4f46e5; color:#fff; }
.btn-primary:hover { background:#4338ca; }
.btn-ghost { background:transparent; color:rgb(71 85 105); }
.btn-ghost:hover { background:rgb(241 245 249); }
html.dark .btn-ghost { color:rgb(148 163 184); }
html.dark .btn-ghost:hover { background:#26262b; }
.btn-danger { background:rgba(244,63,94,.12); color:#f43f5e; }
.btn-danger:hover { background:rgba(244,63,94,.2); }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* Hide number input spinners */
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

/* Modal */
.modal-enter { animation: fadeUp .25s ease-out both; }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px) scale(.98); } to { opacity:1; transform:none; } }

/* Scanner viewport tweaks */
#scanner-region video { border-radius: 1rem; object-fit: cover; }
#scanner-region img { display:none; }

[x-cloak] { display:none !important; }

/* Form label */
.lbl { display:block; font-size:.8rem; font-weight:600; color:rgb(71 85 105); margin-bottom:.4rem; }
html.dark .lbl { color:rgb(148 163 184); }

/* Square icon button (table row actions, modal close) */
.btn-icon { display:inline-grid; place-items:center; width:2.25rem; height:2.25rem; border-radius:9999px; color:rgb(100 116 139); transition: background-color .15s, color .15s; cursor:pointer; }
.btn-icon:hover { background:rgb(241 245 249); color:rgb(51 65 85); }
html.dark .btn-icon { color:rgb(148 163 184); }
html.dark .btn-icon:hover { background:#26262b; color:rgb(226 232 240); }
