/* ============================================================
   Tutoria POS — Corporate SaaS Design System v3
   Palette: Brand Blue #2952a3 + Green #1a9c68
   Font: Plus Jakarta Sans (keterbacaan tinggi untuk data angka)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* === DESIGN TOKENS ========================================= */
:root {
  --primary: var(--brand-600);

  /* Neutral Scale */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Brand Olive (from logo) */
  --brand-50: #f4f5ed;
  --brand-100: #e2e5cd;
  --brand-200: #c9ce9f;
  --brand-500: #6a713f;
  --brand-600: #4A4F2C;
  /* DOMINANT — logo primary */
  --brand-700: #3a3e22;
  --brand-800: #292c18;

  /* Brand Green (from logo "active") */
  --green-50: #ecfdf5;
  --green-500: #1a9c68;
  /* DOMINANT — logo accent */
  --green-600: #138052;

  /* Status */
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-border: #fca5a5;

  /* Sidebar */
  --sidebar-w: 240px;
  --sidebar-bg: #eee5e0;

  /* Typography Scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;

  /* Spacing Scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-full: 9999px;

  /* Elevation (micro shadows only) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .05);

  /* Focus ring */
  --ring: 0 0 0 3px rgba(74, 79, 44, .25);

  /* Transition */
  --ease: 150ms ease;
}

/* === BASE RESET ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--gray-800);
  background: #f0f4fa;
}

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color var(--ease), text-decoration-color var(--ease);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-700);
  text-decoration: underline;
  text-decoration-color: var(--brand-200);
}

a.tambah:hover {
  color: #fff;
}

::selection {
  background: var(--brand-100);
  color: var(--brand-700);
}

/* Scrollbar (thin & polished) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* === HEADINGS ============================================== */
h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin: 0 0 var(--sp-6);
  line-height: 1.25;
}

h2 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
  margin: var(--sp-8) 0 var(--sp-4);
}

/* === LAYOUT ================================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

main {
  flex: 1;
  padding: var(--sp-8) var(--sp-10) 80px;
  min-width: 0;
  overflow-x: auto;
  max-width: 80%;
  margin: 0 auto;
  width: 100%;
}

/* === SIDEBAR =============================================== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 20;
}

/* Custom TopNav Mode (e.g. Kasir on Sewa Tempat) */
.layout-topnav {
  flex-direction: column;
}

.layout-topnav .sidebar {
  width: 100%;
  height: auto;
  position: sticky;
  top: 0;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: var(--sp-2) var(--sp-5);
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-3);
  border-bottom: 1px solid rgba(74, 79, 44, .1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  overflow-x: auto;
  z-index: 50;
}

.layout-topnav .menu-group {
  display: none;
}

.layout-topnav .brand {
  padding: 0;
  margin-right: var(--sp-6);
  border: none;
  margin-bottom: 0;
}

.layout-topnav .menu-item {
  margin: 0;
  white-space: nowrap;
}

.layout-topnav .sidebar-bottom {
  margin-top: 0;
  margin-left: auto;
  padding: 0;
  border-top: none;
  display: flex;
  align-items: center;
  flex-direction: row;
}

.layout-topnav main {
  max-width: 100%;
  width: 100%;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

/* Brand / Logo area */
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
  color: var(--brand-600);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(74, 79, 44, .1);
  /*margin-bottom: var(--sp-3);*/
  margin: 0 auto;
}

.brand-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-sub {
  color: #7ab5e8;
  font-weight: 500;
  font-size: var(--text-xs);
  margin-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  line-height: 1;
}

/* Menu groups & items */
.menu-group {
  padding: var(--sp-5) var(--sp-4) var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(74, 79, 44, .6);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: rgba(74, 79, 44, .8);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 9px var(--sp-4);
  border-radius: var(--r-sm);
  margin: 1px var(--sp-2);
  transition: background var(--ease), color var(--ease);
  position: relative;
}

.menu-item .ic {
  flex-shrink: 0;
  opacity: .7;
  transition: opacity var(--ease);
}

.menu-item:hover {
  background: rgba(74, 79, 44, .08);
  color: var(--brand-600);
  text-decoration: none;
}

.menu-item:hover .ic {
  opacity: 1;
}

.menu-item.active {
  background: rgba(74, 79, 44, .15);
  color: var(--brand-600);
  font-weight: 600;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--brand-600);
  border-radius: 0 var(--r-full) var(--r-full) 0;
}

.menu-item.active .ic {
  opacity: 1;
}

.sidebar-bottom {
  margin-top: auto;
  padding: var(--sp-4) 0;
  border-top: 1px solid rgba(74, 79, 44, .1);
}

.sidebar-user {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-xs);
  color: rgba(74, 79, 44, .6);
  line-height: 1.5;
}

/* === CARDS (Dashboard) ===================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
  cursor: default;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--brand-200);
}

/* Accent stripe di top of card */
.card::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--brand-600);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-4);
  width: 32px;
  opacity: .6;
}

.card span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--sp-2);
}

.card b {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.card small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--green-500);
  margin-top: var(--sp-2);
}

/* === TABLES ================================================ */
.table-wrap {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
  margin: var(--sp-4) 0 var(--sp-8);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  margin: var(--sp-4) 0 var(--sp-8);
}

th,
td {
  padding: 11px var(--sp-4);
  text-align: left;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--gray-100);
}

td {
  color: var(--gray-800);
  font-variant-numeric: tabular-nums;
}

th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody tr {
  transition: background var(--ease);
}

tbody tr:hover td {
  background: var(--gray-50);
}

tr:last-child td {
  border-bottom: 0;
}

tr.total td {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 700;
  border-top: 1px solid var(--brand-100);
  border-bottom: 0;
}

tr.total:hover td {
  background: var(--brand-100);
}

tr.nonaktif td {
  color: var(--gray-400);
}

th.r,
td.r {
  text-align: right;
}

th.c,
td.c {
  text-align: center;
  white-space: nowrap;
}

/* === FORMS ================================================= */
form.inline-form {
  display: inline-flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
}

form.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-5);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--sp-4);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
}

input,
select {
  width: auto;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-family: inherit;
  background: #fff;
  color: var(--gray-900);
  transition: border-color var(--ease), box-shadow var(--ease);
  line-height: 1.5;
}

input:hover:not(:disabled),
select:hover:not(:disabled) {
  border-color: var(--gray-400);
}

input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--ring);
}

input:disabled,
select:disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

input[type="date"] {
  cursor: pointer;
}

/* === BUTTONS =============================================== */
/* Base */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 8px 14px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease), border-color var(--ease), color var(--ease);
  white-space: nowrap;
  /* Primary = Brand Blue */
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

button:hover,
.btn:hover {
  background: var(--brand-700);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: #fff;
}

button:active,
.btn:active {
  transform: translateY(1px);
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
  border-color: var(--gray-400);
  box-shadow: var(--shadow-xs);
}

/* Big checkout button */
.btn-besar {
  background: var(--green-500);
  font-size: var(--text-md);
  font-weight: 700;
  padding: 13px var(--sp-5);
  letter-spacing: 0.02em;
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: 0 2px 4px rgba(26, 156, 104, .3);
}

.btn-besar:hover {
  background: var(--green-600);
}

/* Buttons inside tables — secondary ghost style */
table button {
  background: #fff;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
  box-shadow: none;
  padding: 5px 10px;
  font-size: var(--text-xs);
  border-radius: var(--r-sm);
}

/* table button:hover {
  background: var(--brand-50);
  border-color: var(--brand-400);
  color: var(--brand-700);
} */

/* === FEEDBACK STATES ======================================= */
.error {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--red-50);
  border: 1px solid var(--red-border);
  color: var(--red-500);
  padding: 12px var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}

.flash-ok {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--green-50);
  border: 1px solid #6ee7b7;
  color: var(--green-600);
  padding: 12px var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}

.hint {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: var(--sp-1);
}

.muted {
  color: var(--gray-400);
}

.wajib {
  color: var(--red-500);
}

/* === POS LAYOUT (KASIR) ==================================== */
.pos-wrap {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
  margin-bottom: var(--sp-8);
}

/* Left: Product catalog */
.pos-left {
  flex: 1;
  min-width: 0;
  max-height: 76vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--sp-3);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.pos-left::-webkit-scrollbar {
  width: 5px;
}

.pos-left::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--r-full);
}

/* Toolbar */
.pos-toolbar {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  align-items: center;
}

.pos-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  padding: 0 var(--sp-3);
  color: var(--gray-400);
  transition: border-color var(--ease), box-shadow var(--ease);
  box-shadow: var(--shadow-xs);
}

.pos-search input {
  border: 0;
  box-shadow: none;
  flex: 1;
  padding: 9px 0;
  background: transparent;
  font-size: var(--text-base);
  width: 100%;
}

.pos-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.pos-search:focus-within {
  border-color: var(--brand-600);
  box-shadow: var(--ring);
}

.pos-toolbar input[type="date"] {
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-300);
  padding: 8px 12px;
  cursor: pointer;
}

/* Category header */
.pos-kat {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.pos-kat::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Product grid */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

/* Product tile */
.pos-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-decoration: none;
  color: var(--gray-800);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
  align-items: flex-start;
  text-align: left;
  position: relative;
}

.pos-tile:hover {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(41, 82, 163, .1), var(--shadow-sm);
  transform: translateY(-1px);
  z-index: 2;
  background-color: #fff;
}

.pos-tile-kelas {
  cursor: default;
}

.disabled-tile {
  cursor: not-allowed;
}

.pos-tile-kelas:hover {
  transform: none;
  border-color: var(--gray-200);
  box-shadow: var(--shadow-xs);
}

.pos-tile-kelas:hover {
  transform: translateY(-1px);
  border-color: var(--brand-200);
  box-shadow: 0 0 0 3px rgba(41, 82, 163, .08);
}

.pos-tile-nama {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-900);
}

.pos-tile-harga {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--brand-600);
  font-variant-numeric: tabular-nums;
  margin-top: var(--sp-2);
}

/* Package buttons (Trial/Visit/Membership) */
.pos-pkg {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  width: 100%;
}

.pos-pkg form {
  flex: 1;
  min-width: 0;
}

.pos-tile-form {
  display: contents;
}

button.pos-tile {
  width: 100%;
  text-align: left;
  align-items: flex-start;
}

.pos-pkg-btn {
  width: 100%;
  flex-direction: column;
  gap: 2px;
  background: var(--gray-50) !important;
  color: var(--gray-700) !important;
  border: 1px solid var(--gray-200) !important;
  box-shadow: none !important;
  padding: 6px var(--sp-2) !important;
  font-size: var(--text-xs) !important;
  font-weight: 600;
  border-radius: var(--r-sm);
  text-align: center;
  line-height: 1.35;
  min-height: unset;
  white-space: normal;
  /* allow price text to wrap */
  word-break: break-word;
}

.pos-pkg-btn small {
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--brand-600);
  display: block;
  white-space: normal;
  word-break: break-word;
}

.pos-pkg-btn:hover {
  background: var(--brand-50) !important;
  border-color: var(--brand-500) !important;
  color: var(--brand-700) !important;
  box-shadow: 0 0 0 2px rgba(41, 82, 163, .12) !important;
}

/* Coach tile */
.pos-tile-terapis {
  flex-direction: row;
  align-items: center;
  gap: var(--sp-3);
}

.pos-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

/* Badge */
.pos-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pos-badge.hot {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

/* === CART / KERANJANG ====================================== */
.pos-cart {
  width: 400px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 24px;
  max-height: 90vh;
  overflow: hidden;
}

.pos-cart-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--gray-900);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.pos-count {
  margin-left: auto;
  background: var(--brand-600);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--r-full);
}

/* Cart body scroll */
.pos-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
}

.pos-cart-label {
  margin-bottom: var(--sp-3);
  display: block;
}

.pos-cart-label select,
.pos-cart-label input {
  width: 100%;
}

.pos-empty {
  text-align: center;
  color: var(--gray-400);
  font-size: var(--text-sm);
  padding: 36px var(--sp-5);
  border: 1px dashed var(--gray-300);
  border-radius: var(--r-md);
  background: var(--gray-50);
}

.pos-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.pos-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-3);
  transition: border-color var(--ease);
}

.pos-item:hover {
  border-color: var(--gray-200);
}

.pos-item-info {
  flex: 1;
  min-width: 0;
}

.pos-item-info b {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-item-info small {
  font-size: var(--text-xs);
  color: var(--gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pos-item-side {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.pos-item-harga {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}

.pos-x {
  background: transparent !important;
  border: none !important;
  color: var(--gray-400) !important;
  box-shadow: none !important;
  width: 26px;
  height: 26px;
  padding: 0 !important;
  font-size: 14px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.pos-x:hover {
  background: var(--red-50) !important;
  color: var(--red-500) !important;
}

/* Cart total */
.pos-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--gray-200);
  margin: var(--sp-3) 0;
}

.pos-total span {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
}

.pos-total b {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--brand-600);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Payment method radio pills */
.pos-metode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
}

.choice {
  position: relative;
  display: flex;
  /* use flex so span can stretch to full height */
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  /* fill full height of the choice label */
  padding: 11px var(--sp-4);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  background: #fff;
  color: var(--gray-600);
  transition: all var(--ease);
}

.choice:hover span {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-700);
}

.choice input:checked+span {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.choice input:focus-visible+span {
  box-shadow: var(--ring);
}

.pos-select {
  width: 100%;
  display: block;
}

/* Cart footer — sticky */
.pos-cart-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--gray-100);
  background: #fff;
  flex-shrink: 0;
}

.pos-mini {
  padding: 2px 6px;
  font-size: 11px;
  border-radius: var(--r-sm);
}

/* Step indicators */
.pos-steps {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.step {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-400);
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--gray-200);
  background: #fff;
  transition: all var(--ease);
}

.step.done {
  color: var(--green-500);
  border-color: #6ee7b7;
  background: var(--green-50);
}

.step.now {
  color: #fff;
  background: var(--brand-600);
  border-color: var(--brand-700);
}

.step-tgl {
  margin-left: auto;
}

.step-tgl input {
  font-size: var(--text-sm);
}

/* Payment/Bayar page */
.pos-bayar {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-xs);
  max-width: 590px;
  margin-bottom: var(--sp-6);
}

.pos-bayar h2 {
  margin: var(--sp-5) 0 var(--sp-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
}

.pos-ringkas {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  font-size: var(--text-base);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--gray-100);
}

.pos-harga-besar {
  margin-left: auto;
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-600);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pos-choices {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.pos-extra {
  margin-top: var(--sp-2);
}

.pos-extra input {
  width: 200px;
}

.pos-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  align-items: center;
}

.mini-bar {
  background: var(--gray-100);
  border-radius: var(--r-full);
  height: 8px;
  overflow: hidden;
}

.mini-bar div {
  background: var(--brand-600);
  height: 100%;
  border-radius: var(--r-full);
  min-width: 2px;
}

/* === PRICE LIST (kelas, coach, alat, student tables) ======= */
.pl-toolbar {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.pl-toolbar .pos-search {
  max-width: 300px;
  flex: none;
}

.pl-meta {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-left: auto;
}

.pl-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
  margin-bottom: var(--sp-8);
}

.pl-table {
  margin: 0;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

.pl-table th:first-child {
  border-top-left-radius: 0;
}

.pl-table th:last-child {
  border-top-right-radius: 0;
}

.pl-table th.r,
.pl-table td.r {
  text-align: right;
}

.pl-table th.c,
.pl-table td.c {
  text-align: center;
  white-space: nowrap;
}

.pl-th-sub {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: none;
  letter-spacing: 0;
}

/* Group row (category separator) */
.pl-group td {
  background: var(--gray-50);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-700);
  padding: 9px var(--sp-4);
  border-bottom: 1px solid var(--gray-200);
}

.pl-group:hover td {
  background: var(--gray-50);
}

.pl-group-n {
  color: var(--gray-400);
  font-weight: 500;
  margin-left: var(--sp-2);
}

/* Status dot */
.pl-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray-300);
  margin-right: 9px;
  vertical-align: 1px;
  flex-shrink: 0;
}

.pl-dot.on {
  background: var(--green-500);
}

.pl-harga {
  font-weight: 600;
  color: var(--gray-900);
}

.pl-hh {
  color: #b45309;
  font-weight: 600;
}

/* Status badge */
.pl-status {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  color: var(--gray-500);
}

.pl-status.on {
  background: var(--green-50);
  color: var(--green-600);
}

/* Action links/buttons inside price list */
.pl-aksi {
  font-size: var(--text-sm);
  font-weight: 500;
  margin-right: var(--sp-2);
  color: var(--brand-600);
  text-underline-offset: 2px;
}

.pl-aksi:hover {
  color: var(--brand-700);
  text-decoration: underline;
  text-decoration-color: var(--brand-200);
}

.pl-aksi-btn {
  font-size: var(--text-xs) !important;
  padding: 4px 10px !important;
  border-radius: var(--r-sm) !important;
  font-weight: 600 !important;
}

/* Edit row highlight */
.pl-edit td {
  background: var(--brand-50);
}

.pl-edit:hover td {
  background: var(--brand-100);
}

.pl-row {}

/* === LOGIN ================================================= */
.login-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #f0f4fa;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, .08) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .05) 0%, transparent 50%);
}

.login-box {
  background: #eee5e0;
  padding: 48px 40px;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .2), 0 8px 16px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  margin: 0 0 var(--sp-1);
  font-size: var(--text-xl);
  text-align: center;
  font-weight: 700;
  color: var(--gray-900);
}

.login-logo {
  width: 160px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.login-box>label {
  gap: var(--sp-2);
}

.login-box button {
  width: 100%;
  padding: 12px;
  font-size: var(--text-md);
  margin-top: var(--sp-2);
}

/* === FOOTER ================================================ */
.foot {
  text-align: center;
  color: var(--gray-400);
  font-size: var(--text-xs);
  padding: var(--sp-10) 0 var(--sp-5);
}

/* === RESPONSIVE ============================================ */
@media (max-width: 1100px) {
  .pos-wrap {
    flex-direction: column;
  }

  .pos-left {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .pos-cart {
    width: 100%;
    position: static;
    max-height: none;
  }
}

@media (max-width: 900px) {
  main {
    padding: var(--sp-5) var(--sp-5) 80px;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    padding: var(--sp-3) var(--sp-4);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    overflow: visible;
  }

  .menu-group {
    display: none;
  }

  .sidebar-bottom {
    display: none;
  }

  .sidebar-user {
    display: none;
  }

  .brand {
    padding: 0;
    margin-right: auto;
    border: none;
    margin-bottom: 0;
  }

  .menu-item {
    padding: 8px 10px;
    border-radius: var(--r-sm);
    margin: 0;
  }

  .menu-item span {
    display: none;
  }

  .menu-item::before {
    display: none;
  }
}

@media (max-width: 700px) {

  /* Mobile: bottom nav */
  .layout {
    flex-direction: column-reverse;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 50;
    height: auto;
    padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    background: var(--sidebar-bg);
    border-top: 1px solid rgba(74, 79, 44, .1);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
    border-radius: 0;
  }

  .sidebar .brand {
    display: none;
  }

  .menu-item {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 8px 4px;
    margin: 0;
    text-align: center;
    min-width: 52px;
    border-radius: var(--r-sm);
  }

  .menu-item span {
    display: block !important;
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    color: inherit;
  }

  .menu-item .ic {
    width: 22px;
    height: 22px;
  }

  .menu-item.active {
    background: rgba(74, 79, 44, .15);
  }

  main {
    padding: var(--sp-4) var(--sp-4) 96px;
  }

  h1 {
    font-size: var(--text-lg);
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
  }

  .card b {
    font-size: var(--text-xl);
  }

  /* Touch-friendly inputs */
  input,
  select {
    font-size: 16px;
    min-height: 42px;
  }

  button,
  .btn {
    font-size: 15px;
  }

  .pos-pkg-btn {
    min-height: 46px !important;
    font-size: 12px !important;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .table-responsive-card thead {
    display: none;
  }

  .table-responsive-card,
  .table-responsive-card tbody,
  .table-responsive-card tr,
  .table-responsive-card td {
    display: block;
    width: 100%;
    white-space: normal;
  }

  .table-responsive-card tr {
    margin-bottom: var(--sp-4);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    padding: var(--sp-3);
  }

  .table-responsive-card td {
    text-align: left;
    padding: var(--sp-2) 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .table-responsive-card td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--gray-500);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  form.form-grid {
    grid-template-columns: 1fr;
    padding: var(--sp-4);
  }

  .pos-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2);
  }

  .pos-tile {
    padding: var(--sp-3);
  }

  .login-box {
    margin: var(--sp-4);
    padding: 36px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* === CUSTOM ALERTS & WIDGETS === */
.alert-box {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  border-left: 4px solid var(--gray-400);
}

.alert-warning {
  background: #fffbf0;
  border-color: #f59e0b;
}

.alert-warning h3 {
  color: #d97706;
  margin: 0;
  font-size: var(--text-md);
}

.alert-info {
  background: #f0f9ff;
  border-color: #0ea5e9;
}

.alert-info h3 {
  color: #0284c7;
  margin: 0;
  font-size: var(--text-md);
}

.alert-danger {
  background: #fef2f2;
  border-color: #ef4444;
}

.alert-danger h3 {
  color: #dc2626;
  margin: 0;
  font-size: var(--text-md);
}

.alert-box ul {
  margin: 0;
  padding-left: var(--sp-5);
  font-size: var(--text-sm);
}

.alert-box li {
  margin-bottom: 4px;
}

.upload-form {
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.badge-danger {
  display: inline-block;
  background: #fee2e2;
  color: #ef4444;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge-success {
  display: inline-block;
  background: #dcfce7;
  color: #16a34a;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  font-weight: 700;
}

.pl-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-xs);
}

/* === PRINT STYLES === */
@media print {

  /* Sembunyikan elemen non-konten (sidebar, tombol, navigasi) */
  .sidebar,
  aside,
  nav,
  button,
  form,
  .pl-toolbar,
  .print-bar,
  .btn-print,
  .btn,
  .btn-ghost,
  .section-title::after,
  .print-hide,
  .no-print {
    display: none !important;
  }

  /* Reset layout to full width */
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .layout,
  .layout-topnav {
    display: block !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Hapus box-shadow dan border yang tidak perlu agar bersih */
  .card,
  .summary-card,
  .table-wrap,
  .pl-card,
  .pos-wrap,
  .pos-left,
  .pos-right,
  .cart-panel {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Kartu ringkasan (seperti di laporan) */
  .summary-cards,
  .charts-grid {
    display: grid !important;
    gap: 10pt !important;
    margin-bottom: 15pt !important;
    page-break-inside: avoid;
  }

  .summary-cards {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .summary-card {
    border: 1pt solid #ddd !important;
    padding: 8pt !important;
  }

  .charts-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .charts-grid.full {
    grid-template-columns: 1fr !important;
  }

  .chart-card {
    border: 1pt solid #ddd !important;
    padding: 8pt 10pt !important;
    page-break-inside: avoid;
  }

  .chart-card h3 {
    font-size: 10pt !important;
    margin-bottom: 3pt !important;
  }

  .chart-card .chart-sub {
    font-size: 8pt !important;
    margin-bottom: 6pt !important;
  }

  .chart-card canvas {
    max-height: 160pt !important;
  }

  .chart-img {
    max-width: 100%;
    max-height: 160pt;
    display: block;
  }


  /* Tables */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 10pt !important;
    margin-bottom: 15pt !important;
    page-break-inside: auto;
  }

  th,
  td {
    border: 1pt solid #aaa !important;
    padding: 6pt !important;
    text-align: left;
  }

  th {
    background: #eee !important;
    font-weight: bold !important;
    -webkit-print-color-adjust: exact;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  tr.total td {
    font-weight: bold !important;
    background: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
  }

  /* Headings */
  h1,
  h2,
  h3 {
    color: #000 !important;
    page-break-after: avoid;
  }

  h1 {
    font-size: 18pt !important;
    margin-bottom: 10pt !important;
    border-bottom: 1pt solid #000;
    padding-bottom: 5pt;
  }

  h2 {
    font-size: 14pt !important;
    margin-top: 15pt !important;
    margin-bottom: 5pt !important;
  }

  /* Misc */
  a {
    text-decoration: none !important;
    color: #000 !important;
  }

  /* Print header (khusus untuk halaman dengan .print-header) */
  .print-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2pt solid #000 !important;
    margin-bottom: 15pt !important;
    padding-bottom: 10pt !important;
  }

  /* Utilities */
  .section-title {
    font-size: 10pt !important;
    margin: 10pt 0 5pt !important;
    border-bottom: 1pt solid #ccc !important;
    padding-bottom: 3pt !important;
  }

  /* Page settings */
  @page {
    size: A4 landscape;
    margin: 12mm 14mm;
  }
}