$primary: #1976d2;

.portal-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: $primary;
  color: white;
  flex-shrink: 0;
}

.portal-logo {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;

  button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: color 0.15s, border-bottom 0.15s;
    border-bottom: 2px solid transparent;

    &.active {
      color: white;
      border-bottom: 2px solid white;
    }

    &:hover:not(.active) {
      color: rgba(255, 255, 255, 0.9);
    }
  }
}

.portal-search {
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  margin-left: auto;
  min-width: 200px;
  outline: none;

  &:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
  }
}

.portal-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;

  h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
  }
}

.loading {
  text-align: center;
  padding: 32px;
  color: #999;
  font-size: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.portal-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;

  &:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  h4 {
    margin: 4px 0 8px;
    font-size: 15px;
    font-weight: 600;
  }
}

.card-type {
  font-size: 11px;
  text-transform: uppercase;
  color: $primary;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.card-space {
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.card-date {
  font-size: 12px;
  color: #999;
}

.empty {
  color: #888;
  font-size: 14px;
  grid-column: 1 / -1;
}

.placeholder-text {
  color: #888;
  font-size: 14px;
}

.portal-viewer {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;

  h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
  }
}

.back-btn {
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  background: white;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;

  &:hover {
    background: #f5f5f5;
  }
}

.doc-meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}

.doc-body {
  font-size: 15px;
  line-height: 1.6;
}

.doc-placeholder {
  color: #555;
  font-style: italic;
}
