/* NavXSim institute portal */
:root {
  --navy: #05122B;
  --navy-2: #0a2550;
  --blue: #0057FF;
  --cyan: #00C8FF;
  --grad: linear-gradient(135deg, #0057FF 0%, #00C8FF 100%);
  --ink: #0f1b33;
  --muted: #64708a;
  --line: #e3e9f4;
  --bg: #f3f6fc;
  --card: #ffffff;
  --ok: #0f9d6b;
  --warn: #b7791f;
  --danger: #d64545;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Open Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 15px; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: 'Montserrat', sans-serif; line-height: 1.2; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
main { flex: 1; }
.p-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.p-main { padding-top: 32px; padding-bottom: 56px; width: 100%; }
.p-muted { color: var(--muted); }
.p-small { font-size: .82rem; }

/* Top bar */
.p-topbar { background: var(--navy); border-bottom: 1px solid rgba(0,200,255,.15); position: sticky; top: 0; z-index: 10; }
.p-topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.p-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-family: 'Montserrat'; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.p-brand:hover { text-decoration: none; }
.p-brand img { height: 34px; width: auto; }
.p-brand span { color: var(--cyan); border-left: 1px solid rgba(255,255,255,.2); padding-left: 12px; }
.p-nav { display: flex; gap: 4px; flex: 1; }
.p-nav a { color: #c5d0e0; font-weight: 600; font-size: .88rem; padding: 8px 14px; border-radius: 8px; }
.p-nav a:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.p-nav a.on { color: #fff; background: rgba(0,200,255,.14); }
.p-user { display: flex; align-items: center; gap: 14px; font-size: .82rem; }
.p-user-email { color: #8fa3c4; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-user a, .p-user button { color: #c5d0e0; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.p-user a:hover, .p-user button:hover { color: #fff; text-decoration: underline; }

/* Headings */
.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.p-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.p-eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.p-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; color: var(--navy); }
.p-lead { color: var(--muted); margin: 8px 0 22px; }
.p-section-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 4px 0 16px; }
.p-form .p-section-title:not(:first-of-type) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.p-narrow { max-width: 620px; }

/* First-run steps */
.p-steps { list-style: none; display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.p-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); }
.p-steps li span { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.p-steps li.on { color: var(--navy); border-color: rgba(0,88,255,.35); box-shadow: 0 0 0 3px rgba(0,88,255,.08); }
.p-steps li.on span { background: var(--grad); color: #fff; }

/* Buttons */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font: 600 .88rem 'Open Sans', sans-serif; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s; white-space: nowrap; }
.p-btn:hover { border-color: var(--blue); text-decoration: none; }
.p-btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(0,88,255,.28); }
.p-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,88,255,.36); border-color: transparent; }
.p-btn-danger { color: var(--danger); border-color: #f2c9c9; }
.p-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.p-btn-block { width: 100%; padding: 13px; }
.p-link { font-size: .88rem; font-weight: 600; }

/* Cards */
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 1px 2px rgba(5,18,43,.04); margin-bottom: 22px; }
.p-card-flush { padding: 0; overflow-x: auto; }
.p-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.p-card:not(.p-card-flush) .p-card-head { margin: -26px -26px 0; }
.p-card-head h2 { font-size: 1rem; color: var(--navy); }
.p-empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.p-empty p { margin-bottom: 16px; }
.p-empty strong { color: var(--navy); }

/* Stats */
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.p-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.p-stat span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.p-stat strong { display: block; font-family: 'Montserrat'; font-size: 1.9rem; font-weight: 800; color: var(--navy); margin-top: 4px; }
.p-stat:first-child { background: linear-gradient(160deg, var(--navy), var(--navy-2)); border-color: transparent; }
.p-stat:first-child span { color: #8fa3c4; }
.p-stat:first-child strong { color: #fff; }


/* Tables */
.p-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.p-table th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 22px; background: #f8faff; border-bottom: 1px solid var(--line); }
.p-table td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-table tbody tr:last-child td { border-bottom: 0; }
.p-table tbody tr:hover { background: #fafcff; }
.p-actions { text-align: right; white-space: nowrap; }
.p-card:not(.p-card-flush) .p-table { margin: 0 -26px -26px; width: calc(100% + 52px); }

.p-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.p-badge-not_started { background: #eef1f7; color: #56627a; }
.p-badge-in_progress { background: #fff3d6; color: #8a5a00; }
.p-badge-completed { background: #dcf5ea; color: #0b7a52; }
.p-badge-off { background: #fde4e4; color: #a12c2c; }

/* Filters */
.p-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.p-filters input[type=search] { flex: 1; min-width: 220px; }

/* Forms */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 9px; font: inherit; font-size: .92rem; color: var(--ink); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,88,255,.1); }
.p-filters select { width: auto; }
.p-field { display: block; margin-bottom: 16px; border: 0; min-width: 0; }
.p-field > span { display: block; font-size: .8rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.p-field > span b { color: var(--danger); }
.p-field > span em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.p-field.has-error input, .p-field.has-error select, .p-field.has-error textarea { border-color: var(--danger); }
.p-error { display: block; color: var(--danger); font-size: .78rem; font-weight: 600; margin-top: 5px; }
.p-grid-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.p-grid-gap { gap: 22px; }
.p-grid-gap > .p-card { margin-bottom: 0; }
.p-grid-gap { margin-bottom: 22px; }
.p-span-2 { grid-column: 1 / -1; }
.p-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.p-push-right { margin-left: auto; }
.p-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin: 4px 0 14px; cursor: pointer; }
.p-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.p-segment { display: flex; gap: 8px; flex-wrap: wrap; }
.p-segment label { position: relative; cursor: pointer; }
.p-segment input { position: absolute; opacity: 0; pointer-events: none; }
.p-segment span { display: inline-block; padding: 9px 18px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--navy); transition: all .2s; }
.p-segment label:hover span { border-color: var(--blue); }
.p-segment input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.p-segment input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0,88,255,.25); }
.p-inline-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.p-inline-form .p-check { margin: 0; }
.p-inline-form input[type=text] { max-width: 320px; }

/* Alerts */
.p-alert { padding: 12px 16px; border-radius: 10px; font-size: .88rem; font-weight: 600; margin-bottom: 18px; }
.p-alert-success { background: #dcf5ea; color: #0b6b48; border: 1px solid #a9e3c9; }
.p-alert-error { background: #fde8e8; color: #9b2626; border: 1px solid #f5bcbc; }


.p-set-password { margin-top: 14px; }
.p-set-password > summary { list-style: none; display: inline-flex; }
.p-set-password > summary::-webkit-details-marker { display: none; }
.p-set-password[open] > summary { border-color: var(--blue); }
.p-set-password form { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafcff; }
.p-dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: .9rem; }
.p-dl dt { color: var(--muted); font-weight: 600; }
.p-dl dd { word-break: break-word; }

.p-danger-zone { margin-top: 8px; border: 1px solid #f2c9c9; border-radius: 14px; padding: 16px 20px; background: #fff; }
.p-danger-zone summary { cursor: pointer; font-weight: 700; color: var(--danger); font-size: .9rem; }
.p-danger-zone p { font-size: .88rem; color: var(--muted); margin-top: 12px; }

/* Auth pages */
.portal-bare { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.p-auth-logo { height: 52px; width: auto; margin-bottom: 36px; }
.p-auth-card { background: #fff; border-radius: 20px; padding: 36px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.p-auth-card h2 { font-size: 1.5rem; color: var(--navy); margin-bottom: 6px; }
.p-auth-card > .p-muted { margin-bottom: 22px; font-size: .9rem; }
.p-auth-card .p-small { margin-top: 18px; text-align: center; }

.p-footer { text-align: center; font-size: .78rem; color: var(--muted); padding: 20px; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 900px) {
  .p-topbar-inner { height: auto; flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; padding-bottom: 8px; }
  .p-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .p-user { margin-left: auto; }
  .p-user-email { display: none; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  /* Tables become stacked cards */
  .p-table thead { display: none; }
  .p-table, .p-table tbody, .p-table tr, .p-table td { display: block; width: 100%; }
  .p-card:not(.p-card-flush) .p-table { margin: 0; width: 100%; }
  .p-table tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .p-table td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
  .p-table td::before { content: attr(data-label); font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
  .p-table td.p-actions { display: block; text-align: left; padding-top: 8px; }
  .p-table td.p-actions::before { content: none; }
  .p-table tbody tr:hover { background: none; }
  .p-table td > .p-badge { justify-self: start; }
}
@media (max-width: 480px) {
  .p-brand span { display: none; }
  .p-topbar-inner { gap: 6px 12px; }
}
@media (max-width: 640px) {
  .p-wrap { padding: 0 16px; }
  .p-main { padding-top: 22px; }
  .p-grid-2 { grid-template-columns: 1fr; }
  .p-card { padding: 20px 18px; }
  .p-card:not(.p-card-flush) .p-card-head { margin: -20px -18px 0; }
  .p-auth-card { padding: 26px 20px; }
  .p-push-right { margin-left: 0; }
  .p-dl { grid-template-columns: 1fr; gap: 2px; }
  .p-dl dd { margin-bottom: 8px; }
}

/* Login: Radar video on the left, sign-in on the right */
.p-login-page { background: #f3f6fc; }
.p-login-page .p-footer { display: none; }
.p-login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.p-login-media { position: relative; overflow: hidden; background: #000; }
/* Full-bleed radar screenshot, framed on the radar circle (left of the image centre). */
.p-login-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 32% 50%; }
.p-login-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px 48px;
  background: linear-gradient(180deg, rgba(5,18,43,.85) 0%, rgba(5,18,43,.10) 22%, rgba(5,18,43,0) 50%, rgba(5,18,43,.55) 70%, rgba(5,18,43,.95) 100%); }
.p-login-overlay .p-auth-logo { height: 46px; margin: 0; }
.p-login-copy h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 800; margin: 14px 0 10px; }
.p-login-copy h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-login-copy p { color: #c5d0e0; max-width: 460px; font-size: 1rem; }
.p-login-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan);
  background: rgba(0,200,255,.12); border: 1px solid rgba(0,200,255,.35); padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(6px); }
.p-login-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.p-login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px; }
.p-login-panel .p-auth-card { width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(5,18,43,.10); border: 1px solid var(--line); }
.p-login-foot { margin-top: 28px; font-size: .78rem; color: var(--muted); }
.p-login-mobile-head { display: none; }
@media (max-width: 900px) {
  /* No video on phones/tablets: compact branded header above the sign-in card */
  .p-login { grid-template-columns: 1fr; min-height: 100vh; }
  .p-login-media { display: none; }
  .p-login-page { background: linear-gradient(180deg, var(--navy) 0, var(--navy-2) 230px, #f3f6fc 230px); }
  .p-login-panel { justify-content: flex-start; padding: 28px 16px 32px; }
  .p-login-mobile-head { display: block; width: 100%; max-width: 420px; margin-bottom: 22px; }
  .p-login-mobile-head img { height: 38px; width: auto; }
  .p-login-mobile-head h1 { color: #fff; font-size: 1.7rem; font-weight: 800; margin-top: 18px; }
  .p-login-mobile-head h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
