/* PSQI UI/UX styles */
.psqi-form, .psqi-result{
  max-width: 820px;
  margin: 24px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  font-family: "Prompt", "Segoe UI", Tahoma, sans-serif;
  color: #222;
}
.psqi-form h3{
  margin: 18px 0 10px;
  font-size: 20px;
  color: #0f172a;
}
.psqi-fieldrow{
  margin: 14px 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
}
.psqi-fieldrow label{
  display:block;
  font-weight:600;
  margin-bottom:8px;
}
.psqi-fieldrow input[type="time"],
.psqi-fieldrow input[type="number"],
.psqi-fieldrow input[type="text"]{
  width: 100%;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd8e3;
  background: #fff;
  font-size: 15px;
}
.psqi-options{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:6px;
}
.psqi-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  transition: all .2s ease-in-out;
  cursor:pointer;
}
.psqi-option:hover{ background:#f0f7ff; border-color:#0073aa; }
.psqi-btn{
  display:inline-block;
  padding:12px 22px;
  background: linear-gradient(90deg, #0073aa, #0ea5e9);
  color:#fff!important;
  border:none;
  border-radius: 28px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  transition:transform .06s ease;
  margin-top:12px;
}
.psqi-btn:hover{ transform: translateY(-1px); }

.psqi-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-radius:14px;
  border-left:10px solid #22c55e;
  background:#f0fdf4;
  margin:12px 0 18px;
}
.psqi-summary.psqi-poor{ border-left-color:#f59e0b; background:#fffbeb; }
.psqi-summary.psqi-verypoor{ border-left-color:#ef4444; background:#fef2f2; }
.psqi-global{ font-size:18px; font-weight:700; }
.psqi-interpret{ font-size:16px; }

.psqi-grid{
  display:grid;
  grid-template-columns: repeat( auto-fit, minmax(160px, 1fr) );
  gap:12px;
  margin-top:14px;
}
.psqi-card{
  background:#f8fafc;
  border:1px solid #e5e9f0;
  border-radius:14px;
  padding:14px;
  text-align:center;
}
.psqi-card span{ display:block; font-weight:700; color:#64748b; margin-bottom:6px; }
.psqi-card strong{ font-size:22px; }
.psqi-card em{ display:block; margin-top:6px; font-style:normal; color:#475569; font-size:13px; }

.psqi-extra{
  margin-top:14px;
  padding:12px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  border-radius:12px;
  font-size:14px;
  color:#334155;
}

.psqi-note, .psqi-disclaimer{
  font-size:12px;
  color:#64748b;
  margin-top:10px;
}
@media (max-width: 520px){
  .psqi-summary{ flex-direction:column; align-items:flex-start; gap:6px; }
}