/* ===================================================================
   AM Water Services — shared styles for all forms
   Form-specific styles (e.g. timesheet table) live inside each form.
   =================================================================== */

:root {
  --navy: #1f3864;
  --navy-dark: #18305a;
  --navy-soft: #98b3e0;
  --field-blue: #e8eef7;
  --field-blue-focus: #d8e3f1;
  --field-border: #c8d3e3;
  --grid-line: #9aa6b8;
  --text: #1a1a1a;
  --page-bg: #ffffff;
  --error: #b53a2b;
  --success: #1e7d3a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: "Calibri", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
}

a { color: var(--navy); }

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px 40px;
  background: #fff;
}

/* ---------- Header (logo + submit button) ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.logo {
  height: 78px;
  width: auto;
  display: block;
}

.submit-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.5px;
  padding: 12px 36px;
  border: none;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(31,56,100,0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  transform: translateY(30px);
}
.submit-btn:active { transform: translateY(31px); }
.submit-btn:hover {
  background: var(--navy-dark);
  transform: translateY(27px);
}
.submit-btn:focus-visible {
  outline: 3px solid var(--navy-soft);
  outline-offset: 2px;
}
.submit-btn[disabled] {
  cursor: progress;
  opacity: 0.7;
  transform: translateY(30px) !important;
}

/* ---------- Identity-style label + dashed input rows ---------- */
.identity {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 560px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-row label {
  font-weight: 700;
  min-width: 60px;
}

.dashed-input {
  flex: 1;
  border: none;
  background: var(--field-blue);
  padding: 4px 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  height: 26px;
}
.dashed-input:focus { background: var(--field-blue-focus); }

/* ---------- Submit feedback (toast + invalid-field outline) ---------- */
.field-error {
  outline: 2px solid var(--error);
  outline-offset: 1px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--navy);
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }

/* ---------- PDF render mode (applied just before snapshot) ---------- */
body.pdf-mode .submit-btn,
body.pdf-mode .toast,
body.pdf-mode .mobile-only { display: none !important; }
body.pdf-mode .page { padding: 16px 20px !important; }

/* ---------- Mobile shared overrides ---------- */
@media (max-width: 900px) {
  .page { padding: 16px; margin: 0; box-shadow: none; }
  .header { flex-direction: row; align-items: center; gap: 16px; }
  .logo { height: 50px; }
  .submit-btn { padding: 10px 24px; font-size: 14px; }
}
