
*{box-sizing:border-box} body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f5f7;color:#222}
.hidden{display:none!important}.login-screen{height:100vh;display:flex;align-items:center;justify-content:center;background:#111827}
.login-card{background:#fff;padding:28px;border-radius:16px;width:360px;box-shadow:0 10px 30px #0005}.login-card h1{margin:0;color:#b91c1c}
input,select,textarea{padding:10px;border:1px solid #ddd;border-radius:8px;width:100%;margin:5px 0;background:#fff}
button{padding:10px 14px;border:0;border-radius:8px;background:#111827;color:white;cursor:pointer;margin:4px}
button:hover{opacity:.9}.danger{background:#b91c1c}.app{display:flex;min-height:100vh}.sidebar{width:230px;background:#111827;color:white;padding:18px;position:sticky;top:0;height:100vh}
.sidebar h2{color:#fbbf24}.sidebar button{display:block;width:100%;text-align:left;background:#1f2937;margin:7px 0}
main{padding:22px;flex:1}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel{background:white;border-radius:14px;padding:16px;margin-bottom:16px;box-shadow:0 2px 8px #0001}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.product-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.product{border:1px solid #eee;border-radius:12px;padding:12px;background:#fafafa}.product b{display:block}.muted{color:#666;font-size:12px}
.cart-row{display:grid;grid-template-columns:1fr 70px 70px 40px;gap:6px;align-items:center;border-bottom:1px solid #eee;padding:8px 0}
.totals{text-align:right}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:16px}
.card{background:white;border-radius:14px;padding:18px;box-shadow:0 2px 8px #0001}.card span{display:block;color:#666}.card b{font-size:24px}
table{border-collapse:collapse;width:100%;background:white}th,td{border-bottom:1px solid #eee;padding:9px;text-align:left}th{background:#f9fafb}
.receipt{position:fixed;right:20px;top:20px;background:white;padding:20px;width:320px;box-shadow:0 10px 35px #0004;border-radius:14px;z-index:10}
@media print{body>*:not(#receipt){display:none!important}.receipt{display:block!important;position:static;box-shadow:none;width:100%}}
@media(max-width:800px){.app{display:block}.sidebar{width:100%;height:auto;position:relative}.grid.two{grid-template-columns:1fr}}

.receipt{text-align:center}
.receipt-logo{margin:0 auto 8px auto;width:58px;height:58px;border:2px solid #111827;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:22px}
.receipt h2{margin:6px 0 4px 0}
.receipt p{margin:6px 0}

.report-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.report-tabs button{background:#374151}
.report-panel table{font-size:14px}

.item-panel table{font-size:14px}
.panel-lite{background:#f9fafb;border:1px solid #eee;border-radius:10px;padding:10px;margin:8px 0}
.panel-lite label{display:block;font-weight:bold;margin-bottom:4px}

.inventory-panel table{font-size:14px}
.inventory-panel .form-grid{margin-bottom:12px}

.employee-panel table{font-size:14px}
.employee-panel select{min-width:130px}

.store-device-panel table{font-size:14px}


/* Curtain House POS Mobile UI Redesign */
:root{
  --ch-dark:#111827;
  --ch-red:#b91c1c;
  --ch-gold:#fbbf24;
  --ch-bg:#f3f4f6;
  --ch-card:#ffffff;
  --ch-line:#e5e7eb;
}
body{background:var(--ch-bg);font-size:16px}
.login-screen{background:linear-gradient(145deg,#111827,#7f1d1d)}
.login-card{border-radius:22px}
.login-card h1{font-size:34px}
.login-card input,.login-card button{font-size:18px;padding:14px}
.mobile-topbar{display:none}
.mobile-bottom-nav{display:none}
.cart-fab{background:var(--ch-red);border-radius:999px}
.product{
  border:1px solid var(--ch-line);
  background:#fff;
  border-radius:18px;
  padding:14px;
  min-height:130px;
  box-shadow:0 4px 12px #0000000d;
}
.product b{font-size:16px}
.product button{
  width:100%;
  border-radius:14px;
  padding:12px;
  background:var(--ch-red);
  font-weight:bold;
}
.product-list{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}
.cart-row{grid-template-columns:1fr 72px 80px 42px}
.cart-row input{font-size:16px;text-align:center}
.sidebar button,.report-tabs button{border-radius:999px}
.panel{border-radius:18px}
input,select,textarea{font-size:16px}
.page-title{display:flex;align-items:center;gap:8px}

@media(max-width:800px){
  body{padding-bottom:82px;background:#f8fafc}
  .login-screen{padding:14px;height:100dvh}
  .login-card{width:100%;max-width:420px;padding:22px}
  .login-card h1{text-align:center;font-size:36px}
  .app{display:block}
  .mobile-topbar{
    display:flex;
    position:sticky;
    top:0;
    z-index:50;
    align-items:center;
    justify-content:space-between;
    background:var(--ch-dark);
    color:#fff;
    padding:12px 14px;
    box-shadow:0 2px 10px #0003;
  }
  .mobile-topbar strong{display:block;font-size:18px}
  .mobile-topbar small{display:block;color:#d1d5db;font-size:12px}
  .sidebar{
    display:flex;
    overflow-x:auto;
    gap:8px;
    width:100%;
    height:auto;
    position:sticky;
    top:54px;
    z-index:40;
    padding:10px;
    background:#fff;
    color:#111827;
    border-bottom:1px solid var(--ch-line);
  }
  .sidebar h2,.sidebar p{display:none}
  .sidebar button{
    flex:0 0 auto;
    width:auto;
    background:#eef2f7;
    color:#111827;
    padding:10px 14px;
    margin:0;
    white-space:nowrap;
    font-weight:600;
  }
  .sidebar .danger{background:#fee2e2;color:#991b1b}
  main{padding:12px}
  .grid.two{grid-template-columns:1fr;gap:12px}
  .page h1{font-size:28px;margin:12px 0}
  .panel{padding:14px;margin-bottom:12px;box-shadow:0 3px 14px #00000012}
  .product-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .product{min-height:150px;padding:12px;display:flex;flex-direction:column;justify-content:space-between}
  .product b{font-size:15px;line-height:1.2}
  .product p{margin:7px 0;font-size:14px}
  .product button{padding:12px 8px;font-size:15px}
  #searchProduct{height:48px;border-radius:14px}
  #cart{max-height:240px;overflow:auto}
  .cart-row{grid-template-columns:1fr 64px 70px 36px;gap:5px;font-size:14px}
  .totals{position:sticky;bottom:74px;background:#fff;border-top:1px solid var(--ch-line);padding-top:10px}
  .totals h2{font-size:24px}
  main button,.panel button{min-height:44px;border-radius:14px;font-size:16px}
  .form-grid{grid-template-columns:1fr}
  table{font-size:13px;display:block;overflow-x:auto;white-space:nowrap}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card{padding:14px}
  .card b{font-size:20px}
  .report-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:6px}
  .report-tabs button{flex:0 0 auto;white-space:nowrap}
  .mobile-bottom-nav{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:100;
    background:#fff;
    border-top:1px solid var(--ch-line);
    padding:8px 6px max(8px, env(safe-area-inset-bottom));
    box-shadow:0 -4px 18px #00000012;
  }
  .mobile-bottom-nav button{
    background:#f3f4f6;color:#111827;margin:0 3px;padding:10px 4px;border-radius:14px;font-size:13px;min-height:48px;
  }
  .mobile-bottom-nav button:first-child{background:var(--ch-red);color:#fff}
  .cart-fab{min-height:40px;padding:9px 14px;background:var(--ch-red);color:#fff}
  .cart-fab span{background:#fff;color:var(--ch-red);border-radius:999px;padding:2px 7px;margin-left:5px;font-weight:bold}
  .mobile-cart-drawer{
    position:fixed;left:0;right:0;bottom:0;max-height:78dvh;z-index:200;background:#fff;
    border-radius:24px 24px 0 0;box-shadow:0 -8px 35px #0004;padding:16px;overflow:auto;
  }
  .drawer-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--ch-line);margin-bottom:10px}
  .drawer-head h3{margin:8px 0}
  .receipt{width:96%;left:2%;right:2%;top:10px}
}
@media(max-width:390px){
  .product-list{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
  .sidebar button{padding:9px 12px;font-size:14px}
}

/* Sales Associate role available - v2 */

.version-badge,.global-version-badge{
  display:inline-block;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  font-weight:700;
  margin:6px 0 14px 0;
}
.global-version-badge{
  position:fixed;
  right:10px;
  bottom:84px;
  z-index:9999;
  box-shadow:0 4px 12px #0002;
}
@media(max-width:800px){
  .global-version-badge{bottom:92px;font-size:11px}
}

/* Receipts menu update */
#receiptsTable button{background:#111827;color:#fff;border-radius:10px;padding:8px 12px}

/* Store save fix */
#storesTable{margin-top:14px}
#storesTable th,#storesTable td{padding:10px;border-bottom:1px solid #e5e7eb}
.version-badge{
  display:inline-block;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  font-weight:700;
  margin:6px 0 14px 0;
}

/* POS device save fix */
#posDevicesTable{margin-top:14px}
#posDevicesTable th,#posDevicesTable td{padding:10px;border-bottom:1px solid #e5e7eb}

/* Item edit update */
#itemListTable button{background:#111827;color:#fff;border-radius:10px;padding:8px 12px}
#itemSku[readonly]{background:#f3f4f6;color:#6b7280}

/* Shift update */
#shiftTable th,#shiftTable td{padding:10px;border-bottom:1px solid #e5e7eb}
.version-badge{
  display:inline-block;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  font-weight:700;
  margin:6px 0 14px 0;
}
