/* ====== WRAPPER ====== */
.htpasswd-box {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
  font-family: 'Inter', Arial, sans-serif;
}

/* ====== TYPO ====== */
.htpasswd-box h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
  margin:0;
}

.htpasswd-box .desc {
  text-align: center;
  color: #6b7280;
  margin-bottom: 30px;
  font-size: 15px;
}

.htpasswd-box .desc strong {
  color: #2563eb;
}

/* ====== GRID ====== */
.htpasswd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ====== INPUTS ====== */
.htpasswd-box label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.htpasswd-box input,
.htpasswd-box select,
.htpasswd-box textarea {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 15px;
  background: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* focus */
.htpasswd-box input:focus,
.htpasswd-box select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* textarea wynik */
.htpasswd-result-wrap textarea {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-family: monospace;
  resize: none;
}

/* ====== AUTOFILL FIX (WAŻNE) ====== */
input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  -webkit-text-fill-color: #000 !important;
}

/* ====== BUTTONS ====== */
.htpasswd-actions {
  margin-bottom: 20px;
}

.htpasswd-btn {
  padding: 14px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* główny */
.htpasswd-btn-main {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  width:100%;
}

.htpasswd-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.25);
}

/* kopiuj */
.htpasswd-btn-copy {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #111827;
  min-width: 110px;
}

.htpasswd-btn-copy:hover {
  background: #e2e8f0;
}

/* ====== RESULT WRAP ====== */
.htpasswd-result-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.htpasswd-result-wrap textarea {
  flex: 1;
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {

  .htpasswd-box {
    padding: 25px;
  }

  .htpasswd-grid {
    grid-template-columns: 1fr;
  }

  .htpasswd-result-wrap {
    flex-direction: column;
  }

  .htpasswd-btn-copy {
    width: 100%;
  }

}


/* layout 2 kolumny */
.htpasswd-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: center;
}

/* obrazek */
.htpasswd-image {
  text-align: center;
}

.htpasswd-image img {
  max-width: 100%;
  height: auto;
}

/* prawa strona */
.htpasswd-form {
  width: 100%;
}

/* mobile */
@media (max-width: 900px) {
  .htpasswd-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .htpasswd-image {
    margin-bottom: 20px;
  }
}


#htpasswd-result {
  background: #0f172a;
  color: #22c55e;
  font-family: monospace;
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.htpasswd-btn-main {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  width:100%;
}

.htpasswd-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

.htpasswd-btn-main::before {
  content: "⚡ ";
}