/* ========================================
   AUTH SESSION GATE
   ======================================== */

body.cc-auth-locked {
  overflow: hidden;
}

body.cc-auth-locked .app {
  filter: blur(1px);
  user-select: none;
  pointer-events: none;
}

.cc-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-auth);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.cc-auth-card {
  width: min(460px, 94vw);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cc-auth-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.cc-auth-header p {
  margin: 0.35rem 0 0;
  color: var(--text-light);
  font-size: 0.92rem;
}

.cc-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cc-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cc-auth-field span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
}

.cc-auth-role {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
}

.cc-auth-error {
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  font-size: 0.84rem;
  padding: 0.55rem 0.65rem;
  font-weight: 600;
}

.cc-auth-submit {
  width: 100%;
  justify-content: center;
}

.cc-auth-hint {
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  color: var(--text-light);
  font-size: 0.78rem;
}

.cc-auth-hint strong {
  color: var(--text);
  font-size: 0.8rem;
}

.cc-auth-hint ul {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
}

.cc-auth-hint li {
  margin: 0.15rem 0;
}

/* ========================================
   Sidebar Account Settings Modal
   ======================================== */

.cc-account-modal-overlay {
  z-index: var(--z-dialog);
}

.cc-account-modal {
  width: min(980px, 96vw);
  max-height: min(92vh, 900px);
}

.cc-account-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cc-account-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.02);
  padding: 0.85rem;
}

.cc-account-section-title {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
}

.cc-account-profile-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.cc-account-avatar-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cc-account-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.03));
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-account-avatar-actions {
  display: grid;
  gap: 0.4rem;
}

.cc-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.cc-account-grid .cc-account-field:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.cc-account-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.cc-account-field > span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
}

.cc-account-checks {
  display: grid;
  gap: 0.48rem;
  margin-top: 0.3rem;
}

.cc-account-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 600;
}

.cc-account-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.cc-account-meta {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.58rem 0.68rem;
  display: grid;
  gap: 0.15rem;
}

.cc-account-meta span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
}

.cc-account-meta strong {
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 800;
}

.cc-account-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

@media (max-width: 880px) {
  .cc-account-profile-row {
    grid-template-columns: 1fr;
  }
  .cc-account-grid,
  .cc-account-meta-grid {
    grid-template-columns: 1fr;
  }
}
