/* ==========================================================================
   Legendario Studio — Drawer Minha Conta (Apple & Web3 Elegance)
   ========================================================================== */

.account-drawer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  justify-content: flex-end;
  background: rgba(4, 5, 8, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}

.account-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.account-drawer__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: rgba(14, 16, 22, 0.94);
  border-left: 1px solid rgba(255, 120, 40, 0.2);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.75),
              inset 1px 0 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.account-drawer.is-open .account-drawer__panel {
  transform: translateX(0);
}

/* Header do Drawer */
.account-drawer__header {
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.account-drawer__title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-drawer__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.account-drawer__close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9AA0A6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-drawer__close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  transform: scale(1.05);
}

/* Hero / Avatar Banner */
.account-drawer__hero {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(180deg, rgba(255, 94, 26, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-drawer__avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #FF7A1A, #D93600);
  box-shadow: 0 8px 24px rgba(255, 94, 26, 0.35);
  flex-shrink: 0;
  cursor: pointer;
  group: relative;
}

.account-drawer__avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #12141A;
  display: block;
}

.account-drawer__avatar-overlay {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #FFFFFF;
}

.account-drawer__avatar-wrapper:hover .account-drawer__avatar-overlay {
  opacity: 1;
}

.account-drawer__user-meta {
  flex: 1;
  min-width: 0;
}

.account-drawer__user-name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-drawer__user-nickname {
  margin: 0 0 6px;
  font-size: 13px;
  color: #FF9A3C;
  font-family: 'JetBrains Mono', monospace;
}

.account-drawer__user-email {
  margin: 0;
  font-size: 12px;
  color: #8C93A0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabs Navigation */
.account-drawer__nav {
  display: flex;
  padding: 8px 16px;
  gap: 6px;
  background: rgba(10, 12, 16, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-drawer__tab-btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #8C93A0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.account-drawer__tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}

.account-drawer__tab-btn.is-active {
  background: rgba(255, 94, 26, 0.12);
  border-color: rgba(255, 94, 26, 0.35);
  color: #FF9A3C;
}

/* Content Area */
.account-drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.account-drawer__content::-webkit-scrollbar {
  width: 6px;
}
.account-drawer__content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.account-drawer__pane {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.account-drawer__pane.is-active {
  display: flex;
}

/* Section Box */
.account-card {
  background: rgba(20, 23, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-label {
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-input {
  height: 40px;
  padding: 0 12px;
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.account-input:focus {
  border-color: #FF5E1A;
  box-shadow: 0 0 0 2px rgba(255, 94, 26, 0.2);
}

.account-textarea {
  min-height: 90px;
  padding: 10px 12px;
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: all 0.2s ease;
}

.account-textarea:focus {
  border-color: #FF5E1A;
  box-shadow: 0 0 0 2px rgba(255, 94, 26, 0.2);
}

/* Buttons */
.account-btn-primary {
  height: 40px;
  background: linear-gradient(135deg, #FF7A1A 0%, #D93600 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.account-btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.account-btn-secondary {
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #E2E8F0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.account-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.account-btn-danger {
  height: 38px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  color: #F87171;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
}

/* Dispositivos */
.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(10, 12, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.device-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.device-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 94, 26, 0.12);
  color: #FF9A3C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.device-item__info {
  display: flex;
  flex-direction: column;
}

.device-item__name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

.device-item__time {
  font-size: 11px;
  color: #8C93A0;
}

.device-item__badge {
  font-size: 10px;
  font-weight: 700;
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

/* Alerta de Senha Provisória */
.account-alert-warn {
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  font-size: 12px;
  color: #FCD34D;
  line-height: 1.45;
}

/* Toast de Feedback */
.account-toast {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.account-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.account-toast--success {
  background: rgba(16, 185, 129, 0.9);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.account-toast--error {
  background: rgba(239, 68, 68, 0.9);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

/* Modal Esqueci Minha Senha */
.forgot-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(4, 5, 8, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.forgot-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.forgot-modal__card {
  width: 100%;
  max-width: 400px;
  margin: 20px;
  padding: 28px;
  background: rgba(18, 20, 26, 0.95);
  border: 1px solid rgba(255, 120, 40, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 2FA Selector & TOTP Setup */
.account-2fa-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-2fa-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(8, 10, 14, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-2fa-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
}

.account-2fa-option.is-selected {
  background: rgba(255, 94, 26, 0.1);
  border-color: rgba(255, 94, 26, 0.4);
}

.account-2fa-option input[type="radio"] {
  accent-color: #FF5E1A;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.account-2fa-option__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-2fa-option__title {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

.account-2fa-option__desc {
  font-size: 11px;
  color: #8C93A0;
}

.account-totp-box {
  margin-top: 10px;
  padding: 14px;
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid rgba(255, 120, 40, 0.25);
  border-radius: 12px;
}
