:root{

  --bg:#070a11;

  --bg-soft:#0c111b;

  --panel:#101827;

  --panel-2:#131d2f;

  --panel-3:#182338;

  --line:#22314b;

  --line-2:#2d3d5d;

  --text:#eef4ff;

  --muted:#94a3bf;

  --muted-2:#6d7c98;

  --green:#b8ea57;

  --green-2:#9ed238;

  --blue:#4fa3ff;

  --red:#ff6b6b;

  --amber:#ffb54d;

  --shadow:0 18px 60px rgba(0,0,0,.38);

  --radius:18px;

  --radius-sm:12px;

  --radius-lg:24px;

  --font:"Plus Jakarta Sans",sans-serif;

  --mono:"JetBrains Mono",monospace;

}

*{box-sizing:border-box}

html,body{margin:0;padding:0}

body{

  font-family:var(--font);

  background:

    radial-gradient(circle at top left, rgba(79,163,255,.09), transparent 28%),

    radial-gradient(circle at top right, rgba(184,234,87,.08), transparent 22%),

    linear-gradient(180deg,#060910 0%,#0a1019 100%);

  color:var(--text);

  min-height:100vh;

}

button,input,select,textarea{

  font:inherit;

}

a{

  color:inherit;

  text-decoration:none;

}

.hidden{

  display:none !important;

}

.app-shell{

  min-height:100vh;

}

.login-shell{

  min-height:100vh;

  display:flex;

  align-items:center;

  justify-content:center;

  padding:28px;

}

.login-wrap{

  width:100%;

  max-width:1120px;

}

.login-card{

  background:rgba(16,24,39,.9);

  border:1px solid rgba(34,49,75,.9);

  box-shadow:var(--shadow);

  border-radius:28px;

  overflow:hidden;

  backdrop-filter:blur(10px);

}

.login-top{

  padding:28px 30px 12px;

}

.brand{

  display:flex;

  flex-direction:column;

  gap:6px;

}

.brand-title{

  font-size:34px;

  font-weight:800;

  letter-spacing:-.03em;

  line-height:1;

}

.brand-title .accent{

  color:var(--green);

}

.brand-sub{

  color:var(--muted);

  font-size:14px;

}

.login-grid{

  display:grid;

  grid-template-columns:1fr 1fr;

  gap:20px;

  padding:18px 30px 30px;

}

.panel{

  background:linear-gradient(180deg,rgba(19,29,47,.92),rgba(15,22,36,.92));

  border:1px solid var(--line);

  border-radius:22px;

  padding:24px;

}

.panel h2{

  margin:0 0 8px;

  font-size:18px;

  font-weight:800;

  letter-spacing:-.02em;

}

.panel p{

  margin:0 0 20px;

  color:var(--muted);

  font-size:14px;

}

.form-grid{

  display:grid;

  gap:14px;

}

.field{

  display:grid;

  gap:8px;

}

.field label{

  font-size:13px;

  color:#d6e2f5;

  font-weight:600;

}

.input,

.select,

.textarea{

  width:100%;

  background:#0b1220;

  border:1px solid var(--line);

  color:var(--text);

  border-radius:14px;

  padding:13px 14px;

  outline:none;

  transition:.18s ease;

}

.textarea{

  min-height:96px;

  resize:vertical;

}

.input:focus,

.select:focus,

.textarea:focus{

  border-color:var(--blue);

  box-shadow:0 0 0 3px rgba(79,163,255,.12);

}

.btn{

  appearance:none;

  border:none;

  cursor:pointer;

  border-radius:14px;

  padding:12px 16px;

  font-weight:800;

  transition:.18s ease;

}

.btn-primary{

  background:var(--green);

  color:#0d1306;

}

.btn-primary:hover{

  background:var(--green-2);

}

.btn-secondary{

  background:#172235;

  border:1px solid var(--line);

  color:var(--text);

}

.btn-secondary:hover{

  border-color:var(--line-2);

  background:#1b2940;

}

.btn-danger{

  background:rgba(255,107,107,.12);

  border:1px solid rgba(255,107,107,.26);

  color:#ffd1d1;

}

.btn-danger:hover{

  background:rgba(255,107,107,.18);

}

.btn-small{

  padding:8px 12px;

  border-radius:10px;

  font-size:13px;

  font-weight:700;

}

.status{

  margin:0 30px 20px;

  border-radius:14px;

  padding:12px 14px;

  font-size:14px;

  display:none;

}

.status.show{display:block}

.status.success{

  background:rgba(184,234,87,.12);

  border:1px solid rgba(184,234,87,.28);

  color:#dff6aa;

}

.status.error{

  background:rgba(255,107,107,.12);

  border:1px solid rgba(255,107,107,.26);

  color:#ffd1d1;

}

.shell{

  display:grid;

  grid-template-columns:280px 1fr;

  min-height:100vh;

}

.sidebar{

  border-right:1px solid var(--line);

  background:rgba(10,16,25,.92);

  padding:24px 18px;

  position:sticky;

  top:0;

  height:100vh;

}

.sidebar-top{

  padding:8px 10px 24px;

}

.sidebar-brand{

  font-size:28px;

  font-weight:800;

  letter-spacing:-.03em;

}

.sidebar-brand .accent{

  color:var(--green);

}

.sidebar-copy{

  color:var(--muted);

  font-size:13px;

  margin-top:6px;

}

.sidebar-nav{

  display:grid;

  gap:8px;

}

.nav-btn{

  width:100%;

  text-align:left;

  background:transparent;

  color:#d7e2f4;

  border:1px solid transparent;

  border-radius:14px;

  padding:14px 14px;

  font-weight:700;

}

.nav-btn:hover{

  background:#111a2a;

  border-color:#1d2b42;

}

.nav-btn.active{

  background:linear-gradient(180deg,rgba(184,234,87,.12),rgba(184,234,87,.06));

  border-color:rgba(184,234,87,.24);

  color:#eef8d9;

}

.main{

  padding:26px;

}

.topbar{

  display:flex;

  align-items:flex-start;

  justify-content:space-between;

  gap:18px;

  margin-bottom:22px;

}

.page-title{

  margin:0;

  font-size:30px;

  font-weight:800;

  letter-spacing:-.03em;

}

.page-subtitle{

  margin-top:8px;

  color:var(--muted);

  font-size:14px;

}

.topbar-right{

  display:flex;

  gap:12px;

  align-items:center;

  flex-wrap:wrap;

}

.user-chip{

  background:rgba(16,24,39,.9);

  border:1px solid var(--line);

  border-radius:16px;

  padding:12px 14px;

  display:flex;

  align-items:center;

  gap:10px;

}

.user-avatar{

  width:38px;

  height:38px;

  border-radius:50%;

  display:grid;

  place-items:center;

  font-weight:800;

  color:#111;

  background:linear-gradient(180deg,var(--green),#95c437);

}

.user-meta{

  display:flex;

  flex-direction:column;

  gap:2px;

}

.user-name{

  font-size:14px;

  font-weight:800;

}

.user-role{

  font-size:12px;

  color:var(--muted);

  text-transform:uppercase;

  letter-spacing:.06em;

}

.hero-grid,

.stats-grid,

.split-grid{

  display:grid;

  gap:18px;

}

.stats-grid{

  grid-template-columns:repeat(4,minmax(0,1fr));

}

.hero-grid{

  grid-template-columns:1.15fr .85fr;

}

.card{

  background:linear-gradient(180deg,rgba(16,24,39,.94),rgba(14,21,34,.94));

  border:1px solid var(--line);

  box-shadow:var(--shadow);

  border-radius:22px;

  padding:22px;

}

.card h3{

  margin:0 0 8px;

  font-size:20px;

  font-weight:800;

  letter-spacing:-.02em;

}

.card p{

  margin:0;

  color:var(--muted);

  font-size:14px;

  line-height:1.6;

}

.stat-card{

  padding:20px;

}

.stat-value{

  font-size:36px;

  font-weight:800;

  line-height:1;

  letter-spacing:-.04em;

}

.stat-label{

  margin-top:10px;

  color:var(--muted);

  font-size:14px;

}

.section-head{

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap:14px;

  margin-bottom:16px;

}

.section-copy{

  color:var(--muted);

  font-size:14px;

  margin-top:6px;

}

.table-wrap{

  overflow:auto;

  border:1px solid var(--line);

  border-radius:18px;

}

.table{

  width:100%;

  border-collapse:collapse;

  min-width:760px;

}

.table th,

.table td{

  padding:15px 14px;

  border-bottom:1px solid var(--line);

  text-align:left;

}

.table th{

  font-size:12px;

  color:var(--muted);

  text-transform:uppercase;

  letter-spacing:.06em;

  background:#111a2a;

}

.table td{

  font-size:14px;

}

.table tr:last-child td{

  border-bottom:none;

}

.table-actions{

  display:flex;

  gap:8px;

  flex-wrap:wrap;

}

.pill{

  display:inline-flex;

  align-items:center;

  gap:6px;

  padding:6px 10px;

  border-radius:999px;

  font-size:12px;

  font-weight:700;

}

.pill-active{

  background:rgba(184,234,87,.12);

  border:1px solid rgba(184,234,87,.22);

  color:#dff6aa;

}

.pill-inactive{

  background:rgba(255,107,107,.10);

  border:1px solid rgba(255,107,107,.22);

  color:#ffd1d1;

}

.empty{

  padding:34px 20px;

  color:var(--muted);

  text-align:center;

}

.kpi-list{

  display:grid;

  gap:12px;

  margin-top:16px;

}

.kpi-row{

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap:12px;

  padding:12px 0;

  border-bottom:1px solid var(--line);

}

.kpi-row:last-child{

  border-bottom:none;

}

.kpi-title{

  font-size:14px;

  font-weight:700;

}

.kpi-meta{

  color:var(--muted);

  font-size:12px;

  margin-top:4px;

}

.kpi-value{

  font-family:var(--mono);

  font-weight:700;

  color:var(--green);

}

.notice{

  background:rgba(79,163,255,.08);

  border:1px solid rgba(79,163,255,.18);

  border-radius:18px;

  padding:18px;

  color:#dbe9ff;

}

.notice-title{

  font-size:16px;

  font-weight:800;

  margin-bottom:6px;

}

.notice-copy{

  color:var(--muted);

  font-size:14px;

  line-height:1.6;

}

.modal-backdrop{

  position:fixed;

  inset:0;

  background:rgba(4,8,14,.7);

  display:none;

  align-items:center;

  justify-content:center;

  padding:20px;

  z-index:999;

}

.modal-backdrop.show{

  display:flex;

}

.modal{

  width:100%;

  max-width:560px;

  background:linear-gradient(180deg,#101827,#0f1726);

  border:1px solid var(--line);

  border-radius:24px;

  box-shadow:var(--shadow);

  padding:24px;

}

.modal-title{

  margin:0 0 6px;

  font-size:22px;

  font-weight:800;

}

.modal-copy{

  margin:0 0 18px;

  color:var(--muted);

  font-size:14px;

}

.modal-actions{

  display:flex;

  justify-content:flex-end;

  gap:10px;

  margin-top:18px;

  flex-wrap:wrap;

}

.stack{

  display:grid;

  gap:18px;

}

@media (max-width: 1100px){

  .shell{

    grid-template-columns:1fr;

  }

  .sidebar{

    position:relative;

    height:auto;

    border-right:none;

    border-bottom:1px solid var(--line);

  }

  .hero-grid,

  .stats-grid{

    grid-template-columns:1fr;

  }

}

@media (min-width:720px) and (max-width:1100px){

  .stats-grid{

    grid-template-columns:repeat(2,minmax(0,1fr));

  }

}

@media (max-width: 720px){

  .login-grid{

    grid-template-columns:1fr;

    padding:18px 18px 20px;

  }

  .login-top{

    padding:22px 18px 10px;

  }

  .status{

    margin:0 18px 18px;

  }

  .main{

    padding:18px;

  }

  .topbar{

    flex-direction:column;

    align-items:stretch;

  }

  .topbar-right{

    justify-content:space-between;

  }

  .page-title{

    font-size:24px;

  }

  .card,

  .panel{

    padding:18px;

  }

}

.stock-topbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.stock-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 16px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
}

.tab.active {
    background: rgba(140, 180, 70, 0.16);
    border: 1px solid rgba(140, 180, 70, 0.28);
    color: #dce8c2;
    box-shadow: 0 0 0 1px rgba(140,180,70,.06);
}

.stock-row {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid #222;
}

.qty-box {
    width: 60px;
    text-align: center;
}

.btn {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-green {
    background: linear-gradient(180deg, #7fa53a 0%, #6b8f2f 100%);
    color: #f5f7f2;
    border: 1px solid rgba(180,220,120,0.18);
}

.btn-red {
    background: #ff4d4d;
}
/* KyrioOps touch PIN modal + unified stock refinements */
.kyrio-pin-backdrop{
  position:fixed;inset:0;z-index:9999;background:rgba(3,7,14,.78);display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(8px)
}
.kyrio-pin-modal{width:min(520px,100%);background:linear-gradient(180deg,#101827,#0b1220);border:1px solid var(--line);border-radius:28px;box-shadow:0 28px 90px rgba(0,0,0,.55);padding:22px}
.kyrio-pin-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
.kyrio-pin-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.14em;color:var(--green);font-weight:900;margin-bottom:6px}
.kyrio-pin-head h3{margin:0 0 6px;font-size:24px;letter-spacing:-.03em}
.kyrio-pin-head p{margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.kyrio-pin-close{width:42px;height:42px;border-radius:14px;border:1px solid var(--line);background:#172235;color:#fff;font-size:24px;cursor:pointer}
.kyrio-pin-staff{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0;max-height:230px;overflow:auto;padding-right:4px}
.kyrio-pin-user{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid var(--line);background:#101a2b;color:#eaf1ff;border-radius:18px;padding:12px;cursor:pointer;min-height:68px}
.kyrio-pin-user.active{background:linear-gradient(135deg,rgba(184,234,87,.22),rgba(184,234,87,.08));border-color:rgba(184,234,87,.55)}
.kyrio-pin-user span{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:var(--green);color:#101827;font-weight:900;flex:0 0 40px}
.kyrio-pin-user strong{display:block;font-size:14px;line-height:1.1}
.kyrio-pin-user small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;margin-top:3px}
.kyrio-pin-empty{grid-column:1/-1;border:1px dashed var(--line);border-radius:18px;padding:18px;color:var(--muted);text-align:center}
.kyrio-pin-dots{display:flex;gap:9px;justify-content:center;margin:18px 0}
.pin-dot{width:14px;height:14px;border-radius:50%;background:#28344a;border:1px solid #3a4b68}
.pin-dot.filled{background:var(--green);border-color:var(--green);box-shadow:0 0 0 5px rgba(184,234,87,.10)}
.kyrio-pin-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.kyrio-pin-keypad button{min-height:58px;border:0;border-radius:18px;background:#172235;color:#fff;font-size:22px;font-weight:900;cursor:pointer}
.kyrio-pin-keypad button:active{transform:scale(.98)}
.kyrio-pin-keypad .ok{background:var(--green);color:#0d1306;font-size:16px}
.kyrio-pin-keypad .clear{background:#24314a;color:#dbe7fb}
.stock-category-card{background:linear-gradient(180deg,rgba(16,24,39,.94),rgba(14,21,34,.94));border:1px solid var(--line);border-radius:22px;padding:16px;margin-bottom:16px}
.stock-category-title{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:900;margin-bottom:12px}
.stock-action-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid rgba(34,49,75,.55)}
.stock-action-row:last-child{border-bottom:0}
.stock-row-name{font-weight:800}
.stock-row-main{min-width:0}
.stock-row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.stock-count-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.stock-count-toolbar .input{max-width:420px}
.stock-count-input{width:112px;text-align:center;font-weight:900;font-size:18px;min-height:48px}
.stock-count-result{border-radius:18px;padding:16px;margin-bottom:16px;border:1px solid rgba(79,163,255,.22);background:rgba(79,163,255,.08)}
.stock-count-result.ok{border-color:rgba(184,234,87,.28);background:rgba(184,234,87,.10)}
.stock-count-result.has-discrepancy{border-color:rgba(255,181,77,.28);background:rgba(255,181,77,.10)}
.stock-count-discrepancies{display:grid;gap:6px;margin-top:12px;color:#f7d7a7;font-size:13px}
@media(max-width:720px){
  .kyrio-pin-staff{grid-template-columns:1fr}.kyrio-pin-keypad button{min-height:64px}.stock-action-row{align-items:stretch;flex-direction:column}.stock-row-actions{justify-content:stretch}.stock-row-actions .input,.stock-row-actions .btn{flex:1;min-height:50px}.stock-count-toolbar{flex-direction:column;align-items:stretch}.stock-count-toolbar .input{max-width:none}.stock-count-input{width:100%}
}
.kyrio-pin-error{background:rgba(255,107,107,.14);border:1px solid rgba(255,107,107,.42);color:#ffd1d1;border-radius:16px;padding:12px 14px;margin:10px 0 14px;font-size:14px;font-weight:800;text-align:center}
.kyrio-pin-keypad button:disabled,.kyrio-pin-user:disabled{opacity:.65;cursor:not-allowed}

/* 2026-05-05 Mobile/tablet deployment refinements
   Keeps desktop/iPad landscape layout clean while making iPhone + iPad portrait touch friendly. */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  overflow-x:hidden;
}
button,
.btn,
.nav-btn,
.tab,
input,
select,
textarea{
  -webkit-tap-highlight-color:rgba(184,234,87,.18);
}
button,
.btn,
.nav-btn,
.tab{
  touch-action:manipulation;
}
input,
select,
textarea,
.input{
  font-size:16px;
  min-height:46px;
}
.main,
.card,
.panel,
.modal,
.kyrio-pin-modal{
  max-width:100%;
}
.section-head,
.topbar,
.kpi-row{
  min-width:0;
}
.stock-tabs,
.template-pills,
.table-actions,
.modal-actions,
.topbar-right{
  -webkit-overflow-scrolling:touch;
}
.stock-tabs,
.template-pills{
  scrollbar-width:none;
}
.stock-tabs::-webkit-scrollbar,
.template-pills::-webkit-scrollbar{
  display:none;
}
.template-pills .btn,
.stock-tabs .btn,
.stock-tabs .tab{
  white-space:nowrap;
  min-height:44px;
}
.table-wrap{
  -webkit-overflow-scrolling:touch;
  max-width:100%;
}
.table-wrap::after{
  content:'';
  display:block;
  width:1px;
  height:1px;
}

@media (min-width: 721px) and (max-width: 1180px){
  .shell{
    grid-template-columns:1fr;
  }
  .sidebar{
    position:sticky;
    top:0;
    z-index:50;
    height:auto;
    border-right:0;
    border-bottom:1px solid var(--line);
    padding:14px 18px;
    backdrop-filter:blur(12px);
  }
  .sidebar-top{
    padding:0 4px 12px;
  }
  .sidebar-brand{
    font-size:24px;
  }
  .sidebar-copy{
    font-size:12px;
  }
  .sidebar-nav{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding-bottom:2px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .sidebar-nav::-webkit-scrollbar{
    display:none;
  }
  .nav-btn{
    flex:0 0 auto;
    width:auto;
    min-height:46px;
    padding:12px 16px;
    white-space:nowrap;
  }
  .main{
    padding:22px;
  }
  .card{
    padding:20px;
  }
  .form-grid[style*="grid-template-columns"]{
    grid-template-columns:1fr 1fr !important;
  }
  #cooking-item-name{
    min-width:0;
  }
}

@media (max-width: 720px){
  .app-shell,
  .shell{
    min-height:100svh;
  }
  .shell{
    display:block;
  }
  .sidebar{
    position:sticky;
    top:0;
    z-index:60;
    height:auto;
    padding:12px 12px 10px;
    border-right:0;
    border-bottom:1px solid var(--line);
    background:rgba(10,16,25,.96);
    backdrop-filter:blur(12px);
  }
  .sidebar-top{
    padding:0 4px 10px;
  }
  .sidebar-brand{
    font-size:22px;
  }
  .sidebar-copy{
    font-size:12px;
    line-height:1.35;
  }
  .sidebar-nav{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:0 2px 2px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .sidebar-nav::-webkit-scrollbar{
    display:none;
  }
  .nav-btn{
    width:auto;
    flex:0 0 auto;
    min-height:44px;
    padding:11px 14px;
    white-space:nowrap;
    border-radius:13px;
    font-size:14px;
  }
  .main{
    padding:14px;
    padding-bottom:calc(22px + env(safe-area-inset-bottom));
  }
  .topbar{
    gap:12px;
    margin-bottom:14px;
  }
  .topbar-right{
    width:100%;
    overflow-x:auto;
    flex-wrap:nowrap;
    justify-content:flex-start;
    padding-bottom:2px;
  }
  .user-chip{
    flex:0 0 auto;
    padding:9px 11px;
    border-radius:14px;
  }
  .user-avatar{
    width:34px;
    height:34px;
  }
  .page-title{
    font-size:26px;
    line-height:1.05;
  }
  .page-subtitle,
  .section-copy,
  .card p,
  .notice-copy{
    font-size:13px;
    line-height:1.45;
  }
  .card,
  .panel,
  .notice{
    border-radius:18px;
    padding:15px;
  }
  .card h3{
    font-size:18px;
  }
  .section-head{
    display:block;
    margin-bottom:12px;
  }
  .stack{
    gap:14px;
  }
  .stock-tabs,
  .template-pills{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:8px !important;
    overflow-x:auto;
    padding-bottom:4px;
    margin-left:-2px;
    margin-right:-2px;
  }
  .template-pills .btn,
  .stock-tabs .btn,
  .stock-tabs .tab{
    flex:0 0 auto;
    min-height:46px;
    padding:10px 13px;
    border-radius:12px;
    font-size:14px;
  }
  .form-grid,
  .form-grid[style*="grid-template-columns"]{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .field{
    gap:6px;
  }
  .field label,
  .field span{
    font-size:13px;
  }
  .input,
  input,
  select,
  textarea{
    width:100%;
    min-height:48px;
    border-radius:13px;
  }
  .modal-actions{
    justify-content:stretch;
  }
  .modal-actions .btn,
  .modal-actions button{
    width:100%;
    min-height:50px;
  }
  .table{
    min-width:620px;
  }
  .table th,
  .table td{
    padding:12px 10px;
    font-size:13px;
  }
  .empty{
    padding:24px 14px;
  }
  .kyrio-pin-backdrop{
    align-items:flex-end;
    padding:10px;
    padding-bottom:calc(10px + env(safe-area-inset-bottom));
  }
  .kyrio-pin-modal{
    border-radius:24px;
    padding:16px;
    max-height:calc(100svh - 20px);
    overflow:auto;
  }
  .kyrio-pin-head h3{
    font-size:21px;
  }
  .kyrio-pin-head p{
    font-size:13px;
  }
  .kyrio-pin-close{
    width:44px;
    height:44px;
    flex:0 0 44px;
  }
  .kyrio-pin-staff{
    max-height:32svh;
  }
  .kyrio-pin-keypad button{
    min-height:58px;
    border-radius:16px;
  }
}

@media (max-width: 430px){
  .main{
    padding:12px;
  }
  .card,
  .panel,
  .notice{
    padding:13px;
    border-radius:17px;
  }
  .page-title{
    font-size:24px;
  }
  .template-pills .btn,
  .stock-tabs .btn,
  .stock-tabs .tab{
    font-size:13px;
    padding-left:11px;
    padding-right:11px;
  }
  .table{
    min-width:560px;
  }
}

@media (orientation: landscape) and (max-height: 520px){
  .sidebar{
    position:relative;
  }
  .kyrio-pin-backdrop{
    align-items:center;
  }
  .kyrio-pin-modal{
    max-height:calc(100svh - 20px);
    overflow:auto;
  }
  .kyrio-pin-staff{
    max-height:120px;
  }
  .kyrio-pin-keypad button{
    min-height:46px;
  }
}


/* KyrioOps iPhone/iPad portrait hardening - 20260505 */
html,
body,
#app,
.app-shell,
.shell{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

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

.card,
.panel,
.notice,
.table-wrap,
.stock-category-card,
.kyrio-mobile-card{
  max-width:100%;
  min-width:0;
}

.btn,
.nav-btn,
.tab,
.input,
.select,
.textarea,
button,
input,
select,
textarea{
  max-width:100%;
}

/* Product/action rows used by stock receive, usage and count */
.kyrio-product-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
  min-width:0;
}
.kyrio-product-main{
  min-width:0;
  flex:1 1 auto;
}
.kyrio-product-title{
  font-weight:800;
  overflow-wrap:anywhere;
}
.kyrio-product-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex:0 0 auto;
}
.kyrio-qty-input{
  width:88px !important;
  min-width:88px;
  text-align:center;
}

@media (max-width: 900px){
  .shell{
    display:block !important;
  }
  .sidebar{
    position:relative !important;
    top:auto !important;
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    padding:18px 18px 14px !important;
    border-right:none !important;
    border-bottom:1px solid var(--line) !important;
  }
  .sidebar-top{
    padding:4px 0 14px !important;
  }
  .sidebar-brand{
    font-size:26px !important;
  }
  .sidebar-copy{
    max-width:100% !important;
    line-height:1.45 !important;
  }
  .sidebar-nav{
    display:flex !important;
    gap:10px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:0 0 4px !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .sidebar-nav::-webkit-scrollbar{display:none;}
  .nav-btn{
    width:auto !important;
    flex:0 0 auto !important;
    white-space:nowrap !important;
    min-height:46px !important;
  }
  .main{
    width:100% !important;
    max-width:100% !important;
    padding:18px !important;
    overflow:hidden !important;
  }
  .topbar{
    flex-direction:column !important;
    align-items:stretch !important;
  }
  .topbar-right{
    width:100% !important;
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
  }
  .stats-grid,
  .hero-grid,
  .split-grid{
    grid-template-columns:1fr !important;
  }
}

@media (max-width: 640px){
  body{
    font-size:16px;
    -webkit-text-size-adjust:100%;
  }
  .main{
    padding:14px !important;
    padding-bottom:calc(22px + env(safe-area-inset-bottom)) !important;
  }
  .sidebar{
    padding:18px 16px 12px !important;
  }
  .page-title{
    font-size:28px !important;
  }
  .page-subtitle,
  .section-copy,
  .card p{
    overflow-wrap:anywhere;
  }
  .card,
  .panel,
  .notice,
  .stock-category-card,
  .kyrio-mobile-card{
    padding:16px !important;
    border-radius:20px !important;
  }
  .stock-tabs,
  .template-pills,
  .tab-row,
  .tabs,
  [class*="tabs"]{
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    flex-wrap:nowrap !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .stock-tabs::-webkit-scrollbar,
  .template-pills::-webkit-scrollbar,
  .tab-row::-webkit-scrollbar,
  .tabs::-webkit-scrollbar{display:none;}
  .stock-tabs > *,
  .template-pills > *,
  .tab-row > *,
  .tabs > *,
  [class*="tabs"] > *{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
  .form-grid,
  .form-grid[style],
  .field-grid,
  .settings-grid,
  [style*="grid-template-columns"]{
    grid-template-columns:1fr !important;
  }
  .kyrio-product-row,
  .stock-action-row,
  .stock-row{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:14px 0 !important;
  }
  .kyrio-product-actions,
  .stock-row-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:minmax(92px, 1fr) minmax(110px, 1fr) !important;
    gap:10px !important;
  }
  .kyrio-qty-input,
  .stock-count-input,
  .stock-row-actions .input{
    width:100% !important;
    min-width:0 !important;
    min-height:52px !important;
  }
  .kyrio-product-actions .btn,
  .stock-row-actions .btn{
    width:100% !important;
    min-height:52px !important;
  }
  .input,
  .select,
  .textarea,
  input,
  select,
  textarea{
    font-size:16px !important; /* stops iOS auto zoom */
  }
}

@media (max-width: 390px){
  .main{padding:12px !important;}
  .sidebar{padding-left:14px !important;padding-right:14px !important;}
  .card,.panel,.notice,.stock-category-card,.kyrio-mobile-card{padding:14px !important;}
  .page-title{font-size:26px !important;}
  .kyrio-product-actions,.stock-row-actions{grid-template-columns:1fr !important;}
}

/* 2026-05-05 iPhone/iPad final operational mobile fixes */
.kyrio-submit-row{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.stock-category-card{padding:16px;margin-bottom:16px}
.stock-category-title{font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.7;margin-bottom:12px}
.fridge-count-mobile-list{display:none}
.fridge-count-input{max-width:140px;min-height:46px}

@media (max-width: 760px){
  html,body,#app,.app-shell,.layout,.main{max-width:100vw!important;overflow-x:hidden!important}
  .main{min-width:0!important;width:100%!important}
  .section-head{align-items:flex-start!important;gap:14px!important;flex-direction:column!important}
  .section-head .btn{width:auto;max-width:100%}
  .kpi-list{width:100%!important;overflow:hidden!important}
  .kpi-row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;align-items:start!important;width:100%!important;overflow:hidden!important;padding:14px 0!important}
  .kpi-row > div{min-width:0!important;max-width:100%!important}
  .kpi-title,.kpi-meta,.kpi-value{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;text-align:left!important}
  .kpi-value{font-size:15px!important;justify-self:start!important;line-height:1.35!important}
  .stock-tabs{padding-bottom:8px!important;margin-left:-2px!important;margin-right:-2px!important}
  .stock-tabs .btn{min-height:52px!important;padding:12px 18px!important;font-size:16px!important}
  .stock-category-card{padding:16px!important;border-radius:20px!important}
  .stock-action-row{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important;gap:12px!important;margin-bottom:0!important;padding:16px 0!important}
  .stock-action-row > div{min-width:0!important;max-width:100%!important}
  .stock-row-actions{display:grid!important;grid-template-columns:minmax(110px,1fr) minmax(120px,1fr)!important;gap:10px!important;width:100%!important;align-items:stretch!important}
  .stock-row-actions .input,.stock-row-actions .btn,.stock-count-input,.kyrio-qty-input{width:100%!important;min-width:0!important;min-height:56px!important;font-size:16px!important}
  .stock-count-row{grid-template-columns:minmax(0,1fr) minmax(128px,180px)!important;align-items:center!important}
  .stock-count-row .stock-count-input{justify-self:end!important;max-width:180px!important;text-align:center!important}
  .kyrio-submit-row{justify-content:stretch!important}
  .kyrio-submit-row .btn{width:100%!important;min-height:56px!important;font-size:17px!important}
  .fridge-count-table{display:none!important}
  .fridge-count-mobile-list{display:grid!important;gap:14px!important;margin-top:16px!important}
  .fridge-count-card{border:1px solid rgba(80,111,156,.42);background:rgba(13,25,45,.62);border-radius:20px;padding:16px;display:grid;gap:12px;min-width:0}
  .fridge-count-main{display:grid;gap:3px;min-width:0}
  .fridge-count-main strong{font-size:18px;line-height:1.25;overflow-wrap:anywhere}
  .fridge-count-main span,.fridge-count-meta{color:var(--muted);font-size:14px}
  .fridge-count-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .fridge-count-input{width:100%!important;max-width:none!important;min-height:56px!important;text-align:center!important;font-size:16px!important}
}

@media (max-width: 430px){
  .page-title{font-size:30px!important;line-height:1.1!important}
  .card h3{font-size:24px!important;line-height:1.15!important}
  .section-copy{font-size:16px!important;line-height:1.45!important}
  .stock-row-actions{grid-template-columns:1fr 1fr!important}
  .stock-count-row{grid-template-columns:1fr!important}
  .stock-count-row .stock-count-input{max-width:none!important;width:100%!important;justify-self:stretch!important}
  .fridge-count-meta{grid-template-columns:1fr!important}
}

/* KyrioOps stock-count / fridge-count operational mobile refinements */
.stock-count-actions,
.stock-count-bottom-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.compact-notice {
  padding: 10px 12px;
  border-radius: 14px;
}
.fridge-count-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.fridge-count-meta-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .stock-count-head {
    align-items: stretch !important;
  }
  .stock-count-actions,
  .stock-count-bottom-actions {
    justify-content: stretch;
    width: 100%;
  }
  .stock-count-actions .btn,
  .stock-count-bottom-actions .btn {
    flex: 1 1 100%;
    min-height: 54px;
  }
  .fridge-count-input-grid {
    grid-template-columns: 1fr;
  }
  .fridge-count-card .field span {
    font-size: 13px;
    opacity: .85;
  }
  .fridge-count-card .input {
    width: 100%;
    min-height: 54px;
    font-size: 18px;
  }
}

/* Dashboard/actionable report helpers */
.clickable-card { cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.clickable-card:hover, .clickable-card:focus { transform: translateY(-1px); border-color: rgba(185, 242, 78, .45); box-shadow: 0 14px 32px rgba(0,0,0,.25); outline: none; }


/* 2026-05-06 Report readability refinement */
.report-pill,
.summary-pill {
    background: rgba(140, 180, 70, 0.10);
    border: 1px solid rgba(140, 180, 70, 0.20);
    color: #dce8c2;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
}

.report-pill.alert {
    background: rgba(255,181,77,.12);
    border-color: rgba(255,181,77,.24);
    color: #ffd89f;
}

.report-row small,
.report-meta {
    color: #7f90ad;
    font-weight: 500;
}

.report-qty {
    color: #c8ee7c;
    font-weight: 800;
}

/* =========================================================
   KYRIOOPS REPORT BUTTON SYSTEM
   ========================================================= */

.report-tabs,
.report-subfilters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.report-tabs button,
.report-subfilters button {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.08);
    background: #18243a;
    color: #dbe7ff;
    border-radius: 10px;
    padding: 10px 14px;
    min-height: 38px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all .18s ease;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;

    box-shadow: none;
    text-shadow: none;
}

.report-tabs button:hover,
.report-subfilters button:hover {
    background: #22314d;
    border-color: rgba(190,242,100,0.25);
    color: #ffffff;
}

.report-tabs button.active,
.report-tabs button.is-active,
.report-subfilters button.active,
.report-subfilters button.is-active {
    background: #2d3f5f;
    color: #ffffff;
    border-color: rgba(190,242,100,0.55);
    box-shadow: inset 0 -2px 0 rgba(190,242,100,0.9);
}

/* Suggested threshold button */
[data-action="reports-apply-threshold"] {
    background: #2d3f5f !important;
    color: #ffffff !important;
    border: 1px solid rgba(190,242,100,0.55) !important;
    box-shadow: inset 0 -2px 0 rgba(190,242,100,0.9) !important;
}

[data-action="reports-apply-threshold"]:hover {
    background: #3a5076 !important;
}


/* =========================================================
   2026-05-07 FINAL REPORT BUTTON + CONTRAST LOCK
   ========================================================= */

.reports-page .report-tabs,
.reports-page .report-subfilters,
.reports-page .report-filter-row,
.reports-page .report-actions,
.reports-page .report-table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reports-page .report-section-btn,
.reports-page .report-section-btn.compact,
.reports-page .report-filter-row .btn,
.reports-page .report-actions .btn,
.reports-page .report-table-tools .btn,
.reports-page .report-subfilters .btn,
.reports-page .report-subfilters button,
.reports-page details summary.btn,
.reports-page .report-exact-table-toggle summary {
  appearance: none !important;
  background: #172238 !important;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  border: 1px solid rgba(148,163,184,.30) !important;
  border-radius: 10px !important;
  min-height: 38px !important;
  padding: 9px 13px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.reports-page .report-section-btn:hover,
.reports-page .report-section-btn.compact:hover,
.reports-page .report-filter-row .btn:hover,
.reports-page .report-actions .btn:hover,
.reports-page .report-table-tools .btn:hover,
.reports-page .report-subfilters .btn:hover,
.reports-page .report-subfilters button:hover,
.reports-page details summary.btn:hover {
  background: #20304a !important;
  border-color: rgba(190,242,100,.45) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.reports-page .report-section-btn.is-active,
.reports-page .report-section-btn.active,
.reports-page .report-section-btn.compact.is-active,
.reports-page .report-section-btn.compact.active,
.reports-page .report-subfilters button.is-active,
.reports-page .report-subfilters button.active,
.reports-page .report-filter-row .btn-primary {
  background: #253650 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: rgba(190,242,100,.72) !important;
  box-shadow: inset 0 -2px 0 rgba(190,242,100,.90) !important;
}

.reports-page .report-actions .btn-primary[data-action="reports-export-csv"] {
  background: var(--green) !important;
  color: #0d1306 !important;
  -webkit-text-fill-color: #0d1306 !important;
  border-color: rgba(190,242,100,.65) !important;
  box-shadow: none !important;
}

.reports-page [data-action="reports-apply-suggested-threshold"],
.reports-page [data-action="reports-apply-threshold"],
.reports-page .report-risk-card .btn-primary,
.reports-page .report-risk-card button.btn-primary {
  background: #253650 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid rgba(190,242,100,.72) !important;
  box-shadow: inset 0 -2px 0 rgba(190,242,100,.90) !important;
  text-shadow: none !important;
}

.reports-page [data-action="reports-apply-suggested-threshold"]:hover,
.reports-page [data-action="reports-apply-threshold"]:hover,
.reports-page .report-risk-card .btn-primary:hover {
  background: #304769 !important;
}

.reports-page .pill,
.reports-page .report-chip,
.reports-page .summary-pill,
.reports-page .report-pill {
  background: rgba(32,48,74,.92) !important;
  color: #eaf2ff !important;
  -webkit-text-fill-color: #eaf2ff !important;
  border: 1px solid rgba(190,242,100,.30) !important;
  font-weight: 800 !important;
}

.reports-page .report-status.ok,
.reports-page .report-status.active,
.reports-page .report-status.submitted {
  background: rgba(132,204,22,.20) !important;
  color: #d9f99d !important;
  -webkit-text-fill-color: #d9f99d !important;
  border: 1px solid rgba(190,242,100,.22) !important;
}


/* 2026-05-07 Fridge count locked UX */
.fridge-count-card.is-locked,
.fridge-count-table tr.is-locked {
  opacity: .82;
}
.fridge-count-input:disabled {
  opacity: .72;
  cursor: not-allowed;
  background: rgba(15,23,42,.72);
  border-color: rgba(148,163,184,.18);
}
.kyrio-submit-row .btn:disabled {
  opacity: .75;
  cursor: not-allowed;
}

/* 2026-05-13 KyrioOps day/night theme toggle + premium confirmation dialog */
:root[data-theme="light"],
body[data-theme="light"]{
  --bg:#f5f7fb;
  --bg-soft:#eef3f8;
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --panel-3:#eef3f8;
  --line:#d9e2ee;
  --line-2:#c2d0e2;
  --text:#111827;
  --muted:#61708a;
  --muted-2:#8090a8;
  --green:#7ca82f;
  --green-2:#6f9829;
  --blue:#2474d8;
  --red:#c93434;
  --amber:#b87512;
  --shadow:0 16px 45px rgba(29,44,71,.12);
}
body[data-theme="light"]{
  background:
    radial-gradient(circle at top left, rgba(36,116,216,.10), transparent 30%),
    radial-gradient(circle at top right, rgba(124,168,47,.12), transparent 24%),
    linear-gradient(180deg,#f7f9fc 0%,#eef3f8 100%);
  color:var(--text);
}
body[data-theme="light"] .sidebar,
body[data-theme="light"] .login-card,
body[data-theme="light"] .card,
body[data-theme="light"] .panel,
body[data-theme="light"] .stock-category-card,
body[data-theme="light"] .modal,
body[data-theme="light"] .kyrio-pin-modal{
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.96));
  border-color:var(--line);
  color:var(--text);
}
body[data-theme="light"] .sidebar{background:rgba(255,255,255,.92)}
body[data-theme="light"] .input,
body[data-theme="light"] .select,
body[data-theme="light"] .textarea{
  background:#fff;
  color:var(--text);
  border-color:var(--line);
}
body[data-theme="light"] .btn-secondary,
body[data-theme="light"] .nav-btn:hover,
body[data-theme="light"] .kyrio-pin-keypad button,
body[data-theme="light"] .kyrio-pin-close,
body[data-theme="light"] .kyrio-pin-user{
  background:#f1f5f9;
  color:#172033;
  border-color:var(--line);
}
body[data-theme="light"] .btn-secondary:hover{background:#e7edf5;border-color:var(--line-2)}
body[data-theme="light"] .nav-btn{color:#34425a}
body[data-theme="light"] .nav-btn.active{
  background:linear-gradient(180deg,rgba(124,168,47,.18),rgba(124,168,47,.08));
  color:#25330d;
  border-color:rgba(124,168,47,.28);
}
body[data-theme="light"] .table th{background:#f1f5f9;color:#53647e}
body[data-theme="light"] .notice{background:rgba(36,116,216,.08);color:#173d73}
body[data-theme="light"] .topbar-right .user-chip{background:#fff;border-color:var(--line)}
body[data-theme="light"] .user-role,
body[data-theme="light"] .section-copy,
body[data-theme="light"] .card p,
body[data-theme="light"] .sidebar-copy,
body[data-theme="light"] .stat-label,
body[data-theme="light"] .kpi-meta{color:var(--muted)}
.kyrio-theme-toggle{min-width:108px}

.kyrio-dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:10050;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(3,7,14,.72);
  backdrop-filter:blur(10px);
  opacity:0;
  transition:opacity .16s ease;
}
.kyrio-dialog-backdrop.show{opacity:1}
.kyrio-dialog{
  width:min(520px,100%);
  background:linear-gradient(180deg,rgba(16,24,39,.98),rgba(11,18,32,.98));
  border:1px solid rgba(255,181,77,.34);
  border-radius:28px;
  box-shadow:0 30px 90px rgba(0,0,0,.55);
  padding:22px;
  transform:translateY(8px) scale(.985);
  transition:transform .16s ease;
}
.kyrio-dialog-backdrop.show .kyrio-dialog{transform:translateY(0) scale(1)}
.kyrio-dialog-head{display:flex;gap:14px;align-items:flex-start}
.kyrio-dialog-icon{
  width:44px;height:44px;border-radius:16px;display:grid;place-items:center;flex:0 0 44px;
  background:rgba(255,181,77,.15);border:1px solid rgba(255,181,77,.32);color:#ffd28a;font-weight:900;
}
.kyrio-dialog-danger{border-color:rgba(255,107,107,.36)}
.kyrio-dialog-danger .kyrio-dialog-icon{background:rgba(255,107,107,.14);border-color:rgba(255,107,107,.36);color:#ffd1d1}
.kyrio-dialog-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.14em;color:var(--amber);font-weight:900;margin-bottom:6px}
.kyrio-dialog h3{margin:0 0 8px;font-size:23px;line-height:1.15;letter-spacing:-.03em;color:var(--text)}
.kyrio-dialog p{margin:0;color:var(--muted);font-size:14px;line-height:1.55}
.kyrio-dialog-details{display:grid;gap:8px;margin-top:18px;border:1px solid var(--line);border-radius:18px;padding:12px;background:rgba(255,255,255,.025)}
.kyrio-dialog-detail-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 2px;border-bottom:1px solid rgba(148,163,191,.16)}
.kyrio-dialog-detail-row:last-child{border-bottom:0}
.kyrio-dialog-detail-row span{color:var(--muted);font-size:13px}.kyrio-dialog-detail-row strong{font-size:14px;text-align:right;color:var(--text)}
.kyrio-dialog-note{margin-top:14px;padding:12px 14px;border-radius:16px;background:rgba(255,181,77,.10);border:1px solid rgba(255,181,77,.22);color:#f8d7a5;font-size:13px;line-height:1.45}
.kyrio-dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:20px}
body[data-theme="light"] .kyrio-dialog{background:linear-gradient(180deg,#ffffff,#f8fafc);box-shadow:0 28px 80px rgba(23,38,65,.22)}
body[data-theme="light"] .kyrio-dialog-backdrop{background:rgba(15,23,42,.38)}
body[data-theme="light"] .kyrio-dialog-details{background:#f8fafc}
body[data-theme="light"] .kyrio-dialog-note{color:#7a4b08;background:rgba(184,117,18,.10)}
@media(max-width:720px){
  .kyrio-dialog-backdrop{align-items:flex-end;padding:12px}
  .kyrio-dialog{border-radius:24px;padding:20px}
  .kyrio-dialog-actions{display:grid;grid-template-columns:1fr;gap:10px}
  .kyrio-dialog-actions .btn{width:100%;min-height:50px}
  .kyrio-theme-toggle{min-width:0;flex:1}
}

/* 2026-05-14 KyrioOps fridge refill premium modal + table UX */
.kyrio-refill-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,6,23,.72);
  backdrop-filter:blur(14px);
}
.kyrio-refill-modal{
  width:min(520px,100%);
  border:1px solid rgba(148,163,184,.22);
  border-radius:28px;
  background:linear-gradient(180deg,rgba(17,24,39,.98),rgba(8,13,24,.98));
  box-shadow:0 30px 90px rgba(0,0,0,.62);
  padding:22px;
  color:var(--text);
}
.kyrio-refill-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.kyrio-refill-eyebrow{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--accent);
  font-weight:900;
  margin-bottom:7px;
}
.kyrio-refill-head h3{
  margin:0 0 8px;
  font-size:24px;
  line-height:1.15;
  letter-spacing:-.03em;
}
.kyrio-refill-head p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.kyrio-refill-x{
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-size:24px;
  cursor:pointer;
}
.kyrio-refill-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 12px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.035);
  margin-bottom:16px;
}
.kyrio-refill-item span{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;grid-column:1 / -1}
.kyrio-refill-item strong{font-size:17px;line-height:1.25}
.kyrio-refill-item em{font-style:normal;color:var(--muted);font-size:13px;align-self:center}
.kyrio-refill-field{display:grid;gap:8px;margin:14px 0}
.kyrio-refill-input{min-height:58px!important;text-align:center!important;font-size:24px!important;font-weight:900!important}
.kyrio-refill-chips{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin:12px 0 16px;
}
.kyrio-refill-chips .btn{min-height:46px;font-size:15px;font-weight:900}
.kyrio-refill-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}
.kyrio-refill-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(154,190,84,.14);
  border:1px solid rgba(154,190,84,.32);
  color:var(--accent);
  font-weight:900;
}
.kyrio-refill-row-btn{width:100%;min-height:44px}
body[data-theme="light"] .kyrio-refill-backdrop{background:rgba(15,23,42,.36)}
body[data-theme="light"] .kyrio-refill-modal{background:linear-gradient(180deg,#ffffff,#f8fafc);box-shadow:0 28px 80px rgba(23,38,65,.22)}
body[data-theme="light"] .kyrio-refill-x{background:#f8fafc}
body[data-theme="light"] .kyrio-refill-item{background:#f8fafc}
@media (max-width:720px){
  .kyrio-refill-backdrop{align-items:flex-end;padding:10px}
  .kyrio-refill-modal{border-radius:26px 26px 18px 18px;padding:18px}
  .kyrio-refill-actions{display:grid;grid-template-columns:1fr;gap:10px}
  .kyrio-refill-actions .btn{width:100%;min-height:52px}
  .kyrio-refill-chips{grid-template-columns:repeat(2,1fr)}
}


/* 2026-05-15 fridge refill mobile UX fix */
.fridge-meta-pill{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}

.fridge-meta-pill span{
  font-size:12px;
  color:rgba(255,255,255,.72);
}

.fridge-meta-pill strong{
  font-size:18px;
  line-height:1;
}

.fridge-meta-pill-refill{
  border-color:rgba(185,242,78,.25);
  background:rgba(185,242,78,.08);
}

.kyrio-refill-total{
  color:#d7ff7a;
}

.kyrio-mobile-refill-row{
  display:flex;
  gap:12px;
  align-items:center;
}

.kyrio-mobile-refill-row .kyrio-refill-row-btn{
  flex:1;
  min-height:54px;
  font-size:17px;
  font-weight:700;
}

.kyrio-mobile-refill-preview{
  min-width:110px;
  padding:10px 12px;
  border-radius:16px;
  text-align:center;
  background:rgba(185,242,78,.10);
  border:1px solid rgba(185,242,78,.20);
}

.kyrio-mobile-refill-preview span{
  display:block;
  font-size:11px;
  color:rgba(255,255,255,.70);
  margin-bottom:4px;
}

.kyrio-mobile-refill-preview strong{
  font-size:22px;
  color:#d7ff7a;
}

@media (max-width: 430px){
  .kyrio-mobile-refill-row{
    flex-direction:column;
    align-items:stretch;
  }

  .kyrio-mobile-refill-preview{
    width:100%;
  }
}


/* 2026-05-15 cache-safe refill history + day mode contrast fixes */
body[data-theme="light"] .stat-card,
body[data-theme="light"] .report-summary-card,
body[data-theme="light"] .report-overview-card,
body[data-theme="light"] .report-risk-card,
body[data-theme="light"] .report-table-panel,
body[data-theme="light"] .report-detail-card,
body[data-theme="light"] .notice.report-intel-action,
body[data-theme="light"] .fridge-count-card,
body[data-theme="light"] .fridge-meta-pill,
body[data-theme="light"] .kyrio-mobile-refill-preview{
  background:#ffffff!important;
  color:#111827!important;
  -webkit-text-fill-color:initial!important;
  border-color:#d8e3ef!important;
  box-shadow:0 10px 28px rgba(29,44,71,.08);
}
body[data-theme="light"] .stat-card *,
body[data-theme="light"] .report-summary-card *,
body[data-theme="light"] .report-overview-card *,
body[data-theme="light"] .report-risk-card *,
body[data-theme="light"] .report-detail-card *,
body[data-theme="light"] .report-table-panel *,
body[data-theme="light"] .notice.report-intel-action *,
body[data-theme="light"] .fridge-count-card *,
body[data-theme="light"] .fridge-meta-pill *,
body[data-theme="light"] .kyrio-mobile-refill-preview *{
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
  opacity:1!important;
}
body[data-theme="light"] .muted-text,
body[data-theme="light"] .section-copy,
body[data-theme="light"] .report-cell-sub,
body[data-theme="light"] .report-table-subtitle,
body[data-theme="light"] .notice-copy,
body[data-theme="light"] .fridge-count-main span,
body[data-theme="light"] .fridge-meta-pill span,
body[data-theme="light"] .kyrio-mobile-refill-preview span{
  color:#53647e!important;
  -webkit-text-fill-color:#53647e!important;
}
body[data-theme="light"] .report-table th{
  background:#edf3f9!important;
  color:#34425a!important;
  -webkit-text-fill-color:#34425a!important;
}
body[data-theme="light"] .report-table td{
  background:#ffffff!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}
body[data-theme="light"] .report-chip,
body[data-theme="light"] .summary-pill,
body[data-theme="light"] .report-pill,
body[data-theme="light"] .kyrio-refill-badge,
body[data-theme="light"] .kyrio-refill-total,
body[data-theme="light"] .fridge-meta-pill-refill strong,
body[data-theme="light"] .kyrio-mobile-refill-preview strong{
  color:#315c00!important;
  -webkit-text-fill-color:#315c00!important;
  background:rgba(124,168,47,.14)!important;
  border-color:rgba(124,168,47,.34)!important;
}
body[data-theme="light"] .report-status.alert,
body[data-theme="light"] .report-status.high,
body[data-theme="light"] .report-status.overdue{
  color:#991b1b!important;
  -webkit-text-fill-color:#991b1b!important;
  background:rgba(239,68,68,.12)!important;
}
body[data-theme="light"] .btn-primary,
body[data-theme="light"] .nav-btn.active,
body[data-theme="light"] .reports-page .report-section-btn.is-active,
body[data-theme="light"] .reports-page .report-section-btn.active,
body[data-theme="light"] .reports-page .report-subfilters button.is-active,
body[data-theme="light"] .reports-page .report-subfilters button.active{
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}
@media (max-width:720px){
  body[data-theme="light"] .fridge-count-card{background:#ffffff!important;}
}


/* 2026-05-15 reports refill + light mode contrast lock */
body[data-theme="light"] .reports-page .report-tabs button,
body[data-theme="light"] .reports-page .report-subfilters button,
body[data-theme="light"] .reports-page .report-section-btn,
body[data-theme="light"] .reports-page .report-section-btn.compact,
body[data-theme="light"] .reports-page .report-filter-row .btn,
body[data-theme="light"] .reports-page .report-actions .btn,
body[data-theme="light"] .reports-page .report-table-tools .btn,
body[data-theme="light"] .reports-page details summary.btn,
body[data-theme="light"] .reports-page .report-exact-table-toggle summary{
  background:#ffffff!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  border:1px solid #cbd8e6!important;
  box-shadow:0 1px 2px rgba(15,23,42,.06)!important;
  opacity:1!important;
}

body[data-theme="light"] .reports-page .report-tabs button:hover,
body[data-theme="light"] .reports-page .report-subfilters button:hover,
body[data-theme="light"] .reports-page .report-section-btn:hover,
body[data-theme="light"] .reports-page .report-filter-row .btn:hover,
body[data-theme="light"] .reports-page .report-actions .btn:hover,
body[data-theme="light"] .reports-page .report-table-tools .btn:hover{
  background:#f0f6fc!important;
  border-color:#7ca82f!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
}

body[data-theme="light"] .reports-page .report-tabs button.active,
body[data-theme="light"] .reports-page .report-tabs button.is-active,
body[data-theme="light"] .reports-page .report-subfilters button.active,
body[data-theme="light"] .reports-page .report-subfilters button.is-active,
body[data-theme="light"] .reports-page .report-section-btn.active,
body[data-theme="light"] .reports-page .report-section-btn.is-active,
body[data-theme="light"] .reports-page .report-filter-row .btn-primary{
  background:#7ca82f!important;
  color:#081006!important;
  -webkit-text-fill-color:#081006!important;
  border-color:#638a20!important;
  box-shadow:none!important;
}

body[data-theme="light"] .reports-page .report-actions .btn-primary[data-action="reports-export-csv"],
body[data-theme="light"] .reports-page .report-actions .btn-primary[data-action="reports-export-pdf"]{
  background:#7ca82f!important;
  color:#081006!important;
  -webkit-text-fill-color:#081006!important;
}

body[data-theme="light"] .reports-page .report-overview-card h4,
body[data-theme="light"] .reports-page .report-table-title,
body[data-theme="light"] .reports-page .report-cell-title,
body[data-theme="light"] .reports-page .report-risk-title{
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
}

body[data-theme="light"] .reports-page .report-chip,
body[data-theme="light"] .reports-page .summary-pill,
body[data-theme="light"] .reports-page .report-pill{
  background:#e9f6d9!important;
  color:#315c00!important;
  -webkit-text-fill-color:#315c00!important;
  border:1px solid #c9e7a8!important;
}


/* 2026-05-15 extra global light button readability fallback */
body[data-theme="light"] button.report-section-btn,
body[data-theme="light"] button.report-section-btn.compact,
body[data-theme="light"] .reports-page button[data-action^="reports-"]{
  background:#ffffff!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  border-color:#cbd5e1!important;
  text-shadow:none!important;
}
body[data-theme="light"] button.report-section-btn.is-active,
body[data-theme="light"] button.report-section-btn.compact.is-active,
body[data-theme="light"] .reports-page button[data-action^="reports-"].is-active{
  background:#7ca82f!important;
  color:#071006!important;
  -webkit-text-fill-color:#071006!important;
  border-color:#5d821f!important;
}


/* 2026-05-15 light mode dark-pill readability fix */
body[data-theme="light"] .reports-page .pill,
body[data-theme="light"] .reports-page .pill-active,
body[data-theme="light"] .reports-page .summary-pill,
body[data-theme="light"] .reports-page .report-pill,
body[data-theme="light"] .reports-page .report-table-tools .pill,
body[data-theme="light"] .reports-page .report-table-tools .pill-active,
body[data-theme="light"] .reports-page .report-table-tools span:not(.report-chip) {
  background:#172235!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  border:1px solid #263954!important;
  text-shadow:none!important;
  opacity:1!important;
}

body[data-theme="light"] .reports-page .report-table-tools .report-chip {
  background:#172235!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  border:1px solid #263954!important;
}

body[data-theme="light"] .reports-page .report-section-btn.is-active,
body[data-theme="light"] .reports-page .report-filter-row .btn-primary,
body[data-theme="light"] .reports-page .report-tabs button.is-active {
  background:#7ca82f!important;
  color:#071006!important;
  -webkit-text-fill-color:#071006!important;
}

/* Kyrio 2026-05 quick operator + light notification readability fix */
.kyrio-operator-gate{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:16px;
  margin:0 0 16px;
  border:1px solid rgba(245,158,11,.38);
  background:rgba(245,158,11,.12);
  border-radius:18px;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}
.kyrio-operator-gate-icon{
  width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  background:rgba(245,158,11,.18);font-size:22px;flex:0 0 auto;
}
.kyrio-operator-gate-title{font-size:16px;font-weight:800;color:var(--text-color,#111827);margin-bottom:4px;}
.kyrio-operator-gate-copy{font-size:13px;line-height:1.45;color:var(--muted-color,#475569);}
.kyrio-operator-required-select{border-color:rgba(245,158,11,.75)!important;box-shadow:0 0 0 3px rgba(245,158,11,.16)!important;}
.kyrio-operator-confirmed{
  display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;
  padding:14px 16px;margin:0 0 16px;border-radius:18px;
  border:1px solid rgba(132,204,22,.35);background:rgba(132,204,22,.12);
}
.kyrio-operator-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted-color,#64748b);font-weight:800;}
.kyrio-operator-name{font-size:16px;font-weight:900;color:var(--text-color,#111827);}
.kyrio-operator-copy{font-size:12px;color:var(--muted-color,#64748b);margin-top:2px;}
.kyrio-operator-empty{border-style:dashed;background:rgba(148,163,184,.08);}
body[data-theme="light"] .status.success,
body[data-theme="light"] .status.error,
body[data-theme="light"] .status.warning{
  color:#111827!important;
  font-weight:800;
  box-shadow:0 12px 30px rgba(15,23,42,.12);
}
body[data-theme="light"] .status.success{background:#e9fbd0!important;border-color:#84cc16!important;}
body[data-theme="light"] .status.error{background:#fee2e2!important;border-color:#ef4444!important;}
body[data-theme="light"] .status.warning{background:#fef3c7!important;border-color:#f59e0b!important;}
@media (max-width:700px){.kyrio-operator-gate,.kyrio-operator-confirmed{align-items:stretch}.kyrio-operator-gate{flex-direction:column}.kyrio-operator-confirmed .field{width:100%;}}

/* Kyrio shift operator session - compact POS/tablet friendly */
.kyrio-shift-operator-card{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px;margin:0 0 14px;border:1px solid rgba(132,204,22,.28);
  border-radius:18px;background:linear-gradient(135deg,rgba(132,204,22,.13),rgba(255,255,255,.04));
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}
.kyrio-shift-operator-card.needs-operator{border-color:rgba(245,158,11,.42);background:linear-gradient(135deg,rgba(245,158,11,.16),rgba(255,255,255,.06));}
.kyrio-shift-title{font-weight:800;font-size:16px;line-height:1.15;color:var(--text);}
.kyrio-shift-copy{font-size:12px;line-height:1.45;color:var(--muted);max-width:620px;margin-top:4px;}
.kyrio-current-op{display:flex;align-items:center;gap:10px;min-width:180px;}
.kyrio-current-op-dot{display:grid;place-items:center;width:36px;height:36px;border-radius:999px;background:rgba(132,204,22,.18);}
.kyrio-shift-label{text-transform:uppercase;font-size:10px;letter-spacing:.07em;color:var(--muted);font-weight:800;}
.kyrio-shift-name{font-weight:900;color:var(--text);font-size:16px;}
.kyrio-op-pills{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;}
.kyrio-op-pill{border:1px solid var(--border);background:var(--card);color:var(--text);border-radius:999px;padding:8px 12px;font-weight:800;font-size:13px;min-height:40px;display:inline-flex;align-items:center;gap:7px;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.06);}
.kyrio-op-pill span{display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:rgba(132,204,22,.18);font-size:11px;}
.kyrio-op-pill.active{background:var(--accent);border-color:var(--accent);color:#10210a;}
.kyrio-op-pill.ghost{background:transparent;border-style:dashed;}
.kyrio-operator-empty{border-style:dashed;background:rgba(245,158,11,.08);}
[data-theme="light"] .status,
[data-theme="light"] .toast,
[data-theme="light"] .notice,
[data-theme="light"] .kyrio-shift-operator-card{color:#172033;}
[data-theme="light"] .status * ,
[data-theme="light"] .toast * ,
[data-theme="light"] .notice *{color:inherit;}
@media (max-width: 760px){
  .kyrio-shift-operator-card{display:block;padding:12px;margin-bottom:12px;border-radius:16px;}
  .kyrio-current-op{margin-bottom:10px;}
  .kyrio-op-pills{justify-content:flex-start;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px;}
  .kyrio-op-pill{width:100%;justify-content:center;min-height:44px;padding:9px 8px;font-size:12px;}
  .kyrio-shift-copy{font-size:11px;}
}

/* 2026-05-19 POS operator UX refinements */
.kyrio-shift-operator-card{
  position:sticky;
  top:10px;
  z-index:35;
  display:grid;
  grid-template-columns:minmax(150px,220px) minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:10px 12px;
  margin:0 0 14px;
  border-radius:18px;
  backdrop-filter:blur(14px);
}
.kyrio-shift-operator-card.needs-operator{
  border-color:rgba(245,158,11,.38);
  background:linear-gradient(135deg,rgba(245,158,11,.14),rgba(132,204,22,.08),rgba(255,255,255,.76));
}
.kyrio-shift-operator-card.active-session{
  border-color:rgba(132,204,22,.42);
  background:linear-gradient(135deg,rgba(132,204,22,.18),rgba(255,255,255,.76));
}
.kyrio-current-op{min-width:0;margin:0!important;}
.kyrio-current-op-dot{width:34px;height:34px;flex:0 0 34px;}
.kyrio-shift-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px;}
.kyrio-op-pills-scroll{
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  overflow-x:auto;
  overflow-y:hidden;
  gap:8px;
  padding:2px 2px 6px;
  margin:0!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
.kyrio-op-pills-scroll::-webkit-scrollbar{height:5px;}
.kyrio-op-pills-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:99px;}
.kyrio-op-pills-scroll .kyrio-op-pill{
  flex:0 0 auto;
  min-width:max-content;
  width:auto!important;
  min-height:38px;
  padding:7px 12px;
}
.kyrio-op-pill.active{box-shadow:0 0 0 3px rgba(132,204,22,.18),0 10px 22px rgba(15,23,42,.10);}
.kyrio-operator-empty{padding:18px!important;margin-top:8px!important;}
.kyrio-temp-alert-row{background:rgba(239,68,68,.08)!important;}
.kyrio-temp-ok-row{background:rgba(132,204,22,.05)!important;}
.kyrio-temp-alert-row td:first-child{border-left:4px solid #ef4444;}
.kyrio-temp-ok-row td:first-child{border-left:4px solid rgba(132,204,22,.65);}
body[data-theme="light"] .kyrio-temp-alert-row{background:#fff1f2!important;}
body[data-theme="light"] .kyrio-temp-ok-row{background:#f7fee7!important;}
body[data-theme="light"] .kyrio-shift-operator-card.needs-operator,
body[data-theme="light"] .kyrio-shift-operator-card.active-session{color:#172033;}
@media (max-width:760px){
  .kyrio-shift-operator-card{
    top:0;
    grid-template-columns:1fr;
    gap:8px;
    padding:10px;
    border-radius:16px;
  }
  .kyrio-current-op{gap:8px;}
  .kyrio-current-op-dot{width:30px;height:30px;flex-basis:30px;font-size:15px;}
  .kyrio-shift-label{font-size:9px;}
  .kyrio-shift-name{font-size:14px;}
  .kyrio-op-pills-scroll{
    margin-left:-2px!important;
    margin-right:-2px!important;
    padding-bottom:4px;
  }
  .kyrio-op-pills-scroll .kyrio-op-pill{
    min-height:38px;
    padding:7px 11px;
    font-size:12px;
  }
  .kyrio-op-pills-scroll .kyrio-op-pill span{width:21px;height:21px;font-size:10px;}
  .section-copy{font-size:12px;line-height:1.35;}
}

/* Kyrio hotfix 2026-05-19: true sticky operator bar + day-mode staff readability */
.kyrio-sticky-operator,
.kyrio-shift-operator-card{
  position: sticky !important;
  top: 12px !important;
  z-index: 80 !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
@media (min-width: 900px){
  .kyrio-sticky-operator,
  .kyrio-shift-operator-card{ top: 16px !important; }
}
.kyrio-op-pills-scroll{
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.kyrio-op-pill{ flex: 0 0 auto !important; }
.kyrio-op-pill.active{ box-shadow: 0 0 0 2px rgba(163,230,53,.45), 0 8px 24px rgba(132,204,22,.24); }
.kyrio-operator-empty{ min-height: 52px !important; }

body[data-theme="light"] table,
body[data-theme="light"] .table,
body[data-theme="light"] .staff-table,
body[data-theme="light"] .settings-table{
  color:#172033 !important;
}
body[data-theme="light"] table th,
body[data-theme="light"] table td,
body[data-theme="light"] .table th,
body[data-theme="light"] .table td{
  color:#172033 !important;
  border-color: rgba(15,23,42,.10) !important;
}
body[data-theme="light"] table thead th,
body[data-theme="light"] .table thead th{
  background:#f3f7fb !important;
  color:#334155 !important;
}
body[data-theme="light"] .btn-secondary,
body[data-theme="light"] button.btn-secondary,
body[data-theme="light"] .staff-table .btn,
body[data-theme="light"] table .btn{
  color:#172033 !important;
  background:#f8fafc !important;
  border-color:rgba(15,23,42,.14) !important;
}
body[data-theme="light"] .btn-danger,
body[data-theme="light"] table .btn-danger{
  color:#7f1d1d !important;
  background:#fee2e2 !important;
  border-color:#fecaca !important;
}
body[data-theme="light"] .btn-primary,
body[data-theme="light"] table .btn-primary{
  color:#102006 !important;
}
body[data-theme="light"] .badge,
body[data-theme="light"] .status-badge{
  color:#172033 !important;
}


/* Kyrio hotfix 2026-05-19: Safari/iPad true sticky operator fallback */
@supports (overflow: clip){
  html, body, #app, .app-shell, .shell, .layout, .main{
    overflow-x: clip !important;
  }
}
.kyrio-shift-operator-card{
  position: sticky !important;
  top: 8px !important;
  z-index: 300 !important;
}
.kyrio-sticky-operator-placeholder{ width:100%; }
.kyrio-fixed-operator-fallback{
  position: fixed !important;
  top: max(8px, env(safe-area-inset-top)) !important;
  left: calc(var(--sidebar-width, 240px) + 26px) !important;
  right: 26px !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 999 !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.22) !important;
}
@media (max-width: 900px){
  .kyrio-fixed-operator-fallback{
    left: 10px !important;
    right: 10px !important;
    top: max(6px, env(safe-area-inset-top)) !important;
  }
}
@media (min-width: 901px) and (max-width: 1200px){
  .kyrio-fixed-operator-fallback{
    left: 210px !important;
    right: 20px !important;
  }
}
body[data-theme="light"] .kyrio-fixed-operator-fallback{
  background: linear-gradient(135deg,rgba(236,253,180,.96),rgba(255,255,255,.96)) !important;
}
body[data-theme="dark"] .kyrio-fixed-operator-fallback{
  background: linear-gradient(135deg,rgba(30,41,59,.96),rgba(15,23,42,.96)) !important;
}


/* Kyrio mobile keyboard stability hotfix 2026-05-24
   Prevent iPhone Safari keyboard resize from causing visible page jumps. */
html{
  min-height:100%;
  overflow-x:hidden;
}
body, .app-shell, .login-shell, .shell{
  min-height:100dvh;
}
@supports (-webkit-touch-callout: none){
  body{
    min-height:-webkit-fill-available;
    overflow-anchor:none;
  }
  input, textarea, select{
    font-size:16px !important;
  }
  body:has(input:focus),
  body:has(textarea:focus),
  body:has(select:focus){
    overflow-anchor:none;
  }
  body:has(input:focus) .kyrio-shift-operator-card,
  body:has(textarea:focus) .kyrio-shift-operator-card,
  body:has(select:focus) .kyrio-shift-operator-card{
    position:relative !important;
    top:auto !important;
  }
}
@media (max-width: 820px){
  .sidebar{height:auto;min-height:auto;}
  .input, .select, textarea{font-size:16px !important;}
  .stock-action-row, .kyrio-product-actions{
    scroll-margin-top:120px;
    scroll-margin-bottom:280px;
  }
}


/* Kyrio mobile keyboard stability patch */
html {
  scroll-padding-top: max(16px, env(safe-area-inset-top));
  scroll-padding-bottom: calc(160px + env(safe-area-inset-bottom));
}

body,
.kyrio-app,
.app-shell,
.main-shell,
.page-shell {
  min-height: 100dvh;
}

input,
textarea,
select,
button {
  font-size: 16px !important;
}

input,
textarea,
select {
  scroll-margin-top: 120px;
  scroll-margin-bottom: 220px;
}

.kyrio-keyboard-open .app-shell,
.kyrio-keyboard-open .main-shell,
.kyrio-keyboard-open .page-shell,
.kyrio-keyboard-open .card {
  overflow-anchor: none;
}

.kyrio-keyboard-open .stock-tabs,
.kyrio-keyboard-open .kyrio-operator-bar,
.kyrio-keyboard-open .mobile-action-bar,
.kyrio-keyboard-open .sticky-action-bar {
  position: static !important;
}

.kyrio-mobile-toast,
.toast,
.toast-stack {
  z-index: 99999 !important;
}

@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }

  .kyrio-keyboard-open body {
    height: var(--kyrio-visual-height, auto);
  }
}

/* 2026-06-24 Dashboard owner inventory table */
.dashboard-inventory-card { overflow: hidden; }
.dashboard-inventory-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.mini-pill { display:inline-flex; align-items:center; border-radius:999px; padding:6px 10px; font-size:12px; font-weight:800; border:1px solid rgba(148,163,184,.24); background:rgba(148,163,184,.12); color:var(--text); }
.mini-pill.critical { border-color:rgba(248,113,113,.35); background:rgba(248,113,113,.12); color:#fecaca; }
.mini-pill.watch { border-color:rgba(251,191,36,.35); background:rgba(251,191,36,.12); color:#fde68a; }
.dashboard-table-wrap { margin-top:14px; overflow:auto; border:1px solid rgba(148,163,184,.20); border-radius:16px; background:rgba(15,23,42,.30); }
.dashboard-stock-table { width:100%; min-width:980px; border-collapse:separate; border-spacing:0; }
.dashboard-stock-table th { position:sticky; top:0; z-index:1; text-align:left; padding:11px 12px; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); background:rgba(15,23,42,.96); border-bottom:1px solid rgba(148,163,184,.18); white-space:nowrap; }
.dashboard-stock-table td { padding:12px; border-bottom:1px solid rgba(148,163,184,.13); vertical-align:middle; }
.dashboard-stock-table tr:last-child td { border-bottom:0; }
.dashboard-stock-table tr:hover td { background:rgba(190,242,100,.035); }
.dashboard-stock-table tr.critical td { background:rgba(248,113,113,.035); }
.dashboard-stock-table tr.watch td { background:rgba(251,191,36,.028); }
.dashboard-stock-table .table-sub { margin-top:3px; color:var(--muted); font-size:11px; }
.stock-status { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:11px; font-weight:850; background:rgba(148,163,184,.16); color:var(--text); white-space:nowrap; }
.stock-status.critical { background:rgba(248,113,113,.16); color:#fecaca; }
.stock-status.watch { background:rgba(251,191,36,.16); color:#fde68a; }
.stock-status.ok { background:rgba(190,242,100,.16); color:#d9f99d; }
.stock-status.muted { color:var(--muted); }
body[data-theme="light"] .dashboard-stock-table th { background:#f8fafc; color:#475569; }
body[data-theme="light"] .dashboard-table-wrap { background:#ffffff; border-color:#dbe3ef; }
body[data-theme="light"] .dashboard-stock-table td { border-color:#e5e7eb; }
body[data-theme="light"] .dashboard-stock-table tr.critical td { background:#fff1f2; }
body[data-theme="light"] .dashboard-stock-table tr.watch td { background:#fffbeb; }
body[data-theme="light"] .mini-pill.critical, body[data-theme="light"] .stock-status.critical { color:#991b1b; }
body[data-theme="light"] .mini-pill.watch, body[data-theme="light"] .stock-status.watch { color:#92400e; }
body[data-theme="light"] .stock-status.ok { color:#3f6212; }
@media(max-width:900px){ .dashboard-inventory-actions{justify-content:flex-start}.dashboard-stock-table{min-width:920px}.dashboard-table-wrap{border-radius:14px} }

/* Dashboard inventory command table v2 */
.dashboard-inventory-card-v2 { overflow: hidden; }
.dashboard-inventory-head { align-items: flex-start; gap: 14px; }
.dashboard-action-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}
.dashboard-action-strip > div {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 14px;
  padding: 12px 14px;
}
.dashboard-action-strip strong { display:block; font-size: 22px; line-height: 1; color: var(--accent, #a3e635); }
.dashboard-action-strip span { display:block; margin-top: 5px; color: var(--muted, #94a3b8); font-size: 12px; }
.dashboard-command-table th:first-child,
.dashboard-command-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(12, 18, 32, 0.96);
  min-width: 158px;
}
.dashboard-command-table thead th:first-child { z-index: 3; }
.action-cell { white-space: nowrap; }
.row-action-label { font-weight: 800; font-size: 12px; margin-bottom: 6px; }
.row-action-label.critical { color: #fecaca; }
.row-action-label.watch { color: #fde68a; }
.row-action-label.ok { color: #bbf7d0; }
.row-action-label.muted { color: #cbd5e1; }
.btn-tiny {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 9px;
}
.btn-tiny.is-success {
  border-color: rgba(163, 230, 53, 0.8);
  box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.18);
}
.mini-pill.ok { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.3); color: #bbf7d0; }
@media (max-width: 900px) {
  .dashboard-action-strip { grid-template-columns: 1fr; }
  .dashboard-command-table th:first-child,
  .dashboard-command-table td:first-child { position: static; min-width: 0; }
}


/* 2026-06-24 Owner UX v3: floating toast + threshold controls */
.kyrio-floating-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100000;
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
  font-weight: 800;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.kyrio-floating-toast.show { opacity: 1; transform: translateY(0); }
.kyrio-floating-toast.success { border-color: rgba(132, 204, 22, 0.55); }
.kyrio-floating-toast.error { border-color: rgba(248, 113, 113, 0.55); }
.kyrio-floating-toast.warning { border-color: rgba(251, 191, 36, 0.55); }
body[data-theme="light"] .kyrio-floating-toast {
  background: #0f172a;
  color: #fff;
}
.dashboard-bulk-threshold-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(147, 197, 253, .25);
  background: rgba(37, 99, 235, .10);
  border-radius: 16px;
}
.dashboard-bulk-threshold-panel strong { display:block; font-size: 14px; }
.dashboard-bulk-threshold-panel span { display:block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.threshold-button-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.threshold-button-row.bulk { justify-content:flex-end; }
.dashboard-command-table th:nth-child(8),
.dashboard-command-table td:nth-child(8) { min-width: 150px; }
body[data-theme="light"] .dashboard-action-strip > div {
  background:#f8fafc;
  border-color:#dbe3ef;
}
body[data-theme="light"] .dashboard-command-table th:first-child,
body[data-theme="light"] .dashboard-command-table td:first-child { background:#fff7ed; }
body[data-theme="light"] .row-action-label.critical { color:#b91c1c; }
body[data-theme="light"] .row-action-label.watch { color:#a16207; }
body[data-theme="light"] .row-action-label.ok { color:#166534; }
body[data-theme="light"] .row-action-label.muted { color:#475569; }
@media (max-width: 900px) {
  .kyrio-floating-toast { left: 14px; right: 14px; bottom: 14px; }
  .dashboard-bulk-threshold-panel { align-items:flex-start; flex-direction:column; }
  .threshold-button-row.bulk { justify-content:flex-start; }
}

/* KyrioOps v4 inventory command UX */
.dashboard-table-toolbar,
.report-command-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}
.dashboard-table-toolbar .kyrio-field,
.report-command-toolbar .kyrio-field {
  min-width: 220px;
  flex: 1 1 220px;
}
.kyrio-field.compact span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted, #64748b);
  margin-bottom: 5px;
}
.kyrio-field.compact input,
.kyrio-field.compact select {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border, #dbe3ef);
  background: var(--panel, #fff);
  color: var(--text, #0f172a);
  padding: 8px 10px;
  font-weight: 700;
}
.report-bulk-threshold-panel {
  margin: 0 0 14px;
}
.report-threshold-actions .is-applied,
.threshold-button-row .is-applied,
[data-action="reports-apply-suggested-threshold"].is-applied {
  border-color: #8fd14f !important;
  background: rgba(143, 209, 79, .16) !important;
  color: var(--text, #0f172a) !important;
}
.report-risk-card [data-action="reports-apply-suggested-threshold"].is-applied {
  opacity: .9;
  cursor: default;
}
@media (max-width: 760px) {
  .dashboard-table-toolbar,
  .report-command-toolbar {
    display: block;
  }
  .dashboard-table-toolbar .kyrio-field,
  .report-command-toolbar .kyrio-field {
    display: block;
    margin-bottom: 8px;
  }
}

/* Kyrio v6 inventory command table UX refresh */
.dashboard-command-table .target-display{display:flex;flex-direction:column;gap:2px;line-height:1.2;white-space:normal}.dashboard-command-table .target-display strong{font-weight:800;color:var(--text,#152033)}.dashboard-command-table .target-cover{font-size:12px;color:var(--muted,#6b7280)}.dashboard-command-table .confidence-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;line-height:1;border:1px solid transparent;white-space:nowrap}.dashboard-command-table .confidence-badge.high{background:#ecfdf3;color:#027a48;border-color:#abefc6}.dashboard-command-table .confidence-badge.medium{background:#fffaeb;color:#b54708;border-color:#fedf89}.dashboard-command-table .confidence-badge.learning{background:#eff6ff;color:#175cd3;border-color:#bfdbfe}.dashboard-command-table .cover-out{display:inline-flex;border-radius:999px;background:#fee4e2;color:#b42318;padding:4px 8px;font-size:12px;font-weight:800}.dashboard-command-table .threshold-button-row.compact{display:flex;flex-wrap:wrap;gap:5px;max-width:128px}.dashboard-command-table .threshold-button-row .btn-tiny.is-current{background:#111827!important;color:#fff!important;border-color:#111827!important;box-shadow:0 2px 8px rgba(17,24,39,.16)}.dashboard-command-table .stock-status.critical{background:#fee4e2;color:#b42318}.dashboard-command-table .stock-status.watch{background:#fffaeb;color:#b54708}.dashboard-command-table .stock-status.ok{background:#ecfdf3;color:#027a48}.dashboard-command-table .stock-status.muted{background:#eff6ff;color:#175cd3}.dashboard-command-table .row-action-label.ok{color:#027a48}.dashboard-command-table .row-action-label.muted{color:#175cd3}.dashboard-command-table td.threshold-current-cell{min-width:130px}.dashboard-command-table th:nth-child(8),.dashboard-command-table td:nth-child(8){min-width:126px}.dashboard-command-table th:nth-child(9),.dashboard-command-table td:nth-child(9){min-width:96px}

/* Kyrio dashboard v7 UX refresh */
.dashboard-action-strip.v7 { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.dashboard-action-strip.v7 button {
  appearance:none;
  border:1px solid rgba(148,163,184,.20);
  border-radius:16px;
  background:rgba(15,23,42,.25);
  padding:14px 16px;
  text-align:left;
  cursor:pointer;
  color:inherit;
  transition:transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.dashboard-action-strip.v7 button:hover { transform:translateY(-1px); border-color:rgba(163,230,53,.35); }
.dashboard-action-strip.v7 button.active { border-color:rgba(163,230,53,.55); box-shadow:0 10px 24px rgba(15,23,42,.10); background:rgba(163,230,53,.08); }
.dashboard-action-strip.v7 button strong { display:block; font-size:22px; line-height:1; color:var(--accent,#a3e635); }
.dashboard-action-strip.v7 button span { display:block; margin-top:5px; color:var(--muted,#94a3b8); font-size:12px; }
.dashboard-bulk-threshold-panel.v7 { gap:16px; }
.bulk-cover-control { display:flex; align-items:end; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.bulk-cover-control label { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--muted,#94a3b8); text-transform:uppercase; letter-spacing:.04em; }
.bulk-cover-control select {
  min-height:38px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:10px;
  padding:0 34px 0 10px;
  background:rgba(15,23,42,.30);
  color:var(--text,#e5e7eb);
  font-weight:800;
}
.target-change-menu { position:relative; width:max-content; max-width:150px; }
.target-change-menu summary {
  list-style:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(148,163,184,.30);
  border-radius:999px;
  padding:6px 10px;
  cursor:pointer;
  font-weight:900;
  background:rgba(248,250,252,.92);
  color:#111827;
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
.target-change-menu summary::-webkit-details-marker { display:none; }
.target-change-menu summary small { font-size:11px; font-weight:700; color:#64748b; }
.target-change-options {
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  z-index:20;
  min-width:142px;
  padding:8px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 40px rgba(15,23,42,.16);
  display:grid;
  gap:6px;
}
.target-change-options .btn { width:100%; justify-content:center; }
.target-change-options .btn.is-current { background:#111827!important; color:#fff!important; border-color:#111827!important; }
.recommended-order {
  display:inline-flex;
  margin-top:6px;
  border-radius:999px;
  padding:4px 8px;
  background:#fff7ed;
  color:#b45309;
  border:1px solid #fed7aa;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.dashboard-command-table .row-action-label.critical,
.dashboard-command-table .row-action-label.watch { font-weight:900; }
body[data-theme="light"] .dashboard-action-strip.v7 button { background:#fff; border-color:#dbe3ef; }
body[data-theme="light"] .dashboard-action-strip.v7 button.active { background:#f7fee7; border-color:#bef264; }
body[data-theme="light"] .bulk-cover-control select { background:#fff; color:#0f172a; border-color:#dbe3ef; }
@media(max-width:900px){
  .dashboard-action-strip.v7 { grid-template-columns:1fr 1fr; }
  .bulk-cover-control { justify-content:flex-start; }
}

/* =========================================================
   KYRIO OPS — UI/UX CONSISTENCY LAYER  v4  2026-06-25
   - SVG nav icons
   - Button group
   - Consistent select styling
   - Responsive hardening
   ========================================================= */

/* --- Nav button: icon + label layout --- */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  opacity: .75;
}
.nav-btn.active .nav-icon { opacity: 1; }
.nav-label { flex: 1; }

/* --- Button group: two buttons that sit flush side by side --- */
.btn-group {
  display: inline-flex;
  gap: 0;
}
.btn-group .btn {
  border-radius: 0;
}
.btn-group .btn:first-child {
  border-radius: 10px 0 0 10px;
  border-right-width: 0;
}
.btn-group .btn:last-child {
  border-radius: 0 10px 10px 0;
}
.btn-group .btn:only-child {
  border-radius: 10px;
  border-right-width: 1px;
}

/* --- Consistent select: match input height, radius, padding --- */
.kyrio-field.compact select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px !important;
  cursor: pointer;
}
/* Match the search input height and radius exactly */
.dashboard-table-toolbar .kyrio-field.compact input,
.dashboard-table-toolbar .kyrio-field.compact select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-2, #2d3d5d);
  background: var(--panel-2, #131d2f);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dashboard-table-toolbar .kyrio-field.compact input:focus,
.dashboard-table-toolbar .kyrio-field.compact select:focus {
  border-color: var(--blue, #4fa3ff);
  box-shadow: 0 0 0 3px rgba(79,163,255,.12);
  outline: none;
}
body[data-theme="light"] .dashboard-table-toolbar .kyrio-field.compact input,
body[data-theme="light"] .dashboard-table-toolbar .kyrio-field.compact select {
  background: #fff;
  border-color: #d1dae8;
  color: #152033;
}
body[data-theme="light"] .kyrio-field.compact select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7c98' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* --- Dashboard inventory actions: single row always --- */
.dashboard-inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* --- Responsive: tablet portrait (768–1100px) --- */
@media (min-width: 769px) and (max-width: 1100px) {
  .dashboard-inventory-actions {
    flex-direction: row;
    justify-content: flex-start;
  }
  .shell {
    grid-template-columns: 200px 1fr;
  }
}

/* --- Responsive: mobile landscape (short viewport) --- */
@media (orientation: landscape) and (max-height: 600px) {
  .sidebar-top {
    padding-bottom: 8px;
  }
  .sidebar-copy {
    display: none;
  }
  .nav-btn {
    padding: 10px 12px;
  }
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --- Responsive: phone portrait (< 768px) --- */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-inventory-actions {
    flex-direction: row;
    justify-content: flex-start;
  }
  .btn-group {
    width: 100%;
  }
  .btn-group .btn {
    flex: 1;
    justify-content: center;
  }
  .dashboard-inventory-head {
    flex-direction: column;
    align-items: stretch !important;
  }
}

/* --- Responsive: small phone (< 430px) --- */
@media (max-width: 430px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mini-pill {
    font-size: 11px;
    padding: 4px 8px;
  }
  .btn-group .btn {
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* --- kpi-value: wrap long snake_case labels --- */
.kpi-value {
  word-break: break-word;
  text-align: right;
  font-size: 13px;
}


/* PIN input: centered, spaced digits */
#staff-action-pin {
  letter-spacing: .35em;
  font-size: 20px !important;
  text-align: center;
}

/* =========================================================
   SET STAFF PIN — tap keypad modal
   ========================================================= */
.modal-pin-set {
  max-width: 340px;
  width: min(340px, 100%);
}
.set-pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 20px 0 16px;
}
.set-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-2, #2d3d5d);
  background: transparent;
  transition: background .12s ease, border-color .12s ease;
}
.set-pin-dot.filled {
  background: var(--green, #b8ea57);
  border-color: var(--green, #b8ea57);
}
.set-pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.set-pin-key {
  min-height: 56px;
  border: 1px solid var(--line, #22314b);
  border-radius: 14px;
  background: var(--panel-2, #131d2f);
  color: var(--text, #eef4ff);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background .1s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.set-pin-key:active { transform: scale(.94); }
.set-pin-key:hover:not(:disabled) { background: var(--panel-3, #182338); }
.set-pin-key.ok {
  background: var(--green, #b8ea57);
  color: #0d1306;
  border-color: var(--green, #b8ea57);
  font-size: 14px;
  font-weight: 800;
}
.set-pin-key.ok:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.set-pin-key.clear {
  background: var(--panel-3, #182338);
  color: var(--muted, #94a3bf);
  font-size: 16px;
}

/* Light theme */
body[data-theme="light"] .set-pin-key {
  background: #f8fafc;
  border-color: #dbe3ef;
  color: #152033;
}
body[data-theme="light"] .set-pin-key:hover:not(:disabled) { background: #eef2f8; }
body[data-theme="light"] .set-pin-key.clear { background: #f1f5f9; color: #64748b; }
body[data-theme="light"] .set-pin-dot { border-color: #c8d6e8; }
body[data-theme="light"] .set-pin-dot.filled { background: #5a8f1a; border-color: #5a8f1a; }
body[data-theme="light"] .set-pin-key.ok { background: #6aab1e; border-color: #6aab1e; color: #fff; }

/* Remove the large-spaced PIN input CSS that was added before */
#staff-action-pin {
  letter-spacing: normal;
  font-size: inherit !important;
  text-align: left;
}

/* =========================================================
   DASHBOARD UX v5  2026-06-25
   - Clickable stat cards with nav hints
   - Filter strip PDF buttons
   ========================================================= */

/* Stat card nav hint */
.stat-hint {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green, #b8ea57);
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .15s ease, transform .15s ease;
}
.clickable-card:hover .stat-hint,
.clickable-card:focus .stat-hint {
  opacity: 1;
  transform: translateY(0);
}
.clickable-card {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.clickable-card:hover {
  border-color: rgba(184,234,87,.30);
  box-shadow: 0 0 0 1px rgba(184,234,87,.12);
}
body[data-theme="light"] .clickable-card:hover {
  border-color: rgba(90,143,26,.30);
  box-shadow: 0 0 0 1px rgba(90,143,26,.08);
}
body[data-theme="light"] .stat-hint { color: #4a7a0e; }

/* Strip PDF button — sits bottom-right of each filter card */
.strip-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted, #94a3bf);
  border: 1px solid var(--line, #22314b);
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(255,255,255,.04);
  pointer-events: all;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.strip-pdf-btn:hover {
  color: var(--text, #eef4ff);
  border-color: var(--line-2, #2d3d5d);
  background: rgba(255,255,255,.08);
}
.dashboard-action-strip.v7 button .strip-pdf-btn {
  display: none;
}
.dashboard-action-strip.v7 button:hover .strip-pdf-btn,
.dashboard-action-strip.v7 button.active .strip-pdf-btn {
  display: inline-flex;
}
body[data-theme="light"] .strip-pdf-btn {
  color: #64748b;
  border-color: #d1dae8;
  background: rgba(0,0,0,.03);
}
body[data-theme="light"] .strip-pdf-btn:hover {
  color: #152033;
  border-color: #94a3b8;
}


/* =========================================================
   INVENTORY STRIP — semantic colours per filter
   ========================================================= */

/* Order today — red/critical tint */
.dashboard-action-strip.v7 button[data-filter="order"] strong { color: #ff8080; }
.dashboard-action-strip.v7 button[data-filter="order"].active {
  border-color: rgba(248,113,113,.45);
  background: rgba(248,113,113,.08);
  box-shadow: none;
}
/* Review this week — amber tint */
.dashboard-action-strip.v7 button[data-filter="review"] strong { color: #fbbf24; }
.dashboard-action-strip.v7 button[data-filter="review"].active {
  border-color: rgba(251,191,36,.40);
  background: rgba(251,191,36,.07);
  box-shadow: none;
}
/* Healthy — green (inherits existing accent, just reinforce) */
.dashboard-action-strip.v7 button[data-filter="healthy"] strong { color: #86efac; }
.dashboard-action-strip.v7 button[data-filter="healthy"].active {
  border-color: rgba(134,239,172,.40);
  background: rgba(134,239,172,.07);
  box-shadow: none;
}
/* All tracked — neutral blue-grey */
.dashboard-action-strip.v7 button[data-filter="all"] strong { color: #94a3b8; }
.dashboard-action-strip.v7 button[data-filter="all"].active {
  border-color: rgba(148,163,184,.35);
  background: rgba(148,163,184,.07);
  box-shadow: none;
}

/* Light theme */
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="order"] strong { color: #dc2626; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="order"].active { background: #fff1f1; border-color: #fca5a5; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="review"] strong { color: #d97706; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="review"].active { background: #fffbeb; border-color: #fde68a; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="healthy"] strong { color: #16a34a; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="healthy"].active { background: #f0fdf4; border-color: #86efac; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="all"] strong { color: #64748b; }
body[data-theme="light"] .dashboard-action-strip.v7 button[data-filter="all"].active { background: #f8fafc; border-color: #cbd5e1; }

/* Remove the hover strip PDF CSS that's no longer needed */
.strip-pdf-btn { display: none !important; }


/* =========================================================
   CHECKLIST OPERATOR BAR  v6  2026-06-25
   Matches stock page pill-tap UX
   ========================================================= */
.kyrio-checklist-operator-bar {
  border: 1px solid var(--line, #22314b);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--panel-2, #131d2f);
}
body[data-theme="light"] .kyrio-checklist-operator-bar {
  background: #f8fafc;
  border-color: #dbe3ef;
}
.kyrio-checklist-op-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  flex-shrink: 0;
}
.kyrio-checklist-op-active {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green, #b8ea57);
}
body[data-theme="light"] .kyrio-checklist-op-active { color: #4a7a0e; }
.kyrio-checklist-op-sub {
  font-size: 11.5px;
  color: var(--muted, #94a3bf);
}
.kyrio-checklist-op-empty {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #94a3bf);
}
.kyrio-checklist-op-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.kyrio-checklist-op-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line, #22314b);
  background: var(--panel-3, #182338);
  color: var(--text, #eef4ff);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.kyrio-checklist-op-pill span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--line-2, #2d3d5d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.kyrio-checklist-op-pill.active {
  border-color: rgba(184,234,87,.45);
  background: rgba(184,234,87,.12);
}
.kyrio-checklist-op-pill.active span {
  background: var(--green, #b8ea57);
  color: #0d1306;
}
.kyrio-checklist-op-pill:hover:not(.active) {
  background: var(--panel-3, #182338);
  border-color: var(--line-2, #2d3d5d);
}
body[data-theme="light"] .kyrio-checklist-op-pill {
  background: #fff;
  border-color: #dbe3ef;
  color: #152033;
}
body[data-theme="light"] .kyrio-checklist-op-pill span {
  background: #e8edf5;
  color: #152033;
}
body[data-theme="light"] .kyrio-checklist-op-pill.active {
  border-color: rgba(74,122,14,.40);
  background: rgba(74,122,14,.08);
}
body[data-theme="light"] .kyrio-checklist-op-pill.active span {
  background: #4a7a0e;
  color: #fff;
}


/* 2026-07-21 Logs correction and audit UX refresh */
.logs-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.logs-technical-details{margin-top:10px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:rgba(15,23,42,.28)}
.logs-technical-details summary{cursor:pointer;padding:11px 13px;color:var(--muted);font-size:12px;font-weight:800;list-style:none}
.logs-technical-details summary::-webkit-details-marker{display:none}
.logs-technical-details pre{white-space:pre-wrap;word-break:break-word;margin:0;padding:13px;border-top:1px solid var(--line);background:rgba(2,6,23,.45);color:#cbd5e1;font-size:12px;line-height:1.55}
.stock-correction-backdrop{position:fixed;inset:0;z-index:4000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(3,7,18,.76);backdrop-filter:blur(10px);opacity:0;transition:opacity .18s ease}
.stock-correction-backdrop.show{opacity:1}
.stock-correction-modal{width:min(620px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:24px;border:1px solid rgba(148,163,184,.2);border-radius:26px;background:linear-gradient(180deg,var(--panel),var(--panel-2));box-shadow:0 30px 100px rgba(0,0,0,.48)}
.stock-correction-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.stock-correction-eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:900;color:var(--amber)}
.stock-correction-head h3{margin:5px 0 4px;font-size:25px;letter-spacing:-.03em}
.stock-correction-head p{margin:0;color:var(--muted)}
.stock-correction-close{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-size:25px;line-height:1;cursor:pointer}
.stock-correction-original{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.025)}
.stock-correction-original span,.stock-correction-preview span{color:var(--muted);font-size:12px;font-weight:700}
.stock-correction-original strong{font-size:20px}
.stock-correction-reason{resize:vertical;min-height:88px;padding-top:12px}
.stock-correction-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.stock-correction-preview>div{padding:13px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.025)}
.stock-correction-preview strong{display:block;margin-top:5px;font-size:17px}
.stock-correction-error{margin-top:14px;padding:11px 13px;border:1px solid rgba(248,113,113,.4);border-radius:13px;background:rgba(248,113,113,.10);color:#fecaca;font-size:13px;font-weight:700}
.stock-correction-note{margin-top:14px;padding:12px 14px;border:1px solid rgba(251,191,36,.22);border-radius:14px;background:rgba(251,191,36,.08);color:#f8d7a5;font-size:13px;line-height:1.45}
.stock-correction-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
body.modal-open{overflow:hidden}
body[data-theme="light"] .stock-correction-backdrop{background:rgba(15,23,42,.42)}
body[data-theme="light"] .stock-correction-modal{box-shadow:0 30px 90px rgba(15,23,42,.25)}
body[data-theme="light"] .stock-correction-note{color:#7a4b08}
@media(max-width:720px){
  .logs-detail-grid,.stock-correction-preview{grid-template-columns:1fr}
  .stock-correction-backdrop{align-items:flex-end;padding:10px}
  .stock-correction-modal{border-radius:24px 24px 18px 18px;padding:20px;max-height:92vh}
  .stock-correction-actions{display:grid;grid-template-columns:1fr}
  .stock-correction-actions .btn{width:100%;min-height:48px}
}
