/* LGF Client Portal styling (PHP-only portal)
 *
 * Goal: match the main site visual language without inheriting the marketing
 * site's fixed nav / long-scroll layout.
 */

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --text-white: #f8fafc;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.08);
  --nav: #092145;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1360px;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  background: radial-gradient(1200px 700px at 20% 0%, rgba(59,130,246,0.12), transparent 55%),
              linear-gradient(180deg, #ffffff, #f7fbff);
}

.portal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  background: var(--nav);
  color: var(--text-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.portal-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
  min-width: 0;
}

.portal-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.portal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.portal-brand-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-nav a {
  color: rgba(248, 250, 252, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 140ms ease, color 140ms ease;
}

.portal-nav a:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-white);
}

.portal-nav a.is-active {
  background: rgba(59, 130, 246, 0.20);
  color: var(--text-white);
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.16);
  margin-left: 6px;
}

.portal-nav-btn,
button.portal-nav-btn {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  color: var(--text-white);
  font-weight: 800;
}

.portal-nav-btn:hover,
button.portal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--text-white);
  transform: translateY(-1px);
}

.portal-nav-btn:active,
button.portal-nav-btn:active {
  transform: translateY(0px);
}

.portal-user-email {
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.78);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-main {
  flex: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  padding: 26px 20px 40px;
}

.portal-title {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.portal-subtitle {
  margin: 0 0 18px;
  color: var(--text-light);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }

@media (max-width: 960px) {
  .col-6, .col-4, .col-3 { grid-column: span 12; }
  .portal-user-email { display: none; }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 10px 30px var(--shadow);
  padding: 18px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.muted { color: var(--text-light); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(59,130,246,0.12);
  color: var(--primary);
  border: 1px solid rgba(59,130,246,0.18);
}

.pill.bad {
  background: rgba(176,0,32,0.10);
  border-color: rgba(176,0,32,0.18);
  color: #7a0015;
}

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.0);
  background: var(--accent);
  color: var(--text-white);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.20);
}

.btn[disabled], button.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn:active { transform: translateY(0px); }

.btn.secondary, button.btn.secondary {
  background: rgba(15, 23, 42, 0.0);
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.03);
  box-shadow: none;
  color: var(--primary);
}

.btn.secondary:hover {
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.25);
  color: var(--primary);
}

.btn.danger, button.btn.danger {
  background: #b00020;
  box-shadow: 0 10px 22px rgba(176, 0, 32, 0.18);
}

.btn.danger:hover { background: #c81234; }

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

code {
  background: rgba(15, 23, 42, 0.06);
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  word-break: break-word;
}

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

select, input[type="text"], input[type="email"], textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  min-width: 240px;
}

textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
}

table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid rgba(226,232,240,0.8); padding: 10px 8px; text-align: left; }
th { color: var(--text-light); font-size: 0.86rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }

.portal-footer {
  color: var(--text-light);
  padding: 16px 20px 26px;
  text-align: center;
  font-size: 0.86rem;
}
