/* ═══════════════════════════════════════════════
   ABORN POWERS — auth.css
   Login page, settings panel, user display
   ═══════════════════════════════════════════════ */

/* ── Login Page (full-screen overlay) ── */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #F7F7F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.auth-card-header {
  background: #1E1E1E;
  padding: 32px 36px 28px;
  text-align: center;
}

.auth-logo {
  height: 36px;
  margin-bottom: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.auth-gold-bar {
  width: 40px;
  height: 3px;
  background: #E8B800;
  margin: 0 auto 14px;
  border-radius: 2px;
}

.auth-card-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.auth-card-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.auth-card-body {
  padding: 28px 36px 32px;
}

.auth-tab-row {
  display: flex;
  background: #F7F7F5;
  border-radius: 6px;
  padding: 2px;
  margin-bottom: 22px;
  gap: 2px;
}

.auth-tab {
  flex: 1;
  padding: 7px;
  border: none;
  background: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}

.auth-tab.active {
  background: white;
  color: #1E1E1E;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.auth-field {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #E2E2DE;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #1E1E1E;
  background: #F7F7F5;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #E8B800;
  background: white;
}

.auth-input.error {
  border-color: #c0392b;
  background: #fdecea;
}

.auth-error {
  font-size: 11.5px;
  color: #c0392b;
  margin-top: 6px;
  display: none;
  background: #fdecea;
  padding: 8px 10px;
  border-radius: 5px;
  border-left: 3px solid #c0392b;
}

.auth-error.visible { display: block; }

.auth-success {
  font-size: 11.5px;
  color: #27ae60;
  margin-top: 6px;
  display: none;
  background: #eafaf1;
  padding: 8px 10px;
  border-radius: 5px;
  border-left: 3px solid #27ae60;
}

.auth-success.visible { display: block; }

.auth-submit-btn {
  width: 100%;
  padding: 11px;
  background: #1E1E1E;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  margin-top: 6px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover { background: #000; }
.auth-submit-btn:disabled { background: #aaa; cursor: not-allowed; }

.auth-forgot {
  text-align: center;
  margin-top: 14px;
}

.auth-forgot button {
  background: none;
  border: none;
  color: #888;
  font-size: 11.5px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-decoration: underline;
}

.auth-forgot button:hover { color: #1E1E1E; }

/* Set Password / Reset form */
.auth-set-password-notice {
  background: #FFFBEA;
  border: 1px solid #E8B800;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: #555;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Toolbar User Display ── */
.toolbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.toolbar-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #E8B800;
  color: #1E1E1E;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.toolbar-user-avatar:hover { opacity: 0.85; }

.toolbar-user-email {
  font-size: 11px;
  color: #888;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Settings Panel ── */
#panel-settings {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.settings-section {
  margin-bottom: 28px;
}

.settings-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #E2E2DE;
}

/* Current user card */
.settings-user-card {
  background: #F7F7F5;
  border: 1px solid #E2E2DE;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1E1E1E;
  color: #E8B800;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-user-info { flex: 1; min-width: 0; }

.settings-user-email {
  font-size: 12px;
  font-weight: 600;
  color: #1E1E1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-user-role {
  font-size: 10.5px;
  color: #888;
  margin-top: 2px;
}

/* Invite form */
.settings-invite-row {
  display: flex;
  gap: 6px;
}

.settings-invite-input {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid #E2E2DE;
  border-radius: 5px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  color: #1E1E1E;
  background: #F7F7F5;
  outline: none;
}

.settings-invite-input:focus {
  border-color: #E8B800;
  background: white;
}

.settings-invite-btn {
  padding: 8px 12px;
  background: #E8B800;
  color: #1E1E1E;
  border: none;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  transition: background 0.15s;
}

.settings-invite-btn:hover { background: #d4a700; }
.settings-invite-btn:disabled { background: #ccc; cursor: not-allowed; }

.settings-invite-feedback {
  font-size: 11px;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  display: none;
}

.settings-invite-feedback.success {
  display: block;
  background: #eafaf1;
  color: #27ae60;
  border-left: 3px solid #27ae60;
}

.settings-invite-feedback.error {
  display: block;
  background: #fdecea;
  color: #c0392b;
  border-left: 3px solid #c0392b;
}

/* Team member list */
.settings-team-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #F7F7F5;
  border: 1px solid #E2E2DE;
  border-radius: 6px;
}

.settings-member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E2E2DE;
  color: #555;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-member-info { flex: 1; min-width: 0; }

.settings-member-email {
  font-size: 11.5px;
  font-weight: 500;
  color: #1E1E1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-member-status {
  font-size: 10px;
  color: #888;
  margin-top: 1px;
}

.settings-member-you {
  font-size: 9.5px;
  font-weight: 700;
  color: #E8B800;
  background: #1E1E1E;
  padding: 2px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

.settings-loading {
  font-size: 11.5px;
  color: #bbb;
  font-style: italic;
  padding: 8px 0;
}

/* Settings tab in sidebar */
#tab-settings {
  position: relative;
}

/* Sign out button */
.settings-signout-btn {
  width: 100%;
  padding: 9px;
  background: #F7F7F5;
  color: #c0392b;
  border: 1.5px solid #f5c6c2;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.settings-signout-btn:hover {
  background: #fdecea;
  border-color: #c0392b;
}

/* Loading overlay shown while checking auth */
#auth-loading {
  position: fixed;
  inset: 0;
  background: #F7F7F5;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.auth-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E2E2DE;
  border-top-color: #E8B800;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-loading-text {
  font-size: 12px;
  color: #aaa;
  font-family: 'Inter', sans-serif;
}
