:root {
  /* GŁÓWNA PALETA APLIKACJI */
  --primary: #2563eb;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray: #64748b;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  
  /* KOLORY MODUŁÓW (Twoje dawne z GAS) */
  --c-pz: #16a34a;
  --c-wz: #2563eb;
  --c-zwr: #6c566b;
  --c-rel: #f57c00;
  --c-tsk: #d81b60;
  --c-pc: #333333;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: #0f172a;
  margin: 0;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* KONTENER RESPONSYWNY */
.container { width: 100%; max-width: 440px; transition: max-width 0.3s ease; }
@media (min-width: 768px) {
  .container { max-width: 900px; }
  .menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
}
@media (max-width: 767px) {
  .menu-grid { display: flex; flex-direction: column; gap: 10px; }
}

/* NAGŁÓWKI TYPOGRAFIA */
.sys-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sys-header-center { justify-content: center; flex-direction: column; }
.title-main { margin: 0; font-size: 1.5rem; font-weight: 900; color: var(--primary); letter-spacing: -0.5px; }
.subtitle { margin: 4px 0 15px 0; font-size: 0.85rem; color: var(--gray); font-weight: 600;}
.section-title { font-size: 0.85rem; font-weight: bold; color: var(--gray); margin: 20px 0 10px 5px; text-transform: uppercase; letter-spacing: 0.5px;}

/* ELEMENTY WSPÓLNE APLIKACJI */
.hidden { display: none !important; }
.view-section { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* MENU */
.menu-btn { display: flex; align-items: center; padding: 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.menu-btn:active { transform: scale(0.97); background: #f8fafc; }
.menu-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.2rem; margin-right: 15px; color: white; }
.menu-text { font-size: 1.1rem; font-weight: 700; flex: 1; text-align: left; }

/* PRZYCISKI AKCJI (Guziki modułowe) */
.btn-action { width: 100%; padding: 16px; border: none; border-radius: 8px; font-weight: bold; font-size: 1rem; cursor: pointer; margin-bottom: 10px; transition: opacity 0.1s; }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-action:active { opacity: 0.8; }

/* KLAWIATURA PIN I LISTA */
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-btn { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; font-size: 1rem; font-weight: 600; cursor: pointer; }
.badge { font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; background: #e2e8f0; color: var(--gray); font-weight: 700;}
.pin-display { display: flex; justify-content: center; gap: 12px; margin: 20px 0; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); background: #ffffff; }
.pin-dot.filled { background: var(--primary); border-color: var(--primary); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 15px; max-width: 350px; margin: 0 auto; }
.key-btn { height: 60px; font-size: 1.4rem; font-weight: 600; border-radius: 10px; border: 1px solid var(--border); background: #f8fafc; cursor: pointer; }
.key-btn:active { background: #e2e8f0; }
.error-msg { color: var(--danger); text-align: center; font-size: 0.85rem; font-weight: 600; min-height: 20px; margin-bottom: 8px; }