/* ─────────────────────────────────────────────────────────────────────────
   MeekPOS — "Receipt Ledger" identity. Hand-written, no build step, no
   Node/npm dependency. Covers exactly the classes used across resources/views.
   ───────────────────────────────────────────────────────────────────────── */

:root {
    --color-paper: #FAFAF9;
    --color-paper-2: #F1F3F6;
    --color-ink: #14202B;
    --color-ink-soft: #4B5A67;
    --color-brand: #1E547D;
    --color-brand-700: #17415F;
    --color-brand-50: #E8EFF5;
    --color-mist: #E1E6EA;
    --color-signal: #1E7D5C;
    --color-error: #C0362C;
    --color-error-50: #FBEAE8;
    --color-highlight: #A8710A;
    --color-highlight-50: #FCF3E1;

    --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background-color: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    letter-spacing: -0.015em;
    margin: 0;
}
a { color: inherit; }
::selection { background: var(--color-brand); color: var(--color-paper); }
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 2px; }

/* ── Components ─────────────────────────────────────────────────────────── */

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-brand);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.85rem 1.4rem;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
    background: var(--color-brand);
    color: var(--color-paper);
    box-shadow: 0 1px 0 var(--color-brand-700);
}
.btn-primary:hover { background: var(--color-brand-700); transform: translateY(-1px); color: var(--color-paper); }
.btn-ghost { border: 1.5px solid var(--color-ink); color: var(--color-ink); background: transparent; }
.btn-ghost:hover { background: var(--color-ink); color: var(--color-paper); }

.receipt {
    position: relative;
    background: #fff;
    border: 1px solid var(--color-mist);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(20, 32, 43, 0.04);
}
.receipt::before {
    content: "";
    position: absolute;
    top: -7px; left: 14px; right: 14px; height: 7px;
    background-image: radial-gradient(circle at 6px 7px, var(--color-paper) 5px, transparent 5.5px);
    background-size: 14px 7px;
    background-repeat: repeat-x;
}
.receipt-featured {
    border-color: var(--color-brand);
    box-shadow: 0 16px 40px -18px rgba(30, 84, 125, 0.45);
}
.ledger-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--color-mist);
    font-size: 0.93rem;
}
.ledger-row:last-child { border-bottom: 0; }
.stamp {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-brand);
    border: 1.5px solid var(--color-brand);
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    transform: rotate(-3deg);
}
.rule {
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--color-mist) 0 8px, transparent 8px 14px);
}
.prose p { line-height: 1.7; }

/* ── Layout / flex / grid ───────────────────────────────────────────────── */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.hidden { display: none; }
.sticky { position: sticky; }
.min-h-screen { min-height: 100vh; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; }
.place-items-center { place-items: center; }
.top-0 { top: 0; }
.z-20 { z-index: 20; }

.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

.space-y-0 > * + * { margin-top: 0; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* ── Sizing / spacing ───────────────────────────────────────────────────── */

.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-7 { width: 1.75rem; }
.w-14 { width: 3.5rem; }
.w-full { width: 100%; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-7 { height: 1.75rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.-mt-4 { margin-top: -1rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-10 { margin-bottom: 2.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-14 { padding-top: 3.5rem; }
.pt-20 { padding-top: 5rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-24 { padding-bottom: 6rem; }

.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-xl { max-width: 36rem; }

/* ── Borders / radius / shadow ──────────────────────────────────────────── */

.border { border: 1px solid var(--color-mist); }
.border-t { border-top: 1px solid var(--color-mist); }
.border-t-2 { border-top: 2px solid var(--color-mist); }
.border-b { border-bottom: 1px solid var(--color-mist); }
.border-y { border-top: 1px solid var(--color-mist); border-bottom: 1px solid var(--color-mist); }
.border-l-0 { border-left: 0; }
.border-dashed { border-style: dashed; }
.border-brand { border-color: var(--color-brand); }
.border-error { border-color: var(--color-error); }
.border-highlight { border-color: var(--color-highlight); }
.border-mist { border-color: var(--color-mist); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-l-lg { border-radius: 0.5rem 0 0 0.5rem; }
.rounded-r-lg { border-radius: 0 0.5rem 0.5rem 0; }
.rounded-full { border-radius: 9999px; }

.bg-white { background-color: #fff; }
.bg-brand-50 { background-color: var(--color-brand-50); }
.bg-error-50 { background-color: var(--color-error-50); }
.bg-highlight-50 { background-color: var(--color-highlight-50); }
.bg-paper-2 { background-color: var(--color-paper-2); }
.bg-paper\/90 { background-color: rgba(250, 250, 249, 0.9); }
.backdrop-blur { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ── Typography ──────────────────────────────────────────────────────────── */

.antialiased { -webkit-font-smoothing: antialiased; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-ink { color: var(--color-ink); }
.text-ink-soft { color: var(--color-ink-soft); }
.text-brand { color: var(--color-brand); }
.text-error { color: var(--color-error); }
.text-highlight { color: var(--color-highlight); }
.underline { text-decoration: underline; }

.focus\:border-brand:focus { border-color: var(--color-brand); }
.focus\:ring-brand:focus { outline: 2px solid var(--color-brand); outline-offset: 1px; }
.focus\:ring-0:focus { box-shadow: none; }
.hover\:text-ink:hover { color: var(--color-ink); }

/* ── Responsive (Tailwind-equivalent breakpoints) ──────────────────────── */

@media (min-width: 640px) {
    .sm\:flex { display: flex; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:text-4xl { font-size: 2.25rem; }
    .md\:text-5xl { font-size: 3rem; }
}

@media (min-width: 1024px) {
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-7 { grid-column: span 7 / span 7; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:sticky { position: sticky; }
    .lg\:top-24 { top: 6rem; }
}
