/* EPIC Field Photo Uploader - Light theme */
* { box-sizing: border-box; }

html, body { height: 100%; }

/* LOCK HORIZONTAL FLOAT / DRIFT */
html {
  overflow-x: hidden;
}
body {
  margin: 0;
  overflow-x: hidden;          /* prevents sideways drift */
  max-width: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
  background:
    radial-gradient(900px 520px at 18% 0%, rgba(31,111,214,0.08), transparent 58%),
    radial-gradient(900px 520px at 85% 10%, rgba(42,168,118,0.08), transparent 60%),
    radial-gradient(900px 520px at 60% 110%, rgba(242,201,76,0.10), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Also ensures no child element can cause sideways overflow */
img, svg, canvas, video {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: 560px;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.logo {
  display: block;
  max-width: 300px;
  width: 100%;
  height: auto;
}

.card {
  background: #ffffff;
  border: 1px solid #e6e9ee;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 28px;
}

.title {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.desc {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #5f6b7a;
}

.bullets {
  margin: 0 0 22px;
  padding-left: 18px;
  color: #5f6b7a;
  font-size: 14px;
}

.bullets li { margin: 6px 0; }

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 750;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, #1f6fd6, #2aa876);
  box-shadow: 0 10px 18px rgba(31,111,214,0.18);
}

.btn-primary:active { transform: translateY(1px); }

.helper {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #5f6b7a;
}

.footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #8a94a6;
}

.link {
  color: #1f6fd6;
  text-decoration: none;
}

.link:hover { text-decoration: underline; }

/* =========================================================
   Field Assist – Home Menu & Logout (ADD ONLY)
   ========================================================= */

/* Stacked action menu (post-login) */
.menu {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.btn-menu {
  width: 100%;
  border: 1px solid #e6e9ee;
  background: #ffffff;
  color: #1f2937;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn-menu:active {
  transform: translateY(1px);
}

.btn-menu .hint {
  font-size: 12px;
  font-weight: 700;
  color: #1f6fd6; /* EPIC blue */
  white-space: nowrap;
}

/* Helper text below menu */
.menu-note {
  margin-top: 12px;
  font-size: 13px;
  color: #5f6b7a;
  text-align: center;
}

/* =========================================================
   Field Assist – Stable auth stage (prevents menu/button shift)
   ========================================================= */

/* Keeps a stable vertical block while auth resolves */
.auth-stage {
  position: relative;
  width: 100%;
  min-height: 420px; /* enough to hold the signed-in menu without reflow */
}

/* Panes overlay each other; we only fade/toggle visibility */
.auth-pane {
  position: absolute;
  inset: 0;
  width: 100%;
}

/* Default visibility helpers */
.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.is-shown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 160ms ease;
}

/* Fallback utility (kept for other pages) */
.hidden {
  display: none !important;
}

/* =========================================================
   Field Assist – Global Home Button (ADD ONLY)
   ========================================================= */

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Keep a.btn-home consistent with layout.css if both are loaded */
.btn-home,
a.btn-home {
  box-sizing: border-box;
  border: 1px solid #e6e9ee;
  background: #ffffff;
  color: #1f6fd6; /* EPIC blue */
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

.btn-home:active,
a.btn-home:active {
  transform: translateY(1px);
}

/* =========================================================
   Field Assist – Global Logout Placement (ADD ONLY)
   ========================================================= */

.logout-zone {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #eef1f5;
  display: flex;
  justify-content: center;
}

/* Logout button – small, centered, secondary */
.btn-logout {
  background: transparent;
  border: 1px solid #1f6fd6; /* EPIC blue */
  color: #1f6fd6;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.btn-logout:active {
  transform: translateY(1px);
}
