
:root{
  --page-bg:#c9f3fd;
  --card-bg:#ffffff;
  --field-bg:#dfe8f4;
  --text:#000000;
  --muted:#000000;
  --border:#e5e7eb;

  --font-base:16px;
  --font-label:14px;
  --font-h1:35px;

  --top-title:75px;
  --top-subtitle:30px;
  --top-btn-text:25px;
  --top-btn-pad-y:10px;
  --top-btn-pad-x:10px;
  --top-icon:50px;
  --top-qr:200px;
}
*{ box-sizing:border-box; }
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:var(--page-bg);
  color:var(--text);
}
.wrap{
  max-width:1250px;
  margin:24px auto;
  padding:0 16px 28px;
}
header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
}
header img{ height:170px; width:auto; }
h1{ margin:0; font-size:var(--font-h1); }

.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:16px;
  row-gap:6px;
  margin-bottom:12px;
}
label{ display:block; font-size:var(--font-label); margin-bottom:6px; }

input, select, textarea{
  width:100%;
  padding:12px 14px;
  background:var(--field-bg);
  color:var(--text);
  border:1px solid #c7d4df;
  border-radius:10px;
  font-size:16px;
}
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:#6f8aa3;
  box-shadow:0 0 0 2px rgba(111,138,163,.16);
}
textarea{ min-height:64px; resize:vertical; }

#qrcode,
#qrcode2,
#qrcode3{
  margin-top:18px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:16px;
  display:inline-block;
  background:#fff;
}

.logo-row{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:10px;
}

.section-logo{
  height:170px;
  width:auto;
}

.logo-row h1{
  margin:0;
  font-size:35px;
}

.small{ font-size:14px; color:var(--muted); margin-top:10px; }

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:14px;
  white-space:pre-wrap;
  background:#f8fafc;
  border:1px solid var(--border);
  padding:10px;
  border-radius:10px;
}

button{
  margin-top:16px;
  padding:10px 16px;
  font-size:16px;
  border-radius:10px;
  border:0;
  cursor:pointer;
  background:#111827;
  color:#fff;
}
hr{ border:0; border-top:5px solid rgba(0,0,0,.12); margin:26px 0; }

details.acc{
  background:transparent;
  border:0;
  border-radius:18px;
  overflow:visible;
  margin:18px 0;
}
details.acc > summary{
  cursor:default;
  padding:14px 16px;
  font-weight:800;
  list-style:none;
}
details.acc > summary::-webkit-details-marker{ display:none; }
details.acc .acc-body{
  padding:20px;
  background:#f7fbfc;
  border:1px solid rgba(0,0,0,.10);
  border-radius:24px;
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.top-header{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  background:transparent;
  border:0;
  border-radius:0;
  padding:10px 0 18px;
  margin-bottom:10px;
}
.top-center{ text-align:center; min-width:0; }
.site-title{
  margin:0 0 4px;
  font-size:var(--top-title);
  line-height:1.05;
}
.site-subtitle{
  margin:2px 0 10px;
  font-size:var(--top-subtitle);
  color:#222;
}
.site-qr{
  height:var(--top-qr);
  width:auto;
  border:1px solid var(--border);
  border-radius:12px;
  padding:8px;
  background:#fff;
}
.quick-nav{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin:12px 0 0;
}
.quick-nav a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:var(--top-btn-pad-y) var(--top-btn-pad-x);
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  font-size:var(--top-btn-text);
}
.quick-nav a img{ height:var(--top-icon); width:auto; }

details.acc > summary{ pointer-events:none; cursor:default; }

hr{
  border:0;
  border-top:5px solid rgba(0,0,0,.12);
  margin:4px 0;
}

details.acc{
  margin:4px 0;
}

details.acc header{
  margin:0;
  padding:0;
}

details.acc h1{
  margin:0;
}

.logo-row{
  margin-bottom:4px;
}

.manual-footer {
  display: flex;
  justify-content: center;
}

.manual-footer a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #000;
}

.manual-footer img {
  width: 40px;
  height: auto;
}

.tabs-nav{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:14px;
  margin:10px 0 28px;
  padding:0 0 12px;
  border-bottom:2px solid #000000;
}
.tab-btn{
  margin-top:0;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 22px;
  background:#dff1f5;
  color:var(--text);
  border:2px solid #000;
  border-bottom:none;
  border-radius:14px 14px 0 0;
  font-weight:800;
  font-size:20px;
  cursor:pointer;
  box-shadow:2px 3px 6px rgba(0,0,0,.25);
  transition:all .2s ease;
}
.tab-btn:hover{
  background:#eef8fa;
  transform:translateY(-2px);
}
.tab-btn img{ height:38px; width:auto; }
.tab-btn.active{
  background:#ffffff;
  color:var(--text);
  position:relative;
  top:2px;
  box-shadow:3px 4px 8px rgba(0,0,0,.35);
}
.tab-btn.active img{ filter:none; }

.tab-panel{ display:none; }
.tab-panel.active, details.tab-panel[open]{ display:block; }

.wrap > hr,
.acc-body > hr,
#qr3d hr{
  display:none !important;
}

.panel-layout{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(280px,.9fr);
  gap:22px;
  align-items:start;
}
.panel-main{min-width:0;}
.panel-side{min-width:0;}
.preview-card{
  background:#eef5f7;
  border:1px solid rgba(0,0,0,.10);
  border-radius:22px;
  padding:18px;
  text-align:center;
  position:sticky;
  top:18px;
}
.preview-card h3{
  margin:0 0 12px;
  font-size:18px;
}
.preview-note{
  font-size:14px;
  color:#334155;
  margin-top:10px;
}
.preview-actions{margin-top:14px;}
.preview-actions button{margin-top:0;}
.preview-card .mono{margin-top:14px; text-align:left;}
.preview-card #qrcode,
.preview-card #qrcode2,
.preview-card #qrcode3{margin-top:0;}
.preview-empty{
  min-height:288px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#475569;
}
.form-stack{max-width:none;}
.form-stack .row{grid-template-columns:1fr; row-gap:8px; margin-bottom:14px;}
.form-stack textarea{min-height:92px;}

@media (max-width:950px){
  .panel-layout{grid-template-columns:1fr;}
  .preview-card{position:static;}
}

.form-stack{
  max-width:820px;
}
.form-stack .row{
  grid-template-columns:1fr;
  row-gap:8px;
  margin-bottom:14px;
}
.form-stack textarea{
  min-height:92px;
}

/* ===== MOBIL ===== */
@media (max-width:700px){

  .top-header{
    flex-direction:column;
    gap:10px;
    padding:8px 0 14px;
  }

  .site-qr{
    height:120px;
  }

  .site-title{
    font-size:42px;
    line-height:1.05;
  }

  .site-subtitle{
    font-size:18px;
    line-height:1.25;
    margin:4px 0 10px;
  }

  /* TOP FANER = under hinanden */
  .tabs-nav{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    margin:10px 0 18px !important;
    padding:0 0 10px !important;
  }

  .tab-btn{
    width:100% !important;
    min-width:0 !important;
    justify-content:center !important;
    padding:12px 14px !important;
    font-size:18px !important;
  }

  .tab-btn img{
    height:26px !important;
  }

  /* KUN WiFi */
  #wifi .logo-row{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    gap:10px !important;
  }

  #wifi .logo-row h1{
    font-size:24px !important;
    line-height:1.15 !important;
    margin:0 !important;
  }

  #wifi .section-logo{
    height:90px !important;
    width:auto !important;
  }

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

  /* KUN 3D */
  #qr3d .logo-row{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    gap:10px !important;
  }

  #qr3d .logo-row h1{
    font-size:24px !important;
    line-height:1.15 !important;
    margin:0 !important;
  }

  #qr3d .section-logo{
    height:90px !important;
    width:auto !important;
  }

  #qr3d .row,
  #qr3d .panel-layout,
  #qr3d .compare-grid,
  #qr3d .result-grid{
    grid-template-columns:1fr !important;
    row-gap:12px !important;
  }

  img{
    max-width:100%;
    height:auto;
  }
}


.contact-photo-wrap{
  margin-top:18px;
  padding:14px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  background:#eef5f7;
}
.contact-photo-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}
.contact-photo-toggle input{
  width:auto;
  margin:0;
}
.contact-photo-help{
  font-size:13px;
  color:#334155;
  line-height:1.45;
  margin-top:8px;
}
.contact-photo-link{
  font-weight:700;
}
.contact-photo-upload{
  margin-top:12px;
}
.contact-photo-preview{
  margin-top:12px;
  display:none;
  align-items:center;
  justify-content:center;
  width:120px;
  height:120px;
  border:1px solid #c7d4df;
  border-radius:18px;
  background:#fff;
  overflow:hidden;
}
.contact-photo-preview img{
  max-width:100%;
  max-height:100%;
  display:block;
}
@media (max-width:700px){
  .contact-photo-preview{
    width:100px;
    height:100px;
  }
}

.history-menu{
  position:absolute;
  z-index:1000;
  min-width:220px;
  max-width:min(520px,calc(100vw - 32px));
  background:#fff;
  border:1px solid #c7d4df;
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  padding:6px 0;
  display:none;
  overflow:hidden;
}
.history-item{
  padding:10px 14px;
  cursor:pointer;
  font-size:15px;
  line-height:1.35;
  word-break:break-word;
}
.history-item:hover,.history-item.active{background:#eef5ff;}

.nav-link{ text-decoration:none; }
.social-quick-links{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0 6px;}
.social-quick-link{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid #c7d4df;border-radius:12px;background:#fff;color:#000;text-decoration:none;font-weight:700;cursor:pointer;}
.social-quick-link:hover{background:#eef8fa;}
.social-quick-link span.icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;background:#dfe8f4;font-size:14px;font-weight:800;}
.social-helper{font-size:14px;color:#334155;margin:8px 0 12px;}
.footer-block{margin-top:10px;}


@media (max-width: 900px){
  .wrap{
    max-width:100%;
    margin:12px auto;
    padding:0 12px 24px;
  }
  .details, details.acc .acc-body{
    padding:16px;
  }
  .logo-row{
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:8px;
  }
  .logo-row h1{
    font-size:28px;
    line-height:1.15;
  }
  .section-logo{
    height:110px;
  }
  header{
    flex-direction:column;
    text-align:center;
  }
  header img{
    height:110px;
  }
}

@media (max-width: 700px){
  .wrap{ padding:0 10px 22px; }
  details.acc .acc-body{ padding:14px; }
  .site-title{ font-size:34px; }
  .site-subtitle{ font-size:15px; }
  .logo-row h1, header h1{ font-size:22px !important; }
  .section-logo, header img{ height:84px !important; }
  input, select, textarea, button{ font-size:16px; }
  .preview-empty{ min-height:220px; }
  .social-quick-links{ gap:8px; }
  .social-quick-link{ width:100%; justify-content:center; }
}


/* === Ens layout på alle sider === */
.wrap{
  max-width:1120px;
  margin:16px auto 24px;
  padding:0 18px 28px;
}
.acc-body{
  background:#eef3f4;
  border:1px solid rgba(0,0,0,.10);
  border-radius:26px;
  padding:28px;
}
.logo-row{
  margin-bottom:18px;
}
.panel-layout{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(280px,340px);
  gap:26px;
  align-items:start;
}
.panel-main,
.panel-side,
.contact-layout .panel-main{
  min-width:0;
}
.form-stack{
  max-width:none;
}
.preview-card{
  width:100%;
  min-height:420px;
}
.preview-empty{
  min-height:260px;
}
#qrcode3.preview-empty,
#qrcode2.preview-empty,
#qrcode.preview-empty{
  min-height:260px;
}
.contact-photo-wrap{
  margin-top:18px;
  width:100%;
}
.contact-photo-upload input[type="file"],
#contactImage{
  width:100%;
}
.social-helper{
  font-size:15px;
  font-weight:700;
  margin:0 0 12px;
}
.social-quick-links{
  margin:0 0 18px;
}
.social-quick-link{
  margin-top:0;
}
.footer-block,
.manual-footer,
.center-footer{
  width:100%;
}

@media (max-width: 900px){
  .wrap{
    max-width:100%;
    padding:0 14px 24px;
  }
  .acc-body{
    padding:20px;
  }
  .panel-layout{
    grid-template-columns:1fr;
    gap:18px;
  }
  .preview-card{
    min-height:0;
    position:static;
  }
}

@media (max-width: 700px){
  .wrap{
    padding:0 10px 20px;
  }
  .acc-body{
    padding:14px;
    border-radius:20px;
  }
  .panel-layout{
    grid-template-columns:1fr;
    gap:16px;
  }
  .panel-side{
    order:2;
  }
  .preview-card{
    padding:14px;
    border-radius:18px;
  }
  .preview-empty,
  #qrcode,
  #qrcode2,
  #qrcode3{
    min-height:220px;
  }
  .social-quick-link{
    width:100%;
    justify-content:center;
  }
}
