/* ============================================================
   洲明科技评估系统 - CloudBase 协作层专用样式
   覆盖：协作状态栏 / 登录弹层 / 同步 Toast / 状态指示器
   ============================================================ */

/* ── 顶部固定状态栏 ───────────────────────────────────────── */
.cb-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #1a2535;
  border-bottom: 1px solid #2c3e50;
  z-index: 1000;
}

.cb-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
  max-width: 1920px;
  margin: 0 auto;
}

/* ── 协作状态栏（旧版兼容）─────────────────────────────────── */
.cb-collaboration-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a2535;
  padding: 6px 20px;
  border-bottom: 1px solid #2c3e50;
  min-height: 36px;
  flex-wrap: wrap;
  gap: 8px;
}

.cb-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cb-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  font-size: 12px;
  color: #bdc3c7;
  background: transparent;
  border: 1px solid #34495e;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.cb-bar-btn:hover { background: #2c3e50; color: white; }

.cb-bar-logout {
  border-color: #c0392b55;
  color: #e74c3c;
}
.cb-bar-logout:hover { background: #c0392b22; color: #e74c3c; }

.cb-bar-user {
  font-size: 12px;
  color: #7f8c8d;
}

/* ── CloudBase 状态指示器 ────────────────────────────────── */
.cloudbase-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #95a5a6;
}

.status-indicator {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-success  { background: #2ecc71; box-shadow: 0 0 5px #2ecc71aa; animation: cb-pulse 2s infinite; }
.status-warning  { background: #f39c12; animation: cb-blink 1s infinite; }
.status-info     { background: #3498db; }
.status-error    { background: #e74c3c; }

@keyframes cb-pulse {
  0%, 100% { box-shadow: 0 0 4px #2ecc71aa; }
  50%       { box-shadow: 0 0 10px #2ecc7199; }
}
@keyframes cb-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.status-text  { color: #bdc3c7; }
.status-user  { color: #3498db; }
.status-time  { color: #636e72; }

/* ── 同步 Toast ──────────────────────────────────────────── */
.cb-sync-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a2535;
  color: #ecf0f1;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  border-left: 3px solid #2ecc71;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.cb-sync-toast.cb-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.cb-toast-icon { font-size: 15px; }

/* ── 登录弹层 ────────────────────────────────────────────── */
.cb-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s;
}

.cb-auth-overlay.cb-auth-hide {
  opacity: 0;
  pointer-events: none;
}

.cb-auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: cb-card-in 0.3s ease;
}

@keyframes cb-card-in {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.cb-auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.cb-auth-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.cb-auth-logo h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a2535;
  margin: 0 0 6px;
}

.cb-auth-subtitle {
  font-size: 13px;
  color: #95a5a6;
  margin: 0;
}

.cb-auth-tabs {
  display: flex;
  border-bottom: 2px solid #ecf0f1;
  margin-bottom: 24px;
}

.cb-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #95a5a6;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.cb-tab.active {
  color: #2980b9;
  border-bottom-color: #2980b9;
}

.cb-auth-panel { /* 面板内容 */ }

.cb-form-group {
  margin-bottom: 16px;
}

.cb-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.cb-form-group input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #dde4f0;
  border-radius: 8px;
  outline: none;
  transition: border 0.2s;
  box-sizing: border-box;
  color: #2c3e50;
}

.cb-form-group input:focus {
  border-color: #2980b9;
  box-shadow: 0 0 0 3px #2980b922;
}

.cb-form-error {
  font-size: 12px;
  color: #e74c3c;
  background: #fdf0f0;
  border: 1px solid #fadbd8;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.cb-btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2980b9, #1a6ff5);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
  letter-spacing: 2px;
}

.cb-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px #1a6ff544;
}

.cb-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cb-btn-outline {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #7f8c8d;
  background: transparent;
  border: 1.5px solid #dde4f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.cb-btn-outline:hover {
  border-color: #bdc3c7;
  color: #5d6d7e;
  background: #f8f9fa;
}

.cb-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #bdc3c7;
  font-size: 12px;
  margin: 14px 0;
}
.cb-auth-divider::before, .cb-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ecf0f1;
}

.cb-auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #ecf0f1;
}

.cb-auth-footer .cloudbase-status {
  justify-content: center;
}

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cb-auth-card {
    padding: 28px 20px 24px;
    border-radius: 12px;
    margin: 0 16px;
  }
  .cb-collaboration-bar {
    padding: 6px 12px;
  }
}
