/* ===================================================================
   Web-only styles: authentication screen, project/member management
   =================================================================== */

/* ---------- Boot splash (shown while the session is restored) ---------- */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #0f4fa8) 55%, #0a2f6b 100%);
  color: #fff;
}

.boot-logo {
  width: 62px;
  height: 62px;
  margin-bottom: 6px;
  color: #fff;
  opacity: 0.95;
  animation: boot-pulse 1.6s ease-in-out infinite;
}

.boot-logo svg {
  width: 100%;
  height: 100%;
}

.boot-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.boot-message {
  font-size: 13px;
  opacity: 0.82;
}

@keyframes boot-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- Authentication screen ---------- */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #0f4fa8) 55%, #0a2f6b 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-primary);
  border-radius: 14px;
  padding: 36px 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  color: var(--primary);
}

.auth-logo svg {
  width: 100%;
  height: 100%;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--text-primary);
}

.auth-subtitle {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-card .form-group {
  text-align: left;
  margin-bottom: 14px;
}

.auth-card .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

.auth-error {
  display: none;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--danger-bg, #fdecec);
  color: var(--danger);
  font-size: 13px;
  text-align: left;
}

.auth-error:not(:empty) {
  display: block;
}

.auth-info {
  display: none;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--success-bg, #e8f6ee);
  color: var(--success, #1a7f4b);
  font-size: 13px;
  text-align: left;
}

.auth-info:not(:empty) {
  display: block;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  font-size: 15px;
}

.auth-switch {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.auth-switch:hover {
  text-decoration: underline;
}

.auth-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-tertiary);
}

/* ---------- Sidebar user footer ---------- */
.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sidebar-footer .sidebar-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ---------- Project / member management ---------- */
.project-card-actions {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.role-owner {
  background: var(--primary-bg, #e8f1fd);
  color: var(--primary);
}

.role-editor {
  background: var(--success-bg, #e8f6ee);
  color: var(--success, #1a7f4b);
}

.role-viewer {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.member-list {
  width: 100%;
  border-collapse: collapse;
}

.member-list th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-primary);
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member-list td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-primary);
  font-size: 14px;
  vertical-align: middle;
}

.member-email {
  color: var(--text-secondary);
  font-size: 12px;
}

.member-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.member-select {
  padding: 5px 8px;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
}

/* ---------- Misc ---------- */
.readonly-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
}

@media print {
  .auth-screen,
  .sidebar-footer,
  #refreshBtn,
  #signOutBtn {
    display: none !important;
  }
}
