/* Managed Gateway sign-in + signed-in shell styling (issue #85). */

.gateway-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  color: #6b7280;
  font: 15px/1.5 system-ui, -apple-system, sans-serif;
}

/* --- Sign-in screen --- */

.gateway-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f7f7f8;
  font: 15px/1.5 system-ui, -apple-system, sans-serif;
  color: #111827;
}

.gateway-card {
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 36px 32px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.gateway-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gateway-subtitle {
  margin: 4px 0 24px;
  color: #6b7280;
}

.gateway-magic-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gateway-magic-link input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

.gateway-magic-link input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.gateway-magic-link button,
.gateway-oauth button {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.gateway-magic-link button {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.gateway-magic-link button:disabled {
  opacity: 0.6;
  cursor: default;
}

.gateway-oauth button:hover {
  background: #f9fafb;
}

.gateway-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #9ca3af;
  font-size: 13px;
}

.gateway-divider::before,
.gateway-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.gateway-oauth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gateway-sent {
  margin: 0;
  padding: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #065f46;
}

.gateway-error {
  margin: 16px 0 0;
  color: #b91c1c;
  font-size: 13px;
}

/* --- Signed-in shell --- */

.gateway-shell {
  font: 15px/1.5 system-ui, -apple-system, sans-serif;
  color: #111827;
}

.gateway-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.gateway-shell-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gateway-shell-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-size: 14px;
}

.gateway-shell-user button {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.gateway-shell-user button:hover {
  background: #f9fafb;
}

.gateway-shell-body {
  padding: 24px 20px;
}

.gateway-shell-empty {
  color: #6b7280;
}

/* --- Minimal Project opener (seed for PRD C) --- */

.gateway-opener-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gateway-opener-form input {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  min-width: 280px;
}

.gateway-opener-form button {
  padding: 8px 14px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.gateway-opener-status {
  font-size: 13px;
  text-transform: capitalize;
  color: #6b7280;
}

.gateway-status-live {
  color: #059669;
}

.gateway-status-reconnecting {
  color: #d97706;
}

.gateway-status-denied {
  color: #b91c1c;
}

.gateway-opener-doc {
  width: 100%;
  height: calc(100vh - 160px);
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

/* --- PRD C: Workspace control surface (switcher, project list, members) --- */
.gateway-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gateway-workspace-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.gateway-switcher {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
}

.gateway-switcher select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  min-width: 240px;
}

.gateway-workspace-bar > button {
  padding: 8px 14px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.gateway-workspace-bar > button:disabled {
  opacity: 0.5;
  cursor: default;
}

.gateway-projects h2,
.gateway-members h2 {
  font-size: 15px;
  margin: 0 0 8px;
}

.gateway-empty {
  color: #9ca3af;
  font-size: 14px;
}

.gateway-project-list,
.gateway-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gateway-project-list li,
.gateway-member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.gateway-project-list button,
.gateway-member-actions button,
.gateway-invite button {
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.gateway-member-actions {
  display: flex;
  gap: 8px;
}

.gateway-invite {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.gateway-invite input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

.gateway-notice {
  color: #059669;
  font-size: 13px;
}
