/* Sign-in screen and gated-page chrome for antonuccio.com.
   Palette follows the public splash page: deep blue gradient, white type,
   #5dbbeb as the single accent. */

:root {
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --ink-faint: rgba(255, 255, 255, 0.55);
  --accent: #5dbbeb;
  --accent-deep: #3b9fd1;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-edge: rgba(255, 255, 255, 0.16);
  --danger: #ff8a8a;
  --ok: #7fd8a4;
}

body.portal {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a3a52 0%, #2b5a7a 50%, #3b9fd1 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--ink);
  margin: 0;
}

/* ---------- Sign-in ---------- */

.signin-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.signin-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.signin-card .brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.signin-card .brand img {
  height: 84px;
  width: auto;
}

.signin-card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  text-align: center;
}

.signin-card .lede {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
  margin: 0 0 1.75rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--panel-edge);
  background: rgba(0, 0, 0, 0.18);
  color: var(--ink);
  font-size: 1rem;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(93, 187, 235, 0.22);
}

.field select option {
  background: #1a3a52;
  color: #ffffff;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent-deep);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--panel-edge);
}

.btn.danger {
  background: rgba(255, 90, 90, 0.22);
  border: 1px solid rgba(255, 138, 138, 0.5);
}

.btn.inline {
  width: auto;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.link-row {
  display: flex;
  justify-content: space-between;
  margin-top: 1.1rem;
  font-size: 0.88rem;
}

.link-row a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

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

/* Remember me. Deliberately below the fields and above the button, where the
   consequence is read before the commitment. */
.checkline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: -0.35rem 0 1.1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.checkline input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkline:hover { color: var(--ink); }

.form-error {
  color: var(--danger);
  font-size: 0.88rem;
  min-height: 1.2em;
  margin: 0.5rem 0 0;
}

.notice {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  border: 1px solid var(--panel-edge);
  background: rgba(0, 0, 0, 0.2);
}

.notice.error { border-color: rgba(255, 138, 138, 0.5); color: var(--danger); }
.notice.ok { border-color: rgba(127, 216, 164, 0.5); color: var(--ok); }

.hidden { display: none !important; }

/* ---------- Gated page chrome ---------- */

.portal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.5rem;
  background: rgba(26, 58, 82, 0.96);
  border-bottom: 1px solid rgba(93, 187, 235, 0.28);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.portal-nav .home {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.portal-nav .home img { height: 44px; width: auto; }

.portal-nav ul {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  flex-wrap: wrap;
}

.portal-nav ul a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.portal-nav ul a:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.portal-nav ul a.active { background: rgba(59, 159, 209, 0.42); color: var(--ink); }

.portal-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.role-chip {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--panel-edge);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.75rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.role-chip.admin { border-color: var(--accent); color: var(--accent); }

/* Admin-only preview switcher, immediately right of Sign out. */
.role-view {
  appearance: none;
  padding: 0.35rem 1.7rem 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--panel-edge);
  background-color: rgba(0, 0, 0, 0.28);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' fill-opacity='0.65' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 9px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}

.role-view:hover { border-color: var(--accent); color: var(--ink); }
.role-view:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The menu itself is drawn by the OS, which ignores the dark theme. */
.role-view option { color: #14202c; background: #ffffff; }

/* Shown only while a preview is active, so the state is never a surprise. */
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding: 0.6rem 1.25rem;
  background: rgba(93, 187, 235, 0.16);
  border-bottom: 1px solid var(--accent);
  color: var(--ink);
  font-size: 0.85rem;
}

.portal-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.portal-main h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.portal-main .page-lede {
  color: var(--ink-soft);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

table.members {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.members th,
table.members td {
  text-align: left;
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: middle;
}

table.members th {
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.table-scroll { overflow-x: auto; }

.empty {
  color: var(--ink-faint);
  font-size: 0.95rem;
  padding: 1.5rem 0;
  text-align: center;
}

.gate-blocked {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .portal-nav { gap: 0.75rem; padding: 0.75rem 1rem; }
  .portal-user { width: 100%; justify-content: flex-start; }
  .portal-main { padding: 1.75rem 1rem 3rem; }
  .portal-main h1 { font-size: 1.6rem; }
}
