/* Team context selector */
.account-icon-wrap { margin-left: 16px; display: flex; align-items: center; gap: 10px; }
.team-context-select {
  font: inherit; font-size: 12px; font-weight: 600; color: #e7ecff;
  background: #1a2240; border: 1px solid rgba(110,168,255,.2);
  border-radius: 8px; padding: 6px 28px 6px 10px;
  cursor: pointer; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa4c7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: border-color .2s, background .15s;
  max-width: 150px; text-overflow: ellipsis;
}
.team-context-select:hover { border-color: #6ea8ff; }
.team-context-select:focus { border-color: #6ea8ff; box-shadow: 0 0 0 2px rgba(110,168,255,.15); }
.team-context-select option { background: #161d3d; color: #e7ecff; }

/* Move-to select (in-modal) */
.team-move-select {
  font: inherit; font-size: 12px; font-weight: 500; color: #e7ecff;
  background: #1a2240; border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px; padding: 5px 24px 5px 8px;
  cursor: pointer; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa4c7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
  transition: border-color .2s;
  max-width: 140px; text-overflow: ellipsis;
}
.team-move-select:hover, .team-move-select:focus { border-color: #6ea8ff; }
.team-move-select option { background: #161d3d; color: #e7ecff; }
.team-move-label { font-size: 12px; color: #9aa4c7; font-weight: 600; }
.team-move-wrap { display: flex; align-items: center; gap: 6px; }

/* Account icon button */
.account-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(110,168,255,.3);
  background: linear-gradient(135deg, rgba(110,168,255,.13), rgba(139,92,246,.13));
  color: #e7ecff; font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, transform .15s;
}
.account-icon-btn:hover { border-color: #6ea8ff; transform: scale(1.08); }

/* Overlay */
.account-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45); }
.account-overlay[hidden] { display: none; }

/* Panel */
.account-panel {
  position: absolute; top: 0; right: 0;
  width: 380px; max-width: 100%; height: 100%;
  background: #161d3d;
  border-left: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,.4);
  animation: acctSlideIn .2s ease-out;
}
@keyframes acctSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.account-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.account-panel-header h2 { font-size: 18px; margin: 0; color: #e7ecff; }
.account-panel-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: transparent; color: #9aa4c7;
  cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.account-panel-close:hover { background: #1d254a; color: #e7ecff; }

.account-panel-body { flex: 1; overflow-y: auto; padding: 20px; }

/* Profile top */
.account-profile-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.account-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #6ea8ff, #8b5cf6);
  color: white; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-email {
  font-size: 14px; color: #9aa4c7;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Sections */
.account-section { margin-bottom: 28px; }
.account-section-title {
  font-size: 12px; font-weight: 700; color: #9aa4c7;
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px;
}
.account-section-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.account-section-row .account-section-title { margin-bottom: 0; }
.account-section-actions { display: flex; gap: 6px; }

/* Fields */
.account-field { margin-bottom: 12px; }
.account-field label {
  display: block; font-size: 12px; font-weight: 600; color: #9aa4c7; margin-bottom: 4px;
}
.account-field input,
.account-field textarea {
  width: 100%; font: inherit; font-size: 14px; color: #e7ecff;
  background: #1d254a; border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 8px 12px; outline: none;
  transition: border-color .2s;
}
.account-field input:focus,
.account-field textarea:focus { border-color: #6ea8ff; }
.account-field input::placeholder,
.account-field textarea::placeholder { color: #5a6490; }

.profile-saved-msg { font-size: 13px; color: #4ade80; margin-left: 8px; }
.profile-saved-msg[hidden] { display: none; }

/* Teams forms */
.acct-teams-form {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
  padding: 10px 12px; background: #1d254a;
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
}
.acct-teams-form[hidden] { display: none; }
.acct-teams-form input {
  flex: 1; min-width: 120px; font: inherit; font-size: 14px; color: #e7ecff;
  background: #0b1020; border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px; padding: 6px 10px; outline: none;
}
.acct-teams-form input:focus { border-color: #6ea8ff; }
.acct-teams-form input::placeholder { color: #5a6490; }
.acct-teams-form-actions { display: flex; gap: 6px; }
.acct-teams-form .form-msg { width: 100%; font-size: 12px; color: #9aa4c7; }
.acct-teams-form .form-msg.error { color: #f87171; }

/* Team cards */
.acct-teams-list { display: flex; flex-direction: column; gap: 8px; }
.acct-teams-empty { font-size: 13px; color: #9aa4c7; text-align: center; padding: 16px 0; margin: 0; }
.acct-teams-empty[hidden] { display: none; }

.acct-team-card {
  padding: 12px 14px; background: #1d254a;
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  transition: border-color .2s;
}
.acct-team-card:hover { border-color: rgba(110,168,255,.2); }
.acct-team-card-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.acct-team-name { flex: 1; font-size: 14px; font-weight: 600; color: #e7ecff; }
.acct-team-code {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9aa4c7;
}
.acct-team-code code {
  font-size: 12px; background: #0b1020; padding: 2px 6px; border-radius: 4px; color: #6ea8ff;
}
.acct-copy-btn { font-size: 11px !important; padding: 3px 8px !important; }

/* Role badges */
.account-panel .role-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px;
  text-transform: capitalize;
}
.account-panel .role-owner { background: rgba(139,92,246,.12); color: #a78bfa; border: 1px solid rgba(139,92,246,.2); }
.account-panel .role-admin { background: rgba(110,168,255,.1); color: #6ea8ff; border: 1px solid rgba(110,168,255,.2); }
.account-panel .role-member { background: rgba(154,164,199,.1); color: #9aa4c7; border: 1px solid rgba(154,164,199,.15); }

/* Footer */
.account-panel-footer {
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08);
}

/* Panel buttons */
.account-panel .btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .1s, background .2s, border-color .2s, color .2s;
}
.account-panel .btn:active { transform: translateY(1px); }
.account-panel .btn-primary { background: linear-gradient(135deg, #6ea8ff, #8b5cf6); color: white; }
.account-panel .btn-primary:hover { filter: brightness(1.08); }
.account-panel .btn-ghost { background: transparent; border-color: rgba(255,255,255,.08); color: #e7ecff; }
.account-panel .btn-ghost:hover { border-color: #6ea8ff; color: #6ea8ff; }
.account-panel .btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

@media (max-width: 480px) {
  .account-panel { width: 100%; }
}
