﻿:root{
  --vi-orange:#ff3e17;
  --ink:#2a324b;
  --ink-87:rgba(0,0,0,.87);
  --ink-60:rgba(0,0,0,.6);
  --line-12:rgba(0,0,0,.12);

  --bg:#f0f0f0;
  --card-bg:#fff;
  --card-shadow:0 1px 2px rgba(0,0,0,.10);

  --header-h:56px;
  --container-max:918px;

  --input-h:62px;
  --input-radius:4px;
  --input-border:#d0d0d0;
  --input-hover:#2a324b;
  --input-focus:#000;
  --focus-ring:0 0 0 3px rgba(0,0,0,.08);

  --btn-h:40px;
  --btn-pill:999px;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:400 16px/24px Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

/* Pasek */
.appbar{
  height:var(--header-h);
  background:var(--vi-orange);
  color:#fff;
  display:flex;
  align-items:center;
  padding:0 24px 0 65px;
}
.brand{
  display:flex;
  align-items:center;
  gap:8px;
}
.brand .logo{
  height:27px;
  width:auto;
  display:block;
}
.brand-sub{
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #fff;
}

/* Layout */
.container{
  max-width:var(--container-max);
  margin:24px auto 40px;
  padding:0 16px;
}
@media (max-width: 960px){
  .container{max-width:100%;}
}

/* Panel - OSTRE ROGI */
.panel{
  background:#fff;
  border:0;
  border-radius:0; /* Ostre rogi */
  box-shadow:0 1px 2px rgba(0,0,0,.10);
  margin:0 0 30px;
  overflow:hidden;
}
.panel-header{
  padding:0;
  background:#fff;
  border-bottom:1px solid rgb(229,231,235);
}
.panel-header h1{
  margin:24px 24px 12px;
  color:#000;
  font-family:Inter, sans-serif;
  font-weight:500;
  font-size:24px;
  line-height:32px;
}
.card-body{
  padding:16px 24px 24px;
}

/* Wrapper */
.form-wrapper{
  margin-top:0;
  padding:24px;
  border:1px solid #dedede;
  border-radius:8px;
  display:flex;
  flex-direction:column;
}

/* Grid */
.form-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

/* Desktop grid */
@media (min-width:860px){
  .form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:
      "serial    install"
      "mac       ski"
      "eu        herstell"
      "ssid      haslo"
      "wpa2      actions";
  }

  .field-serialnummer { grid-area: serial; }
  .field-macAdresse   { grid-area: mac; }
  .field-euId         { grid-area: eu; }
  .field-ssid         { grid-area: ssid; }
  .field-wpa2Schussel { grid-area: wpa2; }

  .field-installCode  { grid-area: install; }
  .field-ski          { grid-area: ski; }
  .field-herstellDatum{ grid-area: herstell; }
  .field-haslo        { grid-area: haslo; }

  .field-actions      { grid-area: actions; }
}

/* Field */
.form-field{
  position:relative;
}

/* Input */
.form-field input[type="text"]{
  height:62px;
  width:100%;
  background:#fff;
  color:rgba(0,0,0,0.87);
  border:1px solid rgb(208,208,208);
  border-radius:4px;

  padding-top:26px;
  padding-bottom:10px;
  padding-left:12px;
  padding-right:32px;

  font-family:Inter, sans-serif;
  font-size:16px;
  font-weight:400;

  caret-color:#000;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.form-field input[type="text"]::placeholder{
  color:transparent;
}
.form-field input[type="text"]:hover{
  border-color:var(--input-hover);
}
.form-field input[type="text"]:focus{
  outline:0;
  border-color:var(--input-focus);
  box-shadow:inset 0 0 0 1px var(--input-focus), var(--focus-ring);
  background:#fff;
}
.form-field input[type="text"].is-invalid{
  border-color:#dd1313 !important;
  box-shadow:inset 0 0 0 1px #dd1313, 0 0 0 3px rgba(221,19,19,.10);
}

/* Label */
.form-field label{
  position:absolute;
  left:12px;
  top:18px;
  font-size:16px;
  color: rgb(118,123,145);
  background:#fff;
  padding:0 4px;
  pointer-events:none;

  transition:
    top .18s ease,
    font-size .18s ease,
    color .18s ease,
    transform .18s ease;
}
.form-field input[type="text"]:focus + label,
.form-field input[type="text"]:not(:placeholder-shown) + label{
  top:4px;
  font-size:12px;
  transform:translateY(-2px);
}

/* Actions */
.form-actions{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Button */
.vi-btn-primary{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 174px;
  height: 48px;
  padding: 0 24px;

  border-radius: 9999px;
  border: none;
  background: #000000;
  color: #ffffff;

  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;

  cursor: pointer;
  transition: background-color .15s, box-shadow .16s;
}
.vi-btn-primary:hover:not(:disabled):not(:active){
  background:#454545;
}
.vi-btn-primary:active:not(:disabled){
  background:#000000;
  box-shadow:0 8px 16px rgba(0,0,0,.30);
}
.vi-btn-primary:disabled{
  background: var(--bg);
  color:#858585;
  cursor:default;
}

/* PREVIEW */
#qr-wrap{ 
  margin-top:16px; 
  display:none; 
}

.preview{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:24px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.10);
  padding:24px;
  margin:0 0 30px;
}

#qr-code{
  padding:10px;
  border:1px dashed #e5e7eb;
  border-radius:6px;
}

/* Tekst obok QR */
#pdf-data{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  height:120px;
}

#pdf-data p{
  margin:0;
  font-size:14px;
  line-height:1;
}

/* PDF BUTTON */
.download-wrap {
  text-align: center;
  margin-top: 16px;
}

#downloadButton {
  display: none;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
#creator-left {
  position: fixed;
  left: 14px;
  bottom: 12px;

  color: var(--dsw-copyright-color);
  font-family: var(--dsw-font-family);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
}
#creator{
  position:fixed;
  right:14px;
  bottom:12px;

  color: var(--dsw-copyright-color);
  font-family: var(--dsw-font-family);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;;
}

/* --- ZAKŁADKI (TABS) - OSTRE PROSTOKĄTY --- */
.device-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px; /* Odstęp od formularza */
  padding: 0;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-60);
  padding: 10px 24px;
  cursor: pointer;
  
  border-radius: 0; /* <--- OSTRY PROSTOKĄT (brak zaokrągleń) */
  
  transition: all 0.2s ease;
  background-color: #f0f0f0; /* Tło nieaktywnego */
}

/* Stan aktywny - CZARNY (jak przycisk Generuj) */
.tab-btn.active {
  background: #000000; 
  color: #ffffff;      
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tab-btn:hover:not(.active) {
  background: #e0e0e0;
  color: var(--ink);
}