/* Tailors.lk Pro - unified stylesheet */

/* ============ RESET / BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background-color: #FFFDF7; color: #1c1b1b; font-family: Inter, sans-serif; line-height: 1.6; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
ul, ol { list-style: none; }

/* ============ COMPONENTS ============ */
.dot-bg { background-image: radial-gradient(circle at 1px 1px, #E5E5E5 1px, transparent 0); background-size: 24px 24px; }
.neo { box-shadow: 3px 3px 0px #1A1A1A; }
.card { background: #FFFFFF; border: 3px solid #1A1A1A; box-shadow: 3px 3px 0px #1A1A1A; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: "Space Grotesk", sans-serif; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: 14px; border: 3px solid #1A1A1A; box-shadow: 3px 3px 0px #1A1A1A; transition: transform .1s, box-shadow .1s, background-color .15s, color .15s; text-decoration: none; }
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0px #1A1A1A; }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0px #1A1A1A; }
.btn-primary { background: #ff6b35; color: #ffffff; }
.btn-primary:hover { background: #e85d2c; }
.btn-dark { background: #ffffff; color: #1c1b1b; }
.btn-dark:hover { background: #f0eded; }
.btn-success { background: #25D366; color: #0a140c; }
.btn-success:hover { background: #1eb85a; }
.field { background: #fff; border: 3px solid #1A1A1A; border-radius: 0; color: #1c1b1b; font-family: Inter, sans-serif; font-size: 15px; padding: 12px 14px; transition: box-shadow .15s; }
.field:focus { outline: none; box-shadow: 3px 3px 0px #1A1A1A; }
.help-card { display: block; }
table.ledger td, table.ledger th { font-variant-numeric: tabular-nums; }
.inv-table th, .inv-table td { border: 2px solid #1A1A1A; padding: 8px 10px; font-size: 14px; }
.legal h2 { font-family: "Space Grotesk", sans-serif; font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 12px; margin-top: 36px; }
.legal h3 { font-weight: 700; margin-bottom: 8px; }
.legal p, .legal li { line-height: 1.7; color: #4A4A4A; }
.legal ul { list-style: disc; padding-left: 1.2em; margin-bottom: 16px; }
.legal a { color: #ab3500; font-weight: 600; text-decoration: underline; }
.prose { max-width: 48rem; }
.popup-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28,27,27,0.6); }
.popup { width: 100%; max-width: 420px; }
.popup-icon-wrap { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; }
.popup-icon-success { background: #25D366; color: #0a140c; }
.popup-icon-error { background: #FF4136; color: #ffffff; }
.popup-icon-info { background: #ff6b35; color: #ffffff; }
.popup-close { cursor: pointer; background: transparent; border: none; padding: 0; color: inherit; }

/* ============ FONT FAMILY ============ */
.font-display { font-family: "Space Grotesk", sans-serif; }
.font-body { font-family: Inter, sans-serif; }
.font-label { font-family: Inter, sans-serif; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ============ FONT SIZE ============ */
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-4xl { font-size: 36px; }
.text-5xl { font-size: 48px; }
.text-[10px] { font-size: 10px; }
.text-[11px] { font-size: 11px; }
.text-[12px] { font-size: 12px; }
.text-[13px] { font-size: 13px; }
.text-[14px] { font-size: 14px; }
.text-[15px] { font-size: 15px; }
.text-[16px] { font-size: 16px; }
.text-[18px] { font-size: 18px; }
.text-[22px] { font-size: 22px; }
.text-[48px] { font-size: 48px; }
.text-[56px] { font-size: 56px; }
.text-[80px] { font-size: 80px; }
.text-display { font-size: clamp(40px, 7vw, 64px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.text-headline-lg { font-size: clamp(32px, 5vw, 48px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
.text-headline { font-size: 32px; line-height: 1.2; font-weight: 700; }
.text-headline-md { font-size: 24px; line-height: 1.3; font-weight: 700; }
.text-body-lg { font-size: 18px; line-height: 1.6; font-weight: 500; }
.text-body { font-size: 16px; line-height: 1.6; font-weight: 400; }
.text-label-bold { font-size: 14px; line-height: 1; letter-spacing: 0.05em; font-weight: 700; }
.text-label-sm { font-size: 12px; line-height: 1; font-weight: 600; }

/* 404 page overrides (giant headline uses its own clamp) */
.text-display-404 { font-size: clamp(64px, 18vw, 160px); line-height: 1; font-weight: 700; letter-spacing: -0.02em; }

/* ============ TYPOGRAPHY ============ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration: underline; }
.underline-offset-4 { text-underline-offset: 4px; }
.decoration-3 { text-decoration-thickness: 3px; }
.italic { font-style: italic; }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }
.tracking-[0.05em] { letter-spacing: 0.05em; }
.tracking-[0.08em] { letter-spacing: 0.08em; }
.tracking-[0.1em] { letter-spacing: 0.1em; }
.tracking-[0.14em] { letter-spacing: 0.14em; }
.whitespace-nowrap { white-space: nowrap; }
.align-middle { vertical-align: middle; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }
.list-none { list-style: none; }

/* ============ COLORS: TEXT ============ */
.text-background { color: #FFFDF7; }
.text-surface { color: #FFFFFF; }
.text-surface\/70 { color: rgba(255,255,255,0.70); }
.text-surface\/75 { color: rgba(255,255,255,0.75); }
.text-surface\/80 { color: rgba(255,255,255,0.80); }
.text-surface\/85 { color: rgba(255,255,255,0.85); }
.text-on-surface { color: #1c1b1b; }
.text-on-surface-variant { color: #594139; }
.text-text-muted { color: #4A4A4A; }
.text-border { color: #1A1A1A; }
.text-primary { color: #ab3500; }
.text-primary-container { color: #ff6b35; }
.text-on-primary { color: #ffffff; }
.text-on-primary-container { color: #5f1900; }
.text-secondary { color: #745c00; }
.text-secondary-container { color: #fcd03d; }
.text-on-secondary-container { color: #705900; }
.text-tertiary { color: #00677e; }
.text-tertiary-container { color: #00a7cb; }
.text-success { color: #25D366; }
.text-danger { color: #FF4136; }
.text-white { color: #ffffff; }
.text-white\/70 { color: rgba(255,255,255,0.70); }
.text-white\/75 { color: rgba(255,255,255,0.75); }
.text-white\/80 { color: rgba(255,255,255,0.80); }
.text-white\/85 { color: rgba(255,255,255,0.85); }
.text-white\/90 { color: rgba(255,255,255,0.90); }

/* ============ COLORS: BACKGROUND ============ */
.bg-background { background-color: #FFFDF7; }
.bg-surface { background-color: #FFFFFF; }
.bg-surface-container { background-color: #f0eded; }
.bg-surface-container-low { background-color: #f6f3f2; }
.bg-surface-container-high { background-color: #eae7e7; }
.bg-on-surface { background-color: #1c1b1b; }
.bg-border { background-color: #1A1A1A; }
.bg-primary { background-color: #ab3500; }
.bg-primary-container { background-color: #ff6b35; }
.bg-secondary { background-color: #745c00; }
.bg-secondary-container { background-color: #fcd03d; }
.bg-secondary-container\/40 { background-color: rgba(252,208,61,0.40); }
.bg-success { background-color: #25D366; }
.bg-success\/10 { background-color: rgba(37,211,102,0.10); }
.bg-white { background-color: #ffffff; }

/* ============ COLORS: BORDER ============ */
.border-border { border-color: #1A1A1A; }
.border-surface { border-color: #FFFFFF; }
.border-surface\/40 { border-color: rgba(255,255,255,0.40); }
.border-on-surface\/40 { border-color: rgba(28,27,27,0.40); }

/* ============ DISPLAY ============ */
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.grid { display: grid; }
.hidden { display: none; }
.fixed { position: fixed; }
.relative { position: relative; }

/* ============ FLEX ALIGNMENT ============ */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }

/* ============ GRID ============ */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-\[1fr_auto\] { grid-template-columns: 1fr auto; }
.col-span-2 { grid-column: span 2 / span 2; }

/* ============ GAP ============ */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-10 { gap: 40px; }
.gap-x-4 { column-gap: 16px; }
.gap-y-2 { row-gap: 8px; }

/* ============ SPACE Y ============ */
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 4px; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 8px; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 10px; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 16px; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 20px; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 24px; }
.space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 40px; }

/* ============ MARGIN ============ */
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-1 { margin-left: 4px; margin-right: 4px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-10 { margin-bottom: 40px; }
.mb-12 { margin-bottom: 48px; }

/* ============ PADDING ============ */
.p-0 { padding: 0; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-7 { padding: 28px; }
.p-8 { padding: 32px; }
.p-10 { padding: 40px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-2\.5 { padding-left: 10px; padding-right: 10px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-8 { padding-left: 32px; padding-right: 32px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.py-14 { padding-top: 56px; padding-bottom: 56px; }
.py-16 { padding-top: 64px; padding-bottom: 64px; }
.py-24 { padding-top: 96px; padding-bottom: 96px; }
.pt-0 { padding-top: 0; }
.pt-2 { padding-top: 8px; }
.pt-10 { padding-top: 40px; }
.pt-12 { padding-top: 48px; }
.pt-14 { padding-top: 56px; }
.pt-16 { padding-top: 64px; }
.pb-4 { padding-bottom: 16px; }
.pb-8 { padding-bottom: 32px; }
.pb-10 { padding-bottom: 40px; }
.pb-12 { padding-bottom: 48px; }
.pb-14 { padding-bottom: 56px; }
.pb-16 { padding-bottom: 64px; }
.pb-20 { padding-bottom: 80px; }
.pb-24 { padding-bottom: 96px; }
.pb-\[max\(0\.75rem\,env\(safe-area-inset-bottom\)\)\] { padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }

/* ============ WIDTH ============ */
.w-full { width: 100%; }
.w-1\/3 { width: 33.333333%; }
.w-1\.5 { width: 6px; }
.w-6 { width: 24px; }
.w-7 { width: 28px; }
.w-8 { width: 32px; }
.w-9 { width: 36px; }
.w-10 { width: 40px; }
.w-16 { width: 64px; }
.w-24 { width: 96px; }
.w-32 { width: 128px; }
.w-\[18px\] { width: 18px; }
.w-\[20px\] { width: 20px; }

/* ============ HEIGHT ============ */
.h-1\.5 { height: 6px; }
.h-6 { height: 24px; }
.h-7 { height: 28px; }
.h-8 { height: 32px; }
.h-9 { height: 36px; }
.h-10 { height: 40px; }
.h-16 { height: 64px; }
.h-\[18px\] { height: 18px; }
.h-\[20px\] { height: 20px; }
.min-h-screen { min-height: 100vh; }

/* ============ MAX WIDTH ============ */
.max-w-xs { max-width: 20rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }

/* ============ BORDER ============ */
.border-\[3px\] { border-width: 3px; }
.border-0 { border-width: 0; }
.border-b { border-bottom-width: 1px; }
.border-b-\[3px\] { border-bottom-width: 3px; }
.border-t-\[3px\] { border-top-width: 3px; }
.border-y-\[3px\] { border-top-width: 3px; border-bottom-width: 3px; }
.border-dashed { border-style: dashed; }
.border-collapse { border-collapse: collapse; }
.rounded-full { border-radius: 9999px; }
.shadow-none { box-shadow: none; }
.focus\:shadow-none:focus { box-shadow: none; }

/* ============ POSITION / LAYERS ============ */
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.inset-x-0 { left: 0; right: 0; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.scroll-mt-24 { scroll-margin-top: 96px; }
.overflow-x-auto { overflow-x: auto; }
.cursor-pointer { cursor: pointer; }

/* ============ TRANSITION ============ */
.transition { transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.transition-colors { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }

/* ============ HOVER ============ */
.hover\:text-primary:hover { color: #ab3500; }
.hover\:text-on-surface:hover { color: #1c1b1b; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:bg-surface:hover { background-color: #FFFFFF; }
.hover\:bg-surface-container-low:hover { background-color: #f6f3f2; }
.hover\:underline:hover { text-decoration: underline; }

/* ============ FONT AWESOME ICONS ============ */
i.fa-solid, i.fa-regular, i.fa-brands, i.fa-sharp, i.fa-classic, i.fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-style: normal;
  flex-shrink: 0;
  color: inherit;
}
i.fa-solid.w-\[18px\], i.fa-regular.w-\[18px\], i.fa-brands.w-\[18px\] { font-size: 18px; }
i.fa-solid.w-\[20px\], i.fa-regular.w-\[20px\], i.fa-brands.w-\[20px\] { font-size: 20px; }
i.fa-solid.w-6, i.fa-regular.w-6, i.fa-brands.w-6 { font-size: 24px; }
i.fa-solid.w-7, i.fa-regular.w-7, i.fa-brands.w-7 { font-size: 28px; }
i.fa-solid.w-8, i.fa-regular.w-8, i.fa-brands.w-8 { font-size: 32px; }
i.fa-solid.w-9, i.fa-regular.w-9, i.fa-brands.w-9 { font-size: 36px; }
i.fa-solid.w-10, i.fa-regular.w-10, i.fa-brands.w-10 { font-size: 40px; }

/* ============ RESPONSIVE: sm (>=640px) ============ */
@media (min-width: 640px) {
  .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)); }
  .sm\:grid-cols-\[auto_1fr\] { grid-template-columns: auto 1fr; }
  .sm\:items-center { align-items: center; }
  .sm\:w-auto { width: auto; }
}

/* ============ RESPONSIVE: md (>=768px) ============ */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:inline-flex { display: inline-flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:gap-6 { gap: 24px; }
  .md\:p-8 { padding: 32px; }
  .md\:p-10 { padding: 40px; }
  .md\:p-12 { padding: 48px; }
  .md\:p-14 { padding: 56px; }
  .md\:px-10 { padding-left: 40px; padding-right: 40px; }
  .md\:pt-0 { padding-top: 0; }
  .md\:pt-20 { padding-top: 80px; }
  .md\:pt-24 { padding-top: 96px; }
  .md\:pb-14 { padding-bottom: 56px; }
  .md\:pb-16 { padding-bottom: 64px; }
  .md\:pb-20 { padding-bottom: 80px; }
  .md\:pb-24 { padding-bottom: 96px; }
  .md\:py-20 { padding-top: 80px; padding-bottom: 80px; }
  .md\:py-24 { padding-top: 96px; padding-bottom: 96px; }
  .md\:text-4xl { font-size: 36px; }
  .md\:text-\[72px\] { font-size: 72px; }
}

/* ============ RESPONSIVE: lg (>=1024px) ============ */
@media (min-width: 1024px) {
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .lg\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .lg\:h-20 { height: 80px; }
  .lg\:pt-20 { padding-top: 80px; }
}

/* ============ PRINT (invoice generator) ============ */
@media print {
  body * { visibility: hidden; }
  #invoiceSheet, #invoiceSheet * { visibility: visible; }
  #invoiceSheet { position: absolute; left: 0; top: 0; width: 100%; border: none !important; box-shadow: none !important; margin: 0 !important; }
}
