/* Container Principal */
.profile-main {
  min-height: calc(100vh - 100px);
  padding: 40px 0 60px;
}

.profile-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Cabeçalho do Perfil */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  background: rgba(16, 64, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 24px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #19675f;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.avatar img {
  width: 40px;
  filter: invert(1);
  opacity: 0.9;
}

.profile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.profile-email {
  margin: 0;
  color: var(--neutral);
  font-size: 1rem;
}

.profile-role {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 12px;
  background: rgba(143, 216, 183, 0.15);
  color: var(--highlight);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.profile-stats {
  display: flex;
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--neutral);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Sections */
.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-section {
  background: rgba(12, 49, 46, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
}

.btn-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(143, 216, 183, 0.3);
  color: var(--highlight);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: rgba(143, 216, 183, 0.1);
  border-color: var(--highlight);
}

.btn-edit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Info List */
.info-list {
  display: flex;
  flex-direction: column;
}

.info-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  color: var(--neutral);
  font-size: 0.95rem;
}

.info-value {
  color: #ffffff;
  font-weight: 500;
  font-size: 1rem;
}

/* Action List */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.action-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.action-item-icon {
  width: 60px;
  height: 60px;
  background: rgba(16, 64, 59, 0.8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--highlight);
}

.action-item-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.15rem;
}

.action-desc {
  color: var(--neutral);
  font-size: 0.95rem;
}

.chevron {
  width: 20px;
  height: 20px;
  color: var(--neutral);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Danger Zone */
.danger-zone .section-header {
  border-bottom-color: rgba(255, 87, 87, 0.15);
}

.danger-zone h2 {
  color: #ff8f8f;
}

.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.danger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.danger-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.danger-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.danger-text strong {
  color: #ffffff;
  font-weight: 600;
}

.danger-text span {
  color: var(--neutral);
  font-size: 0.85rem;
}

.btn-danger-outline {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(255, 143, 143, 0.3);
  color: #ff8f8f;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-danger-outline:hover {
  background: rgba(255, 87, 87, 0.1);
  border-color: #ff8f8f;
}

.btn-danger {
  padding: 10px 20px;
  background: #a52f2f;
  border: 1px solid #c93b3b;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #8c2626;
  border-color: #a52f2f;
}

/* Modais */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.profile-modal[hidden] {
  display: none !important;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.profile-modal-dialog {
  position: relative;
  z-index: 1001;
  width: 100%;
  max-width: 480px;
  background: #10403b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.profile-modal-dialog h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.4rem;
}

.section-tag {
  display: inline-block;
  color: #ff8f8f;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.profile-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--neutral);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.profile-modal-close:hover {
  color: #ffffff;
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.profile-edit-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-edit-field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neutral);
}

.profile-edit-field input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.profile-edit-field input:focus {
  outline: none;
  border-color: var(--highlight);
  background: rgba(0, 0, 0, 0.3);
}

.profile-edit-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.profile-action {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.profile-edit-actions button[type="submit"] {
  background: var(--highlight);
  color: #0c312e;
}

.profile-edit-actions button[type="submit"]:hover {
  background: #75c9a3;
}

.profile-action-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--neutral-strong);
  border-color: rgba(255, 255, 255, 0.1);
}

.profile-action-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.delete-account-description {
  color: var(--neutral);
  line-height: 1.5;
  margin-bottom: 16px;
}

.delete-account-list {
  padding-left: 20px;
  color: #ffffff;
  margin-bottom: 20px;
}

.delete-account-list li {
  margin-bottom: 8px;
}

.delete-account-warning {
  background: rgba(255, 87, 87, 0.1);
  border: 1px solid rgba(255, 87, 87, 0.2);
  padding: 12px;
  border-radius: 8px;
  color: #ffbaba;
  font-size: 0.9rem;
  line-height: 1.4;
}

.delete-account-button {
  background: #a52f2f;
  color: #ffffff;
}

.delete-account-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-account-button:not(:disabled):hover {
  background: #8c2626;
}

.profile-edit-feedback {
  font-size: 0.9rem;
  color: #ffbaba;
  margin: 0;
}

/* Responsivo */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .profile-stats {
    width: 100%;
    justify-content: flex-start;
    gap: 32px;
  }
  
  .info-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .danger-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .btn-danger-outline, .btn-danger {
    width: 100%;
    text-align: center;
  }
  
  .profile-edit-actions {
    flex-direction: column;
  }
}

