/* assets/css/style.css - Apotek POS Pro */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --secondary: #0f172a;
  --secondary-light: #f8fafc;
  
  --accent-blue: #0284c7;
  --accent-red: #e11d48;
  --accent-amber: #d97706;
  
  --border-color: #e2e8f0;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-main);
  background-color: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Full-view workspace: use the available monitor width on every module. */
body > main,
body > div[class*="max-w-"],
header > div[class*="max-w-"] { max-width: none !important; }

.menu-tile { display:block; padding:.6rem .7rem; border-radius:.65rem; color:#334155; font-weight:700; }
.menu-tile:hover { background:#fff; color:#047857; box-shadow:0 1px 3px rgb(0 0 0 / .08); }

img, video, canvas, svg {
  max-width: 100%;
}

input, select, textarea, button {
  max-width: 100%;
}

/* Prevent long medicine names, invoice numbers and labels from widening cards. */
main, main > *, .card-pos {
  min-width: 0;
}

table {
  max-width: 100%;
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  input, select, textarea {
    font-size: 16px !important; /* prevents automatic zoom on mobile browsers */
  }

  .struk-wrapper {
    width: min(78mm, calc(100vw - 1rem));
  }

  .etiket-box {
    width: min(70mm, calc(100vw - 1rem));
  }
}

/* Kemenkes Badges */
.badge-obat-bebas {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}
.circle-obat-bebas {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #059669;
  border: 1px solid #064e3b;
  display: inline-block;
}

.badge-obat-bebas-terbatas {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #0284c7;
}
.circle-obat-bebas-terbatas {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #0284c7;
  border: 1px solid #075985;
  display: inline-block;
}

.badge-obat-keras {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: #ffe4e6;
  color: #9f1239;
  border: 1px solid #f43f5e;
}
.circle-obat-keras {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #e11d48;
  border: 1.5px solid #881337;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Glass & Card effects */
.card-pos {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

/* Thermal Printer Styling */
@media print {
  body * {
    visibility: hidden;
  }
  .printable-area, .printable-area * {
    visibility: visible;
  }
  .printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print {
    display: none !important;
  }
}

/* Struk 58mm & 80mm format */
.struk-wrapper {
  width: 78mm;
  margin: 0 auto;
  padding: 10px;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #000;
  line-height: 1.35;
}
.struk-58mm {
  width: 54mm;
  font-size: 9.5px;
}
.struk-divider {
  border-top: 1px dashed #444;
  margin: 6px 0;
}
.struk-double-divider {
  border-top: 2px solid #000;
  margin: 6px 0;
}

/* Etiket Thermal Label Kemenkes */
.etiket-box {
  width: 70mm;
  height: 48mm;
  border-radius: 4px;
  padding: 6px;
  margin: 0 auto 10px auto;
  box-sizing: border-box;
  font-family: var(--font-main);
  background: #ffffff;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  page-break-inside: avoid;
}
.etiket-putih {
  border: 2px solid #000000;
}
.etiket-biru {
  border: 3px solid #0284c7;
}
.etiket-biru .etiket-header {
  background-color: #0284c7;
  color: #ffffff;
  padding: 2px 4px;
  border-radius: 2px;
}

/* Keyboard badge */
.kbd-shortcut {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #475569;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* Table scroll styling */
.custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
