:root {
  --bg-app: #f4f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --accent-royal: #1a62d6;
  --accent-hover: #1551b5;
  --accent-gold: #ffc83b;
  --text-dark: #1e293b;
  --text-main: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  --success: #16a34a;
  --danger: #dc2626;
  --topbar-h: 58px;
  --nav-h: 68px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-app);
  background-image: radial-gradient(#e2e8f0 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* ========================================================
   SCHERMATA DI BLOCCO CON PASSWORD
======================================================== */
.lock-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-app);
  background-image: radial-gradient(#e2e8f0 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.lock-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.lock-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.lock-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.lock-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-wrap {
  position: relative;
  width: 100%;
}

.input-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 13px 44px 13px 14px;
  color: var(--text-dark);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.input-wrap input:focus {
  border-color: var(--accent-royal);
  box-shadow: 0 0 0 3px rgba(26, 98, 214, 0.15);
}

.btn-toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 17px;
  opacity: 0.7;
}

.btn-unlock {
  width: 100%;
  background: var(--accent-royal);
  border: none;
  border-radius: 10px;
  padding: 13px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 98, 214, 0.25);
  transition: all 0.15s;
}

.btn-unlock:hover {
  background: var(--accent-hover);
}

.btn-unlock:active {
  transform: scale(0.98);
}

.btn-unlock:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lock-msg {
  font-size: 13px;
  margin-top: 14px;
  min-height: 20px;
  font-weight: 600;
}

.lock-msg.error { color: var(--danger); }
.lock-msg.success { color: var(--success); }

.attempts-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

.shake {
  animation: shakeKey 0.4s ease;
}
@keyframes shakeKey {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
