:root{
  --green:#0f9b67;
  --green-dark:#08784e;
  --green-soft:#ecfdf5;
  --ink:#10231d;
  --muted:#64748b;
  --line:#e8eef0;
  --bg:#f6faf8;
  --white:#fff;
  --red:#b91c1c;
  --red-soft:#fef2f2;
  --blue:#0369a1;
  --yellow:#92400e;
  --shadow:0 14px 36px rgba(15,35,29,.08);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--ink)}
a{text-decoration:none;color:inherit}
button,input{font-family:inherit}
.hpo-app{min-height:100vh;display:flex}
.hpo-sidebar{width:292px;background:#fff;border-right:1px solid var(--line);position:fixed;left:0;top:0;bottom:0;z-index:30;display:flex;flex-direction:column}
.hpo-brand{padding:22px 20px;border-bottom:1px solid var(--line);display:flex;gap:13px;align-items:center}
.hpo-logo{width:48px;height:48px;border-radius:17px;background:linear-gradient(135deg,var(--green),#16c98b);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:900;box-shadow:0 10px 22px rgba(15,155,103,.22)}
.hpo-brand h2{margin:0;font-size:19px}
.hpo-brand p{margin:3px 0 0;color:var(--muted);font-size:12px}
.hpo-nav{padding:12px;overflow:auto;flex:1}
.hpo-nav a{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:16px;color:#334155;margin-bottom:5px;transition:.15s}
.hpo-nav a:hover{background:#f1f5f9}
.hpo-nav a.active{background:#e7fff4;color:#062c1e;border:1px solid #bbf7d0}
.hpo-code{min-width:43px;height:32px;border-radius:11px;background:#eafaf2;color:var(--green);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:12px}
.hpo-nav a.active .hpo-code{background:var(--green);color:#fff}
.hpo-nav-title{font-weight:800;font-size:14px;display:block}
.hpo-nav-desc{font-size:11px;color:var(--muted);margin-top:2px;display:block}
.hpo-main{margin-left:292px;width:calc(100% - 292px);min-height:100vh}
.hpo-topbar{height:74px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:20}
.hpo-top-left{display:flex;align-items:center;gap:12px}
.hpo-menu-btn{display:none;width:44px;height:44px;border:0;border-radius:15px;background:#eafaf2;color:var(--green);font-weight:900;font-size:18px;cursor:pointer}
.hpo-topbar h1{margin:0;font-size:22px}
.hpo-topbar p{margin:2px 0 0;color:var(--muted);font-size:12px}
.hpo-user-pill{border:1px solid var(--line);border-radius:999px;background:#fff;padding:10px 14px;color:#334155;font-weight:800;font-size:13px}
.hpo-content{padding:22px;max-width:1500px;margin:0 auto}
.hpo-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:25}
.hpo-alert{border-radius:16px;padding:13px 15px;margin-bottom:16px}
.hpo-alert.ok{background:#ecfdf5;color:#047857;border:1px solid #bbf7d0}
.hpo-alert.err{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.hpo-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#ecfdf5,#fff);border:1px solid #d8f3e6;border-radius:24px;padding:24px;box-shadow:var(--shadow);margin-bottom:18px}
.hpo-kicker{display:inline-flex;border-radius:999px;background:#dcfce7;color:#047857;padding:6px 10px;font-weight:900;font-size:12px;margin-bottom:10px}
.hpo-hero h2{margin:0 0 7px;font-size:30px;color:#10231d}
.hpo-hero p{margin:0;color:#64748b;line-height:1.5}
.hpo-hero-card{min-width:240px;border-radius:20px;background:linear-gradient(135deg,var(--green),#11b981);color:white;padding:18px}
.hpo-hero-card small{display:block;opacity:.9}
.hpo-hero-card b{display:block;font-size:24px;margin:5px 0}
.hpo-hero-card span{display:block;font-size:12px;opacity:.9}
.hpo-grid{display:grid;gap:14px;margin-bottom:18px}
.hpo-grid.stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.hpo-grid.two{grid-template-columns:1fr 1fr}
.hpo-stat,.hpo-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:17px;box-shadow:0 8px 24px rgba(15,35,29,.055)}
.hpo-stat small{color:#64748b}
.hpo-stat b{display:block;color:#10231d;font-size:23px;margin-top:7px}
.hpo-stat span{display:block;color:#64748b;font-size:12px;margin-top:5px}
.hpo-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.hpo-card h3{margin:0;font-size:18px}
.hpo-card p{margin:4px 0 0;color:#64748b;font-size:13px}
.hpo-link-btn{border:1px solid var(--green);color:var(--green);background:#fff;border-radius:13px;padding:9px 12px;font-weight:800;font-size:13px;white-space:nowrap}
.hpo-asset-row,.hpo-status-list div{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #eef2f7;padding:13px 0}
.hpo-asset-row:first-of-type,.hpo-status-list div:first-child{border-top:0}
.hpo-asset-row span,.hpo-status-list span{color:#64748b}
.hpo-asset-row b,.hpo-status-list b{font-size:16px}
.hpo-asset-row.profit b{color:var(--green)}
.hpo-status-list b.ok{color:var(--green)}
.hpo-table-wrap{overflow-x:auto}
.hpo-table{width:100%;border-collapse:collapse;min-width:640px}
.hpo-table th{background:#f8fafc;text-align:left;font-size:12px;text-transform:uppercase;color:#64748b;padding:13px}
.hpo-table td{padding:13px;border-top:1px solid #eef2f7;vertical-align:top}
.hpo-debug{white-space:pre-wrap;margin:16px 0 0;background:#0f172a;color:#e5e7eb;border-radius:16px;padding:16px;overflow:auto}
.hpo-login-body{background:linear-gradient(135deg,#e8fff4,#f8fafc);min-height:100vh}
.hpo-login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:22px}
.hpo-login-card{width:100%;max-width:430px;background:#fff;border:1px solid #d8f3e6;border-radius:28px;padding:26px;box-shadow:0 24px 70px rgba(15,155,103,.16)}
.hpo-login-brand{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.hpo-login-logo{width:54px;height:54px;border-radius:19px;background:linear-gradient(135deg,var(--green),#16c98b);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:900;box-shadow:0 12px 26px rgba(15,155,103,.24)}
.hpo-login-brand h1{margin:0;font-size:22px}
.hpo-login-brand p{margin:4px 0 0;color:#64748b;font-size:13px}
.hpo-login-hero{background:#ecfdf5;border:1px solid #bbf7d0;border-radius:20px;padding:16px;margin-bottom:16px}
.hpo-login-hero h2{margin:0 0 6px;font-size:22px}
.hpo-login-hero p{margin:0;color:#64748b;line-height:1.5;font-size:13px}
.hpo-login-form{display:grid;gap:10px}
.hpo-login-form label{font-weight:800;font-size:13px;color:#334155}
.hpo-login-form input{width:100%;border:1px solid #cbd5e1;border-radius:15px;padding:13px 14px;font-size:14px;outline:none}
.hpo-login-form input:focus{border-color:var(--green);box-shadow:0 0 0 4px rgba(15,155,103,.12)}
.hpo-login-form button{border:0;border-radius:16px;background:var(--green);color:#fff;font-weight:900;padding:14px;margin-top:8px;cursor:pointer;font-size:15px}
.hpo-login-foot{display:flex;align-items:center;justify-content:space-between;margin-top:18px;color:#64748b;font-size:12px}
@media(max-width:1100px){
  .hpo-grid.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hpo-grid.two{grid-template-columns:1fr}
}
@media(max-width:980px){
  .hpo-sidebar{transform:translateX(-105%);transition:.2s}
  body.hpo-sidebar-open .hpo-sidebar{transform:translateX(0)}
  body.hpo-sidebar-open .hpo-overlay{display:block}
  .hpo-main{margin-left:0;width:100%}
  .hpo-menu-btn{display:block}
  .hpo-user-pill{display:none}
}
@media(max-width:620px){
  .hpo-content{padding:14px}
  .hpo-topbar{padding:0 14px}
  .hpo-hero{display:block;padding:18px}
  .hpo-hero h2{font-size:24px}
  .hpo-hero-card{margin-top:14px;min-width:0}
  .hpo-grid.stats{grid-template-columns:1fr}
  .hpo-card-head{display:block}
  .hpo-link-btn{display:inline-flex;margin-top:12px}
}

/* HayPOS Owner Admin PART 2 */
.hpo-form-card label,
.hpo-template-card label{
  display:block;
  font-weight:800;
  font-size:13px;
  color:#334155;
  margin-bottom:7px;
}
.hpo-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
}
.hpo-form-grid .full{grid-column:1/-1}
.hpo-form-grid input,
.hpo-form-grid textarea,
.hpo-form-grid select,
.hpo-template-card input,
.hpo-template-card textarea,
.hpo-toolbar-form input,
.hpo-toolbar-form select{
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:15px;
  padding:12px 13px;
  font-size:14px;
  outline:none;
  background:#fff;
}
.hpo-form-grid input:focus,
.hpo-form-grid textarea:focus,
.hpo-form-grid select:focus,
.hpo-template-card input:focus,
.hpo-template-card textarea:focus,
.hpo-toolbar-form input:focus,
.hpo-toolbar-form select:focus{
  border-color:var(--green);
  box-shadow:0 0 0 4px rgba(15,155,103,.12);
}
.hpo-form-grid small{
  display:block;
  color:#64748b;
  margin-top:6px;
  font-size:12px;
}
.hpo-form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.hpo-primary-btn{
  border:0;
  border-radius:15px;
  background:var(--green);
  color:#fff;
  font-weight:900;
  padding:12px 15px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.hpo-switch-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
}
.hpo-switch-row{
  display:flex !important;
  align-items:center;
  gap:10px;
  padding:13px;
  border:1px solid #e8eef0;
  border-radius:16px;
  background:#f8fafc;
  margin:0 !important;
}
.hpo-switch-row input{
  width:18px;
  height:18px;
  accent-color:var(--green);
}
.hpo-switch-row span{
  font-weight:800;
  color:#10231d;
}
.hpo-template-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
}
.hpo-template-card{
  display:flex;
  flex-direction:column;
  gap:9px;
}
.hpo-mini-check{
  display:flex !important;
  align-items:center;
  gap:7px;
  border:1px solid #bbf7d0;
  background:#ecfdf5;
  padding:8px 10px;
  border-radius:999px;
  margin:0 !important;
  white-space:nowrap;
}
.hpo-mini-check input{
  width:16px;
  height:16px;
  accent-color:var(--green);
}
.hpo-toolbar-form{
  display:grid;
  grid-template-columns:1fr 180px auto auto;
  gap:10px;
  align-items:center;
  margin-bottom:18px;
}
.hpo-badge{
  display:inline-flex;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:900;
}
.hpo-badge-ok{background:#dcfce7;color:#047857}
.hpo-badge-bad{background:#fee2e2;color:#b91c1c}
.hpo-badge-warn{background:#fef3c7;color:#92400e}
.hpo-table.wide{min-width:1000px}
.hpo-message-cell{
  max-width:360px;
  color:#334155;
  font-size:13px;
  line-height:1.45;
}
@media(max-width:900px){
  .hpo-form-grid,
  .hpo-switch-grid,
  .hpo-template-grid,
  .hpo-toolbar-form{
    grid-template-columns:1fr;
  }
  .hpo-form-actions .hpo-primary-btn,
  .hpo-form-actions .hpo-link-btn,
  .hpo-toolbar-form .hpo-primary-btn,
  .hpo-toolbar-form .hpo-link-btn{
    width:100%;
  }
}

/* HayPOS Owner Admin PART 3 */
.hpo-actions-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.product-toolbar{
  grid-template-columns:1fr 180px 180px auto auto;
}
.hpo-product-name{
  font-weight:900;
  font-size:15px;
  color:#10231d;
}
.hpo-muted{
  color:#64748b;
  font-size:12px;
  margin-top:4px;
}
.hpo-row-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  align-items:center;
}
.hpo-link-btn.small,
.hpo-danger-btn.small{
  padding:8px 10px;
  border-radius:11px;
  font-size:12px;
}
.hpo-danger-btn{
  border:0;
  border-radius:15px;
  background:#fee2e2;
  color:#b91c1c;
  font-weight:900;
  padding:12px 15px;
  cursor:pointer;
}
.hpo-text-red{color:#b91c1c}
.hpo-form-grid.one{
  grid-template-columns:1fr;
}
.product-checks{
  margin-top:18px;
}
.hpo-import-guide pre{
  background:#0f172a;
  color:#e5e7eb;
  border-radius:16px;
  padding:16px;
  overflow:auto;
  white-space:pre-wrap;
}
.hpo-label-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(155px,1fr));
  gap:10px;
}
.hpo-barcode-label{
  border:1px dashed #111827;
  border-radius:10px;
  padding:9px;
  background:#fff;
  text-align:center;
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.hpo-barcode-label b{
  font-size:12px;
  line-height:1.2;
}
.hpo-label-price{
  font-weight:900;
  font-size:13px;
  margin-top:4px;
}
.hpo-barcode-box{
  border:1px solid #111827;
  border-radius:6px;
  padding:7px 4px;
  margin:7px 0 4px;
  font-family:Arial,Helvetica,sans-serif;
  font-weight:900;
  letter-spacing:1px;
  font-size:13px;
}
@media print{
  body{
    background:#fff !important;
  }
  .hpo-sidebar,
  .hpo-topbar,
  .no-print,
  .hpo-overlay{
    display:none !important;
  }
  .hpo-main{
    margin-left:0 !important;
    width:100% !important;
  }
  .hpo-content{
    padding:0 !important;
    max-width:none !important;
  }
  .hpo-card{
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
  }
  .hpo-label-grid{
    display:grid !important;
    grid-template-columns:repeat(3, 58mm) !important;
    gap:3mm !important;
  }
  .hpo-barcode-label{
    width:58mm;
    min-height:32mm;
    page-break-inside:avoid;
  }
}
@media(max-width:900px){
  .product-toolbar{
    grid-template-columns:1fr;
  }
  .hpo-actions-bar .hpo-primary-btn,
  .hpo-actions-bar .hpo-link-btn{
    width:100%;
  }
}

/* HayPOS Owner Admin PART 4 */
.hpo-sales-filter{
  display:grid;
  grid-template-columns:1fr 150px 150px 170px auto auto;
  gap:10px;
  align-items:center;
  margin-bottom:18px;
}
.hpo-sales-filter input,
.hpo-sales-filter select{
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:15px;
  padding:12px 13px;
  font-size:14px;
  outline:none;
  background:#fff;
}
.hpo-sales-filter input:focus,
.hpo-sales-filter select:focus{
  border-color:var(--green);
  box-shadow:0 0 0 4px rgba(15,155,103,.12);
}
.hpo-receipt-preview-card{
  display:flex;
  justify-content:center;
  background:#f8fafc;
}
.hpo-receipt{
  background:#fff;
  color:#111827;
  border:1px solid #e5e7eb;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
  padding:10px;
  font-family:Arial,Helvetica,sans-serif;
}
.hpo-receipt.receipt-58{width:58mm;max-width:58mm}
.hpo-receipt.receipt-80{width:80mm;max-width:80mm}
.hpo-receipt.font-small{font-size:10px}
.hpo-receipt.font-normal{font-size:11px}
.hpo-receipt.font-large{font-size:12px}
.receipt-center{text-align:center}
.receipt-logo{
  max-width:38mm;
  max-height:18mm;
  object-fit:contain;
  margin:0 auto 5px;
  display:block;
}
.receipt-store{
  font-weight:900;
  font-size:1.18em;
  text-transform:uppercase;
}
.receipt-line{
  border-top:1px dashed #111827;
  margin:7px 0;
}
.receipt-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  line-height:1.35;
}
.receipt-row span{
  color:#111827;
}
.receipt-row b{
  text-align:right;
}
.receipt-item{
  margin-bottom:6px;
}
.receipt-total{
  font-size:1.15em;
  font-weight:900;
}
.receipt-qris{
  width:34mm;
  height:34mm;
  object-fit:contain;
  margin:5px auto;
  display:block;
}
.receipt-qr-text{
  border:1px solid #111827;
  padding:6px;
  font-weight:900;
  letter-spacing:1px;
  word-break:break-all;
}
.receipt-footer{
  white-space:normal;
  line-height:1.35;
}
@media(max-width:980px){
  .hpo-sales-filter{
    grid-template-columns:1fr;
  }
  .hpo-sales-filter .hpo-primary-btn,
  .hpo-sales-filter .hpo-link-btn{
    width:100%;
  }
}
@media print{
  body{
    background:#fff !important;
  }
  .hpo-sidebar,
  .hpo-topbar,
  .hpo-overlay,
  .no-print{
    display:none !important;
  }
  .hpo-main{
    margin-left:0 !important;
    width:100% !important;
  }
  .hpo-content{
    padding:0 !important;
    max-width:none !important;
  }
  .hpo-receipt-preview-card{
    display:block !important;
    background:#fff !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
  }
  .hpo-receipt{
    border:0 !important;
    box-shadow:none !important;
    margin:0 !important;
    padding:0 !important;
  }
}

/* HayPOS Owner Admin PART 5 */
.hpo-report-menu{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.hpo-report-card{
  display:block;
  background:#fff;
  border:1px solid #e8eef0;
  border-radius:20px;
  padding:18px;
  box-shadow:0 8px 24px rgba(15,35,29,.055);
  transition:.16s;
}
.hpo-report-card:hover{
  transform:translateY(-2px);
  border-color:#bbf7d0;
  box-shadow:0 14px 30px rgba(15,155,103,.10);
}
.hpo-report-card b{
  display:block;
  font-size:17px;
  color:#10231d;
  margin-bottom:6px;
}
.hpo-report-card span{
  display:block;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
}
.hpo-report-filter{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:18px;
}
.hpo-report-filter input,
.hpo-assets-filter input,
.hpo-assets-filter select{
  border:1px solid #cbd5e1;
  border-radius:15px;
  padding:12px 13px;
  font-size:14px;
  outline:none;
  background:#fff;
}
.hpo-report-filter input:focus,
.hpo-assets-filter input:focus,
.hpo-assets-filter select:focus{
  border-color:var(--green);
  box-shadow:0 0 0 4px rgba(15,155,103,.12);
}
.hpo-assets-filter{
  display:grid;
  grid-template-columns:1fr 180px auto auto;
  gap:10px;
  align-items:center;
  margin-bottom:18px;
}
.hpo-chart-list{
  display:grid;
  gap:12px;
}
.hpo-chart-row{
  display:grid;
  grid-template-columns:120px 1fr 160px;
  gap:12px;
  align-items:center;
}
.hpo-chart-label{
  font-weight:800;
  color:#334155;
}
.hpo-chart-bar{
  height:16px;
  background:#eef2f7;
  border-radius:999px;
  overflow:hidden;
}
.hpo-chart-bar span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#0f9b67,#16c98b);
  border-radius:999px;
}
.hpo-chart-value{
  text-align:right;
  font-weight:900;
  color:#10231d;
}
@media(max-width:1000px){
  .hpo-report-menu{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .hpo-assets-filter{
    grid-template-columns:1fr;
  }
  .hpo-chart-row{
    grid-template-columns:1fr;
    gap:6px;
  }
  .hpo-chart-value{
    text-align:left;
  }
}
@media(max-width:620px){
  .hpo-report-menu{
    grid-template-columns:1fr;
  }
  .hpo-report-filter .hpo-primary-btn,
  .hpo-report-filter .hpo-link-btn,
  .hpo-assets-filter .hpo-primary-btn,
  .hpo-assets-filter .hpo-link-btn{
    width:100%;
  }
}
