/* ─────────────────────────────────────────────────────────────────────────────
   DAComply — early-access auth gate overlay (Phase 1)
   Additive only. Covers the app until the user is authenticated. Does not modify
   or depend on any existing app styles.
   ───────────────────────────────────────────────────────────────────────────── */

#dacAuthGate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #0d1526;
  background: radial-gradient(1200px 600px at 50% -10%, #16233d 0%, #0d1526 60%, #0a111f 100%);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #E4EAF4;
  overflow: auto;
}
#dacAuthGate[hidden] { display: none !important; }

/* Prevent the app underneath from scrolling while the gate is shown. */
body.dac-auth-locked { overflow: hidden; }

.dac-gate-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.dac-gate-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.dac-gate-brand img { height: 34px; width: auto; }

.dac-gate-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 4px;
  color: #F2F5FA;
}
.dac-gate-sub {
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
  color: #93A0B8;
  margin: 0 0 20px;
}

.dac-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.dac-field label { font-size: 11px; font-weight: 600; color: #93A0B8; }
.dac-field input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  color: #E4EAF4;
  outline: none;
  width: 100%;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.dac-field input::placeholder { color: #5f6b81; }
.dac-field input:focus {
  border-color: #DE9A1E;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(222, 154, 30, 0.16);
}

.dac-gate-btn {
  width: 100%;
  border: none;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  background: #DE9A1E;
  color: #131B2C;
  transition: filter .14s, opacity .14s;
  margin-top: 4px;
}
.dac-gate-btn:hover { filter: brightness(1.06); }
.dac-gate-btn:disabled { opacity: 0.6; cursor: default; }

.dac-gate-msg {
  font-size: 12px;
  line-height: 1.5;
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 13px;
  display: none;
}
.dac-gate-msg.show { display: block; }
.dac-gate-msg.error { background: rgba(220, 70, 70, 0.14); border: 1px solid rgba(220, 70, 70, 0.4); color: #F3B4B4; }
.dac-gate-msg.info  { background: rgba(222, 154, 30, 0.12); border: 1px solid rgba(222, 154, 30, 0.35); color: #F0D9A8; }

.dac-gate-toggle {
  text-align: center;
  font-size: 12px;
  color: #93A0B8;
  margin-top: 16px;
}
.dac-gate-toggle button {
  background: none;
  border: none;
  color: #DE9A1E;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
}
.dac-gate-toggle button:hover { text-decoration: underline; }

/* Sign-out sits in .header-actions as a normal flex item (not fixed/absolute). */
.header-actions:has(#dacSignOut) {
  gap: 9px;
  flex-wrap: nowrap;
  min-width: 0;
}

/* Landing nav: host created by auth-gate.js when .header-actions is absent. */
.nav-in > .header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#dacSignOut {
  position: static;
  z-index: auto;
  flex-shrink: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #C9D4E8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s;
}
#dacSignOut[hidden] { display: none !important; }
#dacSignOut:hover {
  color: #F2F5FA;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
}

.dac-signout-label-short { display: none; }

@media (max-width: 700px) {
  #dacSignOut {
    padding: 6px 10px;
    font-size: 11.5px;
  }
  .dac-signout-label { display: none; }
  .dac-signout-label-short { display: inline; }
}
