/* app.css — shared styles for dashboard, login, etc. */

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

/* ---------- Light theme (default) ---------- */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --primary: #2563eb;
  --primary-2: #1e40af;
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  --border: #e5e7eb;

  --input-bg: #ffffff;
  --input-border: #d1d5db;
  color-scheme: light;
}

/* ---------- Optional dark theme via .theme-dark on <body> ---------- */
body.theme-dark {
  --bg: #0b0c10;
  --card: #121317;
  --muted: #8b8e98;
  --text: #e8eaed;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --danger: #ef4444;
  --ok: #10b981;
  --warn: #f59e0b;
  --border: #22242b;

  --input-bg: #0f1116;
  --input-border: var(--border);
  color-scheme: dark;
}

/* ---------- Global ---------- */
body { background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 32px auto; padding: 0 16px; }
.header { display:flex; align-items:center; gap:12px; margin-bottom: 18px; }
.header h1 { margin:0; font-size: 22px; font-weight: 700; }
.header .spacer { flex: 1; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  background: var(--primary); color: #fff; border:0; border-radius:10px;
  padding: 10px 14px; cursor:pointer; font-weight:600;
}
.btn:hover { background: #000; color: #fff; }

.btn-ghost {
  background: transparent; color: var(--text); border:1px solid var(--border);
  border-radius:10px; padding: 10px 14px; cursor:pointer; font-weight:600;
}
.btn-ghost:hover { border-color: var(--muted); }

.icon { width:16px; height:16px; display:inline-block; vertical-align:middle; }

/* ---------- Forms ---------- */
.input, input[type="text"], input[type="email"], input[type="password"], select, textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
}
.input::placeholder { color: var(--muted); }
.form-row { display:flex; gap:12px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table { 
    width: 100%; 
    border-collapse: collapse; 
    border-radius: 10px; 
    overflow: hidden; 
}
.table thead th {
  text-align:left; font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing: .04em; color: var(--muted);
  background: #f3f4f6; padding:12px; border-bottom:1px solid var(--border);
}
body.theme-dark .table thead th { background: #101219; }
.table tbody td {
  padding: 12px; border-bottom:1px solid var(--border);
  vertical-align: middle;
}
.table thead th:not(:nth-child(3)) { white-space: nowrap; }
.table tbody td:not(:nth-child(3)) { white-space: nowrap; }

.table tbody tr:hover { background: rgba(0,0,0,.03); }
body.theme-dark .table tbody tr:hover { background: #0e1117; }

/* ---------- Badges / Status ---------- */
.id-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: var(--input-bg); border:1px solid var(--input-border); padding: 4px 8px; border-radius: 8px;
  display:inline-flex; gap:8px; align-items:center;
  white-space: nowrap; 
}

.status {
  font-weight:600; padding:4px 8px; border-radius: 999px; font-size:12px;
  display:inline-block; border:1px solid var(--border);
}
.status.paused   { color:#a16207; background: rgba(234,179,8,.15); }
.status.active  { color:#047857; background: rgba(16,185,129,.15); }
.status.finished{ color:#475569; background: rgba(148,163,184,.18); }

/* ---------- Action buttons ---------- */
.actions { display:flex; gap:8px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn {
  background: transparent; border:1px solid var(--border); color: var(--text);
  padding:8px; border-radius:8px; cursor:pointer;
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Toolbar / Search ---------- */
.toolbar { display:flex; gap:10px; align-items:center; margin-bottom: 12px; }
.muted   { color: var(--muted); }

/* ---------- Pagination ---------- */
.pagination { display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top: 12px; }
.page {
  padding:6px 10px; border:1px solid var(--border); border-radius:8px; color: var(--text);
}
.page.active { background: var(--primary); border-color: var(--primary); color:#fff; }
.page:hover  { border-color: var(--muted); }

/* ---------- Login Page Helpers ---------- */
.center-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.login-card h1 { margin: 0 0 12px; font-size: 22px; }
.login-card .hint { color: var(--muted); margin-bottom: 16px; font-size: 13px; }
.login-card .row { display: grid; gap: 8px; margin-bottom: 12px; }
.login-card label { font-size: 12px; color: var(--muted); }
.login-card .actions { justify-content: flex-end; }

/* ---------- Reset & Global Landing Page ---------- */
body.theme-clinmap {
    --bg-main: #021a19;
    --bg-gradient: radial-gradient(circle at 15% 25%, #0e3d3b 0%, #021a19 100%);
    --text-color: #ffffff;
    --accent: #e65b2d;
    --accent-invert: #ffffff;
    --logo-sub-color: #a5d1cf;
    --btn-text-base: #ffffff;
    --btn-text-hover: #e65b2d;
}

body.theme-withpatients {
    --bg-main: #424A56;
    --bg-gradient: radial-gradient(circle at 15% 25%, #6a778d 0%, #424A56 100%);
    --text-color: #ffffff;
    --accent: #EACA9A;
    --accent-invert: #000000;
    --logo-sub-color: #EACA9A;
    --btn-text-base: #000000;
    --btn-text-hover: #EACA9A;
}

body.landing-page {
    background-color: var(--bg-main);
    background-image: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh; overflow: hidden; position: relative;
}

#raysCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.navbar, .hero-section { position: relative; z-index: 10; }

/* ---------- Navbar ---------- */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 40px 8%; }
.logo-text { display: flex; flex-direction: column; font-weight: 800; line-height: 0.85; }
.logo-main { font-size: 28px; letter-spacing: -1px; }
.logo-sub { color: var(--logo-sub-color); }
.nav-links { display: flex; align-items: center; gap: 30px; }

.nav-link-simple {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    transition: transform 0.3s ease;
}
.nav-link-simple:hover { transform: scale(1.1); text-decoration: underline; }

/* ---------- Sliding Invert Buttons ---------- */
.btn-login, .btn-cta {
    display: inline-flex; align-items: center; gap: 10px;
    border: none;
    font-weight: 700; text-transform: uppercase; text-decoration: none; cursor: pointer;
    background-size: 200% 100%;
    background-position: right bottom;
    background-image: linear-gradient(to right, var(--accent-invert) 50%, var(--accent) 50%);
    color: var(--btn-text-base) !important;
    transition: background-position 0.5s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, background-position, color;
}

.btn-login { padding: 12px 26px; border-radius: 25px; font-size: 13px; }
.btn-cta { padding: 18px 42px; border-radius: 35px; font-size: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

.icon-svg { width: 18px; height: 18px; }

.btn-login:hover, .btn-cta:hover {
    background-position: left bottom;
    color: var(--btn-text-hover) !important;
    transform: scale(1.08);
}

/* ---------- Hero ---------- */
.hero-section { display: flex; align-items: center; justify-content: space-between; padding: 60px 8%; max-width: 1400px; margin: 0 auto; height: calc(100vh - 150px); }
.hero-content { flex: 1.2; }
.hero-title { font-size: clamp(40px, 6vw, 80px); font-weight: 700; line-height: 1.1; margin-bottom: 30px; }
.hero-description { border-left: 3px solid var(--accent); padding-left: 20px; margin-bottom: 40px; font-size: 18px; color: #e5eef0; }
.hero-visual { flex: 0.8; display: flex; justify-content: flex-end; }

/* ---------- Images ---------- */
.floating-image { 
    width: 100%; 
    max-width: 400px; 
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.3)); 
    animation: floatEffect 6s ease-in-out infinite; 
}

/* Neu: Statische Klasse ohne Animation */
.static-image { 
    width: 100%; 
    max-width: 400px; 
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.3)); 
    animation: none; 
}

@keyframes floatEffect { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-20px); } 
}

/* =========================================================
   PORTAL (LOGGED-IN AREA) — ADDED STYLES (safe-scoped)
   ========================================================= */

/* Ensure portal pages use the same themed background variables */
body.portal-page {
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  color: var(--text-color);
  min-height: 100vh;
}

/* Portal content spacing under fixed header (header height differs mobile/desktop) */
body.portal-page .portal-content {
  padding-top: 96px; /* desktop header space */
  padding-bottom: 28px;
}

@media (max-width: 768px) {
  body.portal-page .portal-content {
    padding-top: 130px; /* mobile header stacks */
  }
}

/* Fixed topbar: fully opaque black */
body.portal-page .portal-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #000;
  z-index: 9999;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

body.portal-page .portal-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 8%;
  display: flex;
  align-items: center;
  gap: 18px;
}

body.portal-page .portal-brand-link {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}

body.portal-page .portal-brand .logo-main {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

body.portal-page .portal-brand .logo-sub {
  color: var(--logo-sub-color);
}

/* Nav links: white, active/hover uses accent */
body.portal-page .portal-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 6px;
}

body.portal-page .portal-link {
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 10px;
  border-radius: 10px;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

body.portal-page .portal-link:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

body.portal-page .portal-link.active {
  color: var(--accent);
  background: rgba(255,255,255,0.08);
}

/* Logout icon button */
body.portal-page .portal-logout {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

body.portal-page .portal-logout svg {
  width: 20px;
  height: 20px;
}

body.portal-page .portal-logout:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  color: var(--accent);
}

/* Portal headings should be white */
body.portal-page .header h1 { color: #fff; }

/* Cards in portal: glass style */
body.portal-page .card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

body.portal-page .muted { color: rgba(255,255,255,0.65); }

/* Buttons on portal: keep existing but ensure readable */
body.portal-page .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
body.portal-page .btn-ghost:hover {
  border-color: rgba(255,255,255,0.28);
}

/* Tiles grid */
body.portal-page .portal-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

body.portal-page .portal-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  color: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.portal-page .portal-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}

body.portal-page .portal-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.12);
  flex: 0 0 44px;
}

body.portal-page .portal-tile-icon svg {
  width: 22px;
  height: 22px;
  opacity: 0.95;
}

body.portal-page .portal-tile-title {
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

body.portal-page .portal-tile-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.68);
}

/* Responsive: 2 columns then 1 */
@media (max-width: 980px) {
  body.portal-page .portal-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.portal-page .portal-topbar-inner {
    padding: 16px 6%;
    flex-wrap: wrap;
    gap: 10px 12px;
  }
  body.portal-page .portal-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  body.portal-page .portal-logout {
    position: absolute;
    right: 6%;
    top: 12px;
  }
  body.portal-page .portal-tiles {
    grid-template-columns: 1fr;
  }
}

/* Tables on portal */
body.portal-page .table thead th {
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
body.portal-page .table tbody td {
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
body.portal-page .table tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

/* Inputs on portal */
body.portal-page .input,
body.portal-page input[type="text"],
body.portal-page input[type="email"],
body.portal-page input[type="password"],
body.portal-page select,
body.portal-page textarea {
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}
body.portal-page .input::placeholder { color: rgba(255,255,255,0.5); }

/* =========================================================
   LANDING PAGE (index.php) — MOBILE FIXED BACKGROUND + CENTER NAV
   ========================================================= */

/* Make background layer truly fixed (also on mobile) */
body.landing-page {
  /* override existing background on the body itself */
  background: none !important;
}

/* Fixed gradient layer behind everything */
body.landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  z-index: 0;
}

/* Rays canvas must be fixed too, so it doesn't scroll away */
body.landing-page #raysCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Keep actual content above background + rays */
body.landing-page .navbar,
body.landing-page .hero-section {
  position: relative;
  z-index: 10;
}

/* Mobile layout: logo top, then centered Register + Login in one row */
@media (max-width: 768px) {
  body.landing-page {
    overflow-y: auto; /* allow scrolling if content is taller */
    -webkit-overflow-scrolling: touch;
  }

  body.landing-page .navbar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px 6%;
  }

  body.landing-page .logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  body.landing-page .nav-links {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center; /* vertical centering */
    gap: 26px;          /* spacing between Register and Login */
	margin-top: 26px;
    flex-wrap: nowrap;  /* keep them in one row */
  }
}

/* =========================================================
   LANDING PAGE (index.php) — MOBILE: HIDE IMAGE, FULL TEXT
   ========================================================= */

@media (max-width: 768px) {

  /* Hide hero image completely on mobile */
  body.landing-page .hero-visual {
    display: none;
  }

  /* Let text take full width */
  body.landing-page .hero-content {
    flex: 1 1 100%;
    max-width: 100%;
  }

  /* Remove desktop spacing assumptions */
  body.landing-page .hero-section {
    justify-content: flex-start;
  }

  /* Optional: tighten typography slightly for mobile */
  body.landing-page .hero-title {
    font-size: clamp(34px, 9vw, 46px);
  }

  body.landing-page .hero-description {
    font-size: 16px;
  }
}

/* =========================================================
   LANDING PAGE (index.php) — MOBILE: CENTER CTA BUTTON
   ========================================================= */

@media (max-width: 768px) {

  /* Center CTA button horizontally */
  body.landing-page .hero-actions {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  body.landing-page .hero-actions .btn-cta {
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================================================
   PORTAL — UI POLISH (requested)
   ========================================================= */

/* Primary action buttons (e.g. "Open Survey Creator") */
body.portal-page .btn {
  background: var(--accent);
  color: var(--accent-invert);
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
body.portal-page .btn:hover {
  background: var(--accent);
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Pagination: active uses accent */
body.portal-page .page {
  color: rgba(255,255,255,0.88);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}
body.portal-page .page:hover {
  border-color: rgba(255,255,255,0.25);
}
body.portal-page .page.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-invert);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* Toolbar readability */
body.portal-page .toolbar {
  gap: 12px;
}
body.portal-page .toolbar .muted {
  color: rgba(255,255,255,0.60);
}
body.portal-page .form-row {
  align-items: center;
}

/* Table readability & contrast */
body.portal-page .table thead th {
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  letter-spacing: .06em;
}
body.portal-page .table tbody td {
  color: rgba(255,255,255,0.88);
}
body.portal-page .table tbody tr:hover {
  background: rgba(255,255,255,0.06);
}

/* Icon action buttons: clearer, nicer */
body.portal-page .icon-btn {
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
body.portal-page .icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.28);
  color: var(--accent);
}

/* =========================================================
   PORTAL — FIX ID BADGE READABILITY + STATUS COLORS (requested)
   ========================================================= */

/* Copyable ID badge: make it readable on dark/glass portal */
body.portal-page .id-badge {
  background: rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
}

/* Ensure the ID text inside is readable too */
body.portal-page .id-badge,
body.portal-page .id-badge * {
  color: rgba(255,255,255,0.92);
}

/* Status badges: nicer + role-based colors (supports English + German labels) */
body.portal-page .status {
  border-color: rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.28);
  color: rgba(255,255,255,0.88);
  padding: 5px 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* Entwurf (yellow-ish) — if your backend outputs this as class */
body.portal-page .status.paused {
  color: #fff3c4;
  background: rgba(217, 119, 6, 0.22);
  border-color: rgba(217, 119, 6, 0.38);
}

/* Active as green too */
body.portal-page .status.active {
  color: #c8ffe8;
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.38);
}

/* Archived muted */
body.portal-page .status.finished {
  color: rgba(255,255,255,0.65);
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.26);
}

/* =========================================================
   MODAL / LIGHTBOX (Other survey settings) — ADDED (necessary)
   ========================================================= */

body.modal-open { overflow: hidden; }

.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #000; /* fully black */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10000;
}

.modal {
  width: min(720px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  margin-left: auto;
}

.modal-body {
  padding: 14px;
}

/* form layout inside modal */
.modal .form-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 12px;
  align-items: center;
}
.modal .form-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.modal .form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.modal .help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

body.portal-page .modal {
  background: #383838;
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

body.portal-page .modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

body.portal-page .modal-title {
  color: rgba(255,255,255,0.92);
}

body.portal-page .modal .help,
body.portal-page .modal .form-grid label {
  color: rgba(255,255,255,0.70);
}

/* inputs in modal on portal */
body.portal-page .modal .input,
body.portal-page .modal input[type="text"] {
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
}

@media (max-width: 640px) {
  .modal .form-grid {
    grid-template-columns: 1fr;
  }
}
