/* OysKasir — modern visual layer adapted from the active WA.ON/Watzap style. */
:root {
  --wz-primary: #625bf6;
  --wz-primary-dark: #4f46e5;
  --wz-purple: #8b5cf6;
  --wz-pink: #ec4899;
  --wz-ink: #172033;
  --wz-muted: #748097;
  --wz-line: rgba(99, 102, 241, .12);
  --wz-surface: rgba(255, 255, 255, .88);
  --wz-gradient: linear-gradient(135deg, #5c67f2 0%, #7257ee 52%, #8b5cf6 100%);
  --wz-gradient-rich: linear-gradient(135deg, #5c67f2 0%, #7c3aed 58%, #ec4899 125%);
  --wz-shadow-sm: 0 8px 28px rgba(41, 48, 92, .06);
  --wz-shadow-md: 0 18px 48px rgba(51, 47, 113, .12);
  --wz-ease: cubic-bezier(.16, 1, .3, 1);
  --teal: var(--wz-primary);
  --teal-dark: var(--wz-primary-dark);
  --ink: var(--wz-ink);
  --muted: var(--wz-muted);
  --line: #e8eaf3;
  --bg: #f5f6fb;
}

html { color-scheme: light; }
body {
  color: var(--wz-ink);
  background:
    radial-gradient(circle at 5% 4%, rgba(99, 102, 241, .12), transparent 27rem),
    radial-gradient(circle at 96% 8%, rgba(236, 72, 153, .08), transparent 24rem),
    linear-gradient(150deg, #fafaff 0%, #f4f5fb 48%, #fff9fc 100%);
  background-attachment: fixed;
}

::selection { color: #fff; background: rgba(92, 103, 242, .86); }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(92, 103, 242, .20);
  outline-offset: 2px;
}

/* Shared surfaces and controls */
.panel,
.toolbar,
.page-head.boxed,
.product-card,
.branch-card {
  border-color: rgba(99, 102, 241, .11);
  background: var(--wz-surface);
  box-shadow: var(--wz-shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.panel { border-radius: 20px; }
.panel-pad { padding: clamp(19px, 2vw, 25px); }
.section-gap { margin-top: 20px; }
.page-head.boxed {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border-radius: 20px;
}
.page-head.boxed::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #8b5cf6, #5c67f2);
}
.page-head h2, .dashboard-head h2 {
  color: #18233a;
  font-weight: 800;
  letter-spacing: -.045em;
}
.page-head p, .dashboard-head p, .sub { color: #7c879b; }

input, select, textarea {
  border-color: #e5e8f1;
  background: rgba(252, 252, 255, .92);
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input:hover, select:hover, textarea:hover { border-color: #d5d5ed; background: #fff; }
input:focus, select:focus, textarea:focus {
  border-color: #8581ee;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(92, 103, 242, .10);
}

.btn {
  border-radius: 11px;
  font-weight: 700;
  transition: transform .2s var(--wz-ease), box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.btn.primary, .login-form .submit, .pay-btn {
  color: #fff;
  border-color: transparent;
  background: var(--wz-gradient-rich);
  box-shadow: 0 9px 22px rgba(92, 103, 242, .22);
}
.btn.primary:hover, .login-form .submit:hover, .pay-btn:hover {
  box-shadow: 0 13px 28px rgba(92, 103, 242, .29);
  filter: saturate(1.05);
}
.btn.soft { color: #655bd1; border-color: #e2e0f7; background: #f5f3ff; }
.btn.text { color: #655bd1; }
.btn.green { box-shadow: 0 6px 16px rgba(16, 185, 129, .14); }
.badge { border-radius: 999px; font-weight: 750; letter-spacing: .01em; }

/* Floating glass sidebar and header */
.sidebar {
  margin: 12px 0 12px 12px;
  height: calc(100vh - 24px);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 22px;
  background: rgba(255, 255, 255, .89);
  box-shadow: 0 18px 55px rgba(45, 47, 88, .10);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
}
.sidebar-brand {
  height: 78px;
  border-bottom: 1px dashed rgba(99, 102, 241, .13);
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(247,245,255,.72));
}
.sidebar-brand img { box-shadow: 0 8px 22px rgba(92, 103, 242, .22); }
.sidebar-brand strong { color: #17233b; letter-spacing: -.7px; }
.sidebar-brand strong span { color: #625bf6; }
.sidebar nav { padding-top: 7px; }
.nav-group-label, .nav-group:nth-child(n) .nav-group-label {
  color: #a0a7b8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
}
.nav-link {
  position: relative;
  overflow: hidden;
  min-height: 45px;
  border-radius: 13px;
  color: #667187;
}
.nav-link::after {
  content: '';
  position: absolute;
  inset: 7px auto 7px 0;
  width: 3px;
  border-radius: 0 6px 6px 0;
  background: #6c63ee;
  opacity: 0;
  transform: scaleY(.45);
  transition: .2s ease;
}
.nav-link.active {
  color: #5147c8;
  border-color: rgba(99, 102, 241, .12);
  background: linear-gradient(135deg, #f5f2ff, #eceeff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 6px 15px rgba(92,103,242,.07);
}
.nav-link.active::after { opacity: 1; transform: scaleY(1); }
.nav-link:hover { color: #554acb; background: rgba(245, 243, 255, .78); }
.nav-link > .icon {
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.sidebar-footer {
  margin: 0 12px 12px;
  padding: 13px 12px;
  border: 0;
  border-radius: 14px;
  color: rgba(255,255,255,.76);
  background: var(--wz-gradient-rich);
}
.sidebar-footer button { color: #fff; background: rgba(255,255,255,.16); }

.topbar {
  top: 12px;
  right: 16px;
  left: calc(var(--sidebar) + 24px);
  height: 62px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 19px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 35px rgba(47, 51, 90, .08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.topbar .menu-btn, .topbar .branch-select, .topbar .module, .account-btn {
  border-color: rgba(99,102,241,.10);
  background: rgba(248,248,255,.84);
}
.topbar .menu-btn:hover { color: #625bf6; border-color: #dcd9f5; background: #f4f1ff; }
.topbar .module { color: #8790a3; }
.topbar .module b { color: #5147c8; }
.dot { background: #20c997; box-shadow: 0 0 0 4px rgba(32,201,151,.12); }
.account-btn { padding: 5px 10px 5px 5px; }
.avatar { background: var(--wz-gradient-rich); box-shadow: 0 5px 13px rgba(92,103,242,.22); }
.account-menu {
  border-color: rgba(99,102,241,.12);
  background: rgba(255,255,255,.96);
  box-shadow: 0 20px 55px rgba(40, 43, 81, .16);
  backdrop-filter: blur(18px);
}
.main { padding-top: 94px; padding-right: 28px; padding-bottom: 34px; }

/* Dashboard */
.dashboard-head {
  position: relative;
  padding: 27px 29px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255,255,255,.18), transparent 13rem),
    linear-gradient(125deg, #5047d7 0%, #675af0 55%, #8b5cf6 100%);
  box-shadow: 0 22px 50px rgba(79,70,229,.18);
  overflow: hidden;
}
.dashboard-head::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  right: -70px;
  bottom: -125px;
  border: 32px solid rgba(255,255,255,.09);
  border-radius: 50%;
  pointer-events: none;
}
.dashboard-head h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); }
.dashboard-head p { color: rgba(255,255,255,.75); }
.dashboard-tools { position: relative; z-index: 1; border-color: rgba(255,255,255,.23); background: rgba(255,255,255,.13); box-shadow: none; backdrop-filter: blur(12px); }
.dashboard-tools input, .dashboard-tools .btn { border-color: rgba(255,255,255,.28); }
.dashboard-tools input { color: #433b91; background: rgba(255,255,255,.92); }
.dashboard-tools .btn:not(.green) { color: #fff; background: rgba(255,255,255,.14); }
.dashboard-tools .btn.green { color: #176f5a; background: #ecfff8; }

.stat {
  position: relative;
  overflow: hidden;
  border-color: rgba(99,102,241,.10);
  box-shadow: var(--wz-shadow-sm);
}
.stat:not(.gradient)::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #625bf6, #8b5cf6);
  opacity: .75;
}
.stat:nth-child(3)::before { background: linear-gradient(90deg, #3b82f6, #22d3ee); }
.stat:nth-child(4)::before { background: linear-gradient(90deg, #f59e0b, #fb7185); }
.stat-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 18px rgba(30,41,59,.08); }
.gradient { background: var(--wz-gradient-rich); box-shadow: 0 16px 34px rgba(92,103,242,.22); }
.chart-panel { border-radius: 22px; }
.chart-panel h3::before { width: 4px; height: 21px; background: linear-gradient(180deg,#8b5cf6,#625bf6); }
.chart-panel:nth-child(2) h3::before { background: linear-gradient(180deg,#ec4899,#8b5cf6); }
.recent-row { border-color: rgba(99,102,241,.09); }
.recent-row:hover { margin-inline: -8px; padding-inline: 8px; border-radius: 12px; background: #faf9ff; }
.recent-row .round-icon { color: #6b5ee1; background: linear-gradient(145deg,#f3efff,#ebeaff); box-shadow: inset 0 0 0 1px rgba(99,102,241,.07); }

/* Tables, lists and settings */
.toolbar { padding: 14px; border-radius: 17px; }
.table-wrap {
  border: 1px solid rgba(99,102,241,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--wz-shadow-sm);
}
.data-table th {
  color: #747e94;
  background: linear-gradient(180deg,#fbfbff,#f5f5fb);
  border-bottom-color: rgba(99,102,241,.11);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.data-table td { border-bottom-color: #eff0f6; }
.data-table tbody tr { transition: background-color .18s ease; }
.data-table tbody tr:hover { background: #faf9ff; }
.product-cell .thumb { border: 1px solid #ebeaf5; box-shadow: 0 5px 12px rgba(40,45,80,.08); }
.form-actions, .modal-foot { border-color: #ebeaf4; background: linear-gradient(180deg,#fafaff,#f6f6fc); }
.variant-editor { border-color: #e5e3f5; background: rgba(250,249,255,.86); }
.note { color: #655c9a; border-color: #e3e0f7; background: #f6f4ff; }
.presets button.active { color: #574bd0; background: #eae7ff; }
.receipt-preview { border-radius: 16px; box-shadow: 0 16px 40px rgba(45,47,78,.12); }

/* POS */
.main.pos-main { padding-top: 88px; }
.pos-tools, .pos-search { position: relative; z-index: 1; }
.pos-tools select, .pos-tools input, .pos-search input { background: rgba(255,255,255,.92); }
.product-card {
  border-radius: 18px;
  transition: transform .22s var(--wz-ease), border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
}
.product-card:hover { border-color: rgba(99,102,241,.27); background: #fff; box-shadow: var(--wz-shadow-md); }
.product-image, .product-placeholder { border-radius: 13px; }
.product-price { color: #5549c4; }
.stock-badge { border-radius: 999px; }
.view-toggle { border-color: rgba(99,102,241,.13); box-shadow: 0 5px 15px rgba(40,45,80,.04); }
.view-toggle button.active { background: var(--wz-gradient); box-shadow: 0 5px 13px rgba(92,103,242,.20); }
.cart {
  border-color: rgba(99,102,241,.13);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(47,45,94,.12);
}
.cart-header { padding: 15px 17px; background: var(--wz-gradient-rich); }
.cart-items { background: linear-gradient(180deg,#fbfbff,#f7f7fc); }
.cart-row { border-color: #e9e8f3; border-radius: 14px; box-shadow: 0 5px 15px rgba(41,45,80,.04); }
.cart-row:hover { border-color: #dcd8f5; }
.customer-box { border-color: #ebe9f5; background: #faf9ff; }
.bill { border-color: #dfdcf7; background: linear-gradient(125deg,#f2efff,#faf9ff); }
.bill strong { color: #564ac9; }

/* Login */
.login {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  gap: 20px;
  padding: 20px;
  background:
    radial-gradient(circle at 8% 5%, rgba(99,102,241,.18), transparent 30rem),
    radial-gradient(circle at 93% 92%, rgba(236,72,153,.12), transparent 28rem),
    linear-gradient(145deg,#f8f8ff 0%,#f2f3fb 52%,#fff7fc 100%);
}
.login::before, .login::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.login::before { width: 230px; height: 230px; left: -95px; top: 18%; background: linear-gradient(135deg,rgba(92,103,242,.15),rgba(139,92,246,.03)); }
.login::after { width: 290px; height: 290px; right: -130px; bottom: 4%; border: 48px solid rgba(236,72,153,.07); }
.login-left {
  position: relative;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 27px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 25px 70px rgba(47,48,88,.11);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.login-left::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 27px 27px 0 0;
  background: linear-gradient(90deg,#5c67f2,#8b5cf6,#ec4899);
}
.login-brand img { box-shadow: 0 13px 34px rgba(92,103,242,.25); }
.login-brand h1 { color: #17233b; letter-spacing: -1.25px; }
.login-brand h1 span { color: #625bf6; }
.login-brand p { color: #939bad; }
.login-form label { color: #788198; }
.login-form input { background: rgba(252,252,255,.88); }
.login-session { color: #7d849a; border-color: #ecebf5; background: #fafaff; }
.demo-accounts button {
  border-color: rgba(99,102,241,.11);
  background: linear-gradient(145deg,#fff,#f9f7ff);
  box-shadow: 0 6px 18px rgba(45,47,88,.04);
}
.demo-accounts button:hover { border-color: #d4cff4; background: #f5f2ff; box-shadow: 0 11px 24px rgba(76,69,140,.10); }
.login-info { border-color: #ebe9f5; background: rgba(252,252,255,.86); }
.login-right {
  isolation: isolate;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 27px;
  background:
    radial-gradient(circle at 84% 12%,rgba(255,255,255,.18),transparent 14rem),
    radial-gradient(circle at 17% 100%,rgba(236,72,153,.28),transparent 20rem),
    linear-gradient(132deg,#4f46d8 0%,#675af0 48%,#8b5cf6 100%);
  box-shadow: 0 27px 70px rgba(79,70,229,.22);
}
.login-right::before { opacity: .32; background: radial-gradient(circle at 18% 9%,#fff,transparent 45%); }
.login-right::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 230px;
  height: 230px;
  right: -70px;
  bottom: -130px;
  border: 42px solid rgba(255,255,255,.09);
  border-radius: 50%;
}
.login-right h2 { color: #fff; }
.login-right > p { color: rgba(255,255,255,.72); }
.login-pill { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.13); }
.feature { border-color: rgba(255,255,255,.20); background: rgba(255,255,255,.13); box-shadow: 0 12px 30px rgba(40,31,112,.10); backdrop-filter: blur(15px); }
.feature-top { color: rgba(255,255,255,.55); }
.feature-top > .icon, .feature:nth-child(n) .icon { color: #5147cf; background: #fff; box-shadow: 0 7px 18px rgba(42,31,120,.17); }
.feature h3 { color: #fff; }
.feature p { color: rgba(255,255,255,.70); }
.feature small { color: #fde68a; }
.login-right-footer { color: rgba(255,255,255,.54); border-color: rgba(255,255,255,.15); }

/* Modals and feedback */
dialog {
  border-color: rgba(99,102,241,.12);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(31,29,72,.28);
}
dialog::backdrop { background: rgba(29,29,60,.48); backdrop-filter: blur(6px); }
.modal-head {
  color: #fff;
  border-bottom: 0;
  background: var(--wz-gradient-rich);
}
.modal-head .btn { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.13); }
#toast { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: #373451; box-shadow: 0 16px 40px rgba(34,33,63,.25); }
.boot { color: #5d56bd; }
.boot img { box-shadow: 0 12px 35px rgba(92,103,242,.24); }

@media (hover: hover) and (pointer: fine) {
  .panel:not(.chart-panel):not(.cart):not(.login-left):hover,
  .branch-card:hover { border-color: rgba(99,102,241,.20); box-shadow: var(--wz-shadow-md); }
  .btn:not(:disabled):hover { transform: translateY(-2px); }
  .btn:not(:disabled):active { transform: translateY(0) scale(.98); }
  .product-card:hover { transform: translateY(-4px); }
  .nav-link:hover > .icon { transform: translateY(-1px) scale(1.03); }
}

@media (max-width: 960px) {
  .sidebar { margin-left: 9px; }
  .topbar { left: calc(var(--sidebar) + 18px); }
  .main { padding-right: 20px; }
  .dashboard-head { align-items: stretch; }
  .dashboard-tools { max-width: 460px; }
}

@media (max-width: 760px) {
  .sidebar, .collapsed .sidebar { margin: 8px; height: calc(100vh - 16px); border-radius: 20px; }
  .topbar { top: 9px; right: 9px; left: 9px; height: 60px; border-radius: 17px; }
  .main, .main.pos-main { padding: 84px 12px 24px; }
  .dashboard-head { padding: 23px 20px; border-radius: 21px; }
  .dashboard-head h2 { font-size: 25px; }
  .dashboard-tools { width: 100%; max-width: none; }
  .page-head.boxed { padding: 19px 18px; border-radius: 18px; }
  .table-wrap { border-radius: 16px; }
  .login { padding: 14px; }
  .login-left { min-height: calc(100vh - 28px); border-radius: 24px; }
  .login-left::before { border-radius: 24px 24px 0 0; }
}

@media (max-width: 430px) {
  .topbar { padding-inline: 12px; }
  .topbar-actions { gap: 7px; }
  .account-name, .topbar .module span:not(.dot) { display: none; }
  .dashboard-head { padding: 21px 17px; }
  .dashboard-tools { padding: 7px; }
  .panel { border-radius: 17px; }
  .login { padding: 9px; }
  .login-left { min-height: calc(100vh - 18px); padding: 25px 20px; border-radius: 21px; }
  .login-brand img { width: 86px; height: 86px; }
  .login-brand h1 { font-size: 28px; }
  .demo-accounts button { padding-inline: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; }
  .panel, .product-card, .table-wrap { box-shadow: none; backdrop-filter: none; }
}
