/* ==========================================
   Freebuff Finance - Tema Escuro Minimalista
   ========================================== */

/* Reset e base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-input: #0d1117;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-blue: #58a6ff;
  --accent-purple: #bc8cff;
  --accent-orange: #d29922;
  --accent-cyan: #39d2c0;
  --gradient-green: linear-gradient(135deg, #238636, #3fb950);
  --gradient-red: linear-gradient(135deg, #da3633, #f85149);
  --gradient-blue: linear-gradient(135deg, #1f6feb, #58a6ff);
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s ease;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Layout principal */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  position: relative;
}

/* Desktop: layout com sidebar */
@media (min-width: 1024px) {
  .app-container {
    flex-direction: row;
  }

  .app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 24px;
  }

  .main-content {
    margin-top: 60px;
    margin-left: 0;
    padding: 24px 32px;
    max-width: 100%;
  }

  .tab-bar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 80px;
    flex-direction: column;
    border-top: none;
    border-right: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 16px 0;
    gap: 4px;
  }

  .tab-item {
    flex: none;
    padding: 12px 8px;
    margin: 0 8px;
    border-radius: var(--radius-sm);
  }

  .tab-item.active {
    background: rgba(88, 166, 255, 0.1);
  }

  .tab-label {
    font-size: 10px;
  }

  .main-content {
    margin-left: 80px;
  }
}

/* ===== TELA DE LOGIN ===== */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 24px;
  background: var(--bg-primary);
}

.login-logo {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 40px;
}

.user-select {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  min-width: 120px;
}

.user-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.user-card.active {
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.1);
}

.user-avatar {
  font-size: 36px;
  margin-bottom: 8px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.pin-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.pin-digit {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  -webkit-text-security: disc;
}

.pin-digit:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.login-error {
  color: var(--accent-red);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}

.login-hint {
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== HEADER ===== */
.app-header {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
}

.header-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.header-balance-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-balance-value {
  font-size: 18px;
  font-weight: 700;
}

.header-balance-value.positive { color: var(--accent-green); }
.header-balance-value.negative { color: var(--accent-red); }

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.header-user:hover {
  background: var(--bg-card);
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  padding-bottom: 80px;
  scroll-behavior: smooth;
  max-width: 100%;
}

@media (min-width: 768px) {
  .main-content {
    padding: 24px 32px;
    padding-bottom: 24px;
  }
}

.page { display: none; }
.page.active { display: block; }

/* ===== TAB BAR ===== */
.tab-bar {
  display: flex;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 10px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 10px;
  gap: 2px;
  border: none;
  background: none;
}

.tab-item:hover { color: var(--text-secondary); }

.tab-item.active {
  color: var(--accent-blue);
}

.tab-icon {
  font-size: 20px;
  line-height: 1;
}

.tab-label {
  font-weight: 500;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Summary Cards */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

/* Charts Grid */
.charts-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .summary-card {
    padding: 20px;
  }

  .summary-card-value {
    font-size: 28px;
  }

  .charts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .chart-card {
    min-height: 350px;
  }
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.summary-card.full-width {
  grid-column: 1 / -1;
}

.summary-card-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.summary-card-value {
  font-size: 22px;
  font-weight: 700;
}

.summary-card-value.green { color: var(--accent-green); }
.summary-card-value.red { color: var(--accent-red); }
.summary-card-value.blue { color: var(--accent-blue); }

/* ===== FORMULÁRIOS ===== */
.form-group {
  margin-bottom: 14px;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Tipo toggle */
.type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.type-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.type-btn.active.income {
  border-color: var(--accent-green);
  background: rgba(63, 185, 80, 0.1);
  color: var(--accent-green);
}

.type-btn.active.expense {
  border-color: var(--accent-red);
  background: rgba(248, 81, 73, 0.1);
  color: var(--accent-red);
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  width: 100%;
}

.btn-primary {
  background: var(--gradient-blue);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-success {
  background: var(--gradient-green);
  color: white;
}

.btn-danger {
  background: var(--gradient-red);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
}

/* ===== LISTA DE TRANSAÇÕES ===== */
.transaction-list {
  list-style: none;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

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

.transaction-desc {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transaction-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.transaction-amount {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.transaction-amount.income { color: var(--accent-green); }
.transaction-amount.expense { color: var(--accent-red); }

.transaction-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: var(--transition);
}

.transaction-item:hover .transaction-actions {
  opacity: 1;
}

/* ===== FILTROS ===== */
.filters-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--text-secondary);
}

.filter-chip.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* ===== CATEGORY BUDGET BAR ===== */
.category-item {
  margin-bottom: 16px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.category-name {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-amounts {
  font-size: 12px;
  color: var(--text-muted);
}

.budget-bar {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.budget-bar-fill.ok { background: var(--accent-green); }
.budget-bar-fill.warning { background: var(--accent-orange); }
.budget-bar-fill.danger { background: var(--accent-red); }

/* ===== AI SECTION ===== */
.ai-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.ai-message.user {
  background: var(--accent-blue);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-message.assistant {
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-message.assistant p {
  margin-bottom: 8px;
}

.ai-message.assistant p:last-child {
  margin-bottom: 0;
}

.ai-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ai-input-row .form-input {
  flex: 1;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px 16px;
}

.ai-loading .dots span {
  animation: dotPulse 1.4s infinite;
  display: inline-block;
  font-size: 18px;
}

.ai-loading .dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading .dots span:nth-child(3) { animation-delay: 0.4s; }

.ai-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ai-quick-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.ai-quick-btn:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  background: rgba(188, 140, 255, 0.1);
}

/* ===== CONFIG PAGE ===== */
.config-section {
  margin-bottom: 24px;
}

.config-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.config-item:last-child {
  border-bottom: none;
}

.config-item-info {
  flex: 1;
}

.config-item-label {
  font-size: 14px;
  font-weight: 500;
}

.config-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.modal-actions .btn {
  flex: 1;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

.toast.success {
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}

.toast.error {
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.toast.info {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 380px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .user-select {
    flex-direction: column;
    align-items: center;
  }

  .pin-digit {
    width: 46px;
    height: 54px;
    font-size: 20px;
  }
}

@media (min-width: 1024px) {
  .login-screen {
    padding: 48px;
  }

  .login-logo {
    font-size: 64px;
  }

  .login-title {
    font-size: 32px;
  }

  .login-form {
    max-width: 400px;
  }

  .card {
    padding: 24px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 12px 16px;
    font-size: 16px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 16px;
  }

  .transaction-item {
    padding: 16px 0;
  }

  .transaction-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .transaction-desc {
    font-size: 15px;
  }

  .transaction-amount {
    font-size: 16px;
  }
}

/* ===== LOGIN FORM ===== */
.login-form {
  width: 100%;
  max-width: 320px;
}

.login-links {
  margin-top: 16px;
  text-align: center;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--text-primary);
}

/* ===== AVATAR SELECT ===== */
.avatar-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar-option {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-input);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option:hover {
  border-color: var(--text-secondary);
}

.avatar-option.selected {
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.15);
}

/* ===== MFA ===== */
.mfa-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.mfa-user-info .user-avatar {
  font-size: 24px;
}

.mfa-user-info .user-name {
  font-weight: 600;
  font-size: 14px;
}

.mfa-code-input {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  justify-content: center;
}

.mfa-digit {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.mfa-digit:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.mfa-qr-container {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px auto;
  width: fit-content;
}

.mfa-qr-image {
  display: block;
  width: 200px;
  height: 200px;
}

.mfa-manual-code {
  text-align: center;
  margin: 16px 0;
}

.mfa-secret-code {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  word-break: break-all;
}

.mfa-verify-section {
  margin-top: 24px;
}

/* ===== PROFILE ===== */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 16px;
}

.profile-avatar {
  font-size: 48px;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
}

.profile-username {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== ADMIN BADGE ===== */
.admin-badge {
  font-size: 10px;
  position: absolute;
  top: -2px;
  right: -4px;
}

.header-user {
  position: relative;
}

/* ===== ROLE BADGES ===== */
.role-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.role-superadmin {
  background: rgba(210, 153, 34, 0.2);
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
}

.role-admin {
  background: rgba(88, 166, 255, 0.2);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}

.role-user {
  background: rgba(139, 148, 158, 0.2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.you-badge {
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 600;
}

/* ===== USER LIST ===== */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.user-item-avatar {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 50%;
}

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

.user-item-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-select {
  padding: 4px 8px;
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ===== PROFILE ROLE ===== */
.profile-role {
  font-size: 13px;
  color: var(--accent-blue);
  margin-top: 4px;
}
