/* ════════════════════════════════════════════════════
   index.css  —  стилі форми працівника (index.html)
   ════════════════════════════════════════════════════ */

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; }

/* ── Login ── */
#login-screen {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo .icon { font-size: 40px; margin-bottom: 8px; }
.login-logo h1    { font-size: 20px; font-weight: 700; color: var(--text); }
.login-logo p     { font-size: 13px; color: var(--muted); margin-top: 4px; }
.login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.login-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-field input {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s;
}
.login-field input:focus { outline: none; border-color: var(--primary); }
.login-error {
  color: var(--error);
  font-size: 12px;
  margin-bottom: 10px;
  display: none;
}
.btn-login {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-login:hover  { background: var(--primary-hover); }
.btn-login:active { transform: scale(0.98); }

/* ── Error screen ── */
#error-screen {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 24px;
}
.err-icon { font-size: 56px; }

/* ── App screen ── */
#app-screen {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 90px;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-avatar { font-size: 26px; flex-shrink: 0; }
.header-info   { flex: 1; }
.header-title  { font-size: 15px; font-weight: 700; line-height: 1.2; }
.header-sub    { font-size: 12px; opacity: 0.8; }
.btn-logout {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-logout:active { background: rgba(255,255,255,0.25); }

/* ── Form wrap ── */
.form-wrap {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Section card ── */
.section-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.section-header {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.section-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Field overrides for mobile form ── */
.section-body .field label {
  font-size: 11px;
}
.section-body .field input,
.section-body .field select,
.section-body .field textarea {
  padding: 9px 12px;
  font-size: 16px; /* prevents iOS zoom */
}
.section-body .field textarea {
  min-height: 88px;
  resize: vertical;
}

/* ── Bottom bar ── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  z-index: 100;
}
.btn-submit {
  flex: 1;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn-submit:hover    { background: var(--primary-hover); }
.btn-submit:active   { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-clear {
  padding: 0 16px;
  background: #f1f5f9;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-clear:active { background: #e2e8f0; }

/* ── Telegram main button override ── */
@media (max-width: 600px) {
  .section-body { padding: 12px; }
}
