*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f1ea;color:#25170e}.hidden{display:none!important}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#3b160f,#8b2e18)}.login-card{background:#fff;padding:28px;border-radius:18px;box-shadow:0 10px 35px #0005;width:min(420px,92vw)}.logo{max-width:120px;display:block;margin:0 auto 10px}.login-card h1,.login-card h2{text-align:center;margin:6px}.login-card label,form label{display:block;margin-top:10px;font-weight:bold}.login-card input,input,select,textarea{width:100%;padding:12px;border:1px solid #c7b8a5;border-radius:10px;font-size:16px}textarea{min-height:70px}button{border:0;border-radius:10px;padding:11px 14px;margin:5px;cursor:pointer;background:#e5d6bf;font-weight:bold}.primary{background:#1f6f43;color:#fff}.danger{background:#a32222;color:#fff}.error{color:#b00020}.warning{color:#9a4d00}.app header{display:flex;justify-content:space-between;align-items:center;background:#e8eef5;color:#000;padding:14px 18px}.app header h1{margin:0;font-size:22px}nav{display:flex;gap:6px;flex-wrap:wrap;background:#dfe7ef;padding:8px;position:sticky;top:0;z-index:5}nav button{background:#ffffff;color:#000000;font-weight:700}main{padding:16px;max-width:1300px;margin:auto}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.card,.panel{background:#fff;border-radius:16px;padding:16px;box-shadow:0 3px 14px #0001;margin-bottom:14px}.card p{font-size:34px;margin:0;font-weight:bold}.grid2{display:grid;grid-template-columns:minmax(280px,430px) 1fr;gap:16px}.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.item{border-bottom:1px solid #eadfce;padding:10px;display:grid;grid-template-columns:70px 1fr auto;gap:12px;align-items:center}.item img{width:62px;height:62px;object-fit:cover;border-radius:10px;background:#eee}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eadfce;margin:2px;font-size:12px}.low{background:#fff1c2!important}.critical{background:#ffd0d0!important}.notice{background:#edf8ef;border-left:5px solid #1f6f43;padding:10px;border-radius:10px;margin:10px 0}.big-input{font-size:24px;padding:18px}.big-btn{font-size:22px;padding:18px 26px}.result{font-size:24px;font-weight:bold;padding:16px;border-radius:12px}.success{background:#d7f5df}.fail{background:#ffd8d8}#toast{position:fixed;right:15px;top:90px;z-index:20;min-width:260px}.toast{padding:16px;border-radius:12px;margin-bottom:8px;box-shadow:0 6px 20px #0003;font-weight:bold}.toast.ok{background:#d8f5dc}.toast.warn{background:#fff0b8}.toast.err{background:#ffd0d0}.drink-card{border:1px solid #eadfce;border-radius:14px;padding:12px;margin:10px 0;background:#fff}.drink-under-item{margin-top:12px}.table{width:100%;border-collapse:collapse}.table td,.table th{padding:8px;border-bottom:1px solid #eee;text-align:left}@media(max-width:800px){.grid2{grid-template-columns:1fr}.app header{display:block}.item{grid-template-columns:1fr}.item img{width:100%;height:140px}nav button{flex:1 1 45%}}@media print{nav,header,button,form,#importFile{display:none!important}body{background:#fff}.panel{box-shadow:none}}
.super-only{border-left:6px solid #32150d}
.locked{opacity:.45;pointer-events:none}
.role-note{font-size:13px;color:#6b5b4a}
.online-card{border:1px solid #e5d6bf;border-radius:14px;padding:12px;margin:10px 0;background:#fffdf8}
.online-card img{max-width:120px;border-radius:10px;display:block;margin:6px 0}


/* v14 Mobiltilpasning */
.mobile-menu-title{
  display:none;
  background:#dfe7ef;
  color:#000;
  padding:10px 14px;
  font-weight:bold;
}

@media(max-width:900px){
  body{
    font-size:17px;
    background:#f7f2ea;
  }

  .login-page{
    align-items:flex-start;
    padding-top:24px;
  }

  .login-card{
    width:94vw;
    padding:22px;
    border-radius:18px;
  }

  .login-card input,
  input,
  select,
  textarea{
    font-size:18px;
    padding:15px;
    min-height:52px;
  }

  button{
    font-size:17px;
    min-height:52px;
    padding:14px 16px;
    border-radius:14px;
  }

  .app header{
    position:sticky;
    top:0;
    z-index:30;
    padding:12px;
  }

  .app header h1{
    font-size:19px;
  }

  .app header p{
    font-size:13px;
    margin:4px 0;
  }

  nav{
    position:sticky;
    top:72px;
    z-index:25;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:8px;
    max-height:45vh;
    overflow:auto;
  }

  nav button{
    width:100%;
    margin:0;
    white-space:normal;
  }

  main{
    padding:10px;
  }

  .grid2{
    grid-template-columns:1fr !important;
    gap:10px;
  }

  .cards{
    grid-template-columns:1fr;
  }

  .card,
  .panel{
    padding:14px;
    border-radius:16px;
    margin-bottom:10px;
  }

  .item{
    grid-template-columns:1fr !important;
    gap:8px;
    border:1px solid #eadfce;
    border-radius:14px;
    margin-bottom:10px;
    background:#fff;
  }

  .item img{
    width:100%;
    height:160px;
    object-fit:contain;
    background:#f3eee6;
  }

  .big-input{
    font-size:24px;
    min-height:68px;
  }

  .big-btn{
    width:100%;
    font-size:22px;
    min-height:72px;
    margin:10px 0;
  }

  #scan .panel:first-child{
    position:sticky;
    top:160px;
    z-index:20;
    border:2px solid #1f6f43;
  }

  #scanResult{
    font-size:22px;
    line-height:1.35;
  }

  .row{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .row button{
    width:100%;
    margin:0;
  }

  .table,
  .table tbody,
  .table tr,
  .table td,
  .table th{
    display:block;
    width:100%;
  }

  .table tr{
    margin-bottom:12px;
    border:1px solid #eadfce;
    border-radius:12px;
    padding:8px;
    background:#fff;
  }

  .table th{
    display:none;
  }

  .table td{
    border:0;
    border-bottom:1px solid #eee;
    padding:8px 4px;
  }

  .table td:last-child{
    border-bottom:0;
  }

  #toast{
    left:10px;
    right:10px;
    top:auto;
    bottom:10px;
    min-width:unset;
  }

  .toast{
    font-size:17px;
    padding:16px;
  }

  .drink-card,
  .online-card{
    font-size:16px;
  }

  .online-card img{
    max-width:100%;
    width:100%;
    height:180px;
    object-fit:contain;
  }
}

@media(max-width:480px){
  nav{
    grid-template-columns:1fr;
    top:68px;
  }

  .login-card h1{
    font-size:24px;
  }

  .login-card h2{
    font-size:18px;
  }

  .app header{
    display:block;
  }

  .app header button{
    width:100%;
    margin:8px 0 0 0;
  }

  main{
    padding:8px;
  }
}

/* v15 mobil og backup */
.header-actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.checkline{
  display:flex!important;
  gap:10px;
  align-items:center;
}
.checkline input{
  width:auto;
  min-height:auto;
}
.mobile-quick-bar{
  display:none;
}
@media(max-width:900px){
  html, body{
    width:100%;
    min-height:100%;
    overflow-x:hidden;
  }
  .app{
    padding-bottom:86px;
  }
  .app header{
    display:block;
    top:0;
  }
  .header-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    margin-top:8px;
  }
  .header-actions button{
    width:100%;
    margin:0;
  }
  nav{
    position:relative!important;
    top:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  #scan .panel:first-child{
    position:relative!important;
    top:auto!important;
  }
  .mobile-quick-bar{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:4px;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:99;
    background:#32150d;
    padding:6px;
    box-shadow:0 -4px 18px #0004;
  }
  .mobile-quick-bar button{
    min-height:56px;
    font-size:13px;
    padding:8px 4px;
    margin:0;
    background:#fff;
    color:#32150d;
  }
  .login-page{
    min-height:100svh;
    padding:12px;
    align-items:center;
  }
  .login-card{
    margin:auto;
  }
}

/* v16: mobil innlogging og varetelling */
body.login-active nav,
body.login-active .mobile-quick-bar,
body.login-active header{
  display:none!important;
}
body.login-active #loginPage{
  display:flex!important;
}
body.login-active #appPage{
  display:none!important;
}
.count-row{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:8px;
  align-items:center;
  border-bottom:1px solid #eadfce;
  padding:8px 0;
}
.count-row input{
  min-height:44px;
}
.count-diff.minus{background:#ffd0d0;padding:6px;border-radius:8px}
.count-diff.plus{background:#d8f5dc;padding:6px;border-radius:8px}
@media(max-width:900px){
  .mobile-quick-bar{
    grid-template-columns:repeat(5,1fr);
  }
  .mobile-quick-bar button{
    font-size:12px;
  }
  .count-row{
    grid-template-columns:1fr;
    border:1px solid #eadfce;
    border-radius:14px;
    padding:12px;
    margin-bottom:10px;
    background:#fff;
  }
  .count-row strong{
    font-size:18px;
  }
}


/* v18 PROFF VENSTREMENY OG PUB-DESIGN */
:root{
  --bg:#140d09;
  --panel:#fffaf2;
  --panel2:#f5ead9;
  --text:#24140c;
  --muted:#806b55;
  --brand:#32150d;
  --brand2:#5b2416;
  --gold:#d9a441;
  --gold2:#f4cf7b;
  --green:#1f6f43;
  --danger:#a32222;
  --line:#ead8bd;
  --shadow:0 18px 45px rgba(0,0,0,.18);
}

body{
  background:
    radial-gradient(circle at top left, rgba(217,164,65,.18), transparent 35%),
    linear-gradient(135deg,#120906 0%,#2b1109 38%,#f4f1ea 38%,#f4f1ea 100%);
  color:var(--text);
}

.app{
  min-height:100vh;
  display:grid;
  grid-template-columns:292px 1fr;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  background:
    linear-gradient(180deg,rgba(50,21,13,.98),rgba(20,9,6,.98)),
    radial-gradient(circle at top,rgba(217,164,65,.18),transparent 55%);
  color:#fff;
  padding:18px;
  box-shadow:12px 0 40px rgba(0,0,0,.22);
  z-index:50;
  display:flex;
  flex-direction:column;
}

.sidebar-brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px 8px 22px;
  border-bottom:1px solid rgba(255,255,255,.12);
  margin-bottom:12px;
}

.sidebar-logo{
  width:74px;
  height:74px;
  object-fit:contain;
  background:#fff;
  border-radius:18px;
  padding:6px;
  box-shadow:0 10px 28px rgba(0,0,0,.35);
}

.sidebar-brand h2{
  margin:0;
  font-size:23px;
  letter-spacing:.3px;
}

.sidebar-brand p{
  margin:4px 0 0;
  color:var(--gold2);
  font-weight:bold;
}

.sidebar nav{
  position:static!important;
  display:flex!important;
  flex-direction:column;
  gap:8px;
  background:transparent!important;
  padding:0!important;
  overflow:auto;
}

.sidebar nav button{
  width:100%;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
  margin:0;
  padding:14px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.08);
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  transition:.18s ease;
  font-size:15px;
  text-align:left;
}

.sidebar nav button:hover{
  background:linear-gradient(135deg,var(--gold),#f3d992);
  color:#2b140b;
  transform:translateX(4px);
  box-shadow:0 10px 22px rgba(0,0,0,.20);
}

.sidebar nav button span{
  min-width:22px;
  font-size:18px;
}

.sidebar-footer{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.12);
  display:grid;
  gap:8px;
}

.sidebar-footer button{
  width:100%;
  margin:0;
}

.app-shell{
  min-width:0;
}

.app header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(255,250,242,.88);
  color:var(--text);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(91,36,22,.12);
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  padding:18px 26px;
}

.app header h1{
  font-size:28px;
  color:var(--brand);
  letter-spacing:.2px;
}

.app header p{
  color:var(--muted);
  font-weight:bold;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  padding:9px 14px;
  border-radius:999px;
  background:#efe0c7;
  color:#5b2416;
  font-weight:bold;
  border:1px solid #e0c89f;
}

main{
  max-width:1500px;
  padding:24px;
}

h2{
  color:var(--brand);
  font-size:28px;
  margin-top:4px;
}

.card,.panel,.login-card{
  background:rgba(255,250,242,.96);
  border:1px solid rgba(91,36,22,.10);
  box-shadow:var(--shadow);
}

.cards{
  grid-template-columns:repeat(3,minmax(180px,1fr));
}

.card{
  position:relative;
  overflow:hidden;
  min-height:135px;
}

.card:before{
  content:"";
  position:absolute;
  right:-28px;
  top:-28px;
  width:90px;
  height:90px;
  border-radius:50%;
  background:rgba(217,164,65,.22);
}

.card h3{
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:13px;
}

.card p{
  color:var(--brand);
  font-size:42px;
}

button{
  transition:.16s ease;
}

button:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(0,0,0,.12);
}

.primary{
  background:linear-gradient(135deg,var(--green),#2f9d62);
  color:#fff;
}

.danger{
  background:linear-gradient(135deg,var(--danger),#d43a32);
  color:#fff;
}

input,select,textarea{
  background:#fffdf8;
  border:1px solid #d8c3a4;
}

input:focus,select:focus,textarea:focus{
  outline:3px solid rgba(217,164,65,.24);
  border-color:var(--gold);
}

.notice{
  background:#fff4d8;
  border-left-color:var(--gold);
}

.item{
  background:#fffdf8;
  border:1px solid var(--line);
  border-radius:16px;
  margin:8px 0;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

.badge{
  background:#efe0c7;
  color:#5b2416;
  font-weight:bold;
}

.low{
  background:#fff0c9!important;
  border-color:#e1b34c!important;
}

.table th{
  background:#32150d;
  color:#fff;
}

.table td,.table th{
  border-bottom:1px solid #ead8bd;
}

.login-card{
  border-top:6px solid var(--gold);
}

.login-page{
  background:
    linear-gradient(135deg,rgba(18,9,6,.92),rgba(91,36,22,.90)),
    url("img/logo.jpg");
  background-size:cover;
  background-position:center;
}

.mobile-quick-bar{
  display:none;
}

@media(max-width:950px){
  .app{
    display:block;
  }

  .sidebar{
    position:relative;
    height:auto;
    padding:12px;
  }

  .sidebar-brand{
    padding-bottom:12px;
  }

  .sidebar-logo{
    width:58px;
    height:58px;
  }

  .sidebar nav{
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .sidebar nav button{
    justify-content:center;
    text-align:center;
    padding:13px 8px;
    min-height:56px;
  }

  .sidebar-footer{
    grid-template-columns:1fr 1fr;
  }

  .app header{
    position:relative;
    padding:14px;
  }

  main{
    padding:12px;
  }

  .cards{
    grid-template-columns:1fr;
  }

  .mobile-quick-bar{
    display:grid;
  }
}

@media(max-width:520px){
  .sidebar nav{
    grid-template-columns:1fr;
  }

  .sidebar-brand h2{
    font-size:20px;
  }

  .app header h1{
    font-size:22px;
  }
}

@media print{
  .sidebar,.mobile-quick-bar,.header-actions{
    display:none!important;
  }
  .app{
    display:block;
  }
}


/* v20 autodrink og vare-preview */
.selected-vare-preview{
  position:sticky;
  top:92px;
  z-index:8;
  border:2px solid var(--gold);
  background:linear-gradient(135deg,#fffaf2,#fff1cf);
  border-radius:20px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 18px 40px rgba(0,0,0,.16);
}
.selected-vare-preview h3{
  margin-top:0;
  color:var(--brand);
}
.preview-card{
  display:grid;
  grid-template-columns:145px 1fr;
  gap:16px;
  align-items:start;
}
.preview-card img,.preview-noimg{
  width:145px;
  height:145px;
  object-fit:contain;
  background:#fff;
  border-radius:18px;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-weight:bold;
  text-align:center;
}
.preview-card h2{
  margin:0 0 8px;
}
.stock-auto{
  border-left:6px solid var(--green);
}
.general-drinks{
  border-left:6px solid var(--gold);
}
#drinkForm textarea{
  min-height:110px;
}
@media(max-width:900px){
  .selected-vare-preview{
    position:relative;
    top:auto;
  }
  .preview-card{
    grid-template-columns:1fr;
  }
  .preview-card img,.preview-noimg{
    width:100%;
  }
}


/* v21 toast/meldinger */
#toast{
  top:auto!important;
  bottom:35px!important;
  right:28px!important;
  left:auto!important;
  z-index:9999!important;
}

.toast{
  min-width:360px;
  max-width:520px;
  font-size:20px!important;
  line-height:1.4;
  padding:22px!important;
  border-radius:18px!important;
  box-shadow:0 16px 40px rgba(0,0,0,.28)!important;
  animation:toastPop .22s ease;
}

.toast.ok{
  border-left:8px solid #1f6f43;
}

.toast.warn{
  border-left:8px solid #d9a441;
}

.toast.err{
  border-left:8px solid #a32222;
}

@keyframes toastPop{
  from{
    opacity:0;
    transform:translateY(18px) scale(.96);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@media(max-width:900px){
  #toast{
    left:12px!important;
    right:12px!important;
    bottom:88px!important;
  }

  .toast{
    min-width:auto;
    width:100%;
    font-size:19px!important;
    padding:20px!important;
  }
}


/* v22 større uttaksmeldinger */
#toast{
  bottom:95px!important;
}

.toast{
  min-width:420px;
  max-width:650px;
  font-size:24px!important;
  line-height:1.5!important;
  padding:28px!important;
  border-radius:22px!important;
  font-weight:700!important;
}

.result{
  font-size:28px!important;
  line-height:1.5!important;
  padding:26px!important;
  border-radius:20px!important;
  margin-top:16px;
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}

.result b{
  font-size:30px;
}

@media(max-width:900px){
  #toast{
    bottom:115px!important;
  }

  .toast{
    min-width:auto;
    width:100%;
    font-size:23px!important;
    padding:24px!important;
  }

  .result{
    font-size:25px!important;
    padding:22px!important;
  }

  .result b{
    font-size:27px;
  }
}


/* v23 backup-mappe */
#backupFolderStatus{
  font-size:18px;
  padding:16px;
}


/* v24 superbruker faresone */
.danger-zone{
  margin-top:28px;
  border:3px solid #a32222;
  border-radius:22px;
  padding:22px;
  background:linear-gradient(135deg,#fff3f3,#ffe1e1);
  box-shadow:0 16px 36px rgba(163,34,34,.16);
}

.danger-zone h3{
  color:#8a1111;
  font-size:30px;
  margin-top:0;
}

.danger-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:18px;
}

.big-danger{
  grid-column:1/-1;
  font-size:28px!important;
  padding:24px!important;
  background:linear-gradient(135deg,#7a0000,#d40000)!important;
}

@media(max-width:900px){
  .danger-grid{
    grid-template-columns:1fr;
  }

  .big-danger{
    font-size:24px!important;
  }
}


/* v25 serveringsenheter */
.servering-info{
  background:linear-gradient(135deg,#fff7df,#ffeab5);
  border-left:6px solid #d9a441;
  padding:16px;
  border-radius:16px;
  margin:10px 0 14px;
  font-size:18px;
  line-height:1.5;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.servering-info b{
  color:#5b2416;
}


/* v26 øl og cider */
.servering-info{
  white-space:normal;
}

.preview-card p{
  line-height:1.6;
}


/* v27 mineralvann og blandevann */
.preview-card p{
  margin-bottom:10px;
}


/* v28 innlogging/kvalitetssikring */
body.login-active #loginPage{display:flex!important}
body.login-active #appPage{display:none!important}
body.login-active .sidebar,
body.login-active .app-shell,
body.login-active .mobile-quick-bar{display:none!important}
#loginMsg{font-weight:bold;font-size:16px}


/* v29 robust innlogging og bakgrunnsbilde */
.login-reset{
  width:100%;
  background:#fff1d2!important;
  color:#5b2416!important;
  border:1px solid #d9a441!important;
}

:root{
  --login-bg-image:url("img/logo.jpg");
}

.login-page{
  background:
    linear-gradient(135deg,rgba(18,9,6,.88),rgba(91,36,22,.82)),
    var(--login-bg-image)!important;
  background-size:cover!important;
  background-position:center!important;
}

body.custom-bg{
  background:
    radial-gradient(circle at top left, rgba(217,164,65,.18), transparent 35%),
    linear-gradient(135deg,#120906 0%,#2b1109 38%,#f4f1ea 38%,#f4f1ea 100%);
}

body.custom-bg::before{
  content:"";
  position:fixed;
  inset:0;
  background:
    linear-gradient(135deg,rgba(244,241,234,.86),rgba(244,241,234,.94)),
    var(--login-bg-image);
  background-size:cover;
  background-position:center;
  z-index:-1;
}

#backgroundUpload{
  background:#fffdf8;
}

/* v31 varetyper og endre/slette */
.varetype-help{
  font-size:16px;
}
.vare-actions{
  display:grid;
  gap:8px;
}
.vare-actions button{
  width:100%;
  margin:0;
}
#varetype optgroup{
  font-weight:bold;
  color:#5b2416;
}
#varetype option{
  color:#24140c;
}
.servering-info{
  border:2px solid #d9a441;
}

/* v32 bedre søk */
.search-tools{
  margin:8px 0 14px;
}
#vareSearch{
  border:2px solid #d9a441;
  font-size:18px;
}
.item b{
  color:#32150d;
}

/* v33 bredt produktsøk */
#lookupStatus{
  font-size:17px;
  line-height:1.45;
}
#lookupStatus a{
  font-weight:bold;
  color:#5b2416;
}

/* v34 roller og startside */
.role-note{
  background:#fff1d2;
  border-left:6px solid #d9a441;
  padding:12px;
  border-radius:12px;
  font-weight:bold;
}

/* v35 scan kvalitet */
#scanInput{
  border:3px solid #1f6f43!important;
}
#scanResult.success{
  border:3px solid #1f6f43;
}
#scanResult.fail{
  border:3px solid #a32222;
}

/* v36 backup */
.notice.backup{
  border:2px solid #1f6f43;
}

/* v38 backup og rask scan */
#scanInput{
  background:#f7fff9!important;
}
#backupFolderStatus,
#importFile{
  font-size:18px;
}

/* v39 backup UI */
.backup-box{
  background:#fffdf8;
  border:2px solid #d9a441;
  border-radius:18px;
  padding:18px;
  margin-bottom:20px;
}

.backup-status{
  margin:12px 0;
  font-size:17px;
}

.super-danger-zone{
  margin-top:30px;
  background:#fff1f1;
  border:3px solid #a32222;
  border-radius:20px;
  padding:20px;
}

.super-danger-zone h3{
  color:#7a0000;
}

/* v42 backup og faresone */
.backup-box{
  background:#fffdf8;
  border:2px solid #d9a441;
  border-radius:18px;
  padding:18px;
  margin:16px 0;
}
.super-danger-zone{
  margin-top:26px;
  border:3px solid #a32222;
  border-radius:22px;
  padding:22px;
  background:#fff1f1;
}
.super-danger-zone.hidden{display:none!important}
.danger-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.big-danger{grid-column:1/-1;font-size:24px!important;padding:20px!important}
@media(max-width:900px){.danger-grid{grid-template-columns:1fr}}

/* v43 kvalitet og backup */
.backup-box, #backupFolderStatus{
  border:2px solid #d9a441;
}
#backupFolderStatus{
  padding:16px;
  font-size:17px;
  line-height:1.45;
}
button[onclick*="pickBackupFolder"],
button[onclick*="testBackupFolder"],
button[onclick*="saveBackupSettings"]{
  cursor:pointer;
}

/* v45 tydelig varevisning */
.vare-title{
  font-size:22px;
  font-weight:900;
  color:#32150d;
  margin-bottom:10px;
}
.vare-facts{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  gap:10px;
  margin:10px 0;
}
.fact-box{
  background:linear-gradient(135deg,#fff7df,#ffe9ad);
  border:2px solid #d9a441;
  border-radius:14px;
  padding:12px;
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}
.fact-box span{
  display:block;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6b4b1f;
  font-weight:800;
  margin-bottom:5px;
}
.fact-box b{
  font-size:20px;
  color:#32150d;
}
.vare-stock{
  margin-top:10px;
  padding:10px;
  background:#edf8ef;
  border-left:6px solid #1f6f43;
  border-radius:10px;
  font-size:18px;
}
.vare-codes{
  margin-top:8px;
  color:#4a3829;
  line-height:1.5;
}
@media(max-width:900px){
  .vare-facts{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:520px){
  .vare-facts{
    grid-template-columns:1fr;
  }
}

/* v46 bestilling */
.order-print h2{
  color:#32150d;
  margin-bottom:8px;
}
.order-table td{
  font-size:16px;
  line-height:1.45;
}
@media print{
  body *{visibility:hidden!important}
  #bestilling, #bestilling *{visibility:visible!important}
  #bestilling{
    position:absolute;
    left:0;
    top:0;
    width:100%;
  }
  nav, header, .sidebar, .mobile-quick-bar, #toast, #bestilling .row{
    display:none!important;
  }
  .panel{
    box-shadow:none!important;
    border:0!important;
  }
  .order-table th{
    background:#eee!important;
    color:#000!important;
  }
}

/* v47 mottak av bestilling */
.order-table input{
  max-width:90px;
  padding:8px;
  margin-bottom:6px;
}
.order-table .no-print button{
  display:block;
  width:100%;
  margin:4px 0;
}
@media print{
  .no-print{
    display:none!important;
  }
}

/* v48 brukernavn og bestilling */
#loginUser{
  font-size:20px;
  font-weight:800;
  background:#fffdf8;
  border:2px solid #d9a441;
}
.user-public-row{
  grid-template-columns:1fr auto!important;
}
.user-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.user-actions button{
  margin:0;
}
.order-table input{
  max-width:90px;
  padding:8px;
  margin-bottom:6px;
}
.order-table .no-print button{
  display:block;
  width:100%;
  margin:4px 0;
}
@media print{
  .no-print{display:none!important}
  body *{visibility:hidden!important}
  #bestilling, #bestilling *{visibility:visible!important}
  #bestilling{position:absolute;left:0;top:0;width:100%}
  nav, header, .sidebar, .mobile-quick-bar, #toast, #bestilling .row{display:none!important}
}

/* v49 egen varelager-modul */
.lager-card{
  background:#fffdf8;
  border:1px solid #ead8bd;
  border-radius:18px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
#varelagerSearch{
  border:2px solid #d9a441;
  font-size:18px;
  margin-bottom:16px;
}

/* v51 autosøk status */
#lookupStatus{
  font-size:17px;
  line-height:1.5;
}
#lookupStatus a{
  font-weight:900;
  color:#32150d;
  text-decoration:underline;
}

/* v52 kompakt meny - alle moduler synlig uten scrolling */
.sidebar{
  width:245px!important;
  min-width:245px!important;
  padding:10px!important;
  overflow:hidden!important;
}

.sidebar-brand{
  padding:6px 4px 10px!important;
  margin-bottom:6px!important;
  gap:8px!important;
}

.sidebar-logo{
  width:46px!important;
  height:46px!important;
  border-radius:12px!important;
}

.sidebar-brand h2{
  font-size:18px!important;
  line-height:1.1!important;
}

.sidebar-brand p{
  font-size:12px!important;
  margin:2px 0 0!important;
}

.sidebar nav{
  gap:4px!important;
  overflow:visible!important;
  max-height:none!important;
}

.sidebar nav button{
  min-height:36px!important;
  padding:7px 9px!important;
  font-size:13px!important;
  border-radius:10px!important;
  line-height:1.15!important;
}

.sidebar nav button span{
  min-width:18px!important;
  font-size:15px!important;
}

.sidebar-footer{
  padding-top:6px!important;
  gap:5px!important;
}

.sidebar-footer button{
  min-height:34px!important;
  padding:7px!important;
  font-size:13px!important;
}

.app{
  grid-template-columns:245px 1fr!important;
}

@media(max-height:760px){
  .sidebar nav button{
    min-height:31px!important;
    padding:5px 8px!important;
    font-size:12px!important;
  }
  .sidebar-logo{
    width:38px!important;
    height:38px!important;
  }
  .sidebar-brand h2{
    font-size:16px!important;
  }
}

@media(max-width:950px){
  .sidebar{
    width:auto!important;
    min-width:0!important;
    overflow:visible!important;
  }
  .sidebar nav{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
  }
}

@media(max-width:620px){
  .sidebar nav{
    grid-template-columns:repeat(2,1fr)!important;
  }
}

/* v53 autosøk strekkode */
#lookupStatus{
  font-size:17px;
  line-height:1.5;
}
#lookupStatus a{
  font-weight:900;
  color:#32150d;
  text-decoration:underline;
}

/* v54 lagring og manuell autofyll */
.manual-lookup-box{
  background:#fffdf8;
  border:2px solid #d9a441;
  border-radius:16px;
  padding:14px;
  margin:14px 0;
}
.manual-lookup-box textarea{
  min-height:110px;
}

/* v55 autosøk */
#lookupStatus{
  border:2px solid #d9a441;
  font-size:17px;
  line-height:1.5;
}
#lookupStatus a{
  font-weight:900;
  text-decoration:underline;
}

/* v56 internett autosøk først */
#lookupStatus{
  border:2px solid #1f6f43;
}

/* v57 autosøk resultat */
.autosok-result{
  background:#eefaf1;
  border:2px solid #1f6f43;
  border-radius:16px;
  padding:14px;
  margin:12px 0;
}
.auto-result-grid{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:14px;
  align-items:start;
}
.auto-result-grid img{
  width:120px;
  height:120px;
  object-fit:contain;
  background:white;
  border-radius:12px;
}
@media(max-width:700px){
  .auto-result-grid{grid-template-columns:1fr}
}

/* v58 Barcode først */
#lookupStatus{border-color:#1f6f43!important}

/* v59 versjon, undertype og deaktiv vare */
.login-version{
  font-size:13px;
  font-weight:800;
  color:#d9a441;
  text-align:center;
  margin-top:-6px;
  margin-bottom:10px;
  letter-spacing:.04em;
}
.checkline{
  display:flex!important;
  align-items:center;
  gap:10px;
  font-weight:900;
  background:#fffdf8;
  border:2px solid #d9a441;
  border-radius:12px;
  padding:10px;
}
.checkline input{
  width:22px!important;
  height:22px!important;
}
.deaktiv-label{
  display:inline-block;
  background:#a32222;
  color:white;
  font-size:18px;
  font-weight:1000;
  padding:6px 10px;
  border-radius:10px;
  margin-left:10px;
}
.inactive-vare{
  border:3px solid #a32222!important;
  background:linear-gradient(135deg,#fff1f1,#ffffff)!important;
  opacity:.82;
}
.inactive-vare .vare-title{
  color:#7a0000!important;
}

/* v60 scan med antall */
#scanAntall{
  max-width:220px;
  border:3px solid #d9a441!important;
  font-size:28px!important;
  font-weight:900;
  text-align:center;
  background:#fffdf8!important;
}
#scanAntall + #scanInput{
  margin-top:10px;
}

/* v62 sikker innlogging */
.login-security-note{
  font-size:12px;
  color:#7a5b21;
  text-align:center;
  margin:6px 0 10px;
  font-weight:800;
}
#loginPass{
  -webkit-text-security: disc;
}

/* v63 brukeradministrasjon */
#userForm input,
#userForm select{
  border:2px solid #d9a441;
}

/* v64 Backup 1 og Backup 2 */
.backup-dual-panel{
  border:3px solid #1f6f43!important;
  background:#f4fff7!important;
}
.backup-location{
  border:2px solid #d9a441;
  border-radius:16px;
  padding:14px;
  margin:12px 0;
  background:#fffdf8;
}
.backup-location h4{
  margin:0 0 8px;
  font-size:22px;
  color:#32150d;
}
.backup-status{
  margin-top:10px;
  font-size:16px;
  line-height:1.45;
}

/* v65 modultilgang per bruker */
.module-access-box{
  background:#fffdf8;
  border:2px solid #d9a441;
  border-radius:16px;
  padding:14px;
  margin:14px 0;
}
.module-access-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(160px,1fr));
  gap:8px;
}
.module-access-grid label{
  display:flex!important;
  align-items:center;
  gap:8px;
  padding:9px;
  border:1px solid #ead8bd;
  border-radius:10px;
  background:white;
  font-weight:800;
}
.module-access-grid input{
  width:20px!important;
  height:20px!important;
}
@media(max-width:700px){
  .module-access-grid{grid-template-columns:1fr}
}


/* Dashboard uttak fix */
.dashboard-cards{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));}
.dashboard-grid{align-items:start;margin-top:16px;}
.dashboard-scan-panel{border:2px solid rgba(230,179,91,.55);box-shadow:0 0 0 2px rgba(80,20,12,.15) inset;}
.stock-message-ok h3{margin-top:0;color:#ffe0a3;}
.stock-message-ok p{margin:.35rem 0;font-size:1.05rem;}
.warnline{background:#5a250b;border:1px solid #f0b45f;padding:8px;border-radius:8px;}
.result.success{background:#12351f;border:1px solid #5fc178;padding:14px;border-radius:12px;}
.result.fail{background:#4a1111;border:1px solid #d65c5c;padding:14px;border-radius:12px;}
.settings-users-panel{margin-top:18px;border-top:3px solid rgba(230,179,91,.45);}
#dashScanInput:focus,#scanInput:focus{outline:3px solid #f0b45f;box-shadow:0 0 0 5px rgba(240,180,95,.25);}

/* V2.7 Drinkforslag Pro */
.pro-drink-card{background:#fffdf8;border:1px solid #eadfce;border-left:6px solid #8b2e18}
.pro-drink-card.can-make{border-left-color:#1f6f43;background:#f7fff8}
.pro-drink-card.missing{border-left-color:#b8860b}
.drink-title-row{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.drink-title-row h3{margin:0 0 6px 0;font-size:22px}
.drink-meta{background:#f4efe7;border-radius:10px;padding:8px;margin:8px 0}
.drink-ok{background:#d8f5dc!important;color:#164d2f}
.drink-warn{background:#fff0b8!important;color:#6b4500}
.pro-drink-card h4{margin:12px 0 4px;color:#32150d}
.pro-drink-card details{background:#f8f4ec;border-radius:10px;padding:8px;margin-top:8px}
.pro-drink-card summary{cursor:pointer;font-weight:bold}

/* V2.8 auto-utlogging / backup */
#autoLogoutPanel select{max-width:360px;font-size:16px;padding:10px;border-radius:10px;}
#autoBackupInfoV28{margin:12px 0;}
.settings-users-panel{margin-top:18px;border:1px solid rgba(255,215,120,.25);}


/* V3.0 Fancy Dashboard */
#dashboard{max-width:1500px;margin:0 auto;}
.dash-hero{display:flex;justify-content:space-between;align-items:stretch;gap:18px;margin-bottom:18px;padding:22px;border-radius:24px;background:linear-gradient(135deg,#32150d,#6e2718 54%,#b8860b);color:#fff;box-shadow:0 18px 45px rgba(50,21,13,.22);overflow:hidden;position:relative;}
.dash-hero:after{content:"";position:absolute;right:-70px;top:-70px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.12)}
.dash-kicker{text-transform:uppercase;letter-spacing:.16em;font-size:12px;font-weight:900;color:#ffe1a4}.dash-hero h2{font-size:38px;margin:4px 0 4px}.dash-hero p{margin:0;opacity:.92}.dash-live{min-width:210px;background:rgba(0,0,0,.22);border:1px solid rgba(255,255,255,.22);border-radius:18px;padding:16px;font-weight:900;text-align:center;align-self:center}.dash-live small{font-weight:600;opacity:.85}.pulse-dot{display:inline-block;width:11px;height:11px;border-radius:50%;background:#6ee28a;margin-right:8px;box-shadow:0 0 0 6px rgba(110,226,138,.18)}
.dash-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:18px;align-items:start}.dash-main{min-width:0}.dash-side{position:sticky;top:88px;display:flex;flex-direction:column;gap:12px}.dash-stat-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:12px;margin-bottom:16px}.dash-stat{background:#fffaf2;border:1px solid #eadfce;border-radius:20px;padding:16px;box-shadow:0 8px 24px rgba(50,21,13,.08);min-height:126px;display:flex;flex-direction:column;gap:4px}.dash-stat span{font-size:28px}.dash-stat small{color:#6c5843;font-weight:800}.dash-stat b{font-size:24px;color:#32150d;line-height:1.05}.dash-stat.warn{background:#fff6d9;border-color:#e8be55}.dash-stat.dangerstat{background:#ffe7e2;border-color:#d66b5c}.dash-scan-card{background:linear-gradient(135deg,#fffaf2,#fff);border:2px solid rgba(184,134,11,.35);border-radius:24px;padding:18px;margin-bottom:16px;box-shadow:0 14px 35px rgba(50,21,13,.12);display:grid;grid-template-columns:1fr minmax(260px,420px);gap:16px;align-items:start}.dash-scan-card h3{margin:0 0 8px;font-size:24px}.dash-scan-card p{margin:0;color:#614830}.dash-scan-fields{display:grid;grid-template-columns:90px 1fr;gap:8px;align-items:center}.dash-scan-fields label{font-weight:900;color:#32150d}.dash-scan-fields input{margin:0}.dash-scan-fields .big-btn{grid-column:1/-1;margin:6px 0 0}.dash-result{grid-column:1/-1;margin:0}.dash-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:14px}.dash-panel,.dash-sidebox{background:#fff;border:1px solid #eadfce;border-radius:20px;padding:15px;box-shadow:0 9px 26px rgba(50,21,13,.08)}.dash-panel h3{margin:0 0 10px;color:#32150d}.dash-mini-list{display:flex;flex-direction:column;gap:8px}.dash-mini-row{padding:10px;border-radius:13px;background:#f8f1e7;border-left:5px solid #b8860b}.dash-mini-row span{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.dash-mini-row b{color:#32150d}.dash-mini-row small{color:#6c5843;text-align:right;line-height:1.25}.dash-empty{padding:14px;border-radius:13px;background:#edf8ef;border-left:5px solid #1f6f43;color:#24412d}.dash-side-title{font-weight:900;color:#32150d;margin-bottom:8px}.dash-sidebox small{display:block;line-height:1.35;color:#6c5843;margin-top:5px}.dash-logout-dock select{font-size:14px;padding:9px;border-radius:10px;margin:4px 0 8px}.dash-logout-dock label{font-size:13px;font-weight:900;color:#32150d}.mini-logout-btn{width:100%;margin:10px 0 0;padding:9px;font-size:14px;border-radius:10px}.dashboard-autologout-panel{margin:0!important}.dash-side .notice{font-size:13px;padding:8px;margin:6px 0}
@media(max-width:1200px){.dash-stat-grid{grid-template-columns:repeat(3,1fr)}.dash-layout{grid-template-columns:1fr}.dash-side{position:static;display:grid;grid-template-columns:repeat(3,1fr)}}
@media(max-width:780px){.dash-hero{display:block}.dash-live{margin-top:14px}.dash-stat-grid{grid-template-columns:repeat(2,1fr)}.dash-scan-card{grid-template-columns:1fr}.dash-scan-fields{grid-template-columns:1fr}.dash-panel-grid{grid-template-columns:1fr}.dash-side{display:flex}.dash-hero h2{font-size:30px}.dash-mini-row span{display:block}.dash-mini-row small{text-align:left}.dash-stat b{font-size:21px}}

/* V3.1 manuell backup-tilbakelegging */
.manual-restore-box{
  margin-top:18px;
  padding:16px;
  border:1px solid rgba(255,215,0,.35);
  border-radius:14px;
  background:rgba(20,12,8,.55);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}
.manual-restore-box h4{margin:0 0 8px;color:#ffd36a;}
.manual-restore-box input[type=file]{margin:10px 0 12px;width:100%;}
#manualRestorePreview{line-height:1.55;}


/* V3.2 - nettversjon: lysere dashboard og tydelig tekst */
#dashboard,
#dashboard *{
  color:#2b160d;
}
#dashboard .dash-hero{
  background:linear-gradient(135deg,#fff8eb,#f0dfc2) !important;
  color:#2b160d !important;
  border:1px solid #d9b26a;
  box-shadow:0 12px 35px rgba(0,0,0,.16);
}
#dashboard .dash-hero h2,
#dashboard .dash-hero p,
#dashboard .dash-kicker,
#dashboard .dash-live,
#dashboard .dash-live small{
  color:#2b160d !important;
}
#dashboard .dash-stat,
#dashboard .dash-panel,
#dashboard .dash-sidebox,
#dashboard .dash-scan-card,
#dashboard .dash-mini-row{
  background:#fffaf0 !important;
  color:#2b160d !important;
  border-color:#dfc28e !important;
}
#dashboard .dash-mini-row small,
#dashboard .dash-sidebox small,
#dashboard .dash-scan-card p,
#dashboard .dash-stat small{
  color:#5a3a1f !important;
}
#dashboard input,
#dashboard select{
  background:#ffffff !important;
  color:#1b0d07 !important;
  border:2px solid #b8860b !important;
}
#dashboard .result.success,
#dashboard .dash-result{
  color:#123018 !important;
  background:#e9ffe9 !important;
  border-color:#42a55b !important;
}
#dashboard .result.error{
  color:#3a0606 !important;
  background:#ffe9e9 !important;
}
.login-card input,
.login-card select{
  autocomplete:off;
}
.backup-web-box{
  background:#fffaf0;
  border:2px solid #d9b26a;
  border-radius:16px;
  padding:14px;
  margin:12px 0;
  color:#2b160d;
}

/* V3.6: fast utlogging og synk-status i alle moduler */
.global-logout-bar-v36{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:9999;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:16px;
  background:rgba(30,12,7,.92);
  border:1px solid rgba(255,214,138,.35);
  box-shadow:0 10px 25px rgba(0,0,0,.35);
  color:#ffe9bb;
  font-size:12px;
}
.global-logout-bar-v36 button{
  padding:7px 10px;
  border-radius:10px;
  border:0;
  background:#8b1e1e;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
#syncStatusV36.ok{color:#b9ffca;}
#syncStatusV36.warn{color:#ffe09a;}
#syncStatusV36.err{color:#ffb3b3;}
.login-active .global-logout-bar-v36{display:none;}
@media(max-width:760px){
  .global-logout-bar-v36{right:8px;bottom:62px;font-size:11px;}
}

/* V3.6 duplikatvarsling / server-sync */
#syncStatusV36.ok{color:#b9ffca;}
#syncStatusV36.warn{color:#ffe09a;}
#syncStatusV36.err{color:#ffb3b3;}
.login-active .global-logout-bar-v36{display:none;}

/* V3.7 serverstatus */
#syncStatusV36.ok{color:#0f5132;font-weight:700}
#syncStatusV36.warn{color:#8a5a00;font-weight:700}
#syncStatusV36.err{color:#842029;font-weight:800}
.global-logout-bar-v36{position:fixed;right:12px;bottom:12px;z-index:9999;background:#fff7e8;color:#27130c;border:1px solid #d9b36b;border-radius:14px;padding:8px 10px;box-shadow:0 8px 24px rgba(0,0,0,.25);font-size:13px;display:flex;gap:8px;align-items:center}
.global-logout-bar-v36 button{padding:6px 10px;border-radius:10px;border:0;background:#5a1d14;color:white;font-weight:700}

/* V4.2 tydelig kvalitet/backup-panel */
.quality-result-v42,
.backup-panel-v42{
  border:1px solid rgba(255,215,120,.35);
  background:#1f1712;
  color:#fff4df;
  border-radius:16px;
  padding:16px;
  margin:14px 0;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
}
.quality-result-v42 ul{margin:10px 0 0 20px;}
.quality-result-v42 li{margin:6px 0;color:#ffe0b0;}
.backup-panel-v42 .notice{background:#2b2119;color:#ffe9c8;border:1px solid rgba(255,215,120,.25);}

/* V4.3 Smart ny-vare-søk */
.smart-vare-search-box{border:1px solid rgba(255,215,128,.35);border-radius:18px;padding:16px;margin:14px 0;background:rgba(30,13,8,.78);box-shadow:0 10px 28px rgba(0,0,0,.22)}
.smart-search-line{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.smart-search-line .big-input{flex:1;min-width:230px;font-size:1.08rem;padding:14px 16px;border-radius:14px;border:1px solid rgba(255,215,128,.45);background:#fff;color:#1b0b06;font-weight:700}
.smart-results{display:grid;gap:10px;margin-top:12px}
.smart-result-card{display:grid;grid-template-columns:82px 1fr;gap:12px;align-items:start;background:#fff8ea;color:#1b0b06;border:1px solid #d9b46c;border-radius:14px;padding:12px}
.smart-result-card img{width:76px;height:76px;object-fit:contain;background:#fff;border-radius:10px;border:1px solid #ead6aa}
.smart-result-card h4{margin:0 0 5px;color:#1b0b06;font-size:1.1rem}.smart-result-card p{margin:3px 0;color:#1b0b06}.smart-result-card button{margin-top:8px}
.duplicate-live-warning{background:#ffe3e3;color:#5b0000;border:1px solid #c33;border-radius:12px;padding:10px;margin:10px 0;font-weight:700}.duplicate-live-warning button{margin-left:8px}
.notice.warn{background:#fff3cd;color:#3b2600;border-color:#ffd56a}.notice.danger{background:#ffe3e3;color:#5b0000;border-color:#c33}


/* V4.8 – bedre kontrast på brune/mørke felt */
.panel, .card, .stat-card, .dashboard-card, .fact-box, .notice, .servering-info, .selected-vare-preview, .autosok-result, .smart-vare-search-box, .manual-lookup-box, .smart-results, .preview-card {
  color: #fff7df !important;
}
.panel h1, .panel h2, .panel h3, .card h1, .card h2, .card h3, .stat-card h3, .dashboard-card h3,
.panel label, .panel p, .panel span, .panel b, .notice, .servering-info, .selected-vare-preview p, .autosok-result p {
  color: #fff7df !important;
}
.panel input, .panel select, .panel textarea, input, select, textarea {
  background: #fffaf0 !important;
  color: #1f1308 !important;
  border: 1px solid #d7a642 !important;
}
.panel input::placeholder, .panel textarea::placeholder { color:#6d5941 !important; }
.fact-box, .notice, .servering-info, .selected-vare-preview, .autosok-result, .smart-vare-search-box, .manual-lookup-box {
  background: rgba(38, 18, 8, 0.92) !important;
  border-color: rgba(255, 204, 102, 0.45) !important;
}
button.primary { color:#1b1008 !important; font-weight:800; }
button.danger { color:#fff !important; }

/* V4.9 – friskere fargeprofil og bedre lesbarhet */
:root{
  --bg:#eef7f1;
  --panel:#ffffff;
  --panel2:#f1fbf5;
  --text:#12251d;
  --muted:#4e675b;
  --brand:#0f5132;
  --brand2:#14845b;
  --gold:#d6a83f;
  --gold2:#f2d27b;
  --green:#14845b;
  --danger:#b3261e;
  --line:#cfe7d8;
}
body{
  background:linear-gradient(135deg,#eef7f1 0%,#f8fbf4 45%,#fff7e1 100%) !important;
  color:var(--text) !important;
}
.login-page{background:linear-gradient(135deg,#0f5132,#21a67a,#f2d27b) !important;}
.app header{background:linear-gradient(90deg,#0f5132,#14845b) !important;color:#fff !important;}
.sidebar{background:linear-gradient(180deg,#0f5132,#093b2c) !important;color:#fff !important;}
nav{background:transparent !important;}
nav button{background:#ffffff !important;color:#0f5132 !important;border:1px solid rgba(255,255,255,.35) !important;}
nav button:hover{background:#e7fff1 !important;}
.card,.panel,.drink-card,.online-card{background:#ffffff !important;color:#12251d !important;border:1px solid var(--line) !important;}
.card h3,.panel h3,.panel h2,.panel label,.card b,.panel b{color:#0f5132 !important;}
.notice{background:#e8fff1 !important;border-left-color:#14845b !important;color:#12251d !important;}
.badge{background:#e4f7ec !important;color:#0f5132 !important;}
button{background:#e6f4ec !important;color:#0f5132 !important;}
button.primary,.primary{background:#14845b !important;color:#fff !important;}
button.danger,.danger{background:#b3261e !important;color:#fff !important;}
input,select,textarea{background:#fff !important;color:#12251d !important;border:1px solid #acd6bf !important;}
input::placeholder,textarea::placeholder{color:#668676 !important;opacity:1 !important;}
.fresh-logout-panel{max-width:420px;font-size:13px;margin-top:14px;background:#f1fbf5 !important;border:1px solid #bde4cd !important;}
.sidebar-footer{border-top:1px solid rgba(255,255,255,.18) !important;}
.super-only{border-left-color:#14845b !important;}

/* ============================================================
   V5.0 – FJERN BRUNFARGE + FULL LESBARHET
   ============================================================ */
:root{
  --ld-bg:#f3faf7;
  --ld-surface:#ffffff;
  --ld-surface2:#eef8f3;
  --ld-text:#10231d;
  --ld-muted:#4f6a5f;
  --ld-primary:#0b6b4b;
  --ld-primary2:#11865f;
  --ld-header:#083f31;
  --ld-line:#c9e6d8;
  --ld-accent:#f0c95a;
}
html,body{
  background:linear-gradient(135deg,#eef9f4 0%,#ffffff 55%,#fff8df 100%) !important;
  color:var(--ld-text) !important;
}
.login-page{background:linear-gradient(135deg,#083f31 0%,#0b6b4b 55%,#f0c95a 100%) !important;}
.app header,
header,
.app-header{
  background:linear-gradient(90deg,#083f31,#0b6b4b) !important;
  color:#ffffff !important;
  border-bottom:3px solid #f0c95a !important;
}
.app header *, header *, .app-header *{color:#ffffff !important;text-shadow:none !important;}
.app header h1, header h1{font-weight:900 !important;letter-spacing:.2px !important;}
nav,.topnav,.menu,.sidebar{
  background:#eaf7f1 !important;
  color:var(--ld-text) !important;
  border-bottom:1px solid var(--ld-line) !important;
}
nav button,.menu button,.sidebar button{
  background:#ffffff !important;
  color:#0b4f3a !important;
  border:1px solid #bde3d2 !important;
  box-shadow:0 2px 8px rgba(8,63,49,.08) !important;
}
nav button:hover,.menu button:hover,.sidebar button:hover,
nav button.active,.menu button.active,.sidebar button.active{
  background:#0b6b4b !important;
  color:#ffffff !important;
}
.card,.panel,.drink-card,.online-card,.backup-web-box,.quality-result-v42,.backup-panel-v42,
.smart-vare-search-box,.manual-lookup-box,.selected-vare-preview,.autosok-result,.fact-box,.servering-info,
.dash-hero,.dash-stat,.dash-panel,.dash-sidebox,.dash-scan-card,.dash-mini-row{
  background:var(--ld-surface) !important;
  color:var(--ld-text) !important;
  border:1px solid var(--ld-line) !important;
  box-shadow:0 6px 20px rgba(8,63,49,.08) !important;
}
.card *:not(button):not(.primary):not(.danger),
.panel *:not(button):not(.primary):not(.danger),
.drink-card *:not(button):not(.primary):not(.danger),
.online-card *:not(button):not(.primary):not(.danger),
.smart-vare-search-box *:not(button):not(.primary):not(.danger),
.selected-vare-preview *:not(button):not(.primary):not(.danger),
.autosok-result *:not(button):not(.primary):not(.danger),
.fact-box *:not(button):not(.primary):not(.danger),
.servering-info *:not(button):not(.primary):not(.danger){
  color:var(--ld-text) !important;
}
.card h1,.card h2,.card h3,.panel h1,.panel h2,.panel h3,
.smart-vare-search-box h1,.smart-vare-search-box h2,.smart-vare-search-box h3,
label,b,strong{color:#083f31 !important;}
.muted,small,.role-note{color:var(--ld-muted) !important;}
.notice{background:#e7fff1 !important;color:var(--ld-text) !important;border-left:5px solid #0b6b4b !important;}
input,select,textarea,.big-input{
  background:#ffffff !important;
  color:#10231d !important;
  border:2px solid #acdcca !important;
}
input::placeholder,textarea::placeholder{color:#60796e !important;opacity:1 !important;}
button{background:#e8f6ef !important;color:#083f31 !important;border:1px solid #bde3d2 !important;}
button.primary,.primary{background:#0b6b4b !important;color:#ffffff !important;border-color:#0b6b4b !important;}
button.danger,.danger{background:#b3261e !important;color:#ffffff !important;border-color:#b3261e !important;}
.badge{background:#e1f4ec !important;color:#083f31 !important;}
.global-logout-bar-v36{background:#ffffff !important;color:#10231d !important;border:1px solid #bde3d2 !important;}
.global-logout-bar-v36 *{color:#10231d !important;}
.global-logout-bar-v36 button{background:#b3261e !important;color:#ffffff !important;}
#syncStatusV36.ok{color:#0b6b4b !important;}
#syncStatusV36.warn{color:#9a6500 !important;}
#syncStatusV36.err{color:#b3261e !important;}


/* V1.0 REN NY VARE / KONTRAST */
:root{--ld-primary:#0f766e;--ld-primary-dark:#0b4f49;--ld-bg:#f4fbf9;--ld-panel:#ffffff;--ld-text:#10201d;--ld-muted:#475569;--ld-border:#cbd5e1;--ld-accent:#14b8a6;}
body{background:var(--ld-bg)!important;color:var(--ld-text)!important;}
header,.app-shell header{background:linear-gradient(135deg,#0f766e,#115e59)!important;color:#fff!important;border-bottom:0!important;}
header h1, header p, .app-shell header h1, .app-shell header p{color:#fff!important;text-shadow:none!important;}
.sidebar,.sidebar-brand{background:#0f172a!important;color:#fff!important;}
.sidebar h2,.sidebar p,.sidebar button{color:#fff!important;}
.panel,.card,.nyvare-clean-panel{background:#fff!important;color:#10201d!important;border:1px solid var(--ld-border)!important;box-shadow:0 10px 28px rgba(15,118,110,.10)!important;}
.panel h2,.panel h3,.card h3,.nyvare-clean-panel h3{color:#0f3f3b!important;}
.nyvare-clean-panel label{font-weight:700;color:#183b36!important;margin-top:12px;display:block;}
.nyvare-clean-panel input,.nyvare-clean-panel select,.nyvare-clean-panel textarea,#vareSearch,#smartVareSearch{background:#fff!important;color:#10201d!important;border:1px solid #94a3b8!important;border-radius:10px!important;padding:11px 12px!important;}
.nyvare-clean-panel input::placeholder,#vareSearch::placeholder,#smartVareSearch::placeholder,.nyvare-clean-panel textarea::placeholder{color:#64748b!important;opacity:1!important;}
.form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;}
.clean-search-line{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin-bottom:8px;}
.smart-results{background:#f8fafc!important;border:1px solid #cbd5e1!important;color:#10201d!important;}
.duplicate-live-warning{background:#fff7ed!important;color:#9a3412!important;border:1px solid #fdba74!important;border-radius:10px;padding:10px 12px;margin:10px 0;font-weight:700;}
.duplicate-live-warning button{margin-left:8px;}
.notice{background:#ecfeff!important;color:#164e63!important;border:1px solid #a5f3fc!important;border-radius:10px;padding:9px 11px;}
button.primary,.primary{background:#0f766e!important;color:white!important;border:0!important;}
button.primary:hover,.primary:hover{background:#0b4f49!important;}
button.danger,.danger{background:#dc2626!important;color:white!important;}
@media(max-width:800px){.form-row-2,.clean-search-line{grid-template-columns:1fr}.nyvare-clean-grid{grid-template-columns:1fr!important}}

.sidebar,.sidebar * , nav button, nav button span { color:#000 !important; }

nav button{border:1px solid #b8c5d3 !important;}


/* ============================================================
   V1.6 - Lesbar meny og header
   ============================================================ */
.sidebar,
.sidebar nav,
.sidebar-footer{
  background:#f3f6fa !important;
  color:#000000 !important;
  border-right:1px solid #c9d3df !important;
}
.sidebar-brand,
.sidebar-brand h2,
.sidebar-brand p,
.sidebar-footer,
.sidebar-footer *{
  color:#000000 !important;
}
.sidebar nav button,
.sidebar nav button span,
nav button,
nav button span,
.mobile-menu-title,
.mobile-menu-title *{
  color:#000000 !important;
  background:#ffffff !important;
  text-shadow:none !important;
  -webkit-text-fill-color:#000000 !important;
}
.sidebar nav button,
nav button{
  border:1px solid #b9c6d3 !important;
  box-shadow:0 1px 4px rgba(0,0,0,.08) !important;
  font-weight:800 !important;
}
.sidebar nav button:hover,
.sidebar nav button.active,
nav button:hover,
nav button.active{
  background:#dbeafe !important;
  color:#000000 !important;
}
.app header{
  background:#0f172a !important;
  color:#ffffff !important;
}
.app header h1,
.app header p,
.app header div,
.app header span{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.header-version{
  font-size:12px !important;
  font-weight:700 !important;
  opacity:.9 !important;
  margin-top:3px !important;
  letter-spacing:.2px !important;
}
.login-security-note{display:none !important;}
select, option, input, textarea{
  color:#000000 !important;
  -webkit-text-fill-color:#000000 !important;
}


/* V1.9 rolig versjon på innlogging */
.login-card h2,
.login-card small{display:none!important;}
.login-version{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:22px!important;
  min-width:90px!important;
  animation:none!important;
}
.login-version::after{
  content:"";
  width:8px;
  height:8px;
  border-radius:2px;
  background:currentColor;
  display:inline-block;
  animation:ldVersionDot 1.2s steps(2,end) infinite;
}
@keyframes ldVersionDot{50%{opacity:.25}}


/* V1.14 rolig innlogging */
.login-card h2,.login-card small,.login-security-note{display:none!important;}
.login-version{animation:none!important;min-width:118px!important;white-space:nowrap!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;}
.login-version::after{content:"";width:7px;height:7px;border-radius:2px;background:currentColor;display:inline-block;opacity:.65;animation:ldV114Dot 1.4s steps(2,end) infinite;}
@keyframes ldV114Dot{50%{opacity:.25}}

/* V1.15 rolig innlogging: tekst fra gamle scripts skjules, fast versjon vises stabilt */
.login-version{
  position:relative!important;
  min-width:120px!important;
  height:24px!important;
  line-height:24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  font-size:0!important;
  animation:none!important;
}
.login-version::before{
  content:"Versjon 1.15";
  font-size:13px!important;
}
.login-version::after{
  content:""!important;
  width:7px!important;
  height:7px!important;
  margin-left:7px!important;
  border-radius:2px!important;
  background:currentColor!important;
  display:inline-block!important;
  opacity:.65!important;
  animation:ldV115Dot 1.4s steps(2,end) infinite!important;
}
@keyframes ldV115Dot{50%{opacity:.18}}

/* V1.16 rolig innlogging */
.login-version, #headerVersion { animation: none !important; transition: none !important; }
.login-version::after { content: ' ▪'; animation: sdfDot116 1.4s infinite; }
@keyframes sdfDot116 { 0%,100% { opacity:.25; } 50% { opacity:1; } }

/* V1.18 mobilkamera QR/strekkode */
.scan-field-line{display:flex;gap:10px;align-items:center;width:100%;}
.scan-field-line input{flex:1;min-width:0;}
.scan-field-line button{white-space:nowrap;}
.scanner-modal{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:99999;display:flex;align-items:center;justify-content:center;padding:16px;}
.scanner-modal.hidden{display:none!important;}
.scanner-box{width:min(680px,100%);background:#fff;color:#111;border-radius:18px;padding:14px;box-shadow:0 20px 60px rgba(0,0,0,.35);}
.scanner-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;}
.scanner-head h3{margin:0;font-size:20px;}
#mobileScannerVideo{width:100%;max-height:70vh;background:#111;border-radius:14px;object-fit:cover;}
#mobileScannerStatus{margin:10px 0 0;font-weight:700;text-align:center;}
@media(max-width:700px){.scan-field-line{flex-direction:column;align-items:stretch}.scan-field-line button{width:100%}.scanner-box{border-radius:14px;padding:10px}}


/* V1.19 fjern avslutt/logg-ut knapp nederst til høyre */
.global-logout-bar-v36,#globalLogoutBarV36,#mobileLogoutBtnV36{display:none!important;visibility:hidden!important;}


/* V1.20 - rolig innlogging og hvit tekst på grønt uttaksskilt */
.login-version{
  animation:none!important;
  transition:none!important;
  visibility:visible!important;
  opacity:1!important;
  font-size:0!important;
  min-width:130px!important;
  height:24px!important;
  line-height:24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  overflow:hidden!important;
}
.login-version::before{
  content:"Versjon 1.20"!important;
  font-size:13px!important;
  animation:none!important;
  transition:none!important;
  opacity:1!important;
}
.login-version::after{
  content:""!important;
  display:none!important;
  animation:none!important;
}
#headerVersion{
  animation:none!important;
  transition:none!important;
  font-size:0!important;
  opacity:1!important;
}
#headerVersion::before{
  content:"Versjon 1.20"!important;
  font-size:13px!important;
}
.result.success,.stock-message-ok,.dash-result.success{
  color:#fff!important;
}
.result.success *,.stock-message-ok *,.dash-result.success *{
  color:#fff!important;
}
@media(max-width:900px){
  .result.success,.stock-message-ok,.dash-result.success{
    color:#fff!important;
  }
  .result.success *,.stock-message-ok *,.dash-result.success *{
    color:#fff!important;
  }
}

/* ==== Rapporter modul V1.25 ==== */
.report-controls p{margin-top:0;color:#334155}.report-output{background:#fff}.print-report-head{border-bottom:2px solid #0f766e;margin-bottom:14px;padding-bottom:10px}.print-report-head h1{margin:0 0 6px;font-size:26px}.report-table{width:100%;border-collapse:collapse;background:#fff}.report-table th{background:#0f766e;color:#fff;text-align:left}.report-table th,.report-table td{padding:9px 10px;border:1px solid #cbd5e1;vertical-align:top}.report-table tbody tr:nth-child(even){background:#f8fafc}.report-summary{font-size:18px;margin:10px 0 14px;padding:10px;border:1px solid #cbd5e1;background:#f8fafc}.print-sign{display:flex;justify-content:space-between;gap:20px;margin-top:30px;padding-top:14px;border-top:1px solid #cbd5e1}.mobile-quick-bar button{color:#fff!important}
@media print{
  body{background:#fff!important;color:#000!important}.sidebar,header,.no-print,.mobile-quick-bar,#toast,.scanner-modal,.header-actions,.sidebar-footer{display:none!important}.app,.app-shell,main,.page,.panel{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;box-shadow:none!important;border:0!important;background:#fff!important}.page.hidden{display:none!important}#rapporter{display:block!important}.report-output{padding:0!important}.print-area{font-size:12px}.print-report-head h1{font-size:22px;color:#000}.report-table{page-break-inside:auto}.report-table tr{page-break-inside:avoid;page-break-after:auto}.report-table th{background:#e5e7eb!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.report-table th,.report-table td{border:1px solid #555!important;padding:6px}.print-sign{font-size:12px} @page{size:A4;margin:12mm}
}


/* ==== V1.26 rapporter, mobil og print ==== */
.report-output .print-report-head{position:relative;min-height:70px;padding-left:96px}
.report-output .print-report-head:before{content:"";position:absolute;left:0;top:0;width:78px;height:58px;background:url('img/logo.jpg') center/contain no-repeat}
.report-controls select,.report-controls input{font-size:16px;min-height:44px}
.report-controls .row button{min-height:44px}
.scanner-modal{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px}
.scanner-box{background:#fff;border-radius:16px;width:min(620px,96vw);padding:14px;box-shadow:0 20px 60px #0008}
.scanner-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.scanner-head h3{margin:0}
#mobileScannerVideo{width:100%;max-height:65vh;background:#111;border-radius:12px;object-fit:cover}
#mobileScannerStatus{font-weight:700;margin:10px 0 0;color:#111}
@media(max-width:800px){
  main{padding:10px}.panel,.card{padding:12px;border-radius:12px}.row>*{flex:1 1 100%}
  nav{gap:4px;padding:6px}nav button{font-size:14px;padding:11px 8px;margin:2px;min-height:46px}
  .big-input{font-size:18px;padding:14px}.big-btn{font-size:18px;padding:14px 18px;width:100%}
  .table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}.table th,.table td{white-space:nowrap}
  .report-output .print-report-head{padding-left:0;padding-top:70px}.report-output .print-report-head:before{left:0;top:0}
  .report-controls .grid2,.report-controls .cards{grid-template-columns:1fr!important}
  input,select,textarea,button{font-size:16px}
}
@media print{
  .report-output .print-report-head{padding-left:85px!important;min-height:62px!important}
  .report-output .print-report-head:before{width:70px!important;height:50px!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .report-output:after{content:"Side " counter(page);position:fixed;bottom:4mm;right:8mm;font-size:10px;color:#000}
}
