/* Smart Communication Systems — Crew Portal */

.portal-body {
  margin: 0;
  min-height: 100vh;
  background: #eef2f7;
  color: var(--navy);
  font-family: var(--body);
}

.portal-body--auth {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, #0d3568 100%);
}

.portal-preview-banner {
  background: #b45309;
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 12px;
}

.portal-viewas-banner {
  background: #1d4ed8;
  color: #fff;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 12px;
}

.portal-viewas-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.portal-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.portal-header {
  background: var(--navy-dark);
  border-bottom: 1px solid var(--border-dark);
}

.portal-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 10px 0;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.portal-brand img {
  height: 48px;
  width: auto;
}

.portal-header__user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
}

.portal-header__user a {
  color: #fff;
  font-weight: 700;
}

.portal-tabs-wrap {
  padding-top: 18px;
}

.portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid #d7e2ec;
  border-radius: 14px;
  background: #fff;
}

.portal-tabs__link {
  padding: 10px 16px;
  border-radius: 10px;
  color: #5c7388;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.portal-tabs__link:hover,
.portal-tabs__link.is-active {
  background: #eef4fb;
  color: var(--navy);
}

.portal-main {
  padding: 28px 0 56px;
}

.portal-card {
  background: #fff;
  border: 1px solid rgba(15, 40, 80, 0.08);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
}

.portal-card h1,
.portal-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  letter-spacing: 0.02em;
}

.portal-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.portal-intro {
  margin: 0 0 18px;
  color: #445;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-badge--green {
  background: #dcfce7;
  color: #166534;
}

.portal-badge--red {
  background: #fee2e2;
  color: #991b1b;
}

.portal-badge--pending_review,
.portal-badge--pending {
  background: #ffedd5;
  color: #9a3412;
}

.portal-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 40, 80, 0.06);
}

.portal-checklist li:last-child {
  border-bottom: 0;
}

.portal-rules-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #334;
  display: grid;
  gap: 10px;
}

.portal-rules-list li {
  line-height: 1.45;
}

.portal-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 2px;
}

.portal-check--ok {
  background: #16a34a;
}

.portal-check--bad {
  background: #dc2626;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-field.full {
  grid-column: 1 / -1;
}

.portal-field label {
  font-size: 0.84rem;
  font-weight: 700;
}

.portal-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #667;
  line-height: 1.4;
}

.portal-field input,
.portal-field select,
.portal-field textarea {
  border: 1px solid rgba(15, 40, 80, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.portal-field-hint {
  margin: 8px 0 0;
  color: #667;
  font-size: 0.92rem;
  line-height: 1.4;
}

.portal-upload-status {
  margin: 14px 0 0;
  font-weight: 700;
  color: var(--navy, #0f2850);
}

.portal-button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--red, #e60910);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
}

.portal-button--ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(15, 40, 80, 0.2);
}

.portal-alert {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 600;
}

.portal-alert--success {
  background: #dcfce7;
  color: #166534;
}

.portal-alert--error,
.portal-alert {
  background: #fee2e2;
  color: #991b1b;
}

.portal-alert--success.portal-alert,
.portal-alert.portal-alert--success {
  background: #dcfce7;
  color: #166534;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(15, 40, 80, 0.08);
  vertical-align: top;
  font-size: 0.92rem;
}

.portal-auth {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.portal-auth .portal-card {
  width: min(440px, 100%);
}

.portal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.portal-photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  background: #ddd;
}

.portal-photo-grid figcaption {
  font-size: 0.8rem;
  margin-top: 6px;
  line-height: 1.35;
  color: #334155;
}

.portal-photo-when {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.72rem;
}

.portal-period-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e8f1fb;
  border: 1px solid #c5daf3;
}

.portal-period-banner__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d4f91;
}

.portal-period-banner__dates {
  font-weight: 600;
  color: #0f2744;
}

.portal-photo-period--current {
  border-color: #9ec0e8;
  box-shadow: 0 0 0 1px rgba(29, 79, 145, 0.08);
}

.portal-photo-period__summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.portal-photo-period__summary::-webkit-details-marker {
  display: none;
}

.portal-photo-period__folder {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.4rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.portal-photo-period[open] .portal-photo-period__folder {
  margin-top: 0.55rem;
  transform: rotate(45deg);
}

.portal-photo-period--current .portal-photo-period__folder {
  border-color: #1d4f91;
}

.portal-photo-period__summary-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.portal-photo-period__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d4f91;
}

.portal-photo-period:not(.portal-photo-period--current) .portal-photo-period__eyebrow {
  color: #64748b;
}

.portal-photo-period__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: inherit;
}

.portal-photo-period__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.portal-photo-period[open] .portal-photo-grid {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .portal-form-grid {
    grid-template-columns: 1fr;
  }
  .portal-header__inner {
    align-items: flex-start;
  }
}
