/* TimPOS Base Styles — Reset + Typography */
/* Removed Google Fonts @import — was blocking page render when CDN slow.
   Falls back to -apple-system / system fonts via tokens.css --font-family. */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  color: var(--neutral-900);
  background: var(--bg-surface);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--neutral-900);
}

h1 {
  font-size: var(--font-display);
}
h2 {
  font-size: var(--font-title);
}
h3 {
  font-size: var(--font-subtitle);
}
h4 {
  font-size: var(--font-body);
}

p {
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

hr {
  border: none;
  border-top: 1px solid var(--neutral-200);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.text-warning {
  color: var(--warning);
}
.text-primary {
  color: var(--primary);
}
.text-muted {
  color: var(--neutral-500);
}

.bg-success {
  background: var(--success);
}
.bg-danger {
  background: var(--danger);
}
.bg-warning {
  background: var(--warning);
}
.bg-primary {
  background: var(--primary);
}

.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}
.font-medium {
  font-weight: 500;
}

.text-display {
  font-size: var(--font-display);
  font-weight: 700;
}
.text-hero {
  font-size: var(--font-hero);
  font-weight: 800;
}
.text-huge {
  font-size: var(--font-huge);
  font-weight: 800;
}
.text-title {
  font-size: var(--font-title);
  font-weight: 700;
}
.text-body {
  font-size: var(--font-body);
}
.text-label {
  font-size: var(--font-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.text-small {
  font-size: var(--font-small);
}
.text-tiny {
  font-size: var(--font-tiny);
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.flex-1 {
  flex: 1;
}
.flex-none {
  flex: none;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.min-h-screen {
  min-height: 100vh;
}

.p-2 {
  padding: var(--space-2);
}
.p-3 {
  padding: var(--space-3);
}
.p-4 {
  padding: var(--space-4);
}
.p-6 {
  padding: var(--space-6);
}
.p-8 {
  padding: var(--space-8);
}

.m-0 {
  margin: 0;
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-3 {
  margin-top: var(--space-3);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-3 {
  margin-bottom: var(--space-3);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}

.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

.rounded-sm {
  border-radius: var(--radius-sm);
}
.rounded-md {
  border-radius: var(--radius-md);
}
.rounded-lg {
  border-radius: var(--radius-lg);
}
.rounded-full {
  border-radius: var(--radius-full);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}
.shadow-md {
  box-shadow: var(--shadow-md);
}
.shadow-lg {
  box-shadow: var(--shadow-lg);
}

/* Lucide icon sizing */
[data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
}

.icon-sm [data-lucide] {
  width: 16px;
  height: 16px;
}
.icon-lg [data-lucide] {
  width: 24px;
  height: 24px;
}
.icon-xl [data-lucide] {
  width: 32px;
  height: 32px;
}

/* Alpine cloak to prevent FOUC */
[x-cloak] {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--neutral-50);
}
::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

/* Print */
@media print {
  body {
    background: white;
  }
  .no-print {
    display: none !important;
  }
}
